This is a sample for simple output of single channel and multiple channels.
The output data of multiple channel output from 0 to 3ch can be changed on the dialog.
If 5 or more channels are specified, the output of 4ch or later will be fixed at 0V.
This sample program requires selection of a device with an analog output function.
Sample specification |
※This is the initial value of the sample program. |
Program name |
AoSimple |
Range |
0 (±10V) |
Specified channel: Channel No. |
0 |
Multiple channels: Number of channels |
1 |
1. Specify the desired program name, run the program, and a window that looks like the one above will appear.
Appearance may vary depending on software version.
2. Initialize
・Specify the device name set in the device manager as the device name, and click the [AioInit] button.
Notifies the device driver to start using the specified device.
・Select the desired output range in [Range:] and press the [AioSetAoRangeAll] button.
Depending on the device used, the setting may not be effective unless the output range is changed with the jumper pin on the device.
3. Channel simple output processing
・Each time you press the [AioSingleAoEx] or [AioMultiAoEx] button, the specified output value will be output from the device.
・When outputting only one specified channel,
Specify the desired channel No. in [ChannelNo:] in the Specify Channel Simple Output frame.
Specify the desired output value for [Output Data:] in the Specify Channel Simple Output frame.
When you press the [AioSingleAoEx] button, the specified value is output from the specified channel No. of the target device.
・When outputting multiple channels,
Specify the desired number of channels in [Number of Channels:] in the Multi Channel Simple Output frame.
Specify the desired output value for [Output Data:] in the Multi Channel Simple Output frame.
When you press the [AioMultiAoEx] button, the specified values are output from the specified channel No.s of the target device.
The starting channel No. is fixed at 0ch. For example, if 3 channels are specified, data will be output from 0ch to 2ch.
4. Exit
・Press the [AioExit] button to notify the device driver that the use of the current device is complete.
Data can be output from different devices (e.g. AIO001, etc.) without terminating the program.
To output data again, specify a new device name and press the [AioInit] button to initialize the device.
5. Processing to terminate the program
・Press the [Close] button in the window to terminate the program.