Copyright 1997 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 nor
for results obtained by the user as a result of using this product.
Trademarks
MS, Microsoft, MS-DOS and Windows are trademarks of Microsoft
Corporation. Other brand and product names are trademarks of
their respective holder.
CNT24-4(PCI)
i
Product Configuration
- CNT24-4(PCI) Board…1
- CNT24-4(PCI) Setup Disk (3.5inch/1.44MB)…1
- User's Guide (this Booklet)…1
Unpacking:
This card is specially packed in an anti-static bag to prevent damage
in shipping.
Check the contents to make sure that you have everything listed
above. If you do not have all the items, contact your distributor
or CONTEC group office where you purchased.
Note!
Do not remove the board from its protective packaging until the
computer case is open and ready for installation. Electrical static
can cause damage to electrical components.
ii
CNT24-4(PCI)
Table of Contents
Copyright........................................................................... i
Trademarks........................................................................ i
Thank you for purchasing the CNT24-4(PCI).
The CNT24-4(PCI) is the PCI bus compatible. This board is
plugged into a PCI bus expansion slot on the motherboard in the
personal computer or into a PCI bus unit. You should read this
manual carefully to construct your system with the board by
creating its application programs and connecting the required
external devices to the board.
Features
- One board enables 24 bit up/down counts for four channels.
- Counts two phase signals from devices like a rotary encoder or a
linear gauge.
- Photocoupler insulated input or TTL level input for each channel.
- Generates interrupts or outputs signals by matching the count
value of each channel with the value set by the user.
- Periodically generates an interrupt using an internal
programmable timer.
- Each channel has a general input signal (including photocoupler
and TTL input).
Introduction
CNT24-4(PCI)
1
Introduction
Limited Three-Year Warranty
CONTEC Interface boards 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 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
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.
2
* 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.
CNT24-4(PCI)
About the Manual
This manual consists of the following chapters:
Chapter 1Introduction
Chapter 2Setup
This chapter describes the procedures for setting up
the CNT24-4(PCI) board and setting its switches.
Chapter 3Connecting the External Devices
This chapter explains how to connect external devices
to the board and gives notes on connecting them.
Chapter 4I/O Ports and Registers
This chapter provides the assignment and definitions
of each I/O port bit used the board.
Chapter 5Specifications
This chapter summarizes the hardware specifications
of the board and provides circuit block diagrams.
Chapter 6Index
Introduction
CNT24-4(PCI)
3
Introduction
4
CNT24-4(PCI)
2. Setup
Component Locations
Figure 2.1. shows the names of major parts on the CNT24-4(PCI)
board.
Note that the switch setting shown below is the factory default.
• Interface connector
for TTL level input (CN2)
• Jumper for interrupt signal
resource settings
JP1
INT
USE
1 2 3
NOT USE
Setup
CNT24-4(PCI)
• Interface connector for
photocoupler resistance input
(CN1)
• BOARD ID Setting Switch
Figure 2.1. Component Locations
8
9
7
A
B
6
5
C
4
D
3
E
2
F
1
0
SW1
BOARD ID
JP1
BOARD ID
SW1
CNT24-4(PCI)
5
Setup
Setting the Board ID
If you install two or more CNT24-4(PCI) boards on one personal
computer, set their respective board IDs to distinguish them.
Assign a different value to each of the boards.
The board IDs from 0 to F can be set 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.
8
9
7
A
6
B
5
C
4
D
3
E
2
F
1
0
SW1
BOARD ID
( Same for match output :
BOARD ID = 0 )
Figure 2.2. Board ID Settings (SW1)
6
CNT24-4(PCI)
Setting the Interrupt Use
If you don't use the Interrupt function, to save the Interrupt
resources of PC, you can let recognize to the PC the CNT24-4(PCI)
as no-Interrupt function boards.
In case of interrupt use, this board is assigned the interrupt level
from PC.
Setup
Setup when interrupt is used
JP1
INT
USE
(Factory setting)
NOT USE
Setup when interrupt is not used
JP1
INT
USE
NOT USE
1 2 31 2 3
Figure 2.3. Setting the Interrupt Use
CNT24-4(PCI)
7
Setup
Setting up the Board
(For Use under MS-DOS or Windows 3.1)
The board setup method for the CNT24-4(PCI) is different
depending on each OS. Set up the board using the appropriate
method depending on the OS used. This section describes the
procedure and notes for using the board under MS-DOS or
Windows 3.1.
Procedure
(1) Set the board ID.
(2) Be sure to check that the personal computer is off, then plug
the board into a PCI bus slot in the personal computer.
(3) Turn the personal computer on to start up MS-DOS.
(4) Setting up the board is completed when MS-DOS gets and
running. When setting up the board has been completed,
be sure to check the assigned resources.
Checking resources
Before operating the CNT24-4(PCI) board, be sure to check the
personal computer resources (I/O addresses and interrupt level)
assigned to the board. For PCI compatible (Plug and Play
compliant) boards, free resources among the personal computer
resources are assigned automatically upon activation of the personal
computer. Follow the steps below to check the assigned resources.
(1) Run the resource check program "CNTPCI.EXE" stored in the
DOS directory on the supplied floppy disk (FD).
(2) Check the I/O addresses and interrupt level (IRQ) displayed on
the screen.
Once the CNT24-4(PCI) has been set up correctly, it can be used
under MS-DOS and Windows 3.1.
8
CNT24-4(PCI)
Obtaining resource information
You can get information on the personal computer resources
assigned to the CNT24-4(PCI) by accessing the PCI BIOS.
For the precise method, refer to the sample program stored in the
DOS directory on the supplied FD.
Sample programs for MS-DOS
The sample programs for using the CNT24-4(PCI) under MS-DOS
are written in Microsoft C.
Setup
DOS --- Samples --
DOS --- Samples --- 98 or PC ---
(1) CNTPCI.CResource check program
CNTPCI.EXE
(2) CNTPCI01.CCount value of any Channel
CNTPCI01.EXE
(3) CNTPCI02.C4 channel count value at the same time
CNTPCI02.EXE
(4) CNTPCI03.CCount value for every time period by timer interrupt
CNTPCI03.EXE
Figure 2.4. Sample Programs on FD
For details on I/O addresses, see Chapter 4 "I/O Ports and
Registers."
CNT24-4(PCI)
9
Setup
Sample's Specification
Table 2.1. Sample's Specification
Using channel0ch0ch - 3ch0ch - 3ch
Operating mode*1*1*1
Input Z-phase/clearoncein validin valid
Digital filter6.5µsec100nsec *2100nsec *2
Initial count value000
Comparison count value100 (64h)100 (64h)100 (64h)
One-shot pulse width
Timer value------1 second
Using connectorCN1CN1CN1
*1 Set an operation mode Set an operation mode for input spcification.
Operation mode data example
8Ch : Photocoupler insulation, 2-phase input
9Bh : Photocoupler insulation, Single-phase input
8Bh : Photocoupler insulation, Gate control input
CCh : TTL level, 2-phase input
DBh : TTL level, Single-phase input
CBh : TTL level, Gate Control input
Other settings (Common) : Asynchronization clear, UP counting direction,
Z-phase positive logic, Single input multiplication.
The Sample program uses the 8C setting.
*2 In the CNTPCI02, CNTPCI03, the digital filter is not set and the default is 100nsec.
*3 To Output the signal to an external peripheral, CN1 must be connected.
ItemSpecification
CNTPCI01.CCNTPCI02.CCNTPCI03.C
104.4msec *3------
≠
10
Note!
Connect a signal appropriate for the input specification of an
external peripheral. To connect a rotary encoder, see Chapter 3.
"Connecting Rotary Encoder".
CNT24-4(PCI)
Setup
(1) Display count value of any channel (CNTPCI01.C)
This program displays the count value of the specified channel.
If the program is executed, the count value of the signal connected
to channel 0 is displayed.
The count comparison data is set at 100; matching with the count
value outputs the one-shot pulse to an external peripheral.
Pressing the ESC key terminates the program
CHANNELDATASTATUS
CH007F
Figure 2.5. CRT Display (CNTPCI01.C)
START
Set I/O address
*********
Set channel
Initial setting
• Set operation mode
• Set Z-phase
• Set digital filter
• Reset sense bit
Set count data
(Lower)
(Middle)
(Upper)
Set count match data
(Lower)
(Middle)
(Upper)
1
1
Set one-shot
pulse width
Latch count value
Read count value
(Lower)
(Middle)
(Upper)
Calculate count value
Display
count value
Figure 2.6. Flowchart (CNTPCI01.C)
CNT24-4(PCI)
11
Setup
(2) Display 4 channel count values at the same time
(CNTPCI02.C)
This program displays the 4 channel count values at the same time.
When this program is executed, the signal count values (Decimal
and HEX) that are connected to channels 0 - 3 and their input status.
Pressing the ESC key terminates the program.
CHANNELDATASTATUS
CH007F
CH107F000000
CH207F000000
CH307F000000
DATA(HEX)
000000
Figure 2.7. CRT Display (CNTPCI02.C)
(3) Display count value for every time period by timer interrupt
(CNTPCI03.C)
This program generates an interrupt every second using the timer
and displays the count value. If this program is executed, the
count values (HEX and decimal) of the signal that is connected to
channels 0 -3 are displayed. The interrupt level is IRQ5.
Pressing the ESC key terminates the program.
CHANNELDATA
CH00
CH10000000
CH20000000
CH30000000
INTERRUPT COUNT 0TIME
DATA(HEX)
000000
12
Figure 2.8. CRT Display (CNTPCI03.C)
Note!
To terminate the program, press the ESC key. If the program is
terminated by another key, the interrupt routine is aborted and the
process stops.
CNT24-4(PCI)
Setup
START
Set segment
*********
base address
Set address
Initial setting
• Set operation mode
• Set Z-phase
• Reset sense bit
Set count data
(Lower)
(Middle)
(Upper)
Set count data
(Lower)
(Middle)
(Upper)
Interrupt process
Set IRQ5
1
1
Clear mask
Set timer data
(Lowest)
(Lower)
(Upper)
(Highest)
Start timer
Check sense port
Latch count value
Read count value
Calculate count value
Display
count value
Reset sense bit
N
END
Y
Set IMR
Stop timer
END
IRQ5
Save registar
*********
Input number of
timer count ups
Interrupt EQI process
Restore register
IRET
Figure 2.9. Flowcharts (CNTPCI03.C)
CNT24-4(PCI)
13
Setup
Setting up the Board
(for Use under Windows 95)
The board setup method for the CNT24-4(PCI) is different
depending on each OS. Set up the board using the appropriate
method depending on the OS used. This section describes the
procedure and notes for using the board under Windows 95.
Before the CNT24-4(PCI) can be used under Windows 95, have the
OS recognize the I/O addresses and interrupt level (IRQ) to be used
for the CNT24-4(PCI). Assigning the resources such as I/O
addresses and IRQ for a piece of hardware in Windows 95 is called
"installing the hardware." Use the appropriate procedure to install
the CNT24-4(PCI).
Checking the OS version
Note that the procedure for installing the CNT24-4(PCI) is different
depending on each version of Windows 95.
Check the version of Windows 95 on your system as follows before
installing the CNT24-4(PCI).
14
(1) Open [Control Panel] from [My Computer].
(2) Double-click on the [System] option to open the [System
Properties] property sheet.
(3) Check the "System:" number displayed on the [General] page.
System:
Microsoft Windows 95
4.00.950
The version numbers of Windows 95 include 4.00.950, 4.00,950a,
and 4.00.950B. The CNT24-4(PCI) setup method is different
depending on the version number of Windows 95.
CNT24-4(PCI)
Loading...
+ 53 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.