Simple Analog Input


Appearance

 

Overview

This is a sample for simple input of single channel and multiple channels.

This sample program requires selecting a device with an analog input 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

AiSimple

Range

0 (±10V)

Input method

0 (Single-end input)

Specified channel: Channel No.

0

Multiple channels: Number of channels

1

 

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.

 ・Select the desired input range in [Range:] and press the [AioSetAiRangeAll] button.

  Depending on the device used, the setting may not be effective unless the input range is changed with the jumper pin on the device.

 ・Select the desired input method in [Input Method:] and press the [AioSetAiInputMethod] button.

 

3. Channel simple input processing

 ・Every time you press the [AioSingleAiEx] or [AioMultiAiEx] button, the input data will be updated.

 ・When inputting only one specified channel,

  Enter the desired channel No. in [ChannelNo:] in the Specify Channel Simple Input frame, and press the [AioSingleAiEx] button.

  The input value from the device is displayed in the [Input Data:] in the Specify Channel Simple Input frame.

 ・When inputting multiple channels,

  Enter the desired number of channels in [Number of Channels:] in the Multi Channel Simple Input frame, and press the [AioMultiAiEx] button.

  The input value from the device is displayed in the [Input Data:] in the Multi Channel Simple Input frame.

  The starting channel number is fixed at 0ch. For example, if 3 channels are specified, data will be acquired 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 acquired from different devices (e.g. AIO001, etc.) without terminating the program.

  To perform data acquisition processing again, specify a new device name and press the [AioInit] button to perform device initialization processing.

 

5. Processing to terminate the program

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