MX Foundation 4
|
Discrete Transmit / Receive (Acquisition) Record. More...
#include <mxf_class_discrete.h>
Data Fields | |
uint64 | timeTag |
uint32 | control |
uint32 | repeatCount |
uint32 | highDuration |
uint32 | lowDuration |
uint32 | data |
uint32 | edge |
This record structure is used to send (transmission) and receive (acquisition) discrete data.
MXF_DISCRETE_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 with the KMXF_DISCRETE_MODULE_RX_TIMETAG_ENABLE attribute.
Transmission Mode: For transmit operation, the time tag allows the application to specify the time when the state is to be set. Depending on the usage the time tag can be optional.
MXF_DISCRETE_DATAREC::control |
Not used in reception.
Used in transmission to control start and stop of pulse schedule.
Bit Constant | Meaning |
---|---|
MXF_DISCRETE_TX_REC_CTRL_WAIT_EOP | Waits next end of pulse before applying new value. |
MXF_DISCRETE_TX_REC_CTRL_WAIT_EOR | Waits next end of repeat count before applying new value. |
MXF_DISCRETE_TX_REC_CTRL_PULSE_START | Starts a pulse schedule. Uses highDuration and lowDuration fields. The data field can be used to specify the initial value of the pulse. The pulse schedule is only available on MXF_MODULE_DIOFIFO_EH module. |
MXF_DISCRETE_DATAREC::repeatCount |
In transmission indicates the number of time the pulse schedule is repeated. Must be set to 1 if pulse schedule mode is not used. Repeat count of 0 in pulse schedule mode means the pulse is repeated forever.
Not used in reception.
MXF_DISCRETE_DATAREC::highDuration |
High Duration of the pulse (Ticks count of 10 nsec, range: 5 - 2^32 [50 nsec to 42,94967296 sec]). Minimum combined duration of low and high duration is 100 nsec. Used only with pulse schedule mode, must be set to 0 when pulse schedule mode is not used.
Not used in reception.
MXF_DISCRETE_DATAREC::lowDuration |
Low Duration of the pulse (Ticks count of 10 nsec, range: 5 - 2^32 [50 nsec to 42,94967296 sec]). Minimum combined duration of low and high duration is 100 nsec. Used only with pulse schedule mode , must be set to 0 when pulse schedule mode is not used.
Not used in reception.
MXF_DISCRETE_DATAREC::data |
Discrete data. Bit set to one in this field means that the corresponding discrete line is ON, otherwise the corresponding discrete line is OFF.
MXF_DISCRETE_DATAREC::edge |
Acquisition mode: Discrete edge capture word. Bit set to one in this field means that the corresponding discrete line changed state. The first record after the activation of the receive operation will have this field set to 0 to give the initial state of the discrete lines.
Transmission Mode: Mask to specify which bit to apply the data field. Bit set to one in this field will have its value set to the corresponding bit in data. Bit set to zero will keep its current value. Therefore, if you want set the state of the port #0 and #1, the mask must be set to 0x000000003.