MX Foundation 4
MXF_ASYNCEH_9BIT_DATAREC Struct Reference

ASYNC Enhanced 9-bit Transmit / Receive Record Structure. More...

#include <mxf_class_async_enhanced.h>

Data Fields

uint64 timeTag
 
uint32 control
 
uint32 dataSize
 
uint32 repeatCount
 
uint32 reserved
 
uint16 data [128]
 

Detailed Description

This record structure is needed when sending (transmission) and receiving (acquisition) ASYNC 9-bit message with IPM-ASYNC module.

Examples:
ipm_async_rs485_9bit.c.

Field Documentation

MXF_ASYNCEH_9BIT_DATAREC::timeTag

Acquisition mode: Specifies the time when the data record has been received by the device. It is an absolute time expressed on the timebase set for the device. The time tag may also be disabled by the KMXF_ASYNCEH_RX_TIMETAG_ENABLE attribute.

Transmission Mode: For aperiodic transmit operation, the time tag allows the application to specify the time at which the data is to be transmitted. Depending on the usage the time tag can be optional.

Examples:
ipm_async_rs485_9bit.c.
MXF_ASYNCEH_9BIT_DATAREC::control

Acquisition mode: For receive operation, the control field defines the condition under which the related record data was received.

The control bits are defined as follows:

Bit constant Description
MXF_ASYNCEH_RX_REC_CTRL_STOPBIT_ERROR Stop bit error detected

Receive control bit - string mode only:

Bit constant Description
MXF_ASYNCEH_RX_REC_CTRL_EOS End of string detected
MXF_ASYNCEH_RX_REC_CTRL_SOS Start of string detected



Transmission Mode: For transmission, the control field allows the user to inject transmit error or to generate a discrete pulse on transmit.

A control of zero instructs the transmit process to send the data using the current transmitter settings.

The control bits are defined as follows:

Bit constant Description
MXF_ASYNCEH_TX_REC_CTRL_DISCRETE_OUTPUT_TRIG Generate a discrete trigger pulse for the duration of the ASYNC transmit output. On IPM-ASYNC, the pulse will occur on the associated discrete channel.
MXF_ASYNCEH_TX_REC_CTRL_LONG_WORD_SIZE Transmit with a bit more.
The inserted bit has a value of 0 and is transmitted after the 8th bit, before the 9th bit.
MXF_ASYNCEH_TX_REC_CTRL_SHORT_WORD_SIZE Transmit with a bit less.
MXF_ASYNCEH_TX_REC_CTRL_WORD_ERROR Generate error on a specific word only.
The word index is set in the 8-bit LSB. For example, to send an error on only the third 9-byte data, set the 8-bit LSB to 2.
Examples:
ipm_async_rs485_9bit.c.
MXF_ASYNCEH_9BIT_DATAREC::dataSize

Acquisition mode: Number of bytes received in data array.

Transmission Mode: Number of bytes to transmit from data array. Must be an even number of bytes.

Examples:
ipm_async_rs485_9bit.c.
MXF_ASYNCEH_9BIT_DATAREC::repeatCount

Acquisition mode: Not used.

Transmission Mode: Number of times to repeat the transmission of the record. Must be set to one.

Examples:
ipm_async_rs485_9bit.c.
MXF_ASYNCEH_9BIT_DATAREC::reserved

Reserved for future use. Must be set to 0 for transmit operation.

Examples:
ipm_async_rs485_9bit.c.
MXF_ASYNCEH_9BIT_DATAREC::data

Acquisition mode: Data received.

Transmission Mode: Data to transmit. Only the first 9 bits are allowed.

Examples:
ipm_async_rs485_9bit.c.
Updated 10/23/2023