This is a sample that performs generating for the specified number of channels/generating times in device buffer mode.
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 |
AoGeneratingOnceDev |
Conversion data transfer mode |
0 (Device buffer mode) |
Start condition |
0 (Software) |
Clock type |
0 (Internal clock) |
Stop condition |
0 (Stop conversion by the specified times) |
Memory type |
0 (FIFO) |
Event |
Event that device operation end, Event that generating clock period error, Event that DA conversion error |
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.
3. Analog Output Set
・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.
4. Generating Set
・Specify the desired number of channels in the [Number of Channels:] and press the [AioSetAoChannels] button.
The starting channel No. is fixed at 0ch. For example, if 3 channels are specified, data will be output from 0ch to 2ch.
・In the [Generating Clock Period:] setting, specify the desired generating clock period in [μsec] units and press the [AioSetAoSamplingClock] button.
The minimum value of the generating clock period that can be specified depends on the device used.
You should also consider the number of channels value you specified.
For details, please refer to the item of [Glossary] generating clock period error.
・When you press the [Basic settings] button, the conditions in the "Sample specification" table above are set to the device.
5. Output Data Set
・Specify the desired number of generatings in the [Generating Times:] setting and press the [Generate output data...] button to generate a file for generation.
Storage folder for generated files: (current folder) *Same folder as the EXE file
Generated file name: GeneratingData.csv
Generated data: A sine wave is generated according to the specified range. One cycle is the specified Generating Times.
For multiple channels, a sine wave with a phase delay of 1/4 period (90 degrees) is generated for each channel.
Generated file example:
・After generating the output data, press the [AioSetAoSamplingDataEx] button to notify the output file to the device driver.
6. Generating Operation
・When you press the [Generating Start] button, data output from the device will start.
・When you press the [AioGetAoSamplingCount] button, the displayed value of [Generating Count:] is updated.
・When you press the [AioGetAoStatus] button, the displayed value of [Status:] will be updated.
・Press the [Generating Stop] button to stop data output from the device.
・When data output is completed up to the specified Generating Times, or when generating stops, the Event that device operation end occurs.
When an event occurs, the displayed value of [Generating Count:] is updated.
7. 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.
8. Processing to terminate the program
・Press the [Close] button in the window to terminate the program.