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 damage d or missing item s,
contact your retailer.
Product Configuration List
- PC Card [PIO-16/16L(CB)H] …1
- Cable with isolation unit [PIO-16/16L(CB)H-BOX and CB-PM68/37] …1
- First step guide …1
- CD-ROM [API-PAC(W32) *1] …1
*1 The CD-ROM contains the driver software and User’s Guide (this guide)
PC card
PIO-16/16L(CB)H
Cable with isolation unit
First step guide
CD-ROM
[API-PAC(W32)]
i
Page 3
Copyright
Copyright 2004 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 an d
product names are trademarks of their respective holder.
ii
PIO-16/16L(CB)H
Page 4
Table of Contents
Check Your Pack ag e............................................................................................................................i
Copyright ............................................................................................................................................ ii
Connection to the LE D .............................................................................................................. 32
Example of Connection to TTL Level In put ............................................................................. 32
Connecting the Sink T yp e Ou tpu t and S ink O u tp u t S upp o rt I np u t ................................................. 33
4.FUNCTION35
Data I/O Func tio n ............................................................................................................................. 3 5
Data Input................................................................................................................................... 35
Data Output................................................................................................................................ 35
Monitoring Ou tp ut D at a ............................................................................................................. 35
Digital Filter...................................................................................................................................... 36
Digital Filter Function Principle................................................................................................ 36
Set Digital F ilt e r Time............................................................................................................... 36
Interrupt Con tr ol Fu n ct io n................................................................................................................ 37
Disabling/En a bl ing I n te rr up ts....................................................................................................37
Selecting th e In t e rru p t E dg e ................................................................................................... ... 37
Clearing the Inte rru pt St atu s an d In t er ru p t Sig n a l .................................................................... 37
iv
PIO-16/16L(CB)H
Page 6
5.ABOUT SOFTWARE39
CD-ROM Directo r y S t ru c tu re .......................................................................................................... 39
About Software for Windo w s........................................................................................................... 40
Accessing the He lp F il e........................................................................................................ ..... 40
Using Sample Programs ............................................................................................................ 41
Uninstalling the Dr i v er Li b ra rie s .............................................................................................. 43
About Software for Linux ....................................................................................................... .......... 44
Driver Softwa re In s tal l Pro c ed ur e ............................................................................................. 44
Accessing the He lp F il e........................................................................................................ ..... 45
Using Sample Programs ............................................................................................................ 45
Uninstalling the driver............................................................................................................... 45
This chapter provides information you should know before using the product.
About the PC Card
PIO-16/16L(CB)H is a PC Card Standard compliant CardBus TYPE II size PC Card for input/output of
digital signals.
PIO-16/16L(CB)H can input and output digital signals at 12 to 24 VDC and can input and output up to 16
channels.
Using the bundled Driver library [API-PAC(W32)], you can create Windows application software for
this PC card in your favorite programming language supporting Win32 API functions, such as Visual
Basic or Visual C/C++.
Features
-The signal assignment for the connector is compatible with the P I O -16/ 16L(PCI)H,
PIO-16/16L(PCI), and PIO-16/16L(PM).
-The response time has been improved to 200µsec or better.
-Individual external power supplies can be used for each common pin as it is shared by 16 signal
points.
-The PC card slot side (PC) and the I/O interface are isolated from each other by an opto-coupler,
offering good noise immunity.
-You can use all of the input signals as interrupt inputs.
You can also select the interrupt trigger edge of the input signal.
-The PC card has a digital filter feature to prevent noise or chatter from causing erroneous inputs.
-Up to 35 VDC, 100 mA per signal, max. output.
-The output transistor has a zener diode connected to protect the PC card from surge voltages.
Overcurrent protective device provided for every eight channels of output transistors.
PIO-16/16L(CB)H
1
Page 9
1. Before Using the Product
Support Software
You should use CONTEC support software according to your purpose and development environment.
Driver Library
API-PAC(W32) is the library software that provides the commands for CONTEC hardware products in the form of
Windows standard Win32 API functions (DLL). It makes it easy to create high-speed application software taking
advantage of the CONTEC hardware using various programming languages that support Win32 API functions, such as
Visual Basic and Visual C/C++.
It can also be used by the installed diagnosis progra m to check hardware operations .
CONTEC provides download services to supply the updated drivers an d differential files.
For details, read Help on the bundled CD-ROM or visit the CONTEC’s Web site.
< Operating environment >
OSWindows XP, 2000, Me, 98, etc..
Adaptation languageVisual C/C++, Visual Basic, Delphi, Builder, etc..
OthersEach piece of library software requires 50 megabytes of free hard disk space.
API-PAC(W32)
Linux version of digital I/O driver A PI- DIO(L NX) (S upplie d: St ored o n the API- PA C(W32) CD-RO M )
This driver is used to control CONTEC digital I/O boards (PC cards ) from within Linux.
You can control CONTEC I/O boards easily using the shared library used by gcc and Kylix, the device driver (module)
for each kernel version, and the board (PC card) configuration program (config).
CONTEC provides download services to supply the updated drivers an d differential files.
For details, read Help on the bundled CD-ROM or visit the CONTEC’s Web site.
Adaptation languagegcc, Kylix, etc..
OthersRequires 3 megabytes of free hard disk space.
(For details on supported distributions, refer to Help available after installation.)
Base package of ActiveX components for measurement system development
ACX-PAC(W32)BP
This is a set of useful Windows development tools for measurement systems and consists o f a soft ware compo n ent
library with ready-to-use samples which you can combine for easy programming.
The package contains components for controlling CONTEC I/O boards (PC cards). Features include interface control
for analog I/O, digital I/O, GPIB communications, and counter inputs, as well as X-Y plotting and file storage support.
Check the CONTEC’s Web site for more information on this soft.
(Option)
(Bundled)
Advanced package of ActiveX components for measurement system development
ACX-PAC(W32)AP
Complements the ACX-PAC(W32)BP functions with additional components including graphics (plotting, s witches,
and lamps, etc.) and mathematical and analysis tools.
Check the CONTEC’s Web site for more information on this soft.
(Option)
2
PIO-16/16L(CB)H
Page 10
1. Before Using the Product
Data acquisition VI library for LabVIEW
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 Ac quisition VI, allowing you
to use various devices without complicated settings.
See http://www.contec.co.jp/vidaq/ for details and download of VI-DAQ.
VI-DAQ
(Free download)
Cable & Connector (Option)
Flat Cable with a 37-Pin D-SUB Connectors on 2Ends: PCB37P-1.5 (1.5m)
: PCB37P-3 (3m)
: PCB37P-5 (5m)
Shielded cable with a 37-pin D-SUB connectors on 2 Ends: PCB37PS-0.5P (0.5m)
Relay Terminal Unit for Crimping: EPD-37 *1
Relay Terminal Unit for Crimping: EPD-37A *1
Termination Panel (M3): DTP-3(PC)
Terminal Unit for Cables: DTP-4(PC)
Signal Monitor for Digital I/O: CM-32(PC)E *1
*1 PCB37P or PCB37PS optional cable is required separately.
* Check the CONTEC’s Web site for more information on these options.
PIO-16/16L(CB)H
3
Page 11
1. Before Using the Product
Customer Support
CONTEC provides the following sup port services for you t o use CONTEC products m ore 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 we ll as sample program s 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 Interface 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 pre paid with a c opy of the ori ginal
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 consequentia l damages due to s uch defect or consequences t hat arise from
inexperienced usage, misuse, or malfunction of this device.
4
PIO-16/16L(CB)H
Page 12
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 destructio n of equipment an d resources. U nderstand t he meanings of these labels
to operate the equipment safely.
DANGER
WARNING
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.
PIO-16/16L(CB)H
5
Page 13
1. Before Using the Product
Handling Precautions
DANGER
Do not use the product where it is exposed to flamm able or corrosi ve gas. Doing so ma y result in an
explosion, fire, electric shock, or failure.
CAUTION
-Mount the PC card in a PC card Standard CardBus compatible PC card slot.
-Power saving mode (standby mode) is not supported.
-Do not strike or bend the PC card.
Otherwise, the PC card may malfunction, overheat, cause a failure or breakage.
-Do not subject the socket used to conne ct the cable to the PC card to knoc ks or other excessi ve force.
Otherwise, the PC card may malfunction, overheat, cause a failure or breakage.
-Do not plug or unplug any PC card into or from the PC card slot with the PC powered.
-Do not plug or unplug the connection cable with the PC powered.
-Connect the cable to the PC card before inserting the PC card into the PC.
Otherwise, the PC card may malfunction, overheat, or cause a failure.
-Do not try to remove the cable from the connecte r on the PC card without pr essing the locki ng spring
as this may prevent the cable from being securely connected.
-When you use the PC card in a noisy environment or are nervous about noise, attach ferrite cores to
the connection cable.
-When inserting the PC card, check that you are inserting the PC car d with t he correc t orienta tion and
that the PC card is inserted firmly.
Inserting the PC card incorrectly may damage the PC card or connector or result in a bad connection.
-Ensure that the PC power supply has sufficient capacity for all mounted PC cards.
An inadequate power supply may 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.
6
PIO-16/16L(CB)H
Page 14
1. Before Using the Product
Environment
Use this product in the following environment. If used in an unauthorized environment, the PC card may
overheat, malfunction, or cause a failure.
Operating temperature
0 to 50°C
Operating humidity
10 to 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.
- The bus connector have no stain or corrosion.
- Check that the bus connector
and its cable have been
plugged correctly.
Storage
When storing this product, keep it in its original packing form.
(1) Put the PC card in the storage bag.
(2) Wrap it in the pa ck ing ma te ria l, th en put it in th e 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.
PIO-16/16L(CB)H
7
Page 15
1. Before Using the Product
8
PIO-16/16L(CB)H
Page 16
2. Setup
2. Setup
This chapter explains how to set up the PC card.
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 PC card 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 PC card 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 PC card 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
PIO-16/16L(CB)H
9
Page 17
2. Setup
Using the PC card under an OS other than Windows
For using the PC card under Linux, see the following parts of this manual.
This chapter Step 2 Setting the Hardware
Chapter 3 External Connection
Chapter 5 About Software
Chapter 6 About Hardware
For using the PC card 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
10
PIO-16/16L(CB)H
Page 18
Step 1 Installing the Software
This section describes how to install the Driver libraries.
Before installing the hardware on your PC, install the Driver libraries from the bundled
API-PAC(W32) CD-ROM.
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.
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.
2. Setup
CAUTION
Before installing the software in Windows XP, 2000, or NT, log in as a user with administrator
privileges.
PIO-16/16L(CB)H
11
Page 19
2. Setup
Selecting the Digital I/O Driver
(1)
The following dialog box appears to select “Driver Type” and “Ins tall T ype”.
(2)
Select “Digital I/O”.
(3)
Select “Driver, Help, etc… (Full install)”.
(4)
Click on the [Install] button.
12
PIO-16/16L(CB)H
Page 20
2. Setup
Executing the Installation
(1)
Follow the on-screen instructions to proceed to install.
(2) When the required files have been copied, the “Perform a hardware setup now” and “Show readme
file” check boxes are displayed.
When you are installing the software or hardw are for the first time:
1) Uncheck the “Perform a hardware setup now”.
2) Click on the [Finish] button.
Go to Step 2 to set and plug the hardware.
*When the hardware has already been installed:
Check “Perform a hardware setup now”, then go to Step 4 “Initializing the Software”.
You have now finished installing the software.
PIO-16/16L(CB)H
13
Page 21
2. Setup
Step 2 Setting the Hardware
The following explains how to insert the PC card into the PC.
Part Names
Figure 2.1 shows the names of each part of the PC card.
1m
Interface connector
PIO-16/16L(CB)H
PC card
Connection cable
Figure 2.1. Part Names
Vcc display LED
PIO-16/16L(CB)H-BOX
Isolation circuit box
14
PIO-16/16L(CB)H
Page 22
2. Setup
Connecting the PC Card to the Connection Cable
Plug the PC card connecter of the isolation circuit box PIO-16/16L(CB)H-B OX into the PIO-16/16L(CB)H
PC card. Plug the cable with its connector’ front surface (flat face) aligned with the top face of the PC
card as shown in Figure 2.2.
CAUTION
-When plugging in the cable, align the cable connector with the PC card socket and push firmly into
place. Do not apply any excessive force to the socket on the PC card as this may damage the socket
or result in a bad connection.
-Never insert or unplug the connector while the PC power is turned on.
Connection cable
PC card
Thumb screw
Figure 2.2. Connecting the PC Card to the Connection Cable
PC card slot side
PIO-16/16L(CB)H
15
Page 23
2. Setup
Insert the PC Card
Check that the power to the PC is turned off and insert the PC card into the PC card slot on the PC.
Firmly insert the PC card into the slot with the orientation indicated by the arrow symbol on the PC card,
as shown in Figure 2.3.
The PC card has a key to prevent it from being inser ted incorre ctly. Do not try to force the PC card into
the slot the wrong way around as this may dama ge the PC card or the sl ot on the PC. Also, check the P C
card slot on your PC as th e sl ots on some PC s a re ori ente d so th at P C cards is in s ert ed wi th th e top sid e
facing down.
Refer to the manual for your PC for instructions on how to remove the PC card.
Figure 2.3. Insert the PC Card
CAUTION
Take note of the following points as ina ppropr iate handli ng of t he PC card m ay dam age the PC car d
or connector socket and may result in a bad connection.
-Always insert the PC card with the correct orientation and in accordance with the instructions.
-Do not hold the PC card by the cable or connector when inserting the PC card into the slot
-Do not move the PC with the cable still plugged in.
-Do not apply any excessive force to the cable socket on the PC card such as by pulling on the
cable connector.
-Do not place any objects on top of the cable connector.
16
PIO-16/16L(CB)H
Page 24
2. Setup
Cautions When Using Two or More PIO-16/16L(CB)H PC Cards
If your PC has two TYPE II size PC card slots one on top of the other, you cannot use
PIO-16/16L(CB)H PC cards in both slots at the same time. This is because of the shape of the cable
connector.
However, you can use the PIO-16/16L(CB)H together with another PC card that does not require an
external connector such as a memory PC card.
PIO-16/16L(CB)H
PIO-16/16L(CB)H
PIO-16/16L(CB)H
PIO-16/16L(CB)HPIO-16/16L(CB)H
PIO-16/16L(CB)H
Figure 2.4. Cautions When Using Two or More PIO-16/16L(CB)H PC Cards
PIO-16/16L(CB)H
17
Page 25
2. Setup
Step 3 Installing the Hardware
For using an expansion PC card un der Windows, yo u have to let the OS detect the I /O addresses and I RQ
to be used by the PC card. The process is referred to as installing the hardware.
When using more than one PC card, install the PC car ds one at a time and do not i nstall the next PC card
until setup is complete for the previous PC card.
Turning on the PC
Turn on the power to your PC.
CAUTION
-The PC card cannot be properly installed unless the resources (I/O addre sse s and i nterr upt le vel) for
the PC card can be allocated. Before attempting to install the PC card, first determine what PC
resources are free to use.
-The resources used by each PC car d do not de pend on the locat ion of the PC cards sl ot or the PC car d
itself. If you remove two or more PC cards that have already been insta lled 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 PC cards are assigned to the remounted PC card. In this case, you mus t ch eck th e resource
settings.
Setting with the Found New Hardware Wizard
(1) The "Found New Hardware Wizard" appears.
Select "Install from a list or specific location [Advanced]" and click the "Next" button.
18
PIO-16/16L(CB)H
Page 26
2. Setup
(2) Specify that folder on the CD-ROM which co ntains the setup information (INF) file to register the
PC card.
* The name of the PC card
you have just added is
displayed.
- PIO-16/16L(CB)H
Source folder
The setup information (INF) file is contai ned in the following folder on the bundled CD-ROM.
Windows XP, 2000\INF\Win2000\Dio\PCCard
Windows Me, 98\INF\Win95\Dio\PCCard
Example of specifying the folder for use under Windows XP
PIO-16/16L(CB)H
\INF\Win2000\Dio\PCCard
19
Page 27
2. Setup
CAUTION
In Windows XP, the Hardware Wizard disp lays the following alert dialog box when you have
located the INF file. This dialog box appears, only indi cating that the re levant dri ver has not pas sed
Windows Logo testing, and it ca n be ign ore d without developing any problem with the operation of
the PC card.
In this case, click on the [Continue Anyway] button.
You have now finished installing the software.
* The name of the PC card
you have just added is
displayed.
- PIO-16/16L(CB)H
20
PIO-16/16L(CB)H
Page 28
2. Setup
Step 4 Initializing the Software
The Driver library requires the initial setting to recognize the execution environment. It is called the
initialization of the Dri ve r li br ary.
Invoking API-TOOL Configuration
(1) Open the Start Menu, then select “Programs” – “CONTEC API-PAC(W32)” – “API-TOOL
Configuration”.
(2) API-TOOL Configuration detects the hardware automatically.
The detected the PC cards are listed.
Updating the Settings
(1) Select “Save settings to registry…” from the “File” menu.
You have now finished installing the initial setting of Software.
PIO-16/16L(CB)H
21
Page 29
2. Setup
Step 5 Checking Operations with the Diagnosis
Program
Use the diagnosis program to check that the PC card 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 PC card and driver software.
It can also be used as a simple checker when an ex t ern al dev i ce i s actu al l y con ne ct ed .
Using the “Diagnosis Report” feature report s the driver settings, the presence or absence of the PC card,
I/O status, and interrupt status.
Check Method
Connect the PC card to a remote device to test the input/output and check the execution environment.
For this PC card, prepare an external power supply (12 to 24 VDC).
The Check Mate (CM-32(PC)E) comes in handy when you check digital I/O PC cards.
Check the PC card with the factor defaults untouched.
Connection diagram
Connector
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
Optional cable
PCB37PS-xx
External power
supply
To connect a device other than the Check Mate, see Chapter 3 “External Connection”.
22
PIO-16/16L(CB)H
CM-32(PC)E
GROUP 1
7 6 5 4 3 2 1 0
GROUP 3
7 6 5 4 3 2 1 0
POWER
12 to 24VDC
GROUP 0
GROUP 2
CN3
Page 30
2. Setup
Using the Diagnosis Program
Starting the Diagnosis Program
Select the PC card in the API-TOOL Configuration windows, then run the Diagnosis Program. Run as
the following screen.
* The name of the PC card you have just added is displayed.
* The name of the PC card
you have just added is
displayed.
- PIO-16/16L(CB)H
PIO-16/16L(CB)H
23
Page 31
2. Setup
Checking Digital Inputs and Ou tputs
The main panel of the Diagnosis Program appears.
You can check the current operation states of the PC card in the following boxes:
“Input Port” :
Displays input values bit by bit at fixed time intervals.
“Output Port” : Mouse operation allows the data to output or display.
“Interrupt” : Displays the number of interrupts detected bit by bit.
* The name of the PC card
you have just added is
displayed.
- PIO-16/16L(CB)H
To use the wait time control feature, click on the [Wait Configuration] button. Use the feature when the
wait time based on the DioWait or DioWaitEx function is not normal.
To use the function execution tim e measurement fea ture, click on the [Measurement Tim e] button. Ente r
the I/O start port and the number of ports, t hen press the measurement button. The time for each
execution of a function will be measured.
24
PIO-16/16L(CB)H
Page 32
2. Setup
Diagnosis Report
(1) Clicking on the [Show Diagnosi s Re port] butt on di s pla ys det a ile d data su ch as P C car d se tti ngs a n d
the diagnosis results while saving them in text format.
The results are saved and displayed as a text file (DioRep.txt) in the install folder (Program
Files\CONTEC\API-PAC(W32)).
The Diagnosis Program performs “PC card presence/absence check”, “driver file test”, “PC card
setting test”, and so on.
CAUTION
Before executing diagnosis report output, unplug the cable from the PC card.
(2) A diagnosis report is displayed as shown below.
* The name of the PC card
you have just added is
displayed.
- PIO-16/16L(CB)H
Click on [Show
Diagnosis Report].
PIO-16/16L(CB)H
* The name of the PC card
you have just added is
displayed.
- PIO-16/16L(CB)H
25
Page 33
2. Setup
Setup Troubleshooting
Symptoms and Actions
No output can be obtained.
Use API-TOOL Configuration to check whether the PC card name setting is wrong.
The PC card works with the Diagnosis Program but not with an application.
The Diagnosis Progra m is co ded with A PI-TO O L fu ncti o ns. As lo ng as the PC c ar d ope ra tes w ith th e
Diagnosis Program, it is to operate with other applications as well. In such cases, review your program
while paying attention to the following points:
-Check the arguments to functions and their return values.
-When the PC card is an isolated type, it has a time lag for its response between the output by a
function and the actual output. Consider the execution intervals between functions.
The OS won’t normally get started or detect the PC card. [Windows XP
Turn off the power to your PC, then unplug the PC card. Restart the OS and delete the PC card settings
of API-TOOL Configuration. Turn off the PC again, plug the PC card, and restart the OS. Let the OS
detect the PC card and use API-TOOL Configuration to register PC card settings.
2000]
,
If your problem cannot be resolved
Contact your retailer.
26
PIO-16/16L(CB)H
Page 34
3. External Connection
3. External Connection
This chapter describes the interface connectors on the PC card and the external I/O circuits.
Check the information available here when connecting an external device.
Using the On-board Connectors
Connecting a Device to a Connector
To connect an external device to this PC card, plug the cable from the device into the interface connector
[37pin D-SUB(female)]shown below.
Interface connector
- Connector used
19
37
36
21
20
37-pin D-SUB, female connector
18
DCLC-J37SAF-20L9(mfd. by JAE)
Thumb screw : UNC#4-40(inch screw)
2
- Applicable connectors
1
17JE-23370-02(D8C) (mfd. by DDK, Male)
FDCD-37P (mfd. by HIROSE, Male)
DC-37P-N (mfd. by JAE, Male)
Figure 3.1. Interface Connector and Applicable Cable Connector
PIO-16/16L(CB)H
27
Page 35
3. External Connection
Connector Pin Assignment
Pin Assignments of Interface Connector
Common plus pin for
+2/+3 output ports
+3 port
(Output)
+2 port
(Output)
Common minus pin for
+2/+3 output ports
I-00 to I-17 16 input signal pins. Connect output signals from the external devi ce to these pins.
O20 to O37 16 output signal pins. Conn ect these pins to t he input signal pi n s of th e external device.
P0Connect the positive side of the external power supply. (Input)
P1Connect the positive side of the external power supply. (Output)
N1Connect the negative side of the external power supply. (Output)
N.C.This pin is left unconnected.
Relationships between API-PAC(W32) Logical Ports/Bits and
Connector Signal Pins
The following table lists the relationships between the connector signal pins and the logical port/bit
numbers used for I/O functions when applications are written with API-PAC(W32).
Table 3.1. Logical Ports, Logical Bits, and Connector Signal Pins
D7D6D5D4D3D2D1D0
I-07
I-06
I-05
I-04
I-03
I-02
I-01
Input logical port 0
Input logical port 1
Output logical port 0
Output logical port 1
Note: I-xx and O-xx represent input and output signals, respectively, where [xx] indicates a logical bit.
CAUTION
[7]
[6]
[5]
[4]
[3]
[2]
I-17
I-16
I-15
I-14
I-13
[15]
[14]
[13]
[12]
D7D6D5D4D3D2D1D0
O-27
O-26
O-25
O-24
[7]
[6]
[5]
[4]
O-37
O-36
O-35
O-34
[15]
[14]
[13]
[12]
[11]
O-23
[3]
O-33
[11]
I-12
[10]
O-22
[2]
O-32
[10]
The logical port and logical bit numbers are virtual port and bit numbers that enable programming
independent of PC card I/O addresses or PC card types.
For details, refer to API-DIO HELP available after installing API-PAC(W32).
[1]
I-11
[9]
O-21
[1]
O-31
[9]
I-00
[0]
I-10
[8]
O-20
[0]
O-30
[8]
PIO-16/16L(CB)H
29
Page 37
3. External Connection
Connecting Input Signals
Connect the input signals to a device which can be current-driven, such as a switch or transistor output
device.
The connection requires an external power supply to feed currents.
The PC card inputs the ON/OFF state of the current-driven device as a digital value.
Input Circuit
PIO-16/16L(CB)H
Optocoupler
Optocoupler
* Input pin represents I-xx.
Disconnection
Disconnection
Plus
common
Input
pin
Input
pin
External circuit
Switch
Switch
External
power supply
12V to 24VDC
Figure 3.3. Input Circuit
The input circuits of interface blocks of the PIO-16/16L(CB)H is illustrated in Figure 3.3.
The signal inputs are isolated by opto-couplers (ready to accept current sinking outp ut signal s). The PC
card therefore requires an external power supply to drive the inputs. The power requirement for each
input pin is about 5.1 mA at 24 VDC (about 2.6 mA at 12 VDC).
Connecting a Switch
Input plu s common (CN1 : 18 pin)
I-00 (CN1 : 2 pin)
PIO-16/16L(CB)H side
When the switch is ON, the corresponding bit contains 1.
When the switch is OFF, by contrast, the bit contains 0.
+
External
power supply
12 to 24VDC
-
Figure 3.4. An Example to use Input I-00
30
PIO-16/16L(CB)H
Page 38
3. External Connection
Output Circuit
Connect the output signals to a current-driven controlled device such as a relay or LED.
The connection requires an external power supply to feed currents.
The PC card controls turning on/off the current-driven controlled device using a digital value.
Output Circuit
PIO-16/16L(CB)H
Optocoupler
Optocoupler
* Output pin reprezents O-xx
Zener diode
Zener diode
Poly-switch
Plus
common
Output
pin
Output
pin
Minus
common
External circuit
*
Load
*
Load
External
power supply
12V to 24VDC
Figure 3.5. Output Circuit
The output circuits of interface blocks of the PIO-16/16L(CB)H is illustrated in Figure 3.5. The signal
output section is an opto-coupler isolated, open-collector output (current sink type). Driving the output
section requires an ex te rn al po we r supp l y.
The rated output current per channel is 100 mA at maximum.
The output section can also be connected to a TTL level input as it uses a low-saturated transistor for
output. The residual voltage (low-level voltage) between the collector and emitter with the output on is
0.5V or less at an output current within 50 mA or at most 1.0V at an output current within 100 mA.
A zener diode is connected to the output transistor for protection from surge voltages. A PolySwitch-
based overcurrent protector is provided for every eight output transistors. When the overcurrent
protector works, the output section of the PC card is temporarily disabled. If this is the case, turn of the
power to the PC and the external power supply and wait for a few minutes, then turn them on back .
CAUTION
When the PC is turned on, a ll outpu t ar e re se t to OFF .
PIO-16/16L(CB)H
31
Page 39
3. External Connection
Connection to the LED
Output plus common (CN1 : 37 pin)
5.1kΩ
O-20 (CN1 : 21 pin)
Output minus common (CN1 : 20 pin)
PIO-16/16L(CB)H side
When "1" is output to a relevant bit, the corresponding LED comes on.
When "0" is output to the bit, in contrast, the LED goes out.
LED
+
External
power supply
12 to 24VDC
-
Figure 3.6. An Example to use Output O-20
Example of Connection to TTL Level Input
External
power supply
12 to 24VDC
+
-
Input card
Output plus common
Output
VCC
2kΩ
TTL level input
Output minus common
GND
Figure 3.7. Connection Example of Output and TTL level Input Signal
32
PIO-16/16L(CB)H
Page 40
3. External Connection
Connecting the Sink Type Output and Sink
Output Support Input
The following example shows a connection between a sink type output (output PC card) and a sink
output support input (input PC card). Refer to this connection example when you connect such PC cards
to each other.
External
power supply
12 to 24VDC
+
-
Output board
Output plus common
Output (sink type)
Output minus c o mm on
Input card
Input plu s co mm o n
Input (Sink output acceptable )
Figure 3.8. Example of Connecting the Sink Type Output and Sink Output Support Input
PIO-16/16L(CB)H
33
Page 41
3. External Connection
34
PIO-16/16L(CB)H
Page 42
4. Function
4. Function
This section describes the features of the PC card.
Each function described here can be easily set and exec uted by using the bundle d API driver library. For
details, refer to API-DIO HELP available after installation.
Data I/O Function
Data Input
When the input data is “ON”, “1” is input to the relevant bit.
When the input data is “OFF”, in contrast, “0” is input to the relevant bit.
Data Output
When “1” is output to the relevant bit, the corresponding transistor is set to “ON”.
When “0” is output to the relevant bit, in contrast, the corresponding transistor is set to “OFF”.
CAUTION
When the PC is turned on, all output ar e reset to 0 (OFF).
Monitoring Output Data
The PIO-16/16L(CB)H can read the state of the data currently being output without affecting the output
data.
PIO-16/16L(CB)H
35
Page 43
4. Function
Digital Filter
Using this feature, the PIO-16/16L(CB)H can apply a digital filter to every input pin, thereby preventing
the input signal from being affected by noise or chattering.
Digital Filter Function Principle
The digital filter checks the input signal level during the sampling time of the clock signal. When the
signal level remains the same for the digital filter set time , the digital filter recognizes that signal as the
input signal and changes the signal level of the PC
If the signal level changes at a frequency shorter than the set tim e, therefore, the level c hange i s ignored.
Input Signal
Digital
Filter
Filter Setting Time
Input to PC
Input Signal
Invalid
Input to PC
Valid
Figure 4.1. Digital Filter Function Principle
Set Digital Filter Time
Set the digital filter time to 0 to 20 (14h).
Setting the digital filter time to 0 disables digital filtering. It is set to 0 when the power is turned on .
Figure 4.2 shows the relationships between digital filter time settings and the actual digital filter times.
-If you set the digital filter time, the filter applies to all input pins. You cannot apply the filte r only t o
a specific filter.
-Do not set Setting Data to a value outside the above range as doing so can cause the PC card to
malfunction.
n
/ (8 x 106)
Setting Data
(n)
7 (07h)16
Digital Filter
Time
µsec14 (0Eh)2.048msec
Setting Data
(n)
Digital Filter
Time
36
PIO-16/16L(CB)H
Page 44
4. Function
Interrupt Control Function
The PIO-16/16L(CB)H can use all of the input signals as interrupt request signals.
The PC card can generate an interrupt request signal to the PC when the i nput si gnal c hange s from High
to Low or from Low to High.
When the digital filter (described above) is used, interrupt requests are generated by input signals that
have passed through the filter.
Disabling/Enabling Interrupts
Interrupt mask bits can be used to disable or enable the individual bits for interruptions.
Once a certain bit has been interrupt-disabled, no interrupt occurs even when the corresponding input
signal changes its level.
To let interrupts occur, enable the corresponding interrupt mask bit for interruptions.
CAUTION
All of the interrupt mask bits are interrupt-disabled wh en the power is turned on.
Selecting the Interrupt Edge
Interrupt edge select bits can be used to set the input logic for interruption bit by bit.
If you set an interrupt edge select bit to 0, an interrupt occurs when the input value to the corresponding
bit changes from 0 to 1 (at the fall of the input signal from High to Low).
If you set an interrupt edge select bit to 1, an interrupt occurs when the input value to the corresponding
bit changes from 1 to 0 (at the rise of the input signal from Low to High).
CAUTION
When the power is turned on, a ll of th e inte rrup t edge select bits are set to 0 so that an interrupt
occurs when the input valu e cha ng es fr o m 0 to 1 (at the f al l of th e inpu t signa l from High to Low).
Clearing the Interrupt Status and Interrupt Signal
Interrupt status bits are used to identify the input signal bit being used for requesting an interrupt.
When an interrupt status is input, the interrupt request signal and the interrupt status are cleared
automatically.
CAUTION
-All of the interrupt status bits are set to 0 wh en the power is turned on.
-If an interrupt mask bit has been set to disable interrupts, the interrupt status bit is not set even whe n
the input signal changes its level.
PIO-16/16L(CB)H
37
Page 45
4. Function
38
PIO-16/16L(CB)H
Page 46
5. About Software
CD-ROM Directory Structure
\
|– Autorun.exeInstaller Main Window
| Readmej.htmlVersion information on each API-TOOL (Japanese)
| Readmeu.htmlVersion information on each API-TOOL (English)
.
.
| ––ReleaseDriver file on each API-TOOL
| |––API_NT(For creation of a user-specific install program)
| |––API_W95
5. About Software
PIO-16/16L(CB)H
39
Page 47
5. About Software
About Software for Windows
The bundled CD-ROM “Driver Library API-PAC(W32)” contains th e function s that provide the
following features:
-Digital input/output of specified ports
-Hardware digital input/output of specif ied bits
-Hardware digital filtering that prevents chattering
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 troublesh ooting.
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)” – “Dio” – “API-DIO
HELP” to display help information.
40
PIO-16/16L(CB)H
Page 48
5. About Software
Using Sample Programs
Sample programs have been prepared for specific basic applications.
To use each sample program, enter its driver number and group num ber set by API -TO OL Configurati on
in the DrvNo and GrpNo fields.
Use these sample programs as references for program development and operation check.
The sample programs are stored in \Program Files\CONTEC\API-PAC(W32)\Dio\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)” – “Dio” – “SAMPLE…”.
(3) A sample program is invoked.
PIO-16/16L(CB)H
41
Page 49
5. About Software
Sample Programs - Examples
-Sample program 1:Inputs digital data through a specified port.
-Sample program 2:Outputs digital data through a specified port.
-Sample program 3:Inputs/outputs digital data from/to a programmable PC card.
-Sample program 4:Inputs digital data from a specified port in the background.
-Sample program 5:Inputs/outputs digital data from/to a specified bit.
-Sample program 6:Services interrupts of a specified PC card.
-Sample program 7:Provides process control of a specified PC card.
-Sample program 8:Performs trigger monitoring of a specified PC card.
-Sample program 9:Inputs digital data through a specified port using BCD data.
-Sample program 10:Executes digital input (simple functions) at specified bits through a
-Sample program 11:Services interrupts of a specified PC card (using an extended function).
-Sample program (Console):Inputs/outputs digital data through a specified port.
[Sample program 1] [Sample program 2]
specified port.
[Sample program 5][Sample program 9]
42
PIO-16/16L(CB)H
Page 50
5. About Software
Uninstalling the Driver Libraries
To uninstall API-PAC(W32), follow the procedure below.
(1) Click on the [Start] button on th e 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-DIO(98/PC)xx” from the application list displayed, then click on the
[Add/Remove] button. Follow the on-screen instructions to uninstall the function libraries.
PIO-16/16L(CB)H
43
Page 51
5. About Software
About Software for Linux
The Linux version of digital I/O function driver, API-DIO(LNX), provides function s that execute the
following features:
-Digital input/output of specified ports
-Digital input/out p ut of specified bits
-Hardware digital filtering that prevents chattering
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 troublesh ooting.
Driver Software Install Procedure
The Linux version for digital I/O driver, API-DIO(LNX), is supplied as a compressed file
/linux/dio/cdioXXX.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 decomp ress 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, l og in as a sup erus er.
Decompression and setup procedure
# cd
# mount /dev/cdrom /mnt/cdromMount the CD-ROM.
# cp /mnt/cdrom/linux/dio/cdioXXX.tgz ./Copy the compressed file.
# tar xvfz cdioXXX.tgzDecompress the compressed file.
................
# cd contec/cdio
# makeCompile the file.
................
# make installInstall.
................
# cd config
# ./configSet up the PC card to be used.
..... Set as follows .........
# ./contec_dio_start.shStart the driver.
# cd
44
PIO-16/16L(CB)H
Page 52
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/cdio/help directory.
Using Sample Programs
Sample programs have been prepared for specific basic applications.
Sample programs for each language are contained in the contec/cdio/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/cdio directory. For details,
check the contents of the script.
PIO-16/16L(CB)H
45
Page 53
6. About Hardware
46
PIO-16/16L(CB)H
Page 54
6. About Hardware
6. About Hardware
This chapter provides hardware specifications and hardware-related supplementary information.
Hardware specification
Table 6.1. Specification
ItemSpecification
Input
Input format
Number of input signal channels
Input resistance4.7kΩ
Input ON current2.0 mA or more
Input OFF current0.16 mA or less
Interrupt
Response time
Output
Output formatOpto-isolated open collect or out put (c urren t si n k typ e) (Neg a tive lo gic *1)
Number of output signal channels 16 channels (1 common)
Output
rating
Residual voltage with output on0.5V or less (Output current≤50 mA), 1.0V or l ess (Outpu t current≤100 mA)
Surge protectorZener diode RD47FM(NEC) or equivalent
Response time200µsec within
Common
I/O address
Interruption level
Dielectric strength
External circuit power supply
Power consumption
Operating condition
Allowable distance of signal
extension
Cable length
Compatible PC card slot
Dimension (mm)
Weight
*1 Data “0” and “1” correspond to the High and Low levels, respectively.
*2 On PCs with two TYPE II size PC card s lo ts arr an ged vert ic all y, two P IO- 16 /16L( C B) H ca rds cannot be used in th e
Output voltage
Output current
two slots at the same time. Thi s is due to the shape of the c able con nec to rs.
Opto-isolated input (Compatible with current sink output)(Negative logic *1)
16 channels (all available for interrupts) (1 common pin)
16 interrupt input signals are arrang ed into a single output of interrupt
signal INTA.
An interrupt i s g e ne rated at the falling ed g e (HI G H -to - LOW transition) o r
rising edge (L O W -t o-H I GH transition).
µsec within
200
35 VDC (Max.)
100 mA (par channel) (Max. )
8 bit x 32 port boundary
1 level use
1000Vrms
12 to 24 VDC(±10%)
3.3 VDC 200 mA (Max.)
°C, 10 to 90%RH (No condensati on)
0 to 50
Approx. 50m (depending on wir ing e nvir onmen t)
1m
PC card Standard compliant CardBus
85.6(w) x 54.0(D) x 5.0(H) TYPE II *2
440g(Total weight of PC card, connecti on cable , i sola tion circuit box)
PIO-16/16L(CB)H
47
Page 55
6. About Hardware
PC card Dimensions
85.6mm1.0m
87.0mm
54.0mm
5.0mm9.0mm
77.0mm
Connection cableIsolation circuit boxPC card
24.0mm
48
PIO-16/16L(CB)H
Page 56
Block Diagram
6. About Hardware
Control
Circuits
CardBUS
Interrupt
Control
Figure 6.1. Block Diagram
Optocoupler
Optocoupler
Optocoupler
&
transistor
Optocoupler
&
transistor
PIO-16/16L(CB)H
External Digital
Input Port 0
(8 points, Group 0)
External Ditigal
Input Port 1
(8 points, Group 1)
External Digital
Output Port 0
(8 points, Group 2)
External Digital
Output Port 1
(8 points, Group 3)
PIO-16/16L(CB)H
49
Page 57
PIO-16/16L(CB)H
User’s Guide
CONTEC CO.,LTD.August 2004 Edition
3-9-31, Himesato, Nishiyodogawa-ku, Osaka 555-0025, Japan
Japanese http://www.contec.co.jp/
Englishhttp://www.contec.com/
Chinese http://www.contec.com.cn/
No part of this document may be copied or reproduced in any form by any means without prior written
consent of CONTEC CO., LTD. [08062004]
[08062004]Management No.A-46-900
Parts No.LYDY411
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.