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 Configuration List
- Board [ADA16-32/2(PCI)F] …1
- First step guide … 1
- CD-ROM *1 [API-PAC(W32)] …1
- Synchronization Control Cable(10cm) …1
*1 The CD-ROM contains the driver software and User’s Guide (this guide)
BoardCD-ROM
ADA16-32/2(PCI)F
Synchronous control Cable
First step guide
[API-PAC(W32)]
i
Page 3
Copyright
Copyright 2003 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.
ADA16-32/2(PCI)F
ii
Page 4
Table of Contents
Check Your P ackage................................................................................................................................ i
Table of Contents ...................................................................................................................................iii
1. BEFORE USING THE PRODUCT 1
About the Bo ard ......................................................................................................................................1
Features ............................................................................................................................................ 1
Support Software.............................................................................................................................. 3
What is Set u p ?......................................................................................................................................... 9
Using the Board under Windows Using the Driver Library API-PAC(W32)............................... 9
Using the Board under Windows Using Software Other than the Driver Library
Control Signal Timings......................................................................................................................... 97
Control Signal Timings for Analo g Input..................................................................................... 97
Control Signal Timings for Analo g Output ..................................................................................98
Control Signal Timings for Count er..............................................................................................99
About Cali bration................................................................................................................................100
ADA16-32/2(PCI)F
v
Page 7
ADA16-32/2(PCI)F
vi
Page 8
1. Before Using the Product
1. Before Using the Product
About the Board
This product is a multi-function, PCI bus compliant interface board that incorporates high-precision
analog inputs, high-precision analog outputs, digital inputs, digital outputs, and a counter function.
The board includes an event controller for integrated management of control signals by hardware and a
bus master data transfer function for transferring large volumes of data at high speed. Together, these
features provide all you need to build a high-performance PC-based measurement and control system.
You can use the driver library (API-PAC(W32)) supplied with the board to write Windows application
programs in any programming language (such as Visual Basic, Visual C++, etc.) that supports the
calling of Win32 API functions.
It can also collect data easily without a program when the data logger software [C-LOGGER] stored on
the attached CD-ROM is used. With plug-ins for the dedicated libraries, the board also supports
MATLAB and LabVIEW.
Features
Multi-function
The board contains analog inputs (16-bit, 32ch), analog outputs (16-bit, 2ch), digital inputs (8ch), digital
outputs (8ch), and counters (32-bit binary, 2ch). Combining all these features on one board allows
complex systems to be implemented even on PCs with few spare expansion slots.
The event controller can be used to implement a wide range of different sampling control schemes
The board incorporates an event controller for integrated hardware control. The event controller can
use the external control signals and the events generated by the board functions to start and stop analog
input operation and perform clock control. This enables high-precision synchronization of the various
board functions without requiring software. Also, each function can be operated separately.
Overview of event controller
The arrows in the figure indicate the flow of control
signals. The main control signals included clock
signals and the operation start and stop signals.
Example 1: Synchronize the timing of analog input and
analog output based on an external clock
signal.
Example 2: Start analog input operation each time the
counter reaches a preset value.
ADA16-32/2(PCI)F
1
Page 9
1. Before Using the Product
Bus master transfer function and combined data I/O function
Bus master data transfer can be used for the analog inputs and outputs either separately or at the same
time. This can be used to transfer large volumes of data between the board and PC without placing a
load on the CPU.
When using bus master data transfer for analog input data, you can also transfer the analog output,
digital input, digital output, and counter data at the same time synchronized with the analog input clock
signal.
This function ensures reliable data synchronization in the systems you implement.
Buffer memory available for background processing independent of software
The analog inputs and outputs each have their own buffer memory which can be used when not using
bus master transfer.
You can also perform analog input and output in the background, independent of software and the
current status of the PC.
Software-based calibration
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.
Synchronization control connector provided for synchronizing operation
A synchronization control connector is provided for synchronized control of multiple boards. You can
expand the number of channels simply by adding more boards.
This makes it easy to synchronize operation with other CONTEC boards that have a synchronization
control connector.
Filter function for easy connection of external signals
The digital input signals, counter input signals, and the external control signals for analog I/O
incorporate a digital filter to prevent problems such as chattering.
The same systems can be implemented on either desktop or notebook PCs
The "Analog F Series" boards (ADA16-32/2(PCI)F and ADA16-32/2(CB)F) have equivalent
functionality.
Systems developed on a desktop PC can be ported directly to a notebook PC with minimal changes.
Supported to the data logger software [C-LOGGER]
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], which allows you to use the product on
LabVIEW.
These dedicated libraries are available, free of charge (downloadable), on our web site.
ADA16-32/2(PCI)F
2
Page 10
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 library API-PAC(W32)]
The API-AIO(WDM) is the Windows version driver library software that provides products in the form of Win32 API
functions (DLL). Various sample programs such as Visual Basic and Visual C++, etc and diagnostic program useful
for checking operation is provided.
< Operating environment >
OS Windows Vista, XP, Server 2003, 2000
Adaptation language Visual Basic, Visual C++, Visual C#, Delphi, C++ Builder
You can download the updated version from the CONTEC’s Web site (http://www.contec.com/apipac/). For more
details on the supported OS, applicable language and new information, please visit the CONTEC’s Web site.
Linux version of analog I/O driver
API-AIO(LNX)
[Stored on the bundled CD-ROM driver library API-PAC(W32)]
The API-AIO(LNX) is the Linux version driver software which provides device drivers (modules) by shared library
and kernel version. Various sample programs of gcc are provided.
< Operating environment >
OS RedHatLinux, TurboLinux
(For details on supported distributions, refer to Help available after installation.)
Adaptation language gcc
You can download the updated version from the CONTEC’s Web site (http://www.contec.com/apipac/). For more
details on the supported OS, applicable language and new information, please visit the CONTEC’s Web site.
Data Logger Software
C-LOGGER
[Stored on the bundled CD-ROM driver library API-PAC(W32)]
C-LOGGER is a data logger software program compatible with our analog I/O products. This program enables the
graph display of recorded s ignal data, zoom observati on, file saving, and dynamic transfer to the spreadsheet software
“Excel”. No troublesome programming is required.
CONTEC provides download services (at http://www.contec.com/clogger) to supply the updated drivers.
For details, refer to the C-LOGGER Users Guide or our website.
< Operating Environment >
OS Windows Vista, XP, Server 2003, 2000
Data Acquisition library for MATLAB
ML-DAQ
(Available for downloading (free of charge) from the CONTEC web site.)
This is the library software which allows you to use our analog I/O device products on MATLAB by the MathWorks.
Each function is offered in accordance with the interface which is integrated in MATLAB’s Data Acquisition Toolbox.
See http://www.contec.com/mldaq/ for details and download of ML-DAQ.
ADA16-32/2(PCI)F
3
Page 11
1. Before Using the Product
Data acquisition VI library for LabVIEW
(Available for downloading (free of charge) from the CONTEC web site.)
This is a VI library to use in National Instruments LabVIEW.
VI-DAQ is created with a function form similar to that of LabVIEW's Data Acquisition VI, allowing you t o use
various devices without complicated settings.
See http://www.contec.com/vidaq/ for details and download of VI-DAQ.
VI-DAQ
Cable & Connector (Option)
Shielded Cable with One 96-Pin Half-Pitch Connector : PCA96PS-0.5P (0.5m)
: PCA96PS-1.5P (1.5m)
Shielded Cable with 96-Pin Half-Pitch Connectors at Both Ends : PCB96PS-0.5P (0.5m)
: PCB96PS-1.5P (1.5m)
Flat Cable with One 96-Pin Half-Pitch Connector : PCA96P-1.5 (1.5m)
Flat Cable with 96-Pin Half-Pitch Connectors at Both Ends : PCB96P-1.5 (1.5m)
Half Pitch 96-Pin Female Connector Set(5Pieces) : CN5-H96F
Accessories (Option)
Buffer Amplifier Box for Analog Input Boards (32ch type) : ATBA-32F *1*2
Buffer Amplifier Box for Analog Input Boards (8ch type) : ATBA-8F *1*2*3
Terminal Unit for Cables (M2.5 x 96P) : DTP-64(PC) *1
Screw Terminal Unit (M3.5 x 96P) : EPD-96 *1
Screw Terminal Unit (M3 x 96P) : EPD-96A *1*4
BNC Terminal Unit (for analog input 32ch) : ATP-32F *1
BNC Terminal Unit (for analog input 8ch) : ATP-8 *1*3*5
*1 PCB96PS-* optional cable is required separately (0.5mm is recommended).
*2 An external power supply is necessary (optional AC adaptor POA200-20 prepared.)
*3 The analog input could have 8 channels to be used.
*4 “Spring-up” type terminal is used to prevent terminal screws from falling off.
*5 The digital input can be used up to four points, the digital output up to four points and the counter
I/O up to 1 channel.
* Check the CONTEC’s Web site for more information on these options.
ADA16-32/2(PCI)F
4
Page 12
1. Before Using the Product
Customer Support
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 Three-Years Warranty
CONTEC products are warranted by CONTEC CO., LTD. to be free from defects in material and
workmanship for up to three years 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 office where 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.
ADA16-32/2(PCI)F
5
Page 13
1. Before Using the Product
Safety Precautions
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
WAR NI NG
CAUTION
DANGER indicates an imminently hazardous situation which, if not avoided, will
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.
ADA16-32/2(PCI)F
6
Page 14
1. Before Using the Product
Handling Precautions
DANGER
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.
CAUTION
- There are switches and jumpers on the board that need to be set in advance. Be sure to check these
before installing the board.
- Only set the switches and jumpers on the board to the specified settings.
Otherwise, the board may malfunction, overheat, or cause a failure.
- Do not strike or bend the board. Doing so could damage the board.
Otherwise, the board may malfunction, overheat, cause a failure or breakage.
- Do not touch the board's metal plated terminals (edge connector) with your hands.
Otherwise, the board may malfunction, overheat, or cause a failure.
If the terminals are touched by someone's hands, clean the terminals with industrial alcohol.
- Do not plug or unplug the cables which are connected to the board while the PC or expansion unit is
still turned on.
Otherwise, the board may malfunction, overheat, or cause a failure.
Be sure that the personal computer power is turned off.
- Make sure that your PC or expansion unit can supply ample power to all the boards installed.
Insufficiently energized boards could malfunction, overheat, or cause a failure.
- The specifications of this product are subject to change without notice for enhancement and quality
improvement.
Even when using the product continuously, be sure to read the manual and understand the
contents.
- Do not modify the product. CONTEC will bear no responsibility for any problems, etc., resulting
from modifying this product.
- Regardless of the foregoing statements, CONTEC is not liable for any damages whatsoever
(including damages for loss of business profits) arising out of the use or inability to use this
CONTEC product or the information contained herein.
ADA16-32/2(PCI)F
7
Page 15
1. Before Using the Product
Environment
Use this product in the following environment. If used in an unauthorized environment, the board may
overheat, malfunction, or cause a failure.
Operating temperature
0 - 50°C
Operating 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 bus connector
of the board and its cable have
been plugged correctly.
- Check that the board has
no dust or foreign matter adhering.
- The gold-plated leads of the bus connector
have no stain or corrosion.
Storage
When storing this product, keep it in its original packing form.
(1) Put the board in the storage bag.
(2) Wrap it in the packing material, 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.
ADA16-32/2(PCI)F
8
Page 16
2. Setup
2. Setup
This chapter explains how to set up the board.
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.
The setup procedure varies with the OS and applications used.
Using the Board under Windows
Using the Driver Library API-PAC(W32)
This section describes the setup procedure to be performed before you can start developing application
programs for the board using the bundled CD-ROM “Driver Library API-PAC(W32)”.
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 Installing the Software
Step 2 Setting the Hardware
Step 3 Installing the Hardware
Step 4 Initializing the Software
Step 5 Checking Operations with the Diagnosis Program
If Setup fails to be performed normally, see the “Setup Troubleshooting” section at the end of this
chapter.
Using the Board under Windows
Using Software Other than the Driver Library API-PAC(W32)
For setting up software other than API-PAC(W32), refer to the manual for that software. See also the
following parts of this manual as required.
This chapter Step 2 Setting the Hardware
This chapter Step 3 Installing the Hardware
Chapter 3 External Connection
Chapter 6 About Hardware
ADA16-32/2(PCI)F
9
Page 17
2. Setup
Using the Board under an OS Other than Windows
For using the board under Linux, see the following parts of this manual.
This chapter Step 2 Setting the Hardware
Chapter 3 External Connection
Chapter 5 Abo ut So ftwa re
Chapter 6 About Hardware
For using the board under an OS other than Windows and Linux, see the following parts of this manual.
This chapter Step 2 Setting the Hardware
Chapter 3 External Connection
Chapter 6 About Hardware
ADA16-32/2(PCI)F
10
Page 18
2. Setup
Step 1 Installing the Software
This explains how to install the driver library.
Before installing the hardware on the PC, install the driver library from the API-PAC(W32)
CD-ROM provided with the board.
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.
Which Driver to Use
CONTEC has two analog I/O drivers: API-AIO(WDM) and API-AIO(98/PC).
API-AIO(WDM) is a new driver for analog I/O under Windows.
This driver was developed to be easier to use and to provide additional functions above those provided
by the previous API-AIO(98/PC) driver.
Please use the API-AIO(WDM) with this board. API-AIO(98/PC) is not supported.
ADA16-32/2(PCI)F
11
Page 19
2. Setup
Starting the Install Program
(1)
Load the CD-ROM [API-PAC(W32)] on your PC.
(2)
The API-PAC(W32) Installer window appears automatically.
If the panel does not appear, run (CD-ROM drive letter):\AUTORUN.exe.
(3)
Click on the [Install the drivers] button.
CAUTION
Before installing the soft ware in Wi ndo ws Vista, XP, Serv er 20 03 , 20 00 , log in as a user w i th
administrator privileges.
ADA16-32/2(PCI)F
12
Page 20
2. Setup
Selecting API-AIO(WDM)
(1)
The following dialog box appears to select “Driver to install” and “Install option”, “Usage of
driver library”.
(2)
Select the "High Functionality WDM Analog I/O driver".
(3)
Click on the [Install] button.
* Clicking the [Details] button displays detailed information about API-AIO(WDM) and
API-AIO(98/PC).
Run the installation
(1)
Complete the installation by following the instructions on the screen.
(2) The Readme file appears when the installation is complete.
You have now finished installing the software.
ADA16-32/2(PCI)F
13
Page 21
2. Setup
Step 2 Setting the Hardware
This section describes how to set the board and plug it on your PC.
The board has some switches and jumper to be preset.
Check the on-board switches and jumpers before plugging the board into an expansion slot.
The board can be set up even with the factory defaults untouched. You can change board settings later.
Parts of the Board and Factory Defaults
Figure 2.1 shows the names of each part of the board.
The switch settings shown in the figure are the factory default settings.
Interface connector
(CN1)
ADA16-32/2(PCI)F
CN2, CN3
SW1
BOARD ID
Synchronization Control Cable
(CN2, CN3)
CN2
CN3
Board ID Setting switch
SW1
BOARD ID
8
9
7
6
5
4
3
2
1
0
A
B
C
D
E
F
Figure 2.1. Part Names
ADA16-32/2(PCI)F
14
Page 22
2. Setup
Setting the Board ID
If you install two or more boards on one personal computer, assign a different ID value to each of the
boards to distinguish them.
The board IDs can be set from 0 - Fh to identify up to sixteen boards.
If only one board is used, the original factory setting (Board ID = 0) should be used.
Setting Procedure
To set the board ID, use the rotary switch on the board. Turn the SW1 knob to set the board ID as
shown below.
SW1
BOARD ID
8
9
A
7
6
B
5
C
4
D
3
E
2
F
Factory setting:
0
1
Figure 2.2. Board ID Settings (SW1)
(Board ID = 0)
ADA16-32/2(PCI)F
15
Page 23
2. Setup
Plugging the Board
(1) Before plugging the board, shut down the system, unplug the power code of your PC.
(2) Remove the cover from the PC so that the board can be mounted.
(3) Plug the board into an expansion slot.
(4) Attach the board bracket to the PC with a screw.
(5) Put the cover back into place.
Applicable PCI bus slots
PCI bus slots used in PCs have keys to prevent 5V and 3.3V PCI bus boards from being accidentally
plugged into wrong bus slots. This board can be plugged into both of the 5V and 3.3V PCI bus slots.
<PCI bus slot><PCI bus board>
5-V PCI bus slot
3.3-V PCI bus slot
3.3V key
CAUTION
5V key
A :
Slit for 5-V PCI bu s slot
B :
Slit for 3.3-V PCI bus slot
AB
- Do not touch the board's metal plated terminals (edge connector) with your hands.
Otherwise, the board may malfunction, overheat, or cause a failure.
If the terminals are touched by someone's hands, clean the terminals with industrial alcohol.
- Do not install or remove the board to or from the slot while the computer's power is turned on.
Otherwise, the board may malfunction, overheat, or cause a failure.
Doing so could cause trouble. Be sure that the personal computer or the I/O expansion unit power is
turned off.
- Make sure that your PC or expansion unit can supply ample power to all the boards installed.
Insufficiently energized boards could malfunction, overheat, or cause a failure.
- Power supply from the PCI bus slot at +5V is required.
ADA16-32/2(PCI)F
16
Page 24
2. Setup
Step 3 Installing the Hardware
Windows needs to detect the I/O address and interrupt used by the board. This is called hardware
installation.
When using more than one board, install the boards one at a time and do not install the next board until
setup is complete for the previous board.
Turning on the PC
Turn on the power to your PC.
CAUTION
- The board cannot be properly installed unless the resources (I/O addresses and interrupt level) for
the board can be allocated. Before attempting to install the board, first determine what PC
resources are free to use.
- The resources used by each board do not depend on the location of the PCI bus slot or the board
itself. If you remove two or more boards that have already been installed and then remount one of
them on the computer, it is unknown that which one of the sets of resources previously assigned to
the two boards is assigned to the remounted board. In this case, you must check the resource
settings.
When Using API-AIO(WDM)
(1) When the " Found New Hardware Wizard" opens, select "Install the software automatically
[Recommended]" and then click the "Next" button.
* The wizard may not appear for some OS versions and instead the installation will start
automatically. In this case, proceed to the software initial setup step.
ADA16-32/2(PCI)F
17
Page 25
2. Setup
< If using Windows 98 or Windows Me >
If using Windows 98 or Windows Me, specify the folder that contains the setup information (INF) file
from the CD-ROM.
Source folder
The setup information (INF) file is contained in the following folder on the bundled CD-ROM.
\INF\WDM\AIO
\INF\WDM\AIO
You have now finished installing the hardware.
ADA16-32/2(PCI)F
18
Page 26
2. Setup
Step 4 Initializing the Software
The driver library requires initial settings to determine the execution environment. This is called
driver library initialization.
When Using API-AIO(WDM)
API-AIO(WDM) is initialized automatically during hardware installation. Therefore, if you want to
use it with its initial settings, you can skip the setting procedure described in Step 4. To change the
device name, follow the setting procedure shown below.
Setting the device name
(1) Run Device Manager. From [My Computer] - [Control Panel], select [System] and then select the
[Device Manager] tab.
(You can also open Device Manager by right clicking on My Computer and selecting Properties.)
* The name of the board
you have just added is
displayed.
- ADA16-32/2(PCI)F
(2) The installed hardware appears under the CONTEC Devices node. Open the CONTEC Devices
node and select the device you want to setup (the device name should appear highlighted). Click
[Properties].
ADA16-32/2(PCI)F
19
Page 27
2. Setup
(3) The property page for the device opens.
Enter the device name in the common settings tab page and then click [OK].
The device name you set here is used later when programming.
* The name of the board
you have just added is
displayed.
- ADA16-32/2(PCI)F
* The initial device name that appears is a default value. You can use this default name if you wish.
* Make sure that you do not use the same name for more than one device.
You have now finished installing the initial setting of Software.
ADA16-32/2(PCI)F
20
Page 28
2. Setup
Step 5 Checking Operations with
the Diagnosis Program
Use the diagnosis program to check that the board 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 board 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 board,
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 ADA16-32/2(PCI)F. See "Chapter 3 External Connection" for
details on how to make the connection.
Wiring Diagram
< Analog input >
- Single-Ended Input
Interface connector
CH0
(CN1)A44pin
Signal source
(e.g. Battery etc.)
Analog Ground
(CN1)A34pin
CAUTION
- 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 det ails, se e “Chapter 3 External Connection”.
< Analog output >
Interface connector
(CN1)A48pin
Analog Ground
(CN1)A47pin
CH0
e.g.Tester
Figure 2.3. Wiring Diagram
- Differential Input
Interface connector
(CN1)A44pin
Analog Ground
CH0+
(CN1)A43pin
CH0-
(CN1)A34pin
Signal source
(e.g.Battery etc.)
ADA16-32/2(PCI)F
21
Page 29
2. Setup
Using the Diagnosis Program
Starting the Diagnosis Program
Click the [Diagnosis] button on the device property page to start the diagnosis program.
* The name of the board
you have just added is
displayed.
- ADA16-32/2(PCI)F
ADA16-32/2(PCI)F
22
Page 30
2. Setup
Analog input
Select the input channel, input type, and input range from the lists.
Input data is plotted on a graph.
Analog output
You can select the desired output channel and output range from the lists.
You can set the output data to DC (constant voltage), sine wave, or square wave.
By setting loopback ON, you can reconfigure the internal board hardware so that the channel 0
output signal is connected to all analog input channels.
Digital input / output
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 button resets the count to zero.
ADA16-32/2(PCI)F
23
Page 31
2. Setup
Diagnosis Report
(1) The diagnosis report saves detailed data, including the device settings and settings for each channel,
to a text file and displays the file for you to view.
Clicking [Diagnosis Report] prompts you to specify where to save the report text file.
* The name of the board
you have just added is
displayed.
- ADA16-32/2(PCI)F
(2) The diagnosis report contains the following data.
- Version of OS
- Device Information
- File Information
- Initialization, interrupts, current input or output state for each channel
ADA16-32/2(PCI)F
24
Page 32
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 correctly connected. 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 sample 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.
ADA16-32/2(PCI)F
25
Page 33
2. Setup
ADA16-32/2(PCI)F
26
Page 34
3. External Connection
3. External Connection
This chapter describes the interface connectors on the board and the external I/O circuits.
Check the information available here when connecting an external device.
How to connect the connectors
Connector shape
To connect an external device to this board, plug the cable from the device into the interface connector
(CN1) shown below.
Interface Connector(CN1)
B48
B47
B02
B01
* Please refer to chapter 1 for more information on the supported cable and accessories.
- The numbers in square brackets [ ] are pin numbers designated by HONDA TSUSHIN KOGYO CO.,
Digital Ground
Counter UP Clock Input 01
Control Output 01
B45 A45
B44 A44
B43 A43
B42 A42
B41 A41
B40 A40
B39 A39
B38 A38
B37 A37
B36 A36
B35 A35
B34 A34
B33 A33
B32 A32
B31 A31
B30 A30
B29 A29
B28 A28
B27 A27
B26 A26
B25 A25
B24 A24
B23 A23
B22 A22
B21 A21
B20 A20
N.C.
B19 A19
B18 A18
B17 A17
B16 A16
B15 A15
B14 A14
B13 A13
B12 A12
B11 A11
B10 A10
B09 A09
B08 A08
B07 A07
B06 A06
B05 A05
B04 A04
Reserved
B03 A03
B02 A02
B01
[49]
[1]
B48A48
B01
[96]
[48]
Analog Output 00
Analog Ground ( for AO )
Analog Output 01
Analog Ground ( for AO )
Analog Input 00
Analog Input 16
Analog Input 01
Analog Input 17
Analog Ground ( for AI )
Analog Ground ( for AI )
Analog Input 02
Analog Input 18
Analog Input 03
Analog Input 19
Analog Ground ( for AI )
Analog Ground ( for AI )
Analog Input 04
Analog Input 20
Analog Input 05
Analog Input 21
Analog Ground ( for AI )
Analog Ground ( for AI )
Analog Input 06
Analog Input 22
Analog Input 07
Analog Input 23
Analog Ground ( for AI )
Analog Ground ( for AI )
Digital Ground
N.C.
Digital Input 00
Digital Input 01
Digital Input 02
Digital Input 03
A01
Digital Input 04
Digital Input 05
Digital Input 06
Digital Input 07
AI Control Signal Output 00
AI Control Signal Output 01
Digital Ground
AI External Sampling Clock Input
AI External Stop Trigger Input
AI External Start Trigger Input
Counter UP Clock Input 00
Reserved
Counter Gate Control Input 00
Counter Output 00
A01
ADA16-32/2(PCI)F
28
Page 36
3. External Connection
Analog Input00 - Analog Input31 Analog input signal. The numbers correspond to channel numbers.
Analog Output00 - Analog Output01 Analog output signal. The numbers correspond to channel numbers.
Analog Ground Common analog ground for analog I/O 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.
AI Control Signal Output 00 External sampling clock output signal for analog input.
AI Control Signal Output 01 External output signal for analog input status. Not currently connected.
AO External Start Trigger Input External trigger input for starting analog output sampling.
AO External Stop Trigger Input External trigger input for stopping analog output sampling.
AO External Sampling Clock Input External sampling clock input for analog output.
AO Control Signal Output 00 External sampling clock output signal for analog output.
AO Control Signal Output 01
Digital Input00 - Digital Input07 Digital input signal.
Digital Output00 - Digital Output07 Digital output signal.
Counter Gate Control Input00 -
Counter Gate Control Input01
Counter Up Clock Input00 Counter Up Clock Input01
Counter Output00 - Counter Output01 Count match output signal for counter.
Digital Ground
Reserved Reserved pin
N.C. No connection to this pin.
External output signal for analog output status. Not currently
connected.
Gate control input signal for counter.
Count-up clock input signal for counter.
Common digital ground for digital I/O signals, external trigger inputs,
external sampling clock inputs, and counter I/O signals.
Figure 3.2. Pin Assignment of CN1 < 1 / 2 >
CAUTION
- Do not connect any of the outputs and power outputs to the analog or digital ground.
Neither connect outputs to each other. Doing either can result in a fault.
- If analog and digital ground are shorted together, noise on the digital signals may affect the analog
signals. Accordingly, analog and digital ground should be separated.
- Leave "Reserved" pins unconnected. Connecting these pins may cause a fault in the board.
ADA16-32/2(PCI)F
29
Page 37
3. External Connection
Pin Assignment of CN1 < Differential Input >
N.C.
B48 A48
N.C.
B47 A47
N.C.
B46 A46
N.C.
Analog Input 08[+]
Analog Input 08[-]
Analog Input 09[+]
Analog Input 09[-]
Analog Ground ( for AI )
Analog Ground ( for AI )
Analog Input 10[+]
Analog Input 10[-]
Analog Input 11[+]
Analog Input 11[-]
Analog Ground ( for AI )
Analog Ground ( for AI )
Analog Input 12[+]
Analog Input 12[-]
Analog Input 13[+]
Analog Input 13[-]
Analog Ground ( for Ai )
Analog Ground ( for AI )
Analog Input 14[+]
Analog Input 14[-]
Analog Input 15[+]
Analog Input 15[-]
Analog Ground ( for AI )
Analog Ground ( for AI )
Digital Ground
Digital Output 00
Digital Output 01
Digital Output 02
Digital Output 03
Digital Output 04
Digital Output 05
Digital Output 06
Digital Output 07
AO Control Signal Output 00
AO Control Signal Output 01
AO External Sampling Clock Input
AO External Stop Trigger Input
AO External Start Trigger Input
Counter Gate Control Input 01
- The numbers in square brackets [ ] are pin numbers designated by HONDA TSUSHIN KOGYO CO.,
Digital Ground
Counter UP Clock Input 01
Counter Output 01
B45 A45
B44 A44
B43 A43
B42 A42
B41 A41
B40 A40
B39 A39
B38 A38
B37 A37
B36 A36
B35 A35
B34 A34
B33 A33
B32 A32
B31 A31
B30 A30
B29 A29
B28 A28
B27 A27
B26 A26
B25 A25
B24 A24
B23 A23
B22 A22
B21 A21
B20 A20
N.C.
B19 A19
B18 A18
B17 A17
B16 A16
B15 A15
B14 A14
B13 A13
B12 A12
B11 A11
B10 A10
B09 A09
B08 A08
B07 A07
B06 A06
B05 A05
B04 A04
Reserved
B03 A03
B02 A02
B01
[49]
[1]
B48A48
B01
[96]
[48]
Analog Output 00
Analog Ground ( for AO )
Analog Output 01
Analog Ground ( for AO )
Analog Input 00[+]
Analog Input 00[-]
Analog Input 01[+]
Analog Input 01[-]
Analog Ground ( for AI )
Analog Ground ( for AI )
Analog Input 02[+]
Analog Input 02[-]
Analog Input 03[+]
Analog Input 03[-]
Analog Ground ( for AI )
Analog Ground ( for AI )
Analog Input 04[+]
Analog Input 04[-]
Analog Input 05[+]
Analog Input 05[-]
Analog Ground ( for AI )
Analog Ground ( for AI )
Analog Input 06[+]
Analog Input 06[-]
Analog Input 07[+]
Analog Input 07[-]
Analog Ground ( for AI )
Analog Ground ( for AI )
Digital Ground
N.C.
Digital Input 00
Digital Input 01
Digital Input 02
Digital Input 03
A01
Digital Input 04
Digital Input 05
Digital Input 06
Digital Input 07
AI Control Signal Output 00
AI Control Signal Output 01
Digital Ground
AI External Sampling Clock Input
AI External Stop Trigger Input
AI External Start Trigger Input
Counter UP Clock Input 00
Reserved
Counter Gate Control Input 00
Counter Output 00
A01
ADA16-32/2(PCI)F
30
Page 38
3. External Connection
Analog Input00 - Analog Input15 Analog input signal. The numbers correspond to channel numbers.
Analog Output00 - Analog Output01 Analog output signal. The numbers correspond to channel numbers.
Analog Ground Common analog ground for analog I/O 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.
AI Control Signal Output 00 External sampling clock output signal for analog input.
AI Control Signal Output 01
AO External Start Trigger Input External trigger input for starting analog output sampling.
AO External Stop Trigger Input External trigger input for stopping analog output sampling.
AO External Sampling Clock Input External sampling clock input for analog output.
AO Control Signal Output 00 External sampling clock output signal for analog output.
AO Control Signal Output 01
Digital Input00 - Digital Input07 Digital input signal.
Digital Output00 - Digital Output07 Digital output signal.
Counter Gate Control Input00 -
Counter Gate Control Input01
Counter Up Clock Input00 Counter Up Clock Input01
Counter Output00 - Counter Output01 Count match output signal for counter.
Digital Ground
Reserved Reserved pin
N.C. No connection to this pin.
External output signal for analog input status. Not currently
connected.
External output signal for analog output status. Not currently
connected.
Gate control input signal for counter.
Count-up clock input signal for counter.
Common digital ground for digital I/O signals, external trigger inputs,
external sampling clock inputs, and counter I/O signals.
Figure 3.2. Pin Assignment of CN1 < 2 / 2 >
CAUTION
- Do not connect any of the outputs and power outputs to the analog or digital ground.
Neither connect outputs to each other. Doing either can result in a fault.
- If analog and digital ground are shorted together, noise on the digital signals may affect the analog
signals. Accordingly, analog and digital ground should be separated.
- Leave "Reserved" pins unconnected. Connecting these pins may cause a fault in the board.
ADA16-32/2(PCI)F
31
Page 39
3. External Connection
Analog Input Signal Connection
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 CN1.
The following figure shows an example of shield cable connection. Use shielded cable if the distance
between the signal source and board is long or if you want to provide better protection from noise. For
each analog input channel on CN1, connect the core wire to the signal line and connect the shielding to
ground.
- If the signal source contains over 1MHz signals, the signal may effect the cross-talk noise between
channels.
- If the board and the signal source receive noise or the distance between the board 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 board analog
ground). If it exceeds the maximum voltage, the board 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 signal 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 the 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.
ADA16-32/2(PCI)F
32
Page 40
3. External Connection
Differential Input
The following figure shows an example of flat cable connection.
For each analog input channel on CN1, connect the "+" input to the signal and connect the "-" input to
the signal source ground. Also connect the analog ground on the board to the signal source ground.
The following figure shows an example of shielded cable connection. Use shielded cable if the
distance between the signal source and board is long or if you want to provide better protection from
noise. For each analog input channel on CN1, connect the "+" input to the signal and connect the "-"
input to the signal source ground. Also connect the analog ground on the board and the signal source
ground to the shielding.
- If the signal source contains over 1MHz signals, the signal may effect the cross-talk noise between
channels.
- When the analog ground is not connected, the conversion data is not determined.
- If the board and the signal source receive noise or the distance between the board 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 board analog
ground). If it exceeds the maximum voltage, the board 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 signal 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 the 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.
ADA16-32/2(PCI)F
33
Page 41
3. External Connection
Analog Output Signal Connection
This section shows how to connect the analog output signal by using a flat cable or a shielded cable.
The following figure shows an example of flat cable connection.
Connect the signal source and ground to the CN1 analog output.
BOARD
Analog Output
Analog Ground
CN1CableTarget
Figure 3.7. Analog Output Connection (Flat Cable)
The following figure shows an example of shielded cable connection. Use shielded cable if the
distance between the signal source and board is long or if you want to provide better protection from
noise. For the CN1 analog output, connect the core wire to the signal line and connect the shielding to
ground.
BOARD
Analog Output
Analog Ground
CN1
Shield cable
Tar get
Figure 3.8. Analog Output Connection (Shield Cable)
CAUTION
- If the board or the connected wire receives noise, or the distance between the board and the target is
long, data may not be outputted properly.
- For analog output signal, the current capacity is ±5mA (Max.). Check the specification of the
connected device before connecting the board.
- Do not short the analog output signal to analog ground, digital ground, and/or power line. Doing
so may damage the board.
- Do not connect an analog output signal to any other analog output, either on the board or on an
external device, as this may cause a fault on the board.
ADA16-32/2(PCI)F
34
Page 42
3. External Connection
Digital I/O signals, Counter signals and Control
signals Connection
The following sections show examples of how to connect digital I/O signals, counter I/O signals, and
other control I/O signals (external trigger input signals, sampling clock input signals, etc.).
All the digital I/O signals and control signals are TTL level signals.
10kΩ
BOARD
Digital Ground
Figure 3.9. Digital Input Connection
CN1CableTarge t
Digital Input
BOARD
Digital Output
I
=24mA
OL
Digital Ground
CN1CableTarge t
Figure 3.10. Digital 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 the board (card) and
remains "High". Therefore the external clock for the counter is effective when the counter gate control
input is not connected.
CAUTION
Do not short the output signals to analog ground, digital ground, and/or power line. Doing so may
damage the board.
Reference
For the operation timings for control signal input, see “Control Signal Timings” in Chapter 6
“Hardware”.
ADA16-32/2(PCI)F
35
Page 43
3. External Connection
Synchronization Control Connectors
SC Connectors
Controlling simultaneous operations between boards or controlling in sync with events is in part
dependent on software performance. In order to enhance the reliability of the entire system and to solve
these problems, the board is equipped with SC (Synchronization Control) connectors.
Connecting the SC connectors allows boards of the same or different models to operate in sync with one
another.
From the boards connected with the SC cable, select one master board and use others as slaves. On the
master board, set the signal to be supplied to the slave boards with the software. On the slave boards,
the signal from the master board can be set to either the pacer clock operation start or stop factor.
All board operations can also be stopped with a stop request from the master in case of an error, for
example, or when requested from a slave board. A maximum of 16 boards can be connected including
the master.
For more information on the setup procedure, see the driver software online help. When the SC is not
connected, use the board with stand-alone settings.
Example 1: When clock start and stop requirements are set the same for multiple boards
In order to synchronize master clock start and stop with slave boards you can build a synchronous
system which does not depend on software processing capabilities.
If the board model is the same, data remains synchronized among boards even when channels are
expanded. When board models are different, data still remains compatible since operating clock start
and stop are dependent on the master.
(1) Connect the SC cable.
(2) Designate master/slave with the software.
(3) Assign to the connectors the clock start and stop signals to be output from the master.
(4) Set up slave boards so they can utilize all signals.
(5) Start in order of slave to master boards.
CAUTION
- When clock signals are assigned to the synchronization control connector, the maximum clock
frequency is restricted to 5MHz.
- When signals are assigned to the synchronization control connector, a delay of approximately 100ns
occurs at the slave board.
ADA16-32/2(PCI)F
36
Page 44
3. External Connection
Example 2: When controlling slave operations with master's internal events
By outputting an internal event (interrupt) occurring on the master board, the slaves can start operating
in sync with that signal.
(1) Connect the SC cable.
(2) Designate master/slave with the software.
(3) Assign to the connector the event signal to be output from the master.
(4) Set signals from the master to the start requirements on the slave boards.
(5) Start in order of slave to master boards.
Connecting the SC Connectors (CN2 and CN3)
This board is equipped with sync signal control connectors (CN2 and CN3) for connecting a sync signal
cable. When the cable is connected, multiple boards can operate in sync with one another.
Connection Procedure
Connect the sync signal cable when two or more boards need to operate in sync with one another.
Connect CN2 with a smaller ID number to CN3 with a greater ID number with the cable. You should
only use the cable that came with the board.
ID = 0
ID = 1
ID = 2
Figure 3.11. Connecting Cables
ADA16-32/2(PCI)F
37
Page 45
3. External Connection
ADA16-32/2(PCI)F
38
Page 46
4. Functions
4. Functions
This chapter describes the different functions that can be implemented using the hardware and driver
together. Unless stated otherwise, the driver is assumed to be API-AIO(WDM).
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:
1.Setting the Conversion
Condititions
Starting/Stopping Operation
2.
Resolution
Input Mode
Channel
Channel
conversion order
Range
Data transfer method
Memory
Repeat
Start
Stop
Clock
Start Condition
Stop Condition
Event
3.Monitoring the Status and
Acquiring Data
4.Reset
ADA16-32/2(PCI)F
Status
Sampling
Tran sfer
Repeat
Data aquisition
Status
Memory
39
Page 47
4. Functions
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.
If the device has a resolution of 16-bit, it is 10÷65536 ≈ 0.153mV instead.
ADA16-32/2(PCI)F : The resolution is 16-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 difference 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 point of analog input.
For individual channel numbers, see “Using the On-board Connectors” to “Connector Pin Assignment” in
Chapter 3 "External Connection".
You can specify an arbitrary number of points of analog input by setting the channels by means of
software.
ADA16-32/2(PCI)F
40
Page 48
4. Functions
Channel conversion order
Normally, when performing conversion for more than one channel at each sampling, conversion is
performed consecutively starting from channel 0.
If you wish, you can specify a different channel conversion order.
If the successive approximation input method is used, input is performed as specified by the channel
conversion order setting.
Range
”Range” means the range of voltages at which analog input can be performed.
ADA16-32/2(PCI)F : The input range for the device is set by software.
ADA16-32/2(PCI)F
41
Page 49
4. Functions
Data transfer method
You can select between device buffer mode, which saves conversion data in a conversion data memory
area either on the device or in the driver, or user buffer mode which saves the conversion data in
application 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 buffer.
Device buffer mode is simpler to use than user buffer mode as it handles data by sampling count
and API functions are provided to retrieve conversion data directly as voltage values.
As functions are provided to meet most practical requirements, device buffer mode is usually the
best option.
-
User buffer mode
A region of application memory to store the conversion data is reserved before starting conversion
and specified to the driver.
When conversion starts, conversion data is transferred via the driver directly to the application
memory.
Whether or not to overwrite memory can be specified in user buffer mode.
User buffer mode uses bus master transfer automatically on devices that support it.
Select user buffer mode if you wish to use bus master transfer.
Device buffer mode User buffer mode
ADA16-32/2(PCI)F
42
Page 50
4. Functions
Memory format
The memory format used by device buffer mode and user buffer mode can be specified by software.
Device buffer mode
- FIFO format
In the FIFO (First In First Out) 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 oldest 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.
ADA16-32/2(PCI)F
43
Page 51
4. Functions
User buffer mode
- No overwriting
Data transfer halts when conversion data transfer reaches the end of the user buffer.
This memory format is useful if the number of samples is known in advance.
- Permit overwriting
Data transfer does not halt when conversion data transfer reaches the end of the user buffer.
Data transfer continues to overwrite memory until the conversion stop condition is established.
This mode can be used for long term monitoring or for continuous sampling when all data must be
captured.
ADA16-32/2(PCI)F
44
Page 52
4. Functions
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, including delayed 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 repetition state can be subject to status
monitoring and application notification.
Clock
The sampling clock controls the sampling frequency. You can select either the internal sampling clock,
external sampling clock, or the output of the event controller.
The sampling clock is selected by means of software.
- 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.
- Event controller output
A specified output of the event controller is used as the sampling clock.
Refer to the explanation of the event controller functions or to the driver help for details about the
event controller.
ADA16-32/2(PCI)F
45
Page 53
4. Functions
Start Condition
The condition for controlling the start of sampling can be selected from among software, input data
comparison, an external trigger and an event controller. 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.
ADA16-32/2(PCI)F
46
Page 54
4. Functions
- Conversion data in-range comparison
The in-range compare start condition is established when the level on the specified analog channel
enters the range specified by level 1 and level 2. Saving of conversion data to memory is
performed for the sample points indicated by the black dots.
If the analog signal already exist within the in-range, the convention starts immediately.
Start condition : Level 2 ≤ Analog signal ≤ Level 1
- Conversion data out-of-range comparison
The out-of-range compare start condition is established when the level on the specified analog
channel is outside the range specified by level 1 and level 2. Saving of conversion data to memory
is performed for the sample points indicated by the black dots.
If the analog signal already exist within the out-range, the convention starts immediately.
Start condition : Analog signal ≤ Level 2 or Level 1 ≤ Analog signal
- 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.
- Event controller output
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 event controller output is received.
Refer to the explanation of the event controller functions or to the driver help for details about the
event controller.
ADA16-32/2(PCI)F
47
Page 55
4. Functions
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.
ADA16-32/2(PCI)F
48
Page 56
4. Functions
- Conversion data in-range comparison
The in-range compare stop condition is established when the level on the specified analog channel
enters the range specified by level 1 and level 2. Saving of conversion data to memory is
performed for the sample points indicated by the black dots.
If the analog signal already exist within the in-range, the convention starts immediately.
Start condition : Level 2 ≤ Analog signal ≤ Level 1
- Conversion data out-of-range comparison
The out-of-range compare stop condition is established when the level on the specified analog
channel is outside the range specified by level 1 and level 2. Saving of conversion data to memory
is performed for the sample points indicated by the black dots.
S tart condition : Anal og signal ≤ Level 2 or Level 1 ≤ Analog signal
- External trigger
The board 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 sof tware
command or an error.
- Event controller output
Sampling stops when the specified event controller output is received.
Refer to the explanation of the event controller functions or to the driver help for details about the
event controller.
ADA16-32/2(PCI)F
49
Page 57
4. Functions
Delay
Delayed sampling is performed after the sampling stop condition is satisfied.
When a sampling stop condition other than the software abort command is satisfied, the board performs
sampling for the specified number of times of delayed sampling to store input data to memory.
If you set the number of times of delayed sampling to 0, the board stops sampling the moment the
sampling stop condition is satisfied.
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 end” event
This even occurs whenever a repetition is completed.
- ”End of device operation” 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.
- "Specified number of transfers" event
This event occurs each time a specified number of samples (set by software) has been completed.
This event can only be used in user 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.
ADA16-32/2(PCI)F
50
Page 58
4. Functions
2. Starting/Stopping Operation
Sampling is started by the software command.
Once started, sampling can be stopped by the software command at any timing.
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 operating
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
repeated 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 below 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.
This command can only be used in device buffer mode.
ADA16-32/2(PCI)F
51
Page 59
4. Functions
Transfer
A software command is available to return the number of times data was transferred to user memory.
This command can only be used in user buffer mode.
Repeat
The current repeat count can be obtained by the software command.
Data acquisition
When using the device buffer, 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.
ADA16-32/2(PCI)F
52
Page 60
4. Functions
- 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.
When using a user buffer, the conversion data is transferred directly to application memory by the
driver.
The figure above shows how data is transferred to the user buffer for the case when two channels (0ch
and 1ch) are used. Data transfer uses a single 4 byte packet which is the minimum data transfer size.
Each packet contains two AD conversion data values in binary format.
In the above example, the lower two bytes of the packet contain the channel 0 data and the upper two
bytes contain the channel 1 data.
When using two channels, each packet (each data transfer) contains the data for one sampling.
ADA16-32/2(PCI)F
53
Page 61
4. Functions
The figure above shows how data is transferred to the user buffer for the case when three channels (0ch,
1ch, and 2ch) are used.
As each packet contains two conversion data values, the uppermost two bytes are not used if an odd
number of channels is being used, as in the example above.
When using three channels, two packets (two data transfer operations) are used for each sampling.
ADA16-32/2(PCI)F
54
Page 62
4. Functions
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; that for the 16-bit device is 65536.
The table below shows the relationship between input data and voltage in the ±10-V range.
Voltage Conversion data (12-bit) Voltage Conversion data (16-bit)
+9.995V 4095 +9.99970V65535
: : : :
0.005V 2049 0.00030V32769
0V 2048 0V 32768
-0.005V 2047 -0.00030V32767
: : : :
-10.000V 0 -10.000V0
Ex.: When in pu t d ata 3072 is input at a resolution of 12 -bit in the ± 10-V range
Voltage = 30 72 x (10 - (-10)) ÷ 4096 + (-10)
= 5.0
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 count 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.
ADA16-32/2(PCI)F
55
Page 63
4. Functions
n
Analog Output Function
The board 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:
1.Setting the Conversion
Condititions
Starting/Stopping Operation
2.
3.Monitoring the Status and
Acquiring Data
Resolution
Channel
Range
Output data
Data transfer method
Memory
Repeat
Setting data
Start
Stop
Status
Sampling
Tra nsfe r
Repeat
Clock
Start Conditio
Stop Condition
Event
4.Reset
Status
Memory
ADA16-32/2(PCI)F
56
Page 64
4. Functions
1. Setting the Conversion Conditions
First, set the conditions for executing analog input.
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 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.
If the device has a resolution of 16-bit, it is 10 ÷ 65536 ≈ 0.153mV instead.
ADA16-32/2(PCI)F : The resolution is 16-bit.
Channel
"Channel" represents each point of analog output.
For individual channel numbers, see "Using the On-board 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.
ADA16-32/2(PCI)F : The output range of the device is set by software.
ADA16-32/2(PCI)F
57
Page 65
4. Functions
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; that for the 16-bit device is 65536.
The table below shows the relationship between output data and voltage in the ±10-V range.
Voltage Output data(12-bit) Voltage Output data(16-bit)
+9.995V 4095 +9.99970V 65535
: : : :
0.005V 2049 0.00030V32769
0V 2048 0V 32768
-0.005V 2047 -0.00030V32767
: : : :
-10.000V 0 -10.000V0
Ex.: When 3V is output at a resolution of 16-bit in the ±10-V range
Output data
= (3 - (-10))
65536 ÷ (10 - (-10))
x
= 42598.4 *
* The value that can be set as output data at this time is an integer. Select "42598" or "42599" as the
output data.
The analog signal corresponding to the output data contains an error as follows:
- Output data "42598" converted to: 2.9998 V
- Output data "42598" converted to: 3.0001 V
This error is a consequential error occurring when output data is obtained from an expected analog
value.
ADA16-32/2(PCI)F
58
Page 66
4. Functions
Data transfer method
You can select between device buffer mode, which saves conversion data in a conversion data memory
area either on the device or in the driver, or user buffer mode which saves the conversion data in
application memory.
- Device buffer mode
The application output data is first stored in the device buffer (memory on the device itself or in the
driver).
When conversion starts, the device starts outputting the output data.
The device buffer can operate as FIFO or RING memory.
Device buffer mode is simpler to use than user buffer mode as it handles conversion data by
sampling count and API functions are provided to set conversion data directly as voltage values.
As functions are provided to meet most practical requirements, device buffer mode is usually the
best option.
- User buffer mode
A region of application memory to store the output data is specified before starting conversion.
When conversion starts, the driver outputs the conversion data directly to the device.
Whether or not to overwrite memory can be specified in user buffer mode.
User buffer mode uses bus master transfer automatically on devices that support it.
Select user buffer mode if you wish to use bus master transfer.
Device buffer mode User buffer mode
ADA16-32/2(PCI)F
59
Page 67
4. Functions
Memory format
The memory format used by device buffer mode and user buffer mode can be specified by software.
Device buffer mode
- FIFO 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. Howev er, th is erro r do e s not sto p
analog output if it is in progress.
- Ring format
Use ring format if you wish to output a repeated pattern like that shown below.
ADA16-32/2(PCI)F
60
Page 68
4. Functions
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.
User buffer mode
- No overwriting
Data transfer stops after output reaches the end of the user buffer.
This memory format is useful if the sampling count is known in advance.
- Permit overwriting
Data transfer does not stop when output reaches the end of the user buffer.
Instead, transfer continues repeatedly until the conversion stop condition is established.
In this mode, the analog output operates like a function generator and continuously generates a
fixed waveform.
ADA16-32/2(PCI)F
61
Page 69
4. Functions
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 repetitions 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 operation continue indefinitely. If set to repeat indefinitely, analog output
operation is stopped by outputting a analog output stop command by software.
ADA16-32/2(PCI)F
62
Page 70
4. Functions
Setting data
Device buffer mode
When using the device buffer, 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 d ata to b e set is reserved.
Data cannot be modified during DA conversion.
ADA16-32/2(PCI)F
63
Page 71
4. Functions
User buffer mode
Store the output data in the user buffer using the format shown below.
The figure above shows how to set the data in the user buffer for the case when two channels (0ch and
1ch) are used.
Data transfer is performed using a single 4 byte packet which is the minimum data transfer size.
Each packet contains two DA conversion data values in binary format.
In the above example, the lower two bytes of the packet contain the channel 0 data and the upper two
bytes contain the channel 1 data.
When using two channels, each packet (each data transfer) contains the data for one sampling.
The figure above shows how to set the data in the user buffer for the case when three channels (0ch, 1ch,
and 2ch) are used.
As each packet contains two conversion data values, the uppermost two bytes are not used if an odd
number of channels is being used, as in the example above.
When using three channels, two packets (two data transfer operations) are used for each sampling.
As the ADA16-32/2(PCI)F supports a maximum of two channels, each packet always contains the data
for a single sampling.
ADA16-32/2(PCI)F
64
Page 72
4. Functions
Clock
The sampling clock controls the sampling frequency. You can select either the internal sampling clock, or
external sampling clock. The sampling clock is selected by means of software.
- 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.
- Event controller output
A specified output of the event controller is used as the sampling clock.
Refer to the explanation of the event controller functions or to the driver help for details about the
event controller.
Start Condition
The condition for controlling the start of sampling can be selected from among software, external
trigger and an event controller. 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.
- External trigger
The board 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.
- Event controller output
The board 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 event controller output is
received.
Refer to the explanation of the event controller functions or to the driver help for details about the
event controller.
Stop Condition
The condition for controlling the stop of sampling can be selected from among the last sampling count,
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.
- External trigger
The board 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.
ADA16-32/2(PCI)F
65
Page 73
4. Functions
- Software
Sampling continues indefinitely in this mode. Sampling only stops in response to a sof tware
command or an error.
- Event controller output
Sampling stops when the specified event controller output is received.
Refer to the explanation of the event controller functions or to the driver help for details about the
event controller.
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.
- ”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”.
- ”Repeat end” event
This even occurs whenever a repetition is completed.
- ”End of device operation” 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.
This event is used when the device buffer mode is used for data transfer.
- Specified number of transfers event
This event occurs each time a specified number of samples (set by software) has been completed.
When FIFO for mat is used, the e vent occurs when the remaining number of samples falls below a
specified level. The event occurs repeatedly as long as this condition is satisfied.
When ring memory format is used, the event occurs when the number of samples output from
memory reaches a specified value. The event occurs for the specified number of repetitions.
This event is used when the user buffer mode is used for data transfer.
- 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 an 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).
ADA16-32/2(PCI)F
66
Page 74
4. Functions
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 current state of the device can be checked by obtaining the device status.
The following types of device status are available:
- Device operating
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 ean vent controller output. 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
repeated 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.
- 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.
Transfer
You can use a software command to get the number of times output data has been transferred from user
memory.
This command can only be used in user buffer mode.
Repeat
The current repeat count can be obtained by the software command.
This command can only be used in device buffer mode.
ADA16-32/2(PCI)F
67
Page 75
4. Functions
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 count to 0.
- Resets the sampling count to 0 when a stop trigger is input.
- Resets the status information for the specified data save count.
ADA16-32/2(PCI)F
68
Page 76
4. Functions
Counter Function
1. Setting the Operating 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 operation when the
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 the array being set 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).
ADA16-32/2(PCI)F
69
Page 77
4. Functions
Preset value
This function loads the next preset value automatically each time a compare count match occurs.
The figure above shows an example of using the preset value load function. In this example, the
compare match value is set constant at 2000.
When the counter starts, zero is loaded as the initial preset count.
A compare count match occurs when the count reaches 2000. At this time, 500 is loaded as the next
preset value and the count value jumps to 500. This continues with the next value from the array being
set 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 preset value remains at 1500).
Input signal
The external clock or event controller output 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, or 16ms by software.
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 ev ent
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.
ADA16-32/2(PCI)F
70
Page 78
4. Functions
2. Starting/Stopping Operation/Preset
Starting and stopping the counter and setting the preset values are performed using software commands.
Once the counter has started, it can be stopped at any time by a software command.
The function for setting the preset values can also be called at any time regardless of whether the
counter is running or not.
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 device 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.
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.
ADA16-32/2(PCI)F
71
Page 79
4. Functions
Digital Input Function
Input bit
Individual digital input points are called input bits.
When the number of input points of a d evice is 8, the bits are determined as bit 0 - bit 7.
Bit 3
Bit 2 Bit 1Bit 4Bit 5Bit 6Bit 7
Bit 0
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)
and bit 0 (ON)
Byte data = 85(55H)
Bit 3
Bit 2 Bit 1Bit 4Bit 5Bit 6Bit 7
Bit 0
Digital filter
A digital filter can be used on the input bits.
The filter time can be set to "don't use", 1μs, 128μs, or 16ms by software.
ADA16-32/2(PCI)F
72
Page 80
4. Functions
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.
Bit 3
Bit 2 Bit 1Bit 4Bit 5Bit 6Bit 7
Bit 0
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)
Byte data = 170(AAH)
Bit 0
0(OFF)
1(ON) 0(OFF)
1(ON) 0(OFF)
Bit 3 Bit 2 Bit 1Bit 4Bit 5Bit 6Bit 7
0(OFF) 1(ON)1(ON)
ADA16-32/2(PCI)F
73
Page 81
4. Functions
Event Controller Function
Overview of the event controller
The event controller is used to determine how the control signals between the various functions are
interlinked.
Customizing the way in which the control signals are used allows more advanced operations to be
implemented by synchronizing the different functions within a single device and by synchronizing
operation between multiple devices.
The arrows in the figure show the flow of control signals.
The main control signals include the operation start signals, operation stop signals, and clock signals.
ADA16-32/2(PCI)F
74
Page 82
4. Functions
Example of using the event controller (1)
The following example shows how to configure the event controller to perform analog output
synchronized with analog input.
First, the conversion start signal for analog input can be configured to be used as the start signal for
analog output so that analog input and output start simultaneously.
1. Set the analog input start condition
This example specifies software activation.
2. Set the analog output start condition
As the control signal from analog input is used as the start condition, set this as an event controller
output.
3. Setting up the event controller
Setup the event controller.
The signal destination is the conversion start signal for analog output and the signal source is the
analog input software start signal.
CAUTION
If the start condition for analog input is set to something other than software activation, the signal
source for the event controller must also be specified.
Next, to perform both analog input and output with the same interval, configure so that the clock signal
for analog input is used as the clock signal for analog output.
4. Set the clock to use for analog input
This example specifies the internal clock.
5. Set the clock to use for analog output
As the control signal from analog input will be used as the clock, set this as an event controller
output.
6. Setting up the event controller
Setup the event controller.
The signal destination is the sampling clock for analog output and the signal source is the internal
clock signal for analog input.
In this example, conversion is started first for the analog output. Actual analog output does not
start until analog input conversion starts.
7. Start conversion
Start conversion.
ADA16-32/2(PCI)F
75
Page 83
4. Functions
Example of using the event controller (2)
The following example shows how to configure the event controller to synchronize analog input
operation between two devices using the synchronization connector.
Synchronizing between two devices is performed by connecting control signals from device 1 to device
2.
1. Set the analog input start condition (device 1)
This example specifies software activation.
2. Setting up the event controller (device 1)
Setup the event controller to connect the software start signal to the synchronization connector for
output to device 2.
The signal destination is synchronization bus master signal 1 and the signal source is the analog
input software start signal.
3. Set the clock to use for analog input (device 1)
This example specifies the internal clock.
4. Setting up the event controller (device 1)
Setup the event controller to connect the internal clock to the synchronization connector for output
to device 2.
The signal destination is synchronization bus master signal 2 and the signal source is the internal
clock signal for analog input.
Device 2 performs analog input in accordance with the control signals received from device 1.
5. Set the analog input start condition (device 2)
As the control signal from device 1 is used as the start condition, set this as an output from the
event controller.
6. Setting up the event controller (device 2)
The software start signal from device 1 is connected to synchronization bus master signal 1 which
in turn is connected to synchronization bus slave signal 1 in the synchronization connector.
Accordingly, setup the event controller to use synchronization bus slave signal 1 as the conversion
start signal for device 2.
The signal destination is the conversion start signal for analog input and the signal source is
synchronization bus slave signal 1.
7. Set the clock to use for analog input (device 2)
As the control signal from device 1 is used as the clock, set this as an output from the event
controller.
ADA16-32/2(PCI)F
76
Page 84
4. Functions
8. Setting up the event controller (device 2)
The internal clock signal from device 1 is connected to synchronization bus master signal 2 which
in turn is connected to synchronization bus slave signal 2 in the synchronization connector.
Accordingly, setup the event controller to use synchronization bus slave signal 2 as the sampling
clock for device 2.
The signal destination is the sampling clock for analog input and the signal source is
synchronization bus slave signal 2.
9. Start conversion
In this example, conversion is started first on device 2. When analog input starts on device 1,
analog input starts simultaneously on device 2.
Example of using the event controller (3)
The following example shows how to configure the event controller to start analog input when a count
match occurs on the counter.
Connect the count match signal from the counter to the conversion start signal for analog input.
1. Set the analog input start condition
As the control signal from the counter is used as the start condition, set this as an output from the
event controller.
2. Setting up the event controller
Setup the event controller.
The signal destination is the conversion start signal for analog input and the signal source is the
count match signal from the counter.
3. Start operation
In this example, conversion is first started for analog input. Actual conversion does not start until
a count match occurs on the counter.
ADA16-32/2(PCI)F
77
Page 85
4. Functions
Example of using the event controller (4)
The following example shows how to count the analog output clock and output the counter count match
signal externally each time a specified number of clocks have been input.
This example does not require any setup of the event controller for analog output.
Event controller setup is only needed for the counter.
1. Set the counter input signal
As this example uses the analog input clock signal, setup the event controller accordingly.
2. Setting up the event controller
Setup the event controller.
The signal destination is the count-up clock signal and the signal source is the internal clock signal
for analog output.
3. Start conversion
Start the counter first, then start analog output.
ADA16-32/2(PCI)F
78
Page 86
5. About Software
5. About Software
CD-ROM Directory Structure
\
|– Autorun.exe Installer Main Window
| Readmej.html Version information on each API-TOOL (Japanese)
| Readmeu.html Version information on each API-TOOL (English)
.
| ––Release Driver file on each API-TOOL
| |––API_NT (For creation of a user-specific install program)
| |––API_W95
.
.
| ––UsersGuide Hardware User's Guide(PDF files)
ADA16-32/2(PCI)F
79
Page 87
5. About Software
About Software for Windows
The bundled CD-ROM “Driver library API-PAC(W32)” contains the functions that provide the
following features:
- Analog input or output through arbitrary channels
- Analog input at arbitrary intervals using the internal or external sampling clock
- Simultaneous monitoring of the termination of analog input sampling, buffer memory usage, and
interrupt events s uch as occurrences of errors
- Driver option check using a demo driver even without the board installed
For details, refer to the help file. The help file provides various items of information such as “Function
Reference”, “Sample Programs”, “Tutorial”, “FAQs”and “Troubleshooting”. Use them for program
development and troubleshooting.
Accessing the Help File
(1) Click on the [Start] button on the Windows taskbar.
(2) From the Start Menu, select “Programs” – “CONTEC API-PAC(W32)” – “AIOWDM” –
“API-AIO(WDM) HELP” to display help information.
ADA16-32/2(PCI)F
80
Page 88
5. About Software
Using Sample Programs
Sample programs are provided for each of the basic operations. You can use these to check the
operation of the board and as a reference when writing your own programs.
To use the sample programs, specify the device name in the property page for the program.
The sample programs are stored in \Program Files\CONTEC\API-PAC(W32)\AIOWDM\Samples.
Running a Sample Program
(1) Click on the [Start] button on the Windows taskbar.
(2) From the Start Menu, select “Programs” – “CONTEC API-PAC(W32)” – “AIOWDM” –
“SAMPLE…”.
(3) A sample program is invoked.
ADA16-32/2(PCI)F
81
Page 89
5. About Software
Sample Programs - Examples
Analog input
Simple sample program
- SingleAi Perform single analog input from specified channel
- MultiAi Perform single analog input from multiple channels
Device buffer
- Ai Perform standard analog input using a FIFO buffer
- AiPoll Perform standard analog input by polling
- AiEx Perform analog input for multiple channels using a FIFO buffer
- AiLong Perform long-duration analog input using a FIFO buffer
- AiExt Perform analog input using an external clock
- AiTrg Perform analog input using an external trigger to start and stop operation
- AiLevel1 Use a level trigger to start analog input
- AiLevel2 Use a level trigger to stop analog input
- Ai2 Perform standard analog input using more than one device
- AiCall Perform analog input using a callback routine
- AiSync1 Perform multi-channel analog input using two devices
User buffer
- AiUser1
- AiUser2
Perform analog input for a specified duration using a user buffer
Perform analog input indefinitely using a user buffer
- AiData Perform analog input with attached data
Analog output
Simple sample program
- SingleAo Perform single analog output from specified channel
- MultiAo Perform single analog output from multiple channels
Device buffer
- Ao Perform standard analog output using a FIFO buffer
- AoPoll Perform standard analog output by polling
- AoEx Perform analog output for multiple channels using a FIFO buffer
- AoLong Perform long-duration analog output using a FIFO buffer
- AoExt Perform analog output using an external clock
- AoRing Perform continuous analog output using a ring buffer
- AoTrg Perform analog output using an external trigger to start and stop operation
- Ao2 Perform standard analog output using more than one device
- AoCall Perform analog output using a callback routine
ADA16-32/2(PCI)F
82
Page 90
5. About Software
User buffer
- AoUser1 Perform analog output for a specified duration using a user buffer
- AoUser2 Perform analog output indefinitely using a user buffer
Digital input/output
- DioBit Perform digital I/O using bit values
- DioByte Perform digital I/O using byte values
Counter/Timer
- Counter General purpose counter
- Interval Interval timer
- Watch Stopwatch timer
Others
- Convert Data conversion
- Multi1 Synchronized analog I/O
ADA16-32/2(PCI)F
83
Page 91
5. About Software
Usage of Utility Program
Program for Measurement of Function Execution Speed
The execution time of some main functions can be measured in a function execution speed measurement
program. To use a function execution speed measurement program, click the [execution time
measurement] button in the diagnostic program.
* The name of the board
you have just added is
displayed.
- ADA16-32/2(PCI)F
Procedure
(1) Chose the measure device from device list.
(2) Click the button written with the function name to measure the execution speed of the function.
Please choose from a list the number of channels used for conversion in function AioMultiAi and
AioMultiAo. Input the transmission data size in function AioGetAiSamplingData and
AioSetAoSamplingData. The transmission data is set by unit of kByte.
(3) End the application with an [end] button.
ADA16-32/2(PCI)F
84
Page 92
5. About Software
Analog Input Measurement Tool
It is an analog input measurement utility to carry out infinity sample in the FIFO memory. Once the
conversion data of memory accumulates to a certain quantity, the event occurs and data of the memory
is acquired. Data in the FIFO memory can be confirmed visually.
* The name of the board
you have just added is
displayed.
- ADA16-32/2(PCI)F
64k
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 make use of it for the conversion spec measurement under various conversion
conditions.
ADA16-32/2(PCI)F
85
Page 93
5. About Software
Procedure
(1) Chose the device name of the device to be used from the upper left combo box, and click the setting
(2) The conversion conditions are set on the screen of the analog input setting.
(3) Start the measurement with measurement start button. The various states during the conversion
The number of the samplings in FIFO is :
Event generation sampling frequency :
Total input sampling frequency :
Measurement may stop by the following errors.
Sampling clock error :
Buffer overflow :
(4) Click the “stop” button, and measurement stops.
button.
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.
are displayed.
It is conversion data taken in the memory. This can be visually checked in a "memory image".
When the number of input sampling in FIFO reaches this frequency, the event generates.
It is the total number of samplings for application in the memory.
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 clock. Moreover, the cause by
noise etc. is also concerned.
The memory overflows since the conversion speed is too fast compared with the one at which data
is inputted.
ADA16-32/2(PCI)F
86
Page 94
5. About Software
k
Analog Output Measurement Tool
It is an analog output measurement utility to carry out infinity sample in the FIFO memory. Once the
conversion data of memory accumulates to a certain quantity, the event occurs and new output data is
added. Data in the FIFO memory can be confirmed visually.
* The name of the board
you have just added is
displayed.
- ADA16-32/2(PCI)F
64
The number of channels used, the internal/external clock, the conversion speed, the sampling frequency
at which an event generates and number of the samplings to be added can be set. Since the notification
of a sampling clock error event is sent, please make use of it for the conversion spec measurement under
various conversion conditions.
CAUTION
This program is made with Visual Basic. Therefore, it is not possible to execute it as it is in the
environment in which Visual Basic is not installed. The program can be used by executing the
following setup below the folder that installs the API-AIO(WDM).
AIOWDM\Utility\AoSpec\setup.exe
ADA16-32/2(PCI)F
87
Page 95
5. About Software
Procedure
(1) Chose the device name of the device to be used from the upper left combo box, and click the setting
(2) The conversion conditions are set on the screen of the setting analog output.
(3) Start the measurement with measurement start button. The various states during the conversion
The number of the samplings in FIFO is :
Event generation sampling frequency :
Adding sampling frequency :
Measurement may stop by the following errors.
Sampling clock error :
(4) Click the “stop” button, and measurement stops.
button.
Once an output is done at the sampling frequency specified as data setting sampling frequency, an
event occurs and data will be added. Click the OK button to finish setting the conditions, and
returns to former screen.
are displayed.
It is conversion data set in the memory. This can be visually checked in a "memory image".
When the number of unoutput sampling in FIFO reaches this frequency, the event generates.
It is the number of samplings of output data to b e add e d du ring th e ev en t.
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 clock. Moreover, the cause by
noise etc. is also concerned.
ADA16-32/2(PCI)F
88
Page 96
5. About Software
Uninstalling the Driver Librar ie s
To uninstall API-PAC(W32), follow the procedure below.
(1) Click on the [Start] button on the Windows taskbar. From the Start Menu, select “Settings” –
“Control Panel”.
(2) Double-click on “Add/Remove Programs” in the Control Panel.
(3) Select "CONTEC API-AIO(WDM) driver" and "CONTEC API-AIO(WDM) VerX.XX
(Development environment)" from the list of applications.
Click the [Change/Remove] button. Follow the on-screen instructions to uninstall the function
libraries.
ADA16-32/2(PCI)F
89
Page 97
5. About Software
About Software for Linux
The Linux version of analog I/O function driver, API-AIO(LNX), provides functions that execute the
following features:
- The analog input/output of a specified channel can be done.
- It is possible to operate as a set parameter to the analog input/output board is preserved by the
default value, and the setting of the parameter doesn't exist.
For details, refer to the help file. The help file provides various items of information such as “Function
Reference”, “Sample Programs”, and “FAQs”. Use them for program development and
troubleshooting.
Driver Software Install Procedure
The Linux version for analog I/O driver, API-AIO(LNX), is supplied as a co mpressed file
/linux/aio/caioXXX.tgz on the bundled API-PAC(W32)CD-ROM. (Note: XXX represents the driver
version.)
Mount the CD-ROM as shown below, copy the file to an arbitrary directory, and decompress the file to
install the driver.
For details on using the driver, refer to readme.txt and the help file in HTML format extracted by
installation.
To install the driver, log in as a superuser.
Decompression and setup procedure
# cd
# mount /dev/cdrom /mnt/cdrom Mount the CD-ROM.
# cp /mnt/cdrom/linux/aio/caioXXX.tgz ./ Copy the compressed file.
# tar xvfz caioXXX.tgz Decompress the compressed file.
................
# cd contec/caio
# make Compile the file.
................
# make install Install.
................
# cd config
# ./config Set up the board to be used.
..... Set as follows.........
# ./contec_aio_start.sh Start the driver.
# cd
ADA16-32/2(PCI)F
90
Page 98
5. About Software
Accessing the Help File
(1) Invoke a web browser in your X-Window environment.
(2) In the browser, open diohelp.htm in the contec/caio/help directory.
Using Sample Programs
Sample programs have been prepared for specific basic applications.
Sample programs for each language are contained in the contec/caio/samples directory. For compiling
them, refer to the manual for the desired language.
Uninstalling the driver
To uninstall the driver, use the uninstall shell script contained in the contec/caio directory. For details,
check the contents of the script.
ADA16-32/2(PCI)F
91
Page 99
5. About Software
ADA16-32/2(PCI)F
92
Page 100
6. About Hardware
6. About Hardware
This chapter provides hardware specifications and hardware-related supplementary information.
For detailed technical information
For further detailed technical information (“Technical Reference” including the information such as an
I/O map, configuration register, etc.), visit the Contec's web site (http://www.contec.com/support/) to
call for it.
ADA16-32/2(PCI)F
93
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.