Infinite Generating Using Device Buffer


Appearance

 

Overview

In device buffer mode, this is a sample that generates with a stop condition other than Stop conversion by the specified times.

This sample program requires selection of a device with an analog output function.

Sample specification

※This is the initial value of the sample program.
Please note that it is different from the initial value of the driver.

Program name

AoGeneratingInfiniteDev

Conversion data transfer mode

0 (Device buffer mode)

Memory type

0 (FIFO)

Event

Event that device operation end, Event that the specified number of data are output, Event that generating clock period error, Event that DA conversion error

Event that the specified number of data are output

500

 

Step to Use

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.

 

5. Generating condition setting

 ・When you press the [Condition Set...] button, the "Generating Condition" dialog box is displayed.

  

 

 ・Select the desired start condition in the [Start Condition:] setting.

 ・Select the desired [Clock Type:] in the Clock Condition setting.

  If the Internal clock is selected, enter the Generating Clock Period in [μsec] units. The minimum value of the generating clock period that can be specified depends on the device used.

  If the External clock is selected, data will be output at the cycle of the external clock connected to the device.

  In addition, it is necessary to decide the clock period by considering the value of the specified number of channels. For details, please refer to the item of [Glossary] generating clock period error.

 ・Select the desired stopping condition in the [Stop Condition:] setting.

 ・If you press the [OK] button, all the settings in the [Generating Condition] dialog box will be reflected and you will return to the main window.

  When you press the [Cancel] button, all settings will be discarded and you will return to the main window.

 

6. 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:

  

 

 

7. Event that the specified number of data are output set

 ・Specify the desired number of generatings in [Generating Times:] and press the [AioSetAoEventSamplingTimes] button.

 

8. Generating Operation

 ・When you press the [Generating Start] button, data output from the device will start.

  An event will occur when the data for [Generating Times:] in the Event that the specified number of data are output set are output from the device.

  Each time an event occurs, the displayed values for [Total Generating Count:] and [Setting Generating Count:] are updated.

 ・When you Press the [AioGetAoSamplingCount] button, the displayed value of [Total Generating Count:] is updated.

 ・When you press the [AioGetAoSamplingTims] button, the displayed value of [Setting 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.

 

9. 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.

 

10. Processing to terminate the program

 ・Press the [Close] button in the window to terminate the program.