Set Attached Data


For F-series devices and Z-series devices that both use bus master transfer, the available conditions are different.
This section explains the setting of attached data for F-series device (excluding AIO-163202FX-USB).

Please refer "Data attached to AD conversion data" topic to know the status on the other devices.



About F-series Device (excluding AIO-163202FX-USB)

Summary of Attached Data

When using bus master transfer, the following attached data can be transferred at the same time in addition to the conversion data as a hardware additional function.
 

Attached Data

Attached information of analog input

Data of analog output

Data of digital input and output

Counter Data

Attached information of analog input

- Information about whether current sampling is normal sampling or delayed sampling
- Status of the current repeat operation
- Whether sampling clock period error has occurred

State of analog output

At the timing of AD conversion, it is possible to attach the current analog output data.

State of digital input and output

At the timing of AD conversion, it is possible to attach the current digital output data.
And, at the timing of AD conversion, digital input can be performed and input data can be stored.

State of counter

At the timing of AD conversion, it is possible to attach the current counter value in operation.

How to Transfer to User Buffer

When adding attached data, data is stored in the user buffer as follows.

The attached data is added after the AD conversion data. Regardless of the type of attached data, one packet (4 bytes) area is used.

Set Attached Data

Set attached data by function AioSetAiAttachedData.

Ret = AioSetAiAttachedData ( Id , AttachedData )

In AttachedData, specify the type of data to be attached by macro or numeric value from the following range.
AttachedData has the following meaning in bit unit and can be specified by combining them.

Attached Data

Macro

Value

Attached information of analog input

AIAT_AI

00000001H

Data of analog output

AIAT_AO0

00000100H

Data of digital input and output

AIAT_DIO1

00010000H

Data of counter channel 0

AIAT_CNT0

00100000H

Data of counter channel 1

AIAT_CNT1

00200000H