If the user buffer mode is enabled, you can specify the data attached to AD conversion data with the AioSetAiAttachedData function.
Attached data is transferred to user memory together with AD conversion
data.
Attached data uses 4 bytes (1 packet) for all types.
Therefore, please note that the number of packets required for one sampling
changes depending on the specified status of attached data.
You can get the number of packets required per sampling with the AioGetAiSamplingDataSize
function.
Attached data follows AD conversion data.
They are transferred in the following order.
1. Attached information of analog input
2. Data of analog output
3. Data of digital input and output
4. Data of counter channel 0
5. Data of counter channel 1
Regardless of the type of attached data you use, data with the lowest number is transferred first.
1. Attached information of analog input
Status of AD conversion operation is attached. This data (4 bytes) has
meaning in bits.
Low 2 bytes
Attached Data |
Bit 15 |
Bit 14 |
Bit 13 |
Bit 12 |
Bit 11 |
Bit 10 |
Bit 9 |
Bit 8 |
Bit 7 |
Bit 6 |
Bit 5 |
Bit 4 |
Bit 3 |
Bit 2 |
Bit 1 |
Bit 0 |
Signal Name |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
Repeat |
Delay |
Normal |
High 2 bytes
Attached Data |
Bit 31 |
Bit 30 |
Bit 29 |
Bit 28 |
Bit 27 |
Bit 26 |
Bit 25 |
Bit 24 |
Bit 23 |
Bit 22 |
Bit 21 |
Bit 20 |
Bit 19 |
Bit 18 |
Bit 17 |
Bit 16 |
Signal Name |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
Error |
※Supplement of signal name
Normal : If the current sampling is
normal sampling, this bit is ON. If it is delay sampling,
this bit is OFF.
Delay : If the current
sampling is delay sampling, this bit is ON. If it is normal
sampling, this bit is OFF.
Repeat : If the current repeat times
is odd number, this bit is ON. If it is even number, this
bit is OFF.
Error : If the sampling
clock period error occurs, this bit is ON. Otherwise this
bit is OFF.
- : Not used
2. Data of analog output
Attaches the analog output data, which are outputted in binary value when
AD conversion is performed. This data (4 bytes) contains analog output
data for 2 channels.
Low 2 bytes
Attached Data |
Bit 15 |
Bit 14 |
Bit 13 |
Bit 12 |
Bit 11 |
Bit 10 |
Bit 9 |
Bit 8 |
Bit 7 |
Bit 6 |
Bit 5 |
Bit 4 |
Bit 3 |
Bit 2 |
Bit 1 |
Bit 0 |
Signal Name |
Analog output data (binary) for channel 0 |
High 2 bytes
Attached Data |
Bit 31 |
Bit 30 |
Bit 29 |
Bit 28 |
Bit 27 |
Bit 26 |
Bit 25 |
Bit 24 |
Bit 23 |
Bit 22 |
Bit 21 |
Bit 20 |
Bit 19 |
Bit 18 |
Bit 17 |
Bit 16 |
Signal Name |
Analog output data (binary) for channel 1 |
3. Data of digital input and output
Attaches the digital input/output data, which are inputted or outputted
when AD conversion is performed. This data (4 bytes) has meaning in bits.
Signal allocation of each bit of digital input/output data (4 bytes) is
as follows.
Signal allocation differs depending on the device used.
Specifications based on devices
AIO-163202G-PE, AIO-163202UG-PE, AIO-123202G-PE, AIO-123202UG-PE
Low 2 bytes
Attached Data |
Bit 15 |
Bit 14 |
Bit 13 |
Bit 12 |
Bit 11 |
Bit 10 |
Bit 9 |
Bit 8 |
Bit 7 |
Bit 6 |
Bit 5 |
Bit 4 |
Bit 3 |
Bit 2 |
Bit 1 |
Bit 0 |
Signal Name |
DIO 15 |
DIO 14 |
DIO 13 |
DIO 12 |
DIO 11 |
DIO 10 |
DIO 09 |
DIO 08 |
DIO 07 |
DIO 06 |
DIO 05 |
DIO 04 |
DIO 03 |
DIO 02 |
DIO 01 |
DIO 00 |
High 2 bytes
Attached Data |
Bit 31 |
Bit 30 |
Bit 29 |
Bit 28 |
Bit 27 |
Bit 26 |
Bit 25 |
Bit 24 |
Bit 23 |
Bit 22 |
Bit 21 |
Bit 20 |
Bit 19 |
Bit 18 |
Bit 17 |
Bit 16 |
Signal Name |
- |
- |
- |
- |
- |
- |
- |
E-series Settings |
- |
- |
- |
- |
- |
- |
Dir 01 |
Dir 00 |
※Supplement of signal name
DIO 00 to DIO 15 : Pin numbers for digital input/output
on the device. It is the status of digital input/output. If the Bit is
specified with digital output, the value is the echo back data.
Dir 00 : It is the input/output direction status of digital
input/output port 0 (DIO 00 to 07). 0:Input 1:Output
Dir 01 : It is the input/output direction status of digital
input/output port 1 (DIO 08 to 15). 0:Input 1:Output
E-series Settings : It is the status of the E-series
settings jumper on the device. 0:Do not use as E-series compatible
1:Use as E-series compatible
- : Not used
AI-1664UG-PE
Low 2 bytes
Attached Data |
Bit 15 |
Bit 14 |
Bit 13 |
Bit 12 |
Bit 11 |
Bit 10 |
Bit 9 |
Bit 8 |
Bit 7 |
Bit 6 |
Bit 5 |
Bit 4 |
Bit 3 |
Bit 2 |
Bit 1 |
Bit 0 |
Signal Name |
- |
- |
- |
- |
- |
DO 02 |
DO 02 |
DO 01 |
DO 00 |
- |
- |
- |
DI 03 |
DI 02 |
DI 01 |
DI 00 |
High 2 bytes
Attached Data |
Bit 31 |
Bit 30 |
Bit 29 |
Bit 28 |
Bit 27 |
Bit 26 |
Bit 25 |
Bit 24 |
Bit 23 |
Bit 22 |
Bit 21 |
Bit 20 |
Bit 19 |
Bit 18 |
Bit 17 |
Bit 16 |
Signal Name |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
※Supplement of signal name
DI 00 to DI 03 : Pin numbers for digital input
on the device. It is the status of digital input.
DO 00 to DO 03 : Pin numbers for digital output
on the device. It is the echo back data of digital output.
- : Not used
AIO-163202F-PE, ADA16-32/2(PCI)F
Low 2 bytes
Attached Data |
Bit 15 |
Bit 14 |
Bit 13 |
Bit 12 |
Bit 11 |
Bit 10 |
Bit 9 |
Bit 8 |
Bit 7 |
Bit 6 |
Bit 5 |
Bit 4 |
Bit 3 |
Bit 2 |
Bit 1 |
Bit 0 |
Signal Name |
- |
- |
- |
- |
- |
- |
- |
- |
DI 07 |
DI 06 |
DI 05 |
DI 04 |
DI 03 |
DI 02 |
DI 01 |
DI 00 |
High 2 bytes
Attached Data |
Bit 31 |
Bit 30 |
Bit 29 |
Bit 28 |
Bit 27 |
Bit 26 |
Bit 25 |
Bit 24 |
Bit 23 |
Bit 22 |
Bit 21 |
Bit 20 |
Bit 19 |
Bit 18 |
Bit 17 |
Bit 16 |
Signal Name |
- |
- |
- |
- |
- |
- |
- |
- |
DO 07 |
DO 06 |
DO 05 |
DO 04 |
DO 03 |
DO 02 |
DO 01 |
DO 00 |
※Supplement of signal name
DI 00 to DI 07 : Pin numbers for digital input
on the device. It is the status of digital input.
DO 00 to DI 07 : Pin numbers for digital output on the
device. It is the echo back data of digital output.
- : Not used
4. Data of counter channel 0
Attaches the count value of counter channel 0 when AD conversion is performed.
This data (4 bytes) is the count value of channel 0.
Low 2 bytes
Attached Data |
Bit 15 |
Bit 14 |
Bit 13 |
Bit 12 |
Bit 11 |
Bit 10 |
Bit 9 |
Bit 8 |
Bit 7 |
Bit 6 |
Bit 5 |
Bit 4 |
Bit 3 |
Bit 2 |
Bit 1 |
Bit 0 |
Signal Name |
Count value of channel 0 (Low 2 bytes) |
High 2 bytes
Attached Data |
Bit 31 |
Bit 30 |
Bit 29 |
Bit 28 |
Bit 27 |
Bit 26 |
Bit 25 |
Bit 24 |
Bit 23 |
Bit 22 |
Bit 21 |
Bit 20 |
Bit 19 |
Bit 18 |
Bit 17 |
Bit 16 |
Signal Name |
Count value of channel 0 (High 2 bytes ) |
5. Data of counter channel 1
Attaches the count value of counter channel 1 when AD conversion is performed.
This data (4 bytes) is the count value of channel 1.
Low 2 bytes
Attached Data |
Bit 15 |
Bit 14 |
Bit 13 |
Bit 12 |
Bit 11 |
Bit 10 |
Bit 9 |
Bit 8 |
Bit 7 |
Bit 6 |
Bit 5 |
Bit 4 |
Bit 3 |
Bit 2 |
Bit 1 |
Bit 0 |
Signal Name |
Count value of channel 1 (Low 2 bytes) |
High 2 bytes
Attached Data |
Bit 31 |
Bit 30 |
Bit 29 |
Bit 28 |
Bit 27 |
Bit 26 |
Bit 25 |
Bit 24 |
Bit 23 |
Bit 22 |
Bit 21 |
Bit 20 |
Bit 19 |
Bit 18 |
Bit 17 |
Bit 16 |
Signal Name |
Count value of channel 1 (High 2 bytes) |