Contec CNT24-4(PCI), CNT24-4(PCI)H User Manual

PC-HELPER
4ch 24Bit Up/Down Counter Board for PCI
CNT24-4(PCI)H
User’s Guide
CONTEC CO.,LTD.

Check Your Package

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
- CNT24-4(PCI)H …1
- First step guide …1
- CD-ROM*1 [API-PAC(W32)] …1 *1: The CD-ROM contains the driver software and User’s Guide (this guide).
Board
First step guide
CD-ROM
[API-PAC(W32)]
i

Copyright

Copyright 2005 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 no r for re sult s obt ain ed by th e use r as a resu lt of usi ng th is produ ct .

Trademarks

MS, Microsoft, Windows, Windows NT and MS-DOS are trademarks of Microsoft Corporation. Other brand and product names are trademarks of their respective holder.
ii

Table of Contents

Check Your Pack ag e............................................................................................................................i
Copyright ............................................................................................................................................ ii
Trademarks .........................................................................................................................................ii
Table of Con tents...............................................................................................................................iii
1. BEFORE USING THE PRODUCT 1
About the Bo ard.................................................................................................................................. 1
Features........................................................................................................................................ 1
Support Softw ar e ......................................................................................................................... 2
Cable & Connect or ( Op ti on ) ..................................................................................................... 3
Accessories ( Op ti on ) ................................................................................................................. 3
Customer Supp o rt ............................................................................................................................... 4
Web Site....................................................................................................................................... 4
Limited Thre e- Y ear s Wa r ra n t y .......................................................................................................... 4
How to Obtain Serv ic e ....................................................................................................................... 4
Liability............................................................................................................................................... 4
Safety Precau t ion s .............................................................................................................................. 5
Safety Infor mat i on ....................................................................................................................... 5
Handling Pre ca u tio n s................................................................................................................... 6
Environment................................................................................................................................. 7
Inspection..................................................................................................................................... 7
Storage ......................................................................................................................................... 7
Disposal ....................................................................................................................................... 7
2. SETUP 9
What is Setup? .................................................................................................................................... 9
Using the Board un de r W in do w s Us in g th e D riv e r Lib ra r y A PI -PAC ( W 3 2) ............................ 9
Using the Board under Windows Using Software Other than the Driver Library
API-PAC(W32 )............................................................................................................................ 9
Using the Board un d er an OS O th e r th an Wi n do w s ................................................................. 10
Step 1 Installi n g the Software .......................................................................................................... 11
Starting the I ns t all P r og r a m....................................................................................................... 11
Selecting the Counter Bo ard Driver .......................................................................................... 12
Executing the In s tal l a tio n .......................................................................................................... 13
Step 2 Setting th e H ar d wa r e ............................................................................................................. 14
Parts of the Bo ard an d F ac to r y D ef au l ts ................................................................................... 14
Setting the Bo ard ID .................................................................................................................. 15
Plugging the Board .................................................................................................................... 16
iii
Step 3 Installi ng th e H ard w a re .........................................................................................................17
Turning on the PC......................................................................................................................1 7
Setting with th e Fou n d Ne w H a rd war e W iz a rd......................................................................... 17
Step 4 Initi alizing the S o f tware........................................................................................................ 20
Invoking API-TOOL Configuration.......................................................................................... 20
Updating the S e ttin g s................................................................................................................. 20
Step 5 Checking Op e r ati o n s w ith th e D i ag no s is P rog ra m ............................................................... 21
What is the Di agno s is P r og r a m?................................................................................................ 21
Check Method ............................................................................................................................ 21
Using the Di agnosis Program.................................................................................................... 22
Setting coun t co nd i t ion s ............................................................................................................ 23
Setup Troubl esh oo ti n g...................................................................................................................... 27
Symptoms and A cti o ns .............................................................................................................. 27
If your proble m c a nno t b e r eso lv ed........................................................................................... 27
3. EXTERNAL CONNECTION 29
Using the On-Board Conne c t ors....................................................................................................... 29
Connecting a Bo ar d to a C onn e c to r........................................................................................... 29
Interface Con n ecto r S ig n al As si g n men t ....................................................................................3 0
Connection Meth o d to th e Ex te rn al de v ice 1 -Ph o to cou p l er is o lat ed I npu t -.................................... 33
Photo couple r is o la te d Inp u t Con n ec ti on .................................................................................. 33
Photo couple r Is o lat e d In pu t Ci r cu it .......................................................................................... 33
Example Connectio n wi th a Ro ta ry En co d er ............................................................................ 34
Example Conne ct io n wi th a Lin e a r Sc a le.................................................................................. 34
Connection Me th od to th e Ex t ern al d ev ic e 2 -TT L- Le v el I np ut - ...................................................... 35
TTL-Level Input Connection..................................................................................................... 35
TTL-Level Input Circuit ............................................................................................................ 35
Example Connectio n wi th a Ro ta ry En co d er ............................................................................ 36
Example Connectio n wi th a L in e ar Scale..................................................................................36
One-shot Pulse Outp u t Con n ec tio n ..................................................................................................37
One-shot Pulse Outp u t Co n n ec tio n ........................................................................................... 37
Output Circuit and an Ex a mpl e Con ne c t ion.............................................................................. 37
Surge Voltage Co un t e r meas u r es....................................................................................................... 38
iv
4. FUNCTION 39
Types and Ope rat io n s of Pu l se S ign al s ............................................................................................ 39
Types of pulse si gn al s ................................................................................................................ 39
2-phase Inpu t.............................................................................................................................. 39
Single-phase Input ..................................................................................................................... 40
Single-phase Input with Gate Control....................................................................................... 40
Multiplication of Count In p ut.................................................................................................... 41
Synchronous Cl ear..................................................................................................................... 41
Asynchronous Clear................................................................................................................... 42
Phase Z/CLR In pu t .................................................................................................................... 42
Other Functio n .................................................................................................................................. 43
Compare Regis t er ...................................................................................................................... 43
Digital Filter............................................................................................................................... 43
Programmabl e Timer................................................................................................................. 44
One-shot Pulse ........................................................................................................................... 44
Status Data ................................................................................................................................. 45
5. ABOUT SOFTWARE 47
CD-ROM Directo r y S t ru c tu re .......................................................................................................... 47
About Software for Windo w s........................................................................................................... 48
Accessing the He lp F il e........................................................................................................ ..... 49
Using Sample Programs ............................................................................................................ 50
Uninstalling the Dr i v er Li b ra rie s .............................................................................................. 52
About Software for Linux ....................................................................................................... .......... 53
Driver Softwa re In s tal l Pro c ed ur e ............................................................................................. 53
Accessing the He lp F il e........................................................................................................ ..... 54
Using Sample Programs ............................................................................................................ 54
Uninstalling the driver............................................................................................................... 5 4
6. ABOUT HARDWARE 55
Hardware spe cification..................................................................................................................... 55
Block Diagra m.................................................................................................................................. 56
Differences be tw een C N T2 4 -4 (P C I)H a nd CN T 24 -4( P C I)............................................................. 57
v
vi

1. Before Using the Product

1. Before Using the Product
This chapter provides information you should know before using the product.

About the Board

The CNT24-4(PCI)H is a PCI bus-compliant interface board that counts input pulse signals from external devices.
The CNT24-4(PCI)H has four channels of 24-bit up/down counters, allowing external devices such as a rotary encoder and a linear scale to be connected. Given below are examples of using the board for “detecting a position of the table of a machine tool” and “detecting a change in weight”.
The pulse signal inputting interface is photo coupler isolated or TTL-level input. Using the bundled driver library [API-PAC(W32)], you can create Windows application software for
this board in your favorite programming language supporting Win32 API functions, such as Visual Basic or Visual C/C++.
< Example >
- Detecting a position of the table of a machine tool
Tool
Processing thing
- Detecting a change in weight
CNT24-4(PCI)H
Encoder
Rack
CNT24-4(PCI)H
RelayBOX
Linear Scale
Power supply
Power supply

Features

- It is equipped with four channels of 24-bit up/down counters.
- The board can count two-phase signals, which can be outputs of some rotary encoders and linear scales
- You can select either a photo coupler isolated input or a TTL-level input for each channel by software command.
- Each channel can generate an interrupt request signal and a one-pulse output signal when the count data matches a pre-specified value.
- The board is equipped with a programmable timer to allow interrupts to be generated periodically according to a specified timer value.
- Each Channel is equi pped with a general-purpose input signal (both photo coupler and TTL-level).
1
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 (at http://www.contec.com /apipac/) to supply the updated drivers and differential files. For details, read Help on the bundled CD-ROM or visit the CONTEC’s Web site.
< Operating environment > OS Windows XP, 2000, NT, Me, 98, etc.. Adaptation language Visual C/C++, Visual Basic, Delphi, Builder, etc.. Others Each piece of library software requires 50 MB of free hard disk space.
API-PAC(W32)
Linux version of general-purpose COUNT driver: CD-ROM of API-PAC (W32))
This driver is used to control CONTEC counter boards (PC Cards). You can control CONTEC counter boards easily using the shared library used by gcc, Kylix, the device driver (module) for each kernel version, and the board (PC Cards) configuration program (config). CONTEC provides download services (at http://www.contec.co.jp/enom/apipac/) to supply the updated drivers and differential files. For details, read Help on the bundled CD-ROM or visit the CONTEC’s Web site.
(Bundled)
API-CNT(LNX)
(Suppli ed wi th in th e s ame
< Operating environment > OS RedHatLinux, TurboLinux, etc..
(For details on supported distributions, refer to Help available after installation.) Adaptation language gcc, Kylix Others Each piece of library software requires 3 MB of free hard disk space.
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 Acquisition VI, allowing you to use various devices without complicated settings. See http://www.contec.com/vidaq/ for details and download of VI-DAQ.
2
VI-DAQ
(Free download)
1. Before Using the Product

Cable & Connector (Option)

Flat cable with both-ends 37-pin D-SUB connector : PCB37P-1.5 (1.5m)
: PCB37P-3 (3m) : PCB37P-5 (5m)
Shield cable with both-ends 37-pin D-SUB connector : PCB37PS-0.5P (0.5m)
: PCB37PS-1.5P (1.5m) : PCB37PS-3P (3m) : PCB37PS-5P (5m)
Flat cable with one-end 37-Pin D-SUB connector : PCA37P-1.5 (1.5m)
:PCA37P-3 (3m) :PCA37P-5 (5m)
Shield cable with one-end 37-pin D-SUB connector : PCA37PS-0.5P (0.5m)
:PCA37PS-1.5P (1.5m) :PCA37PS-3P (3m)
:PCA37PS-5P (5m) 30-pin Pinhead Connector to 37-pin D-SUB Co nnecto r : DT/B2 (0.5m) Conversion Flat Cable : DT/O (1.5m) 37-pin D-SUB(male) connector Five-piece set : CN5-D37M

Accessories (Option)

Screw terminal : EPD-37A *1 Screw terminal (Screw Up type) : EPD-37 *1 Terminal unit for solderless terminal (M3) : DTP-3(PC) Terminal unit for leads : DTP-4(PC) *1 Option cable PCB37P or PCB37PS is required separately.
* Check the CONTEC’s Web site for more information on these options.
3
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 boards are warranted by CONTEC CO ., LTD. to be free from defects in m aterial 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 boards. The warranty is not applicable if the device has been tampered with or damaged through abuse, mistreatment, neglect, or unreasonable use, or if the ori ginal invoice is not included, in whi ch 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
1. Before Using the Product

Safety Precautions

Understand the following definitions and precautions to use the product safely.

Safety Information

This document provides safety i nformation usin g the following sym bols to prevent accidents resulting in injury or death and the destruction o f equipment and r esource s. Understa nd the meanings of the se 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.
5
1. Before Using the Product

Handling Precautions

DANGER
Do not use the product where it is ex posed to flamm able or corro sive gas. Doing so may result i n 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. 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 install or remove the board to or from the expansion slot while the computer's power is turned on. Otherwise, the board may malfunction, overheat, or cause a failure. Be sure that the personal computer’s 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.
6
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 th e pack ing mat eri al, t h en pu t it in th e bo x. (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.
7
1. Before Using the Product
8

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 bund led C D -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 guide as required.
This chapter Step 2 Setting the Hardware This chapter Step 3 Installing the Hardware Chapter 3 External Connection Chapter 6 About Hardware
9
2. Setup

Using the Board under an OS Other than Windows

For using the board under Linux, see the following parts of this guide.
This chapter Step 2 Setting the Hardware Chapter 3 External Connection Chapter 5 About Software Chapter 6 About Hardware
For using the board under an OS such as MS-DOS other than Windows, see the following parts of this guide.
This chapter Step 2 Setting the Hardware Chapter 3 External Connection Chapter 6 About Hardware
10

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.
11
2. Setup

Selecting the Counter Board Driver

(1)
The following dialog box appears to select “Driver Type” and “Install Type”
(2)
Select “For Counter Board API-CNT(98/PC)NT”
(3)
Select “Driver, Help, etc… (Full install)”.
(4)
Click on the [Install] button.
.
.
12
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 hardware for the first time:
1) Uncheck “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(API-TOOL Configuration)”, then go to Step 4 “Initializing the Software”.
You have now finished installing the software.
13
Loading...
+ 45 hidden pages