Simple Digital Output

Output Bit

Each point of digital output is called an output bit.
If a device with 4 output points, the bits are defined as bit 0 to bit 3.

 

Output in Bit Unit

Specify a output bit and specify the output data is 1 or 0, the state of that bit is changed to ON or OFF.

Use function AioOutputDoBit to digital output in bit unit.

Ret = AioOutputDoBit ( Id , DoBit , DoData )

In DoBit, specify the bit number for digital output.
If a device with 4 input points, the bit number that can be specified is 0, 1, 2, 3.

In DoData, specify the data for digital output.
Set 1 to turn ON the specified bit. Set 0 to turn OFF the specified bit.

Input in Byte Unit

Each output bit can be collectively output in byte unit.
If a device with 4 input points, each output bit is arranged as follows, and the byte data that can be output is a value from 0 to 15.

Example) If output Bit0 : ON, Bit1 : OFF, Bit2 : ON, Bit 3 : OFF
             Byte data = 5 (5H)

Use function AioOutputDoByte to digital output in byte unit.

Ret = AioOutputDoByte ( Id , DoPort , DoData )

In DoPort, specify the port number for digital output.
If a device with 4 output points, the port number that can be specified is 0 only.

In DoData, specify the data to digital output.
The output data for each bit is specified as a byte data.