N Series for USB
Multifunction DAQ Unit
(16ch AI, 2ch AO, 16ch DIO)
AIO-121602LN-USB
Multifunction DAQ Unit
(8ch AI, 2ch AO, 16ch DIO)
AIO-120802LN-USB
User’s Gui d e
CONTEC CO.,LTD.
Check Your Packa g e
Thank you for purchasing the CONTEC product.
The product consists of the items listed below.
Check, with the following list, that your package is complete. If you discover damaged or missing items,
contact your retailer.
Product C onfiguration List
- Unit (One of the following) …1
[AIO-121602LN-USB , AIO-120802LN-USB]
- USB cable (1.8m) …1
- USB cable attachment on the main unit’s side (For Mini B connector side) …1
- Serial number label …1
*1 The CD-ROM contains the driver software and User’s Guide (this guide)
AIO-121602LN-USB, AIO-120802LN-USB
i
Copyright
Copyright 2013 CONTEC CO., LTD. ALL RIGHTS RESERVED.
No part of this document may be copied or reproduced in any form by any means without prior written
consent of CONTEC CO., LTD.
CONTEC CO., LTD. makes no commitment to update or keep current the information contained in this
document. The information in this document is subject to change without notice.
All relevant issues have been considered in the preparation of this document. Should you notice an
omission or any questionable item in this document, please feel free to notify CONTEC CO., LTD.
Regardless of the foregoing statement, CONTEC assumes no responsibility for any errors that may
appear in this document or for results obtained by the user as a result of using this product.
Trademarks
MS, Microsoft, Windows and Windows NT are trademarks of Microsoft Corporation. Other brand and
product names are trademarks of their respective holder.
AIO-121602LN-USB, AIO-120802LN-USB
ii
Table of Contents
Check Your Package ............................................................................................................................ i
Copyright ............................................................................................................................................ ii
Trademarks .......................................................................................................................................... ii
Table of Contents ............................................................................................................................... iii
1. BEFORE USING THE PRODUCT 1
About the Unit ..................................................................................................................................... 1
Features ........................................................................................................................................ 1
Support Software .......................................................................................................................... 3
Control Signal Timings ..................................................................................................................... 93
Control Signal Timings for Analog Input .................................................................................. 93
Control Signal Timings for Analog Output ................................................................................ 94
Control Signal Timings for Counter ........................................................................................... 95
About Calibration .............................................................................................................................. 96
AIO-121602LN-USB, AIO-120802LN-USB
v
AIO-121602LN-USB, AIO-120802LN-USB
vi
1. Before Using the Product
1. Before Using the Produ ct
This chapter provides information you should know before using the product.
About the Unit
This product is a USB2.0-compliant analog I/O unit that extends the analog I/O function of USB port of
PCs.
Compact design not restricting installation location (188.0(W) x 78.0(D) × 30.5(H)) makes it easy to
install the product within the panel or device using DIN rail mounting jigs, or on the floor or wall.
Windows driver library is supplied. Possible to be used as a data recording device for LabVIEW, with
dedicated libraries.
Features
Multi-function
Analog I/O can be implemented in a compact system. The series consi st s of two different models from
which you can select the best model to suit your application.
The < AIO-121602LN-USB > contains the analog input (12bit, 16ch), analog output (12bit, 2ch).
The < AIO-120802LN-USB > contains the analog input (12bit, 8ch), analog output (12bit, 2ch).
All two models include bi-directional digital inputs / outputs (16points, TTL level) and a counter (32bit
1ch, TTL level). You can select the input/output by the application software in eight signals units.
Analog I/O can be synchronized with an internal timer or external clock.
Analog I/O can both be performed at fixed time intervals and synchronized with an external signal.
- Digital filter function to prevent wrong recognition of external signal chattering is provided.
This product has analog input / output control signal, digital input signal and digital filter function to
prevent it from chattering in counter input signal. (Excluding external clock input signal, counter gate
signal)
Buffer memory available for background processing independent of software
The boards include buffer memory (1K Word each for analog input and output) which can be used in
either FIFO or ring forma t . This allows analog I/O to be performed independent ly of the operating state
of the PC or software.
Software-based calibration function
Calibration of analog input/output can be all performed by software. Apart from the adjustment
information prepared before shipment, additional adjustment information can be stored according to the
use environment .
- Compact design not restricting installation location (188.0(W) x 78.0(D) x 30.5(H))
Compact design of 188.0(W) × 78.0(D) × 30.5(H) does not require special installation location.
- Compatible to USB1.1/USB2.0
Compatible to USB1.1/USB2.0 and capable to achieve high speed transfer at HighSpeed (480 Mbps).
AIO-121602LN-USB, AIO-120802LN-USB
1
1. Before Using the Product
- Diverse installations such as screw fastening, magnet, DIN rail are possible
Installation on the floor / wall /ceiling is possible by screw fastening, magnet, rubber feet, etc.
In addition, DIN rail mounting mechanism is equipped as standard with the product, making it easy to
install the product within the panel or the device.
- Easy-to-wire terminal connector adopted
Adoption of terminal connector (with screws) enables to achieve easy wiring.
- Windows compatible driver libraries are attached.
Using the attached analog I/O driver API-USBP(WDM) mak es it possible to create applications of
Windows. In addition, a diagnostic program by which the operations of hardware can be checked is
provided.
Supported to the data logger software [C-LOGGER] (Analog input only)
Supporting the data logger software [C-LOGGER] that enables the graph display of recorded signal
data, file saving, and dynamic transfer to the spreadsheet software program “Excel”.
Plug-ins for the dedicated libraries, the board also supports MATLAB and LabVIEW.
We offer a dedicated library [ML-DAQ], which allows you to use this product on MATLAB by The
MathWorks as well as another dedicated library [VI-DAQ], whic h allows you to use the product on
LabVIEW.
These dedicated libraries are available, free of charge (downloadable), on our web site.
AIO-121602LN-USB, AIO-120802LN-USB
2
1. Before Using the Product
Support Software
You should use CONTEC support software according to your purpose and development environment.
Windows version of analog I/O driver
API-AIO(WDM)
[Stored on the bundled CD-ROM driver li brary API-USBP(WDM)]
It is the library softwa re, and whic h s upp lies co mmand o f hard wa re pro d uced b y our company in the form of sta ndar d
Win32 API functio n (DLL). Using progr a mmi ng languages supp o rting Win32AP I fu nctions, such as Visual Basic and
Visual C++ e tc. , you can deve lop high-speed application s oftware with feature of har dware produced by our company.
In addition, you can ve r ify the op er atio n of hard wa re us ing Dia gno s tic pr o grams.
< Operating e nviro nme nt >
OS Windows 7, Serve r 2008, Vis ta, X P, Se rve r 2003 .e tc
Adaptation lang ua ge Visu a l Basic, Visual C++, Visual C#
You can download t he upda ted ve rs io n from the C ON TEC’s Web site
(http://www.contec.com/product/device/apiusbp/). For more details on the supported OS, applicable language and new
informatio n, p lea se vis it the C ON T EC’s Web site.
.etc
Data Logger Software C-LOGGER
[Stored on the bundled CD-ROM driver li brary API-USBP(WDM)]
C-LOGGER is a data logger s oftware program compatible with our ana log I/O produc ts. This program enables the
graph display of recorded signal data, zoom observation, file saving, and dynamic transfer to the spreadshe et software
“Excel”. No troublesome programming is required.
CONTEC pro vid e s download se r vic es (at http://www.contec.com/clogger) to supply the update d dri ve rs.
For details, refer to the C-LOGGER Users Guide or our website.
< Operating Enviro n me nt >
OS Windows 7, Vista, XP, S e rver 2 003, 2000
Data acquisition VI library for LabVIEW VI-DAQ (Available fo r do wn load i ng (f r ee of cha rg e) fr om
the CONTE C w eb si te.)
This is a VI libra ry to use i n Nat io na l Ins tr u ment s La bV IE W.
VI-DAQ is create d w ith a fun ct io n fo r m simi la r to tha t of La bV IE W 's Dat a Acquisition VI, allowing you to use
various devic es without co mplicated sett ings.
See http://www.contec.com/vidaq/ for details and download of VI-DAQ.
AIO-121602LN-USB, AIO-120802LN-USB
3
1. Before Using the Product
Customer Su pp ort
CONTEC provides the following support services for you to use CONTEC products more efficiently
and comfortably.
Web Site
Japanese http://www.contec.co.jp/
English http://www.contec.com/
Chinese http://www.contec.com.cn/
Latest product information
CONTEC provides up-to-date information on products.
CONTEC also provides product manuals and various technical documents in the PDF.
Free download
You can download updated driver software and differential files as well as sample programs available in
several languages.
Note! For product information
Contact your retailer if you have any technical question about a CONTEC product or need its price,
delivery time, or estimate information.
Limited One-Year Warranty
CONTEC products are warranted b y CONTEC CO., LTD. to be free from defects in material and
workmanship for up to one year from the date of purchase by the original purchaser.
Repair will be free of charge only when this device is returned freight prepaid with a copy of the
original invoice and a Return Merchandise Authorization to the distributor or the CONTEC group
office, from which it was purchased.
This warranty is not applicable for scratches or normal wear, but only for the electronic circuitry and
original products. The warranty is not applicable if the device has been tampered with or damaged
through abuse, mistreatment, neglect, or unreasonable use, or if the original invoice is not included, in
which case repairs will be considered beyond the warranty policy.
How to Obtain Service
For replacement or repair, return the device freight prepaid, with a copy of the original invoice. Please
obtain a Return Merchandise Authorization number (RMA) from the CONTEC group offi c e whe r e you
purchased before returning any product.
* No product will be accepted by CONTEC group without the RMA number.
Liability
The obligation of the warrantor is solely to repair or replace the product. In no event will the warrantor
be liable for any incidental or consequential damages due to such defect or consequences that arise from
inexperienced usage, misuse, or malfunction of this device.
AIO-121602LN-USB, AIO-120802LN-USB
4
1. Before Using the Product
DANGER
WAR
NING
C
AUTION
DANGER
CAUTION
Safety Pr ecaution s
Understand the following definitions and precautions to use the product safely.
Safety Information
This document provides safety information using the following symbols to prevent accidents resulting
in injury or death and the destruction of equipment and resources. Understand the meanings of these
labels to operate the equipment safely.
DANGER indicates an imminently hazardous situation which, if not avoided, wi ll
result in death or serious injury.
WARNING indicates a potentially hazardous situation which, if not avoided, could
result in death or serious injury.
CAUTION indicates a potentially hazardous situation which, if not avoided, may
result in minor or moderate injury or in property damage.
Handling Precautions
Do not use the product where it is exposed to flammable or corrosive gas. Doing so may result in an
explosion, fire, electric shock, or failure.
- Do not strike or bend this product.
Otherwise, this may malfunction, overheat, cause a failure or breakage.
- Do not tou ch this product's terminals (edge connector) with your hands.
Otherwise, this may malfunction, overheat, or cause a failure.
If the terminals are touched by someone's hands, clean the terminals with industrial alcohol.
- Do not close the ventilation hole(s) of this product by, for example, placing an object. This may
cause overheating, malfunction, and/or failure of the product.
- Do not tou ch the external connector when the power is on.
Otherwise this may malfunction, overheat, cause a failure due to static electricity.
- Make sure that your PC can supply ample power to all this product installed.
Insufficiently energized products could malfunction, overheat, or cause a failure.
- When connecting multiple units, do one at a time and complete setup for the previous unit before
starting to do the next unit.
- The specifications of this product are subject to change without notice for enhancement and quality
improvement.
Even when using this product continuously, be sure to read the manual and understand the contents.
- Do not modify this product. CONTEC will bear no responsibility for any problems, etc., resulting
from modi fying this product.
- Regardless of the foregoing statements, CONTEC is not liable for any damages whatsoev er
(including damages for loss of business profits) arising out of the use or inability to use this
CONTEC product or the information contained herein.
AIO-121602LN-USB, AIO-120802LN-USB
5
1. Before Using the Product
Name
Maker
Turn
Quantity
Installation Site
E04SR301334
SEIWA
2 1 on USB cable at product side
E04SR301334
SEIWA
1 1 on signal cable at product side(CN2, CN3)
- If you use this product in a noisy environment, attach a ferrite core to USB cable to stabilize the
operation. When attaching a ferrite core, coil it around once or more near the connector while
leaving it open, and then close it.
- Regarding “FCC PART 15 Clas s A Notice”
This product has acquired the above-mentioned standard.
However, a sufficient margin may not be secured for the standard. In this case, use a ferrite core
(TDK: ZCAT 3035-1330 or a compatible product) for the USB cable.
When attaching the ferrite core, coil it around twice near t he connector (1cm from the product)
while leaving it open, and then close it.
- Regarding “VCCI Class A Not ice”
This product has acquired the above-mentioned standard.
However, a sufficient margin may not be secured for the standard. In this case, use a ferrite c ore
(TDK: ZCAT 3035-1330) for the USB cable.
When attaching the ferrite core, coil it around twice near the connector (1cm from the product)
while leaving it open, and then close it.
- Regarding “CE EMC Directive Class A Notice”
The ferri te core must be installed in interface connecting cable so that this product (AIO121602LN-USB) may suit the above-mentioned standard.
Image diagram
Ferrite core
Cable
TURN : 1
TURN : 2
TURN : 3
TURN : 4
AIO-121602LN-USB, AIO-120802LN-USB
6
1. Before Using the Product
NOTE
This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions:
WARNING TO US ER
Change or modificatio ns not expre ss ly appro ved the manu fact urer can void the user 's authority to operate this
FCC PART 15 Class A Notice
(1) this device may not cause harmful interference, and (2) this device must accept any interference received,
including interference that may caus e undesired o peration.
This equip ment has been tested and found to comply with the limits for a Class A dig ital device, pursuant to Part 15
of the FCC Rules. These limits are designed t o provide reasona ble protection aga inst harmful interference when the
equipme n t is o pe r a t e d i n a c ommerc ial env ir onment .
This eq u ipment generates, uses, and can radiate radio frequency energy and, if not installed and used in accor dance
with the instru ct ion manu a l, ma y cau se har mful interference to radio communicat ions. Operation o f this equip ment in
a residential area is likely to ca u s e harmful int erference in w hich case the user will be r eq uired to cor r ect the
interferen ce at his own e x pense.
equipment.
AIO-121602LN-USB, AIO-120802LN-USB
7
1. Before Using the Product
CAUTION
Environment
Use this product in the following environment. If used in an unauthorized environment, this product
may overheat, malfunction, or cause a failure.
Operating temperature
0 - 50°C
Humidity
10 - 90%RH (No condensation)
Corrosive gases
None
Floating dust particles
Not to be excessive
Inspection
Inspect the product periodically as follows to use it safely.
Check that the ventilation slit has no obstruction and has no dust or foreign matter adhering.
Moreover, if there is the slit on the case side, please confirm it to the slit similarly.
AIO-121602LN-USB, AIO-120802LN-USB
8
1. Before Using the Product
Storage
When storing this product, keep it in its original packing form.
(1) Put this product in the storage bag.
(2) Wrap it in the packing material, and then put it in the box.
(3) Store the package at room temperature at a place free from direct sunlight, moisture, shock,
vibration, magnetism, and static electricity.
Disposal
When disposing of the product, follow the disposal procedures stipulated under the relevant laws and
municipal ordinances.
AIO-121602LN-USB, AIO-120802LN-USB
9
1. Before Using the Product
AIO-121602LN-USB, AIO-120802LN-USB
10
2. Setup
2. Setup
This chapter explains how to set up this product.
What is Setup?
Setup means a series of steps to take before the product can be used.
Different steps are required for software and hardware.
Installing the driver
This section enables you to prepare the software and hardware by operating in accordance with each
step in this chapter using the bundled CD-ROM. Taking the following steps sets up the software and
hardware. You can use the diagnosis program later to check whether the software and hardware function
normally.
Step 1 Setting the Hardware
Step 2 Install ing the Softw are
Step 3 Install ing the Hardware
Step 4 Checking Operations with the Diagnosis Progra m
Uninstall the driver and then set it up again if it cannot be set up properly.
The following shows the basic flow for installing product.
Installing the S oftware
- API-USBP(WDM)
Development Environment
- C-LOGGER
Page 13
Connecting the Product
- Connecting the PC
Page 16
Setting Properties Using
Device Manager
- Setting the Device
Name.
Page 18
AIO-121602LN-USB, AIO-120802LN-USB
11
2. Setup
Step 1 Setting th e Hardware
This section describes how to set up the product and how to connect it to a PC.
Name of ea ch p a r t s
LED indicator
The above figure has installed the USB cable attachment.
Figure 2.1. Name of each parts (Front side)
AIO-121602LN-USB, AIO-120802LN-USB
12
2. Setup
Step 2 Initializing the Softwa re
Install software.
The following description assumes the operating system as Windows XP. Although some user interfaces
are different depending on the OS used, the basic procedure is the same.
Points
- If you are using Windows XP, please log on as Administrator (authorized account) before
proceeding to the following steps.
Illustration of Menu Screen
Install Development Environment such as sample
programs and onlin e help
Install utility.
Refer to the user’s guide.
Refer to the content of CD-ROM.
Install C-LOGGER.
Points
- Please set up the supplied CD-ROM if it has not been set up. The menu starts automatically.
- If the menu do not start, launch X:AUTORUN.EXE (X:CD-ROM drive) from [Run…] in Start
menu.
- The screen design may be different.
AIO-121602LN-USB, AIO-120802LN-USB
13
2. Setup
Installation of API-USBP(WDM) Development Environment
Installation of development environment is namely installing supplied online help and sample program
in all language in order to use API function.
(1) Clicking on “Install Development or Execution Environment”.
[API-USBP(WDM) Installer] dialog box displays.
(2) Selecting “Advanced Analog I/O driver”.
(3) Clicking on “Continue” Button.
Please perform installation following the directions on the screen. And thus the installation is
completed.
* The scre en desig n may be d iffer ent.
AIO-121602LN-USB, AIO-120802LN-USB
14
2. Setup
Installing C-LOGGER
Install the data collection software.
(1) Clicking on “C-LOGER”.
[Choose Setup Language] dialog box displays.
(2) Selecting “English”.
(3) Clicking on “OK” Button.
Please perform installation following the directions on the screen. And thus the installation is
completed.
* The screen design may be differen t.
AIO-121602LN-USB, AIO-120802LN-USB
15
2. Setup
CAUTION
Step 3 Installing t he Ha rdware
Under Windows, information about the converter needs to be detected by the OS. This is called
hardware installation.
To use more than one of this product, make sure to install them one by one, setting each unit after
completing the pre vio us one.
Connecting the Product
(1) Turn on the power to the PC before connecting this product.
(2) When the PC has been up and running, plug the USB interface connector to a USB port in the PC.
The converter can also be connected to the PC via a USB hub of this product.
Figure 2.2. Connecting the PC
(3) USB cable can be attached firmly to the main unit by using a USB cable attachment.
Figure 2.3. Attaching a USB Attachment
- The USB cable attachment cannot be used excluding an attached cable.
- When the USB cable attachment is being used, do not perform removing and connecting the USB
cable on the unit side repeatedly. This may damage the USB cable attachment or yourself.
AIO-121602LN-USB, AIO-120802LN-USB
16
2. Setup
* The name of the connected
* The name of the connected
Setting with the Found New H a rd w a r e W iz ard
(1) The “Found New Hardware Wizard” will be started.
* In Windows Vista, Because the driver's installation is completed by "Installing the Software", it is
not nec essary to operate it about the Hardware Wizard.
(2) Select “Install from a list or specific location”, then click on the [Next] button.
Detect setup information from supplied CD automatically for installing USB driver.
product will be displayed.
- AIO-121602LN-USB
- AIO-120802LN-USB
Point
Please specify the path for supplied CD as follows in the case of failure in detecting automatically.
X:\INF\WDM\AIO (X: CD-ROM drive)
(3) Click on [Finish] button to complete the installation of USB driver.
AIO-121602LN-USB, AIO-120802LN-USB
product will be displayed.
- AIO-121602LN-USB
- AIO-120802LN-USB
17
2. Setup
* The name of the connected
Setting Properties Using Device Manager
After connecting product with a PC and completing driver installation, open Device Manager and set
properties.
(1) Starting Device Manager.
From [Start] menu, click on [Settings]-[Control Panel]-[System] and then click on [Device
Manager] button in [Hardware] tab.
product will be displayed.
- AIO-121602LN-USB
- AIO-120802LN-USB
- In the case of Windows 98/Me
Right-click on [My Computer] and select [Properties] to start device manager.
AIO-121602LN-USB, AIO-120802LN-USB
18
2. Setup
CAUTION
* The name of the connected
(2) Setting the Device Name.
Right-clicking on the product name and selecting [Properties] displays [Product Properties].
Open [Common Settings] tab and enter arbitrary name in the editing box for device name. (Default
name also can be used.)
product will be displayed.
- AIO-121602LN-USB
- AIO-120802LN-USB
* The product-specific number will be displayed as the serial number.
USB driver can not be used without settings. Settings must be performed.
(3) Clicking on [OK] button.
Device name is set by clicking [OK] button.
Points
- When the application developed by users is running on another PC, please perform foregoing
operation on the target computer. (No need to install software introduced on next page)
- Please use the device name specified in last step for initialization function when initialization is
performed using API function. When running on other PC, it can run without changing the
application for the same device name being specified.
AIO-121602LN-USB, AIO-120802LN-USB
19
2. Setup
CAUTION
Step 4 Checking Operations with the Diagnosis
Program
Use the diagnosis program to check that the product and driver software work normally, thereby you
can confirm that they have been set up correctly.
What is the Diagnosis Program?
The diagnosis program diagnoses the states of the product and driver software.
It can also be used as a simple checker when an external device is actually connected.
Using the “Diagnosis Report” feature reports the driver settings, the presence or absence of the product,
I/O status, and interrupt status.
Check Method
To check the analog I/O data, use the loopback connection on the board to directly connect the analog
output (channel 0) to an analog input, or connect to an external signal source.
No external connection is required if using loopback to check the I/O.
The figure below shows an example of checking by connecting to an external signal.
The example is for channel 0 on the product.
Connection diagram
< Analog Input >
- Single-Ended In pu t - Differential Input
Figure 2.4. Connection di ag ram (Analog Input)
Input data remains indeterminate when no input pin is connected. The input pin for the channel not
connected to the signal source must be connected to the analog ground.
For details, see “Chapter 3 External Connection”.
< Analog Output >
Figure 2.5. Connection di ag ram (Analog Output)
AIO-121602LN-USB, AIO-120802LN-USB
20
2. Setup
* The name of the connected
* The name of the connected
Using the Diagnosis Program
Starting the Diagnosis Program
Click [Diagnosis] on the Properties page to start the diagnosis program.
product will be displayed.
- AIO-121602LN-USB
- AIO-120802LN-USB
AIO-121602LN-USB, AIO-120802LN-USB
product will be displayed.
- AIO-121602LN-USB
- AIO-120802LN-USB
21
2. Setup
Analog input
Select the input channel and input type from the lists.
Input data is plotted on a graph.
Analog output
You can select the desired output channel from the lists.
You can select the DC (constant voltage), sine wave, or square wave as the output data.
Digital I/O
In the diagnosis program, digital input / output is fixed to 8 points each.
The upper row of circular lamps indicates the digital input states. Red indicates the bit is ON and brown
indicates OFF.
Clicking the lower row of switches turns the digital output bits ON or OFF.
Counter input
Selecting a counter channel displays the count value and state of that counter channel.
Clicking the zero clear buttons resets the count to zero.
AIO-121602LN-USB, AIO-120802LN-USB
22
2. Setup
* The name of the connected
Diagnosis Report
(1) The diagnosis report saves detailed data, including the device settings and settings for each channel,
to a text file and di splays the file for you to view.
Clicking [Diagnosis Report] prompts you to specify where to save the report text file.
product will be displayed.
- AIO-121602LN-USB
- AIO-120802LN-USB
(2) The diagnosis report contains the following data.
- Version of OS
- Device Inf or mat i on
- File Information
- Initialization, interrupts I/O state for each channel
Execution time measurement
Clicking [Execution Time Measurement] runs the program to measure API function execution speed.
The operation of this program is explained in "API function Execution Speed Measurement Program" in
Chapter 4.
AIO-121602LN-USB, AIO-120802LN-USB
23
2. Setup
Setup Troubleshooting
Symptoms and Actions
Data input or output does not operate correctly
- Run the diagnosis program to check that the device is registered and whether any initialization
errors have occurred.
- Is there a problem with the device settings, wiring, or similar? Check the I/O range setting. Also,
the input data will be undefined if the wiring terminals are not connected. Ensure that the channels
you are using are corr ectly co nnected. Connect unused channels to analog ground.
- For voltage input, check by connecting a battery or similar if you do not have any other suitable
signal source. Also check that connecting to analog ground reads correctly as 0V.
The diagnostic program works correctly but the application program does not.
The diagnostic program uses the API-TOOL functions. If the diagnostic program works correctly, other
applications should work correctly also. If you have a problem, recheck your program taking note of the
following points.
- Check the return values of the API functions.
- Refer to the source code for the samp le programs.
The OS does not boot correctly or does not detect the device correctly.
Refer to the "Troubleshooting" section of API-AIO(WDM) HELP.
If your problem cannot be resolved
Contact your retailer.
AIO-121602LN-USB, AIO-120802LN-USB
24
3. Connection and Installation
3. Connection and Installation
Installation Method
Mounting on a DIN Rail
Mounting procedure
(1) Push the fixing hook up using a slotted screwdriver to make it unlockable.
Figure 3.1. Mounting on a DIN Rail < 1 / 3 >
(2) Hook the product from the upper part of the DIN rail, and press the lower part on to the DIN rail.
Figure 3.1. Mounting on a DIN Rail < 2 / 3 >
(3) Push the fixing hook up using a slotted screwdriver to make it lockable.
Figure 3.1. Mounting on a DIN Rail < 3 / 3 >
AIO-121602LN-USB, AIO-120802LN-USB
25
3. Connection and Installation
Removal procedure
(1) Pull down the fixing hook of the unit to unlock it.
Figure 3.2. Removing the unit from the DI N r ail < 1 / 3 >
(2) With the fixing hook unlocked, pull the lower part of this unit towa rd you.
Figure 3.2. Removing the unit from the DI N r ail < 2 / 3 >
(3) By lifting this unit, you can easily remove it from the DIN rail.
Figure 3.2. Removing the unit from the DI N r ail < 3 / 3 >
AIO-121602LN-USB, AIO-120802LN-USB
26
3. Connection and Installation
Desktop Installation
Using the rubber feet
When required to mount the product on the desktop, mount it on a horizontal platform.
The rubber feet can be mounted in their mounting holes as shown in the following figure.
Figure 3.3. Mounting the rubber feet
Wall Installation
To mount the product on the wall, purchase the commercially available screw (fitting for φ3.5)
separately.
Figure 3.4. Wall Installation
AIO-121602LN-USB, AIO-120802LN-USB
27
3. Connection and Installation
CAUTION
Installation Using the Magnet
Attaching the magnet supplied with the product makes it easy to mount or remove the product on or
from a metal surface such as steel desk or partition.
- Do not let the magnet go near objects that can be affected by magnetic fields, such as monitors and
floppy disks.
- If the product is shifted while mounted on the steel surface, the surface paint may be scratched.
- When using the magnet, stack connection is not possible.
Mounting/ removing the magnet
To mount the magnet, press down the entire length of the magnet into its mounting hole while pushing
the magnet in the direction of arrow 1. Next, slide the magnet in the direction of arrow 2 to fix it in
position.
Figure 3.5. Mounting the magne t
To remove the magnet, slide the magnet in the direction of arrow 1 as shown in the following figure,
and then lift it out in the direction of arrow 2.
Figure 3.6. Removing the magne t
AIO-121602LN-USB, AIO-120802LN-USB
28
3. Connection and Installation
Mounting onto the steel wall
Mount the product directly onto the steel wall. Pull it gently after mounting to confirm that it will not
drop off from the body.
Figure 3.7. Mounting onto the steel wall
AIO-121602LN-USB, AIO-120802LN-USB
29
3. Connection and Installation
CAUTION
Installation Conditions
Installation orientation
It is possible to mount it in the orientations shown in the following figure. Other orientations would
cause problems in usage, such as inadequate heat dissipation.
DIN rail fixation
Vertical installation
Horizontal installation Installation on a ceiling
Figure 3.8. DIN rail fixation
Screws / magnet fixation
Vertical installation
Horizontal installation Installation on a ceiling
Figure 3.9. Screws / magnet fixation
When using the product in a high temperature environment, cool it by blowing air even when the
temperature is within the specified range.
AIO-121602LN-USB, AIO-120802LN-USB
30
3. Connection and Installation
Spacing between the system unit and any surrounding objects
Secure a distance of at least 50mm between the top of the main unit (single use) and any surrounding
objects.
Do not locate the unit in a fully enclosed housing.
Figure 3.10. Spacing betw een the unit and any surrounding objects
AIO-121602LN-USB, AIO-120802LN-USB
31
3. Connection and Installation
CAUTION
Connection Method
Connecting an Interface Connector
When connecting the unit to an external device, you can use the supplied connector plug. When wiring
the unit, strip off approximately 7 mm of the covering for the cable, and insert the bare wire by pressing
the orange button on the connector plug. Releasing the orange button after the wire is inserted fixes the
cable. Compatible wires are AWG 28 - 16.
Figure 3.11. Connecting an Interface Connector and Connectors That Can Be Used
Removing the connector plug by grasping the cable can break the wire.
AIO-121602LN-USB, AIO-120802LN-USB
32
Signal
Signal
Signal
00
Analog Ground
(for AO)
01
2
Analog Ground
(for AO)
3
Analog Ground
(for AI)
4
AI External Start
Trigger Input
5
AI External Stop
6
Clock Input
7
Analog Ground
(for AI)
8
AO External S tart
Trigger Input
9
AO External S top
Trigger Input
10
AO External S ampling
Clock Input
11
(for AI)
12
Counter Gate
Control Inpu t
13
14
Counter Up
15
(for AI)
3. Connection and Installation
Signal Layout on th e In t erfa ce C onn ec tor
The unit can be connected to an external device using 10-pin connectors that is provided on the unit
face.
AIO-121602LN-USB < Single-Ended Input >
name
AI00 Analog Inpu t 00 AO00 Analog Outpu t 00 DIO00 Dig ital Input/Output
AI01 Analog Inpu t 01 AGND
AI02 Analog Inpu t 02 AO01 Analog Outpu t 01 DIO02 Dig ital Input/Output 0
AI03 Analog Inpu t 03 AGND
AGND
AI04 Analog Inpu t 04 DGND Digital Ground DIO04 Digital Input/Output 0
AI05 Analog Inpu t 05 AISTA
AI06 Analog Inpu t 06 AISTP
AI07 Analog Inpu t 07 AICLK
AGND
AI08 Analog Inpu t 08 DGND DigitalGround DIO08 Digital Input/Output 0
AI09 Analog Inpu t 09 AOSTA
AI10 Analog Inpu t 10 AOSTP
AI11 Analog Inpu t 11 AOCLK
AGND
AI12 Analog Inpu t 12 CNT O Counter Output DIO12 Digital Input/Output
AI13 Analog Inpu t 13 CNT G
AI14 Analog Inpu t 14 RES Reserved DIO14 Digital Input/Output
AI15 Analog Inpu t 15 CNT C
AGND
Meaning
Analog Ground
Analog Ground
name
N.C. N.C. DGND Digital Ground
DGND DigitalGround DGND DigitalGround
DGND DigitalGround DGND DigitalGround
DGND DigitalGround DGND DigitalGround
AIO-121602LN-USB, AIO-120802LN-USB
Meaning
Trigger Input
AI External Sampling
Clock Input
name
DIO01 Dig ital Input/Output
DIO03 Dig ital Input/Output 0
DIO05 Digital Input/Output 0
DIO06 Digital Input/Output 0
DIO07 Digital Input/Output 0
DIO09 Digital Input/Output 0
DIO10 Digital Input/Output
DIO11 Digital Input/Output
DIO13 Digital Input/Output
DIO15 Digital Input/Output
Meaning
33
3. Connection and Installation
Analog Input 00 – Analog Input 15
Analog input signal. The numbers correspond to channel numbers.
Analog Ground (fir AI)
Common analog ground for analog input signals.
Analog Output 00 – Analog Output 01
Analog output signal. The numbers correspond to channel numbers.
Analog Ground (dor AO)
Common analog ground for analog output signals.
AI External Start Trigger Input
External trigger input for starting analog input sampling.
AI External Stop Trigger Input
External trigger input for stopping analog input sampling.
AI External Sampling Clock Input
External sampling clock input for analog input.
AO External Start Trigger Input
External trigger input for starting analog outpu t sampling.
AO External Stop Trigger Input
External trigger input for sto pping analog outpu t sampling.
AO External Sampling Clock Input
External sampling clock input for analog output.
Digital Input / Output 00 –
Digital Input / Output 15
Counter Gate Control Inpu t
Gate control input signal for coun ter.
Counter Up Clock Input
Count-up clock input signal for counter.
Counter Output
Count match output signal for counter.
Common digital ground for digital I/O signals, external trigger inputs,
external sampling clock inputs, and counter I/O signals.
Reserved
Reserved pin.
N.C.
No connection to this pin.
Digital Input / Output signal.
Digital Ground
Figure 3.12. Pin Assignments of Interface Connector < AIO-121602LN-USB >
< Single-Ended Input >
AIO-121602LN-USB, AIO-120802LN-USB
34
3. Connection and Installation
00
(for AO)
01
02
(for AO)
03
Analog Ground
(for AI)
04
Trigger Input
05
AI External Stop
Trigger Input
06
AI External Sampling
Clock Input
07
Analog Ground
(for AI)
08
AO External S tart
09
Trigger Input
10
AO External S ampling
Clock Input
11
Analog Ground
(for AI)
12
Counter Gate
Control Inpu t
13
14
Counter Up
Clock Input
5
Analog Ground
(for AI)
AIO-121602LN-USB < Differential Input >
Signal
name
AI00 Anal og Input 00[ +] AO00 Analog O utput 00 DIO00 Digital Input/Output
AI01 An alog Input 0 0[-] AGND
AI02 Anal og Input 01[ +] AO01 Analog O utput 01 DIO02 Digital Input/Output
AI03 An alog Input 0 1[-] AGND
AGND
AI04 Anal og Input 02[ +] DGND Digital Ground DIO04 Digital Input/Output
AI05 An alog Input 0 2[-] AISTA
AI06 Anal og Input 03[ +] AISTP
AI07 An alog Input 0 3[-] AICLK
AGND
AI08 Anal og Input 04[ +] DGND DigitalGround DIO08 Digital Input/Output
AI09 An alog Input 0 4[-] AOSTA
AI10 Anal og Input 05[ +] AOSTP
AI11 An alog Input 0 5[-] AOCLK
AGND
AI12 Anal og Input 06[ +] CNT O Counter Output DIO12 Digital Input/Output
AI13 An alog Input 0 6[-] CNT G
AI14 Anal og Input 07[ +] RES Reserved DIO14 Digital Input/Output
AI15 An alog Input 0 7[-] CNT C
AGND
Meaning
Signal
name
N.C. N.C. DGND Digital Ground
DGND DigitalGround DGND DigitalGround
DGND DigitalGround DGND DigitalGround
DGND DigitalGround DGND DigitalGround
Meaning
Analog Ground
Analog Ground
AI External Start
Trigger Input
AO External S top
Signal
name
DIO01 Digital Input/Output
DIO03 Digital Input/Output
DIO05 Digital Input/Output
DIO06 Digital Input/Output
DIO07 Digital Input/Output
DIO09 Digital Input/Output
DIO10 Digital Input/Output
DIO11 Digital Input/Output
DIO13 Digital Input/Output
DIO15 Digital Input/Output 1
Meaning
AIO-121602LN-USB, AIO-120802LN-USB
35
3. Connection and Installation
Analog Input 00 – Analog Input 07
Analog input signal. The numbers correspond to channel numbers.
Analog Ground (for AI)
Common analog ground for analog input signals.
Analog Output 00 – Analog Output 01
Analog output signal. The numbers correspond to channel numbers.
Analog Ground (for AO)
Common analog ground for analog output signals.
AI External Start Trigger Input
External trigger input for starting analog input sampling.
AI External Stop Trigger Input
External trigger input for stopping analog input sampling.
AI External Sampling Clock Input
External sampling clock input for analog input.
AO External Start Trigger Input
External trigger input for starting analo g output sa mpling.
AO External Stop Trigger Input
External trigger input for sto pping analog outpu t sampling.
AO External Sampling Clock Input
External sampling clock inpu t for analog output.
Digital Input /Output 00 –
Digital Input /Output 15
Counter Gate Control Inpu t
Gate control input signal for coun ter.
Counter Up Clock Input
Count-up clock input signal for counter.
Counter Output
Count match output signal for counter.
Common digital ground for digital I/O signals, external trigger inputs,
external sampling clock inputs, and counter I/O signals.
Reserved
Reserved pin.
N.C.
No connection to this pin.
Digital Ground
Digital input / Output signal.
Figure 3.13. Pin Assignments of Interface Connector < AIO-121602LN-USB >
< Differential Input >
AIO-121602LN-USB, AIO-120802LN-USB
36
3. Connection and Installation
Digital
AO External S tart
Trigger Input
Digital
AO External S top
Trigger Input
Digital
AO External S ampling
Clock Input
Digital
(for AI)
Digital
Control Inpu t
Digital
Digital
Clock Input
Digital
Analog Ground
(for AI)
Digital
Analog Ground
(for AO)
Digital
Digital
Analog Ground
(for AO)
Digital
Digital
Trigger Input
Digital
AI External Stop
Trigger Input
Digital
AI External Sampling
Clock Input
Digital
AIO-120802LN-USB < Single-Ended Input >
Signal
name
AI00 Analog Inpu t 00 DGND DigitalGround DIO00
AI01 Analog Inpu t 01 AOSTA
AI02 Analog Inpu t 02 AOSTP
AI03 Analog Inpu t 03 AOCLK
AGND
AI04 Analog Inpu t 04 CNT O Counter Output DIO04
AI05 Analog Inpu t 05 CNT G
AI06 Analog Inpu t 06 RES Reserved DIO06
AI07 Analog Inpu t 07 CNT C
AGND
AO00 Analog Ou tput 00 DIO08
AGND
AO01 Analog Ou tput 01 DIO10
AGND
N.C. N.C. DGND DigitalGround
DGND Digital Ground DIO12
AISTA
AISTP
AICLK
DGND DigitalGround DGND DigitalGround
Meaning
Analog Ground
AI External St art
Signal
name
DGND DigitalGround DGND Digital Ground
DGND DigitalGround DGND DigitalGround
DIO09
DIO11
DIO13
DIO14
DIO15
Meaning
Counter Gate
Counter Up
Signal
name
DIO01
DIO02
DIO03
DIO05
DIO07
Meaning
Input/Output 00
Input/Output 01
Input/Output 02
Input/Output 03
Input/Output 04
Input/Output 05
Input/Output 06
Input/Output 07
Input/Output 08
Input/Output 09
Input/Output 10
Input/Output 11
Input/Output 12
Input/Output 13
Input/Output 14
Input/Output 15
AIO-121602LN-USB, AIO-120802LN-USB
37
3. Connection and Installation
Analog Input 00 – Analog Input 07
Analog input signal. The numbers correspond to channel numbers.
Analog Ground (for AI)
Common analog ground for analog input signals.
Analog Output 00 – Analog Output 01
Analog output signal. The numbers correspond to channel numbers.
Analog Ground (for AO)
Common analog ground for analog output signals.
AI External Start Trigger Input
External trigger input for starting analog input sampling.
AI External Stop Trigger Input
External trigger input for stopping analog input sa mpling.
AI External Sampling Clock Input
External sampling clock input for analog input.
AO External Start Trigger Input
External trigger input for starting analog outpu t sampling.
AO External Stop Trigger Input
External trigger input for stopping analog output sampling.
AO External Sampling Clock Input
External sampling clock inpu t for analog output.
Digital Input / Output 00 –
Digital Input / Output 15
Digital Ou tput00 - Digital Output 03
Digital ou tput signal.
Counter Gate Control Inpu t
Gate control input signal for coun ter.
Counter Up Clock Input
Count-up clock input signal for counter.
Counter Output
Count match output signal for counter.
Digital Ground
Common digital ground for digital I/O signals, external trigger inputs,
Reserved
Reserved pin.
N.C.
No connection to this pin.
Digital input / Output signal.
Figure 3.14. Pin Assignments of Interface Connector < AIO-120802LN-USB >
< Single-Ended Input >
AIO-121602LN-USB, AIO-120802LN-USB
38
3. Connection and Installation
Digital Input/Output
AO External S tart
Trigger Input
Digital Input/Output
AO External S top
Trigger Input
Digital Input/Output
AO External S ampling
Clock Input
Digital Input/Output
(for AI)
Digital Input/Output
Control Inpu t
Digital Input/Output
Digital
Clock Input
Digital Input/Output
Analog Ground
(for AI)
Digital Input/Output
Analog Ground
(for AO)
Digital Input/Output
Digital Input/Output
Analog Ground
(for AO)
Digital Input/Output
Digital Input/Output
Trigger Input
Digital Input/Output
AI External Stop
Trigger Input
Digital Input/Output
AI External Sampling
Clock Input
Digital Input/Output
AIO-120802LN-USB < Differential Input >
Signal
name
AI00 An alog Input 00[ +] DGND DigitalGround DIO00
AI01 An alog Input 0 0[-] AOST A
AI02 An alog Input 01[ +] AO STP
AI03 An alog Input 0 1[-] AOCLK
AGND
AI04 An alog Input 02[ +] CNT O Counter Output DIO04
AI05 An alog Input 0 2[-] CNT G
AI06 An alog Input 03[ +] RES Reserved DIO06
AI07 An alog Input 0 3[-] CNT C
AGND
AO00 Analog Ou tput 00 DIO08
AGND
AO01 Analog Ou tput 01 DIO10
AGND
N.C. N.C. DGND DigitalGround
DGND Digital Ground DIO12
AISTA
AISTP
AICLK
DGND DigitalGround DGND DigitalGround
Meaning
Analog Ground
AI External St art
Signal
name
DGND DigitalGround DGND Digital Ground
DGND DigitalGround DGND DigitalGround
DIO09
DIO11
DIO13
DIO14
DIO15
Meaning
Counter Gate
Counter Up
Signal
name
DIO01
DIO02
DIO03
DIO05
DIO07
Meaning
Input/Output 06
00
01
02
03
04
05
07
08
09
10
11
12
13
14
15
AIO-121602LN-USB, AIO-120802LN-USB
39
3. Connection and Installation
Analog Input 00 – Analog Input 03
Analog input signal. The numbers correspond to channel numbers.
Analog Ground (FOR AI)
Common analog ground for analog input signals.
Analog Output 00 – Analog Output 01
Analog output signal. The numbers correspond to channel numbers.
Analog Ground (FOR AO)
Common analog ground for analog output signals.
AI External Start Trigger Input
External trigger input for starting analog input sampling.
AI External Stop Trigger Input
External trigger input for stopping analog input sa mpling.
AI External Sampling Clock Input
External sampling clock input for analog input.
AO External Start Trigger Input
External trigger input for starting analog outpu t sampling.
AO External Stop Trigger Input
External trigger input for stopping analo g output sa mpling.
AO External Sampling Clock Input
External sampling clock inpu t for analog output.
Counter Gate Control Inpu t
Gate control input signal for counter.
Counter Up Clock Input
Count-up clock input signal for counter.
Counter Output
Count match output signal for counter.
Digital Ground
Common digital ground for digital I/O signals, external trigger inputs,
Reserved
Reserved pin.
N.C.
No connection to this pin.
Digital Input/Ou tput 00 –
Digital Input/Ou tput 15
Digital input/Output signal.
Figure 3.15. Pin Assignments of Interface Connector < AIO-120802LN-USB >
< Differential Input >
AIO-121602LN-USB, AIO-120802LN-USB
40
3. Connection and Installation
CAUTION
Analog Input Signal Co n ne c tion
The procedure for connecting analog signals depends on whether the analog input signals are
single-ended or differential. The sections below describe how to connect the signals using flat cable and
shielded cable.
Single-ended Input
The following figure shows an example of flat cable connection.
Connect separate signal and ground wires for each analog input channel on interface connector.
Figure 3.16. Single-ended In pu t Co nnec ti on (Fl a t Cabl e )
The following figure shows an example of shield cable connection. Use shielded cable if the distance
between the signal source and unit is long or if you want to provide better protection from noise. For
each analog input channel on interface connector, connect the core wire to the signal line and connect
the shielding to ground.
Figure 3.17. Single-ended In pu t Co nnec ti on (S hie lded Cable)
- If the signal source contains over 500 kHz signals, the signal may affect the cross-talk noise
between channels.
- If the unit and the signal source receive noise or the distance between the unit and the signal source
is too long, data may not be input properly.
- An input analog signal should not exceed the maximum input voltage (relate to the product analog
ground). If it exceeds the maximum voltage, the unit may be damaged.
- Connect all the unused analog input channels to analog ground.
- In the channel switching, the multiplexer does the electrical charge and discharge on the internal
capacitor according to the si gnal voltage. Therefore, the voltage from the previous switching state
may go into the next channel. It might cause the error of the signal source action. If this occurs,
insert a high-speed amplifier as a buffer between the signal source and the analog input pin to
reduce th e fluctuation.
- An input pin may fail to obtain input data normally when the signal source connected to the pin has
high impedance. If this is the case, change the signal source to one with lower output impedance or
insert a high-speed amplifier buffer between the signal source and the analog input pin to reduce the
effect.
AIO-121602LN-USB, AIO-120802LN-USB
41
3. Connection and Installation
CAUTION
Differential Input
The following figure shows an example of flat cable connection.
For each analog input channel on interface connector, connect the "+" input to the signal and connect
the "-" input to the signal source ground. Also connect the analog ground on the unit to the signal source
ground.
Figure 3.18. Differential Input Connec tion (Flat Ca ble)
The following figure shows an example of shielded cable connection. Use shielded cable if the distance
between the signal source and unit is long or if you want to provide better protection from noise. For
each analog input channel on interface connector, connect the "+" input to the signal and connect the "-"
input to the signal sour ce ground . Also connect the analog ground on the unit and the signal source
ground to the shielding.
- If the signal source contains over 500 kHz signals, the signal may affect the cross-talk noise
between channels.
- When the analog ground is not connected, the conversion data is not determined.
- If the unit and the signal source receive noise or the distance between the unit and the signal source
is too long, data ma y not be input properly.
- An input analog signal should not exceed the maximum input voltage (relate to the unit analog
ground). If it exceeds the maximum voltage, the unit may be damaged.
- Connect all the unused analog input channels to analog ground.
- In the channel switching, the multiplexer does the electrical charge and discharge on the internal
capacitor according to the si gnal voltage. Therefore, the voltage from the previous switching state
may go into the next channel. It might cause the error of the signal source action. If this occ urs,
insert a high-speed amplifier as a buffer between the signal source and the analog input pin to
reduce th e fluctuation.
- An input pin may fail to obtain input data normally when the signal source connected to the pin has
high impedance. If this is the case, change the signal source to one with lower output impedance or
insert a high-speed amplifier buffer between th e signal source and the analog input pin to reduce the
effect.
AIO-121602LN-USB, AIO-120802LN-USB
42
3. Connection and Installation
CAUTION
Analog Output Signal Connection
This section shows how to connect the analog output signal by using a flat cable or a shield cable.
The following figure shows an example of flat cable connection.
Connect the signal source and ground to the interface connector analog output.
Figure 3.20. Analog Output Connection (Flat Cable)
The following figure shows an example of shield cable connection. Use shield cable if the distance
between the sign al source and this product is long or if you want to provide better protection fr om noise.
For the i n terface connector analog output, connect the core wire to the signal line and connect the
shielding to ground.
Figure 3.21. Analog Output Connection (Shielded Cable)
- If th is product or the con nected w ire receives noise, or the dis tance b etween this product and the
target is long, data may not be outputted properly.
- For analog output signal, the current capacity is ±3mA (Max.). Check the specification of the
connected device before connecting this product.
- Do not short the analog output signal to analog ground, digital ground, and/or power line. Doing so
may damage this product.
- Do not connect an analog output signal to any other analog output, either on this product or on an
external device, as this may cause a fault on this product.
- Analog output signal outputs hundreds of micro voltages when USB cable is inserted.
AIO-121602LN-USB, AIO-120802LN-USB
43
3. Connection and Installation
10kΩ
V
cc
Unit
GN
D
GND
INPUT/OUTPUT
External circui
t
74LV245
2kΩ
DIO
00
Sw
itc
h
DG
ND
DGND
L
ED
D
IO08
Unit side
CAUTION
Connecting I/O Signals
The following sections show examples of how to connect digital I/O signals.
All the I/O signals are TTL level, and input or output can be set in 8 bit unit by software.
I/O Circuit
Figure 3.22. I/O Circuit
Example of Conne cti on
When switch is "ON", the corresponding bit is "0". When switch is "OFF" in con trast, the corresponding bit is "1".
When "1" is output to a relevant bit, the corresponding LED comes on. When "0" is ou tput to the bit, in contrast, the
LED goes out.
Figure 3.23. Connectio n Example Using DIO00 for Input and DIO08 for Output
Take care not to short the outputs to digital ground as this may cause a fault.
AIO-121602LN-USB, AIO-120802LN-USB
44
3. Connection and Installation
CAUTION
Counter signals and Control signals Connection
The following sections show examples of how to connect counter I/O signals, and other control I/O
signals (external trigger input signals, sampling clock input signals, etc.).
All the counter I/O signals and control signals are TTL level signals.
Figure 3.24. Counter input and Control input Connection
Figure 3.25. Counter Output Connection
About the counter input control signal
Counter Gate Control Input (refer to the chapter 3 Connector Pin Assignment) acts as an input that
validate or invalidate the input of an external clock for the counter. This function enables the control of
an external clock input for the counter. The external clock for the counter is effective when input is
"High” and invalid when input is "Low". If unconnected, it is a pull-up in this product and remains
"High". Therefore the external clock for the counter is effective when the counter gate control input is
not connected.
- Do not short the output signals to analog ground, digital ground, and/or power line. Doing so may
damage the product.
- If connected to each output, a pull-up resistor must be about 10kΩ to pull up with a 5V power
source.
- Each input accepts 5V TTL signals.
Reference
For the operation timings for control signal input, see “Control Signal Timings” in Chapter 6
“Hardware”.
AIO-121602LN-USB, AIO-120802LN-USB
45
3. Connection and Installation
AIO-121602LN-USB, AIO-120802LN-USB
46
4. Application Development
Clicking on Print button from
4. Application De v e lopment
Please reference to online help and sample program when developing applications.
Reference to Online Help
Click on [Programs]-[CONTEC API-USBP(WDM)]-[API-USBP(WDM) Help] from [Start] menu.
The information for application development, such as function reference is provided in
[API-USBP(WDM) Help].
Detailed introduction to search method for help should be found from [How to navigate Help] in the
help.
Printing Fun c tion Reference
online help prints the page
being displayed. It can be
printed entirely as follows in
the case of referencing to
printing function.
As figure shown on the right,
selecting mark and
clicking on Print button prints
all the topics under the mark
selected at a time.
AIO-121602LN-USB, AIO-120802LN-USB
47
4. Application Development
Sample programs are copied in
Sample Program
installation path. (The default path is
Progr a m Fil es\CONTEC~)
Sample programs in all language are
provided here. To run a sample program,
click on [Programs]- [CONTEC APIUSBP(WDM)]-[AIO]-[Sample Name]
from [Start] menu.
Distributi ng Developed Appl ication
Please distribute the developed application with USB driver in supplied CD-ROM.
Created application (including driver) can be freely distributed.
AIO-121602LN-USB, AIO-120802LN-USB
48
4. Application Development
* The name of the connected
Use of utility program
Program for Measuring the Executive Speed of Function
Program for measuring the executive speed of function is a program that can measure the executive time
of some main functions.
To use the program for measuring the executive speed of function, please click the button "Measure
tool..." from CONTEC DIAGNOSIS PROGRAM.
product will be displayed.
- AIO-121602LN-USB
- AIO-120802LN-USB
Step to use
(1) Select the device t o be meas ured fr om the d evice list.
(2) Measure the executive speed of a function by clicking the button with the function name.
Select the number of channels for conversion from the list for AioMultiAi and AioMultiAo.
Input the size of data to be transferred for AioGetAiSamplingData and AioSetAoSamplingData.
Set the transfer data in "kByte".
(3) Terminate the application by clicking the button "Exit".
AIO-121602LN-USB, AIO-120802LN-USB
49
4. Application Development
256K
* The name of the board
Analog Input Measurement Tool
It is an analog input measurement utility to carry out infinity sample in the FIF O m emory. Once the
conversion data of memory accumulates to a certain quantity, the ev en t occurs and data of the memory
is acquired. Data in the FIFO memory can be confirmed visually.
The number of channels used, the internal/external clock, the conversion speed, and the sampling
frequency at which an event generates can be set. Since the notification of a sampling clock error event
is sent, please m ake use of it for the conv ersion s pec measurement under various conversion conditions.
you have just added is
displayed.
- AIO-121602LN-USB
- AIO-120802LN-USB
AIO-121602LN-USB, AIO-120802LN-USB
50
4. Application Development
Procedure
(1) Chose the device name of the device to be used from the upper left combo box, and click the setting
button.
(2) The conversion conditions are set on the screen of the analog input setting.
Once an input is done at the sampling frequency specified as data taking-in sampling, an event
occurs and data will be acquired. Click the OK button to finish setting the conditions, and returns to
former screen.
(3) Start the measurement with measurement start button. The variou s state s during the conversion are
displayed.
The number of the samplings in FIFO is:
It is conversion data taken in the memory. This can be visually checked in a "memory image".
Event generation sampling frequency:
When the number of input sampling in FIFO reaches this frequency, the event generates.
Total input sampling frequency:
It is the total number of samplings for application in the memory.
Measurement may stop by the following errors.
Sampling clock error:
It means that the conversion speed is too fast and the driver processing is not in time when
converting at the internal clock.
The cycle of the clock is too fast when converting it at the external c lock. Moreover, the cause by
noise etc. is also concerned.
Buffer overflow:
The memory overflows since the conversion speed is too fast compared with the one at which data
is inputted.
(4) Click the “stop” button, and measurement stops.
AIO-121602LN-USB, AIO-120802LN-USB
51
4. Application Development
128K
* The name of the connected
Measuring Analog Output tool
This is an analog output and measurement utility able to sample indefinitely using the FIFO memory.
An event is triggered when the remaining conversion data in memory reaches a specified level and this
causes the new output data to be loaded. The utility also shows a visual representation of the data in the
FIFO memory.
The number of channels, whether to use an internal or external clock, conversion speed, number of
times to sample before generating an event, and number of samples to load at each event can be
specified. As an event is also generated if a sampling clock error occurs, you can use the utility to test
the conversion operation under a range of different conditions.
product will be displayed.
- AIO-121602LN-USB
- AIO-120802LN-USB
Step to use
(1) Use the combo box at the top left of the window to select the device name of the device to use, then
click the [Set] button.
(2) Specify the conversion conditions in the analog output setup window.
An event is triggered and the next block of data is loaded after the number of samples specified in
the settings has been output. Clicking the OK button saves the settings and returns to the previous
window.
AIO-121602LN-USB, AIO-120802LN-USB
52
4. Application Development
(3) The measuring is beg un after clicked the button of [Start], the conversion's information is displayed.
The sampling number within FIFO:
This specifies the number of conversion data values remaining in memory (that have not yet been
output). This is shown visually in the "Memory Image".
Sampling count for triggering event:
An event is triggered when the number of samples remaining in the FIFO reaches the specified
value.
Nu mb er of sa mp l es t o loa d :
The number of output data values (samples) to load at each event.
The Measuring will stop when this error as follows.
Sampling clock error:
When the application is measuring with internal clock, sampling clock is too fast to process.
When the application is measuring with External clock, clock cycle is too fast. Moreover, noise is
being considered.
(4) The measuring is stopping after clicked the button of [Stop].
AIO-121602LN-USB, AIO-120802LN-USB
53
4. Application Development
* The name of the connected
Returning to Initial State
This is the method of returning to initial state. It is suggested that you should return to initial state and
perform installation again when the operation is losing stabilization.
(1) Deleting Device form Device Manager.
product will be displayed.
- AIO-121602LN-USB
- AIO-120802LN-USB
(2) Drawing USB cable from a PC
(3) Uninstalling Driver
Se lect [CONTEC API-AIO(WDM) driver] from [My Computer]-[Contr ol P an el] -[Add/Remove
Programs].
(4) Restarting
AIO-121602LN-USB, AIO-120802LN-USB
54
5. About C-LOGGER
5. About C-LOGGER
Outline of C-LOGGER
C-LOGGER is a data logger software program compatible with our analog I/O products. This program
enables the graph display of recorded signal data, zoom observation, file saving, and dynamic transfer to
the spr eadsheet soft w are “Excel”. No troublesome programming is required.
The program is stored on the attached CD-ROM [Driver Librar y AP I-USBP (WDM)].
C-LOGGER offers the following functions.
- Sampling and displaying data with high-speed
- Supporting plural windows
- Sending to excel with high-speed
- Supporting 2 data (binary and csv) forms
- Setting acquirement conditions easily with wizard
- Operating intuitively with file viewer and property viewer
- Saving to file automatically for long-time and mass-data acquirement
- Displaying Graph in 2 Screens: Whole and Zoom
- Abundant Function for Customization
For details, refer to the C-LOGGER Users Guid e.
AIO-121602LN-USB, AIO-120802LN-USB
55
5. About C-LOGGER
AIO-121602LN-USB, AIO-120802LN-USB
56
6. Function
1. Setting the Conversion
Conditions
Clock
Start Condition
Stop Condition
Event
Resolution
Input Mode
Channel
Start
Stop
2. Starting/Stopping
Operation
Status
Memory
4.Reset
Status
Sampling
Repeat
Data acquisition
Conversion data
3. Monitoring the Status
and Acquiring Data
Range
Data transfer method
Memory format
Repeat
Channel
conversion order
6. Function
This chapter d escrib es the di fferent functions that can be implemented using the hardware and driver
together. Unless stated otherwise, the driver is assumed to be API-AIO(WDM).
* When data logger software (C-LOGGER) is used, a part of its function can not be u s ed .
Analog Input Function
The board converts analog signals to digital data according to the resolution and stores it in memory.
You can set a variety of conditions for analog input, including the input channel, sampling period, and
sampling start/stop conditions.
Analog input processes are classified as follows:
AIO-121602LN-USB, AIO-120802LN-USB
57
6. Function
1. Setting the Conversion Conditions
First, set the conditions for executing analog input.
Resolution
”Resolution” signifies the number of bits used by an analog input device to represent analog signals.
The higher the resolution, the more finely the voltage range is segmented, allowing the device to convert
analog values to digital equivalents more precisely.
A device with a resolution of 12-bit divides the range width into 4096 segments.
When the device covers the range of 0 - 10V, the minimum unit of converted voltages is 10÷4096 ≈
2.44mV.
AIO-121602LN-USB : The resolution is 12-bit.
AIO-120802LN-USB : The resolution is 12-bit.
Input Mode
”Input Mode” indicates the method of connecting analog input signals.
The input modes available are single-ended input and differential input.
The single-ended input mode is suitable for the environment in which the potential differen ce between
the signal source and ground and noise components can be ignored. For the environment in which they
cannot be ignored, the differential input mode is suitable.
The number of channels available in differential input mode is half that in single-ended input mode.
This board uses on-board jumpers to set the input mode.
Channel
”Channel” represents each channel No. of analog input signal.
For channel numbers, see “How to connect the connectors” to “Connector Pin Assignment” in Chapter 3
"External Connection".
The channel selection specifies the channel number or the number of channels (channel consecutive from
channel 0) in which it wants to convert AD.
AIO-121602LN-USB, AIO-120802LN-USB
58
6. Function
Channel conversion order
Normally, when performing conversion for more than one channel at each sampling, conversion is
performed consecutively starting from channel 0.
Software setup is not required as this board uses a fixed channel conversion priority.
Range
”Range” means the range of voltages at which analog input can be performed
Software setup of the range is not required as this board uses a fixed range of voltages.
AIO-121602LN-USB : ±10V, ±5V, ±2.5V, 0 - 10V
AIO-120802LN-USB : ±10V, ±5V, ±2.5V, 0 - 10V
AIO-121602LN-USB, AIO-120802LN-USB
59
6. Function
Data transfer method
A device buffer mode is available, which uses the device's or driver's conversion data storage memory.
-
Device buffer mode
When conversion starts, data is saved in the device buffer (memory on the device itself or in the
driver).
The device buffer can operate as FIFO or ring memory.
The application calls an API function at an appropriate timing and fetches the conversion data from
the device buf fer.
The device buffer mode provides function that allows the number of items of conversion data using
the number of sampling times as a unit to obtain the number of items of conversion data directly
from the voltage.
Device buffer mode
AIO-121602LN-USB, AIO-120802LN-USB
60
6. Function
Memory format
This board uses device buffer transfer mode; it does not require software setup of the memory format.
Device buffer mode
- FIFO format
In the FIFO (First In First Ou t) format, input data items are read from memory in the same order in
which they were written to the memory. Input data items are fed out of the memory sequentially,
where the olde st one is always read from the memory. The status monitor and application
notification functions are provided, which check and report the state in which the memory has
stored a fixed amount of data or in which the memory has become full.
The FIFO memory is used to obtain all input data from analog input in a short or infinite period of
time.
- Ring format
In the ring format, the memory contains storage areas arranged in a ring. Input data items are
written to the memory sequentially. When it stores data exceeding the limit, it overwrites the area
storing the previous item of input data. The status monitor and application notification functions are
provided, which check and report the state in which data has been written to certain areas of
memory.
The ring memory is used to obtain data where conversion has stopped due to some event, usually
without obtaining data in the normal state.
AIO-121602LN-USB, AIO-120802LN-USB
61
6. Function
Repeat
”Repeat” indicates the number of repetitions of sampling to be executed, from when the sampling start
condition is satisfied until the end of sampling.
The number of repetitions is set by means of software, for which conversion is repeated. You can set an
infinite number of repetitions, in which case the conversion is terminated by the software abort
command.
Input data items are stored to the memory sequentially. The rep etition state c an be subject to status
monitoring and application notification.
Clock
The sampling clock controls the sampling frequency. You can select both the internal sampling clock and
external sampling clock.
- Internal sampling clock
The clock signal from the on-board clock generator is used.
- External sampling clock
The edge of the digital signal input from an external device is used for the sampling clock.
AIO-121602LN-USB, AIO-120802LN-USB
62
6. Function
Start Condition
The condition for controlling the start of sampling can be selected from among software, input data
comparison and an external trigger. The conditions for controlling the start and stop of sampling are
completely independent of each other; they can be set separately.
- Software
The board starts sampling and storing input data to memory immediately after the operation start
command is issued.
- Input data comparison
When the operation start command is issued, the board compares the analog signal input through a
specified channel to the value of the preset comparison level. If the analog signal satisfies the
condition, the board starts storing input data.
Level comparison conditions are set as two conditions: level and direction.
The above sketch shows that the level comparison condition is satisfied in the rising direction.
The start condition is satisfied when the analog signal at the specified channel passes the
comparison level in the rising direction. Input data items are stored to memory, starting with those
at solid dots.
The above sketch shows that the level comparison condition is satisfied in the falling direction.
The start condition is satisfied when the analog signal at the specified channel passes the
comparison level in the falling direction. Input data items are stored to memory, starting with those
at solid dots.
If you set the level comparison directions to both directions, the start condition is satisfied when the
analog signal passes the level both in the rising and falling directions.
- External trigger
The board starts waiting for an external control signal as soon as the operation start command is
output.
Sampling and data transfer to memory start when the specified edge (rising edge or falling edge) is
input from the external control signal.
AIO-121602LN-USB, AIO-120802LN-USB
63
6. Function
Stop Condition
The condition for controlling the stop of sampling can be selected from among the last sampling count,
input data comparison, an external trigger, and software abort.
The board stops sampling whenever an error occurs irrespective of the stop condition setting.
- Last sampling count
The board stops sampling after storing input data to memory for the specified number of times of
sampling.
- Input data comparison
Once the board has started sampling, it compares the analog signal input through a specified
channel to the value of the preset comparison level. If the analog signal satisfies the condition, the
board stops sampling.
Level comparison conditions are set as two conditions: level and direction.
The above sketch shows that the level comparison condition is satisfied in the rising direction.
The stop condition is satisfied when the analog signal at the specified channel passes the
comparison level in the rising direction. Input data items are stored to memory, ending until those at
solid dots.
The above sketch shows that the level comparison condition is satisfied in the falling direction.
The stop condition is satisfied when the analog signal at the specified channel passes the
comparison level in the falling direction. Input data items are stored to memory, ending until those
at solid dots
If you set the level comparison directions to both directions, the start condition is satisfied when the
analog signal passes the level both in the rising and falling directions.
- External trigger
The board starts waiting for an external control signal as soon as the operation start command is
output.
Sampling and data transfer to memory start when the specified edge (rising edge or falling edge) is
input from the external control signal.
AIO-121602LN-USB, AIO-120802LN-USB
64
6. Function
Event
”Event” works as a function for reporting the occurrence of a certain board state to the application.
The following events can be used in combination depending on the specifications and purpose of the
application.
- ”AD conversion start condition satisfied” event
This event occurs when the AD conversion start condition is satisfied. The event is nullified when
the conversion start condition is “software”.
- ”Repeat en d” event
This even occurs whenever a repetition is completed.
- ”End of de vice operat ion” event
This event occurs when the entire operation including repetitions is completed.
- ”Stored specified sampling times” event
This event occurs when sampling has been performed for the number of times set by software.
This event can only be used in device buffer mode.
- Overflow event
This event occurs at an attempt to store input data with the memory full.
- Sampling clock error event
This event occurs when conversion stops as an error occurs due to a sampling clock period that is
too short.
- AD conversion error event
This event occurs when conversion stops due to an AD conversion error.
2. Starting/Stopping Operation
Sampling is started by the software command.
Once started, sampling can be stopped by the software command at any timing.
AIO-121602LN-USB, AIO-120802LN-USB
65
6. Function
3. Monitoring the Status and Acquiring Data
Software commands are used to monitor the operation status of the device and to acquire input data
from memory. Status monitoring and data acquisition can be performed even during sampling.
Status
The current state of the device can be checked by obtaining the device status.
The following types of device status are available:
- Device operatin g
The “device operating” status remains ON, after the execution of the sampling start command until
the board completes conversion, aborts operation due to an error, or stops sampling in response to
the command.
- Waiting for start trigger
This status remains ON, after the board starts sampling until the start trigger is input, if the
conversion start condition is an external trigger or level comparison. The status is set to OFF when
the input trigger is input to start conversion.
The status is set to ON whenever the board enters the conversion start wait status even when
repeat ed operation has been set.
- Specified sampling data stored
This status is set to ON when input data stored in memory has reached the amount corresponding to
the preset number of times of sampling.
If the memory format is FIFO, the status is set to OFF when the amount of input data in the memory
falls b elow the value corresponding to the preset number of times of sampling as data is acquired.
Once the status is set to ON when the memory format is ring, it remains ON until it is reset.
- Overflow
An overflow error occurs when an attempt is made to store input data to memory while it has been
full of input data.
When the memory format is FIFO, the board stops conversion.
When the memory format is ring, the board continues conversion while overwriting existing data
with new one.
- Sampling clock error
This error occurs when the sampling clock period is too short.
- AD conversion error
If the “device operating” status remains ON (without terminating conversion) for an extended
period of time, the driver regards that state as an operation error and sets this status to ON. This
error stops sampling.
Sampling
The number of sampled items of input data stored in memory can be obtained by the software
command.
Repeat
The current repeat count can be obtained by the software command.
AIO-121602LN-USB, AIO-120802LN-USB
66
6. Function
Data acquisition
The conversion data stored in memory can be retrieved using a software command.
The figure below shows the correspondence between the sampling count and the conversion channel for
the conversion data stored in memory.
Input data is acquired differently depending on the memory format used.
- Data acquisition in FIFO format
When FIFO memory is used, the oldest data is always read first.
The following sketch shows an image of data acquisition in FIFO format.
When data is acquired from the memory, the free memory space increases by that data size. When
data is acquired next, the oldest one of the existing data items is taken from the memory in the same
way.
The FIFO memory deletes data once that data is acquired.
AIO-121602LN-USB, AIO-120802LN-USB
67
6. Function
- Data acquisition in ring format
When ring memory is used, data is read always with respect to the current input data write position.
The following sketch shows an image of data acquisition in ring format.
The sampling count obtained is always the number of times of sampling for up to the latest data
(shaded portion below).
The larger the number of samples taken, the older the data item acquired first.
As the ring memory retains data even after that data is acquired, you can fetch the same data any
number of times.
AIO-121602LN-USB, AIO-120802LN-USB
68
6. Function
+0.005V
2049
0V
2048
-10.000V
0
+9.998V
4095
+5.002V
2049
+5.000V
2048
Conversion data
The following equation represents the relationship between input data and voltage.
Voltage = Input data x (Max. range value - Min. range value) / Resolution + Min. range value
The value of resolution for the 12-bit device is 4096.
< ± 10V range >
The following table shows the relation between AD conversion data and voltage.
Voltage Conversion data (12-bi t)
+9.995V 4095
: :
-0.005V 2047
: :
Ex.: When input data 3072 is input at a resolution of 12-bit in the ±10V range
Voltage = 3072 x (10 - (-10)) ÷4096 + (-10)
= 5.0
< 0 - 10V range >
The following table shows the relation between AD conversion data and voltage.
Voltage Conversion data (12-bi t)
: :
+4.998V 2047
: :
0V 0
Ex.: When AD conversion data 3072 is input at a resolution of 12bit in the 0 - 10V range
Voltage = 3072 x (10 - 0) ÷ 4096 + 0
= 7.5
AIO-121602LN-USB, AIO-120802LN-USB
69
6. Function
4. Reset
Various states can be reset by executing the following reset commands:
Status
This command resets the sampling clock error status and AD conversion error status.
Memory
This can only be used when the transfer mode is set to device buffer mode.
This command resets the following memory related states.
- Resets the conversion data in memory.
- Resets the repeat cou nt to 0.
- Resets the sampling count to 0 when a stop trigger is input.
- Resets the buffer overflow status.
- Resets the status information for the specified data save count.
AIO-121602LN-USB, AIO-120802LN-USB
70
6. Function
1. Setting the Conversion
Conditions
Clock
Start Condition
Stop Condition
Event
Resolution
Channel
Range
Output data
Data transfer method
Memory format
Repeat
Setting data
Status
Sampling
Start
Stop
2. Starting/Stopping
Operation
3. Monitoring the Status
and Acquiring Data
Status
Memory
4. Reset
Analog Outp ut F un c tion
This product converts digital data to analog signals according to the resolution.
You can set a variety of conditions for analog output, including the output channel, sampling period,
and sampling start/stop conditions.
Analog output processes are classified as follows:
AIO-121602LN-USB, AIO-120802LN-USB
71
6. Function
1. Setting the Conversion Conditions
First, set the conditions for executing analog output.
Resolution
"Resolution" signifies the number of bits used by an analog output device to represent analog signals.
The higher the resolution, the more finely the voltage range is segmented, allowing the device to convert
digital values to analog equivalents more precisely.
A device with a resolution of 12bit divides the range width into 4096 segments.
If the device has a resolution of 12bit, it is 10 ÷ 4096 ≈ 2.44mV instead.
AIO-121602LN-USB : The resolution is 12bit.
AIO-120802LN-USB : The resolution is 12bit.
Channel
"Channel" represents each point of analog output.
For individual channel numbers, see "How to connect the connectors" to "Connector Pin Assignment" in
Chapter 3 "External Connection".
You can specify an arbitrary number of points of analog output by setting the channels by means of
software.
Range
"Range" means the range of voltages at which analog output can be performed.
Software setup of the range is not required as this board uses a fixed range of voltages.
AIO-121602LN-USB : ±10V, ±5V, 0 - 10V, 0 - 5V
AIO-120802LN-USB : ±10V, ±5V, 0 - 10V, 0 - 5V
AIO-121602LN-USB, AIO-120802LN-USB
72
6. Function
+0.005V
2049
0V
2048
-10.000V
0
+9.998V
4095
+5.002V
2049
+5.000V
2048
Output data
Output data = ((Voltage – Min. range value) x Resolution) / (Max. range value – Min. range value)
The value of resolution for the 12-bit device is 4096.
< ± 10V range >
The table below shows the relationship between output data and voltage in the ±10-V range.
Voltage Output data(12-bit)
+9.995V 4095
: :
-0.005V 2047
: :
Ex.: When 3V is output at a resolution of 12bit in the ±10V range
Output data = (3 - (-10))
4096 ÷ (10 - (-10))
x
= 2662.4 *
* The value that can be set as output data at this time is an integer. Select "2662" or "2663" as the
output data.
The analog signal corresponding to the output data contains an error as follows:
- Output data "2662" converted to: 2.9980 V
- Output data "2663" converted to: 3.0029 V
This error is a consequential error occurring when output data is obtained from an expected analog
value.
< 0 - 10V range >
The table below shows the relationship between output data and voltage in the 0 -10-V range.
Voltage Output data(12-bit)
: :
+4.998V 2047
: :
0V 0
Ex.: When 3V is output at a resolution of 12bit in the 0 -10V range
Output data = (3 - 0)
4096 ÷ (10 - 0)
x
= 1228.8 *
AIO-121602LN-USB, AIO-120802LN-USB
73
6. Function
* The value that can be set as output data at this time is an integer. Select "1228" or "1229" as the
output data.
The analog signal corresponding to the output data contains an error as follows:
- Output data "1228" converted to: 2.9980 V
- Output data "1229" converted to: 3.0005 V
This error is a consequential error occurring when output data is obtained from an expected analog
value.
Data transfer method
It is the device buffer mode, which uses memory for conversion data storage either on the device or in
the driver.
The application output data is first stored in the device buffer (memory on the device itself or in the
driver).
When conversion sta rt s, the device starts outputting the output data.
The device buffer can operate as FIFO or RING memory.
Device buffer mode handles conversion data by sampling count and API functions are provided to
retrieve conversion data directly as voltage values.
Device buffer mode
AIO-121602LN-USB, AIO-120802LN-USB
74
6. Function
Memory format
This board uses device buffer transfer mode; it does not require software setup of the memory format.
- FIFO (First In First Out) format
Use FIFO format if you wish to output a continuous arbitrary analog output like that shown below.
When using FIFO format, writing of conversion data to memory is always performed from after the
most recent data and DA conversion is performed on the oldest data in memory.
You can write to memory during analog output operation.
An error occurs if the volume of data exceeds the memory size. However, this error does not stop
analog output if it is in progress.
- Ring format
Use ring format if you wish to output a repeated pattern like that shown below.
AIO-121602LN-USB, AIO-120802LN-USB
75
6. Function
When using ring format, write the data for one complete cycle of the output waveform before
starting operation.
You cannot write to the memory during its operation of analog output.
DA conversion data is output continuously in the sequence in which the ring format data is stored.
* Although the figure shows a single analog output channel, output from multiple channels is also
possible.
Repeat
You can specify a repeat count to perform sampling for a specified number of times.
Memory must be set to ring format if a number of r epetitions is to be specified.
(The number of repetitions cannot be specified for FIFO memory format.)
The number of repetitions is set by software and sampling is repeated for the specified number of times.
You can also specify that opera tion continue indefinitely. If set to repea t indefinitely, analog output
operation is stopped by outputting a analog output stop command by software.
AIO-121602LN-USB, AIO-120802LN-USB
76
6. Function
Setting data
Use a software command to save the data in memory.
The figure below shows the relationship between the conversion data stored in memory and the
sampling count and conversion channels.
The procedure for setting the conversion data is different depending on the memory format being used.
- Procedure for FIFO format
When using FIFO format, setting data to memory is always performed from the most recent data.
New data can be added during conversion.
- Procedure for RING format
When using ring format, a ring memory area large enough for the data to be set is reserved.
Data cannot be modified during DA conversion.
AIO-121602LN-USB, AIO-120802LN-USB
77
6. Function
Clock
The sampling clock controls the sampling frequency. You can select from among the internal sampling
clock, or the external sampling clock. The sampling cl ock is selected by means of software.
- Internal sampling clock
The clock signal from the on-product clock generator is used.
- External sampling clock
The edge of the digital signal input from an external device is used for the sampling clock.
Start Condition
The condition for controlling the stop of sampling can be selected from among the last sampling count,
an external trigger, software.
The product stops sampling whenever an error occurs irrespective of the stop condition setting.
- Software
The product starts sampling and storing input data to memory immediately after the operation start
command is issued.
- External trigger
The product starts waiting for an external control signal as soon as the operation start command is
output.
Sampling and data transfer from memory start when the specified edge (rising edge or falling edge)
is input from the external control signal.
Stop Condition
The condition for controlling the stop of sampling can be selected from among the last sampling count,
an external trigger, software.
The product stops sampling whenever an error occurs irrespective of the stop condition setting.
- Last sampling count
The product stops sampling after storing input data to memory for the specified number of times of
sampling.
- External trigger
The product starts waiting for an external control signal after the specified number of samples have
been performed.
Sampling stops when the specified edge (rising edge or falling edge) is input from the external
control signal.
- Software
Sampling continues indefinitely in this mode. Sampling only stops in response to a software
command or an error.
Event
”Event” works as a function for reporting the occurrence of a certain product state to the application.
The following events can be used in combination depending on the specifications and purpose of the
application.
- ”DA conversion start condition satisfied” event
This event occurs when the DA conversion start condition is satisfied. The event is nullified when
the conversion start condition is “software”.
AIO-121602LN-USB, AIO-120802LN-USB
78
6. Function
- ”Repeat en d” event
This even occurs whenever a repetition is completed.
- ”End of de vice operat ion” event
This event occurs when the entire operation including repetitions is completed.
- "Specified number of output samples complete" event
This event occurs when the number of output samples specified by software have been completed.
- Sampling clock error event
This event occurs when conversion stops as an error occurs due to a sampling clock period that is
too short.
- DA conversion error event
This event occurs when conversion stops due to a DA conversion error.
2. Starting/Stopping Operation
Analog output operation is started by a software command (the analog output start command).
Similarly, you can stop analog output at any time using a software command (the analog output stop
command).
3. Monitoring the Status and Acquiring Data
You can use a software command to check the status of analog output operation and of the output data
stored in memory.
Status
The cur rent sta te of the device can be checked by obtaining the device status.
The following types of device status are available:
- Device operatin g
The “device operating” status remains ON, after the execution of the sampling start command until
the produ ct completes conversion, aborts operation due to an error, or stops sampling in response to
the command.
- Waiting for start trigger
This status remains ON, after the product starts sampling until the start trigger is input, if the
conversion start condition is an external trigger. The sta tus is set to OFF when the input trigger is
input to start conversion.
The status is set to ON whenever the product enters the conversion start wait status even when
repeat ed operation has been set.
- Specified number of data outputs
This status turns ON when the output data set in memory has reached a predefined number of
samples.
- Sampling clock error
This error occurs when the sampling clock period is too short.
AIO-121602LN-USB, AIO-120802LN-USB
79
6. Function
- DA conversion error
If the “device operating” status remains ON (without terminating conversion) for an extended
period of time, the driver regards that state as an operation error and sets this status to ON. This
error stops sampling.
Sampling
The number of sampled items of output data transferred from in memory can be obtained by the
software command.
This command can only be used in device buffer mode.
4. Reset
Various states can be reset by executing the following reset commands:
Status
This command resets the sampling clock error status and AD conversion error status.
Memory
This can only be used when the transfer mode is set to device buffer mode.
This command resets the following memory related states.
- Resets the conversion data in memory.
- Resets the repeat cou nt to 0.
- Resets the sampling count to 0 when a stop trigger is input.
- Resets the status information for the specified data save count.
AIO-121602LN-USB, AIO-120802LN-USB
80
6. Function
Counter Function
1. Setting the Op e rating Conditions
This specifies the conditions for counter operation.
Operating conditions
The basic operation of the counter is to count an external input signal.
The counter includes a function to detect a count match and perform a specified o p er at ion when t h e
current count value reaches a preset count value.
Compare count values
The compare count load function automatically loads the next compare count value when a count match
occurs.
The figure above shows an example of using the compare count load function.
After the counter starts, the first count match occurs when the count reaches 1000.
When the count reaches 1000, the counter value at which the second compare count match is to occur
(2000) is set.
This continues with the next value from t he array b ei n g s et each time a count match occurs.
After the final value from the array is loaded, operation can start again from the beginning of the array.
Alternatively, loading can be halted (in which case, the compare count value remains at 2000).
Input signal
The external c lock can be selected as the counter input signal.
Digital filter
A digital filter can be used on external input bits.
The filter time can be set to "don't use", 1µs, 128µs, 16ms by software.
AIO-121602LN-USB, AIO-120802LN-USB
81
6. Function
Event
The event function notifies the application when something occurs on the device.
The following events can be used as required.
- Compare count match event
This event is triggered when a compare match occurs on the counter.
- Count overrun event
This event is triggered when a counter overrun occurs.
- Counter operation error
This event is triggered when a counter operation error causes the counter to stop.
2. Starting/Stopping Operation
Starting and stopping the counter are performed using software commands.
Once the counter has started, it can be stopped at any time by a software command.
3. Monitoring the Status and Acquiring Data
Software commands can be used to monitor the device operating status and read counter data. Status
monitoring and data acquisition can both be performed while the counter is running.
Status
The current state of the device can be checked by obtaining the device status.
The following types of device status are available:
- Counter operating
The devi ce operating status is ON from the time the operation start command is executed until
operation stops due to a stop command or error.
- Compare count match
The compare count match status turns ON when a count match occurs after the counter is started.
The status is turned OFF by the status reset command.
- Overrun
The overrun status turns ON if another count match occurs when the compare count match status is
already ON. The status is turned OFF by the status reset command.
Even if the overrun status turns ON, this does not stop the counter.
- Counter operation error
Execution of driver processing may not be able to keep up if multiple count match events occur
within a short time period.
In this case, the counter operation error status turns ON and counter operation stops.
Data acquisition
The current count value can be read using a software command.
AIO-121602LN-USB, AIO-120802LN-USB
82
6. Function
4. Reset
Various states can be reset by executing the following reset commands:
Counter reset
Resets the counter. This restores the counter to its state after power on.
Status
Resets the compare count match status and overrun status.
AIO-121602LN-USB, AIO-120802LN-USB
83
6. Function
CAUTION
Digital Input Function
Input bit
Individual digital input points are called input bits.
When the number of input points of a device is 8, the bits are determined as bit 0 - bit 7.
Input in Bits
The state 1 (ON) or 0 (OFF) of each input bit can be obtained by specifying the bit.
Input in Bytes
Individual input bits can be input in byte units.
When the number of input points of the device is 4, the individual input bits are arranged as shown
below and the byte data to be input is a value between 0 and 15 depending on the states of the bits.
EX. Input of bit 7 (OFF), bit 6 (ON), bit 5 (OFF), bit 4 (ON), bit 3 (OFF), bit 2 (ON),
bit 1 (OFF), bit 0 (ON)
Byt e data = 85(55H)
Digital filter
A digital filter can be used on the input bits.
The filter tim e can be set to "don 't use", 1µs, 128µs,16ms by software.
When the PC is turned on, All is set to input.
AIO-121602LN-USB, AIO-120802LN-USB
84
6. Function
CAUTION
Digital Output Function
Output bit
Individual digital output points are called output bits.
When the number of output points of a device is 8, the bits are determined as bit 0 - bit 7.
Output in Bits
The state of each output bit can be changed to ON or OFF by specifying the bit and setting it to 1 or 0.
Output in Bytes
Individual output bits can be output in byte units.
When the number of output points of the device is 4, the individual output bits are arranged as shown
below and byte data to be output is a value between 0 and 15.
Ex. Output of bit 7 (ON), bit 6 (OFF), bit 5 (ON), bit 4 (OFF), bit3 (ON), bit 2 (OFF), bit 1 (ON)
and bit 0 (OFF)
Byt e data = 170 (AAH)
The level is Low after it was set to output.
AIO-121602LN-USB, AIO-120802LN-USB
85
6. Function
AIO-121602LN-USB, AIO-120802LN-USB
86
7. About Hardware
Item
Specification
Analog input
Isolated specifica tion
Un-Isolated
Input typ e
Single-Ended Input or Differen tial Input
Number of input
Bipolar ±10V, ±5V, ±2.5V
Absolute max. input
Input imp edance
1MΩ or more
Resolution
12bit
Non-Linearity error *1
±20LSB
Conversion speed
2µsec/ch (Max.) *2 [500KS PS]*3
Buffer memory
1K data FIFO or 1K data R ING
Conversion start trigger
Software / external trigger
Conversion stop trigger
Number of samplin g times / external trigg er/software
External start si gnal
TTL level (Rising or falling edge can be selected by software)
External stop signal
TTL level (Rising or falling edge can be selected by software)
External clock signal
TTL level (Rising or falling edge can be selected by software)
Analog output
Isolated specifica tion
Un-Isolated
Number of output
Bipolar ±10V, ±5V
or Unipolar 0 - +10V, 0 - +5V
Output cu rrent ability
3mA
Output impedance
1Ω or less
Resolution
12bit
Non-Linearity error *1
20LSB
Conversion speed
12µsec (Max.) [ 83KSPS]*3
Buffer memory
1K data FIFO or 1K data RING
Conversion start
Conversion stop trigger
Number of samplin g times / external trigg er/software
External start si gnal
TTL level (Rising or falling edge can be selected by software)
External stop signal
TTL level (Rising or falling edge can be selected by software)
External clock signal
TTL level (Rising or falling edge can be selected by software)