Digital i/o board with opto-isolation for pci, digital input board with opto-isolation for pci, digital output board with opto-isolation for pci (71 pages)
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.
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.
Procedure for use under Windows 95 version 4.00.950 or 4.00.950a ........15 Procedure for use under Windows 95 version 4.00.950B............15 Method of installing two or more CNT24-4(PCI) boards (for use under Windows 95 version 4.00.950 or 4.00.950a) ..............16 Method of installing two or more CNT24-4(PCI) boards (for use under Windows 95 version 4.00.950B) ..18...
Page 6
QUESTIONS: ..............61 Is the pilot light on? ............61 Did the system boot up?..........61 Does your program work? ...........61 Does the sample program work? ........61 Is the input data accurate?.........62 Still have a problem? ..........62 7. Index ..............65 CNT24-4(PCI)
Page 7
Connecting to Open-collector Output Device ..27 Figure 3.10. TTL-Level Input Circuitry ........28 Figure 3.11. Output Circuit and Connecting Example ....29 Figure 3.12. Photocoupler Input ..........30 Figure 3.13. TTL Input ...............30 Figure 3.14. Samples of Surge Voltage Protection.......31 Figure 4.1. Output port..............33 CNT24-4(PCI)
Page 8
Figure 4.7. Example of Synchronization Clear ......42 Figure 4.8. Example of Asynchronization Clear......42 Figure 4.9. Counting Example for Multiplied Count Inputs..43 Figure 4.10. Number of Z-phase Inputs Available ZSE=0 (Positive Logic)............44 Figure 4.11. Digital Filter............47 Figure 5.1. Block Diagram............60 CNT24-4(PCI)
Page 9
Table 4.5. Z-phase Input Mode...........44 Table 4.6. Digital Filter Clock Data..........47 Table 4.7. Relationship between programmable timer interrupt ................51 Table 4.8. Relationship Between One-shot Pulse Width Data and Pulse Width ............52 Table 4.9. Default Setting............57 Table 5.1. Specifications ............59 viii CNT24-4(PCI)
1. Introduction 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...
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.
Introduction Chapter 2 Setup This chapter describes the procedures for setting up the CNT24-4(PCI) board and setting its switches. Chapter 3 Connecting the External Devices This chapter explains how to connect external devices to the board and gives notes on connecting them.
Setup 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. • Jumper for interrupt signal resource settings NOT USE • Interface connector...
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.
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.
(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. CNT24-4(PCI)
Setup 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.
*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. 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)
• Set Z-phase • Set digital filter Read count value • Reset sense bit (Lower) (Middle) (Upper) Set count data (Lower) (Middle) Calculate count value (Upper) Display Set count match data count value (Lower) (Middle) (Upper) Figure 2.6. Flowchart (CNTPCI01.C) CNT24-4(PCI)
DATA 000000 000000 000000 000000 INTERRUPT COUNT 0TIME 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)
(Lower) Latch count value (Middle) Restore register (Upper) Read count value IRET Calculate count value Set count data (Lower) (Middle) Display (Upper) count value Interrupt process Reset sense bit Set IRQ5 Set IMR Stop timer Figure 2.9. Flowcharts (CNTPCI03.C) CNT24-4(PCI)
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).
Distributed File From] field, then click on [OK]. (6) Follow the instructions on the screen to complete installation of the CNT24-4(PCI). After finishing installing the board, be sure to check the assigned resources. Procedure for use under Windows 95 version 4.00.950B (1) Set the board ID.
Follow the procedure below to install two CNT24-4(PCI) boards for use under Windows 95 version 4.00.950 or 4.00.950a. (1) Check the board ID of the first CNT24-4(PCI) board, plug it into a PCI bus slot, then start up Windows 95 to install the first board correctly.
Page 26
Before trying to install the second board, check free resources on the personal computer. - The resources used for each CNT24-4(PCI) board do not depend on the location of the PCI bus slot or the board itself. If you...
Follow the procedure below to install two CNT24-4(PCI) boards for use under Windows 95 version 4.00.950B. (1) Check the board ID of the first CNT24-4(PCI) board, plug it into a PCI bus slot, then start up Windows 95 to install the first board correctly.
Before trying to install the second board, check free resources on the personal computer. - The resources used for each CNT24-4(PCI) board do not depend on the location of the PCI bus slot or the board itself. If you...
Support software CONTEC provides the following driver software for Windows 95: API-CNT(98/PC)W95 Ver. 2.3 or later These pieces of driver software support up to four CNT24-4(PCI) boards. Note that, when API-CNT(98/PC)W95 is used, development languages that can be used are only 32-bit versions. Neither driver can be supported by any language dedicated to 16-bit applications.
OS used. This section describes the procedure and notes for using the board under Windows NT. Before the CNT24-4(PCI) can be used under Windows NT, have the OS recognize the I/O addresses and interrupt level (IRQ) to be used for the CNT24-4(PCI).
(2) Select [Resources] (IRQ/port settings). Check the type and settings of resources assigned to the API-CNT(98/PC)NT and the conflicting device list. Once the CNT24-4(PCI) has been installed correctly, it can be used under Windows NT. Support software CONTEC provides the following driver software for Windows NT: API-CNT(98/PC)NT Ver.
CN2 to an external device by connecting the optional cable to CN2. Matched pulse output is output from CN1. (Photocoupler insulated open collector output) Figure 3.1. Connecting the Interface Connector Note! See Chapter 3 "Option cable DT/B2" for further information. CNT24-4(PCI)
External Connection Connector Connecting the CNT24-4(PCI) board to external devices is via one 37-pin female D-Type connector (CN1) and one 30-pin male connector (CN2). • Installed connector 37-pin D-Type connector (female) • Suitable cable 17JE-23370-02(D8C) (male) (DDK) FDCD-37P (male) (HIROSE)
OUT B/DOWN Ground Not Connected N.C. OUT A/UP General-purpose Input Ground OUT Z/CLR General-purpose Input OUT B/DOWN OUT Z/CLR OUT A/UP OUT B/DOWN Note! The VCC and GND signals are used for all four channels. Figure 3.5. CN2 Pin Assignments CNT24-4(PCI)
OUT A/UP OUT A/UP OUT B/DOWN OUT B/DOWN OUT Z/CLR OUT Z/CLR General-purpose Input General-purpose Input Not connected N.C. Not connected N.C. N.C. Not connected Note! Each channel has an independent Plus Common. Figure 3.7. 37-Pin D-Type Connector Pin Assignments CNT24-4(PCI)
External Connection You are now ready to connect the I/O cables to the board if you have not already done so. Connecting the CNT24-4(PCI) to external devices is via the 37-pin D-SUB I/O connector on the board. Figure 3.8. shows Digital input circuits. Figure 3.9.
- The general input signal uses the same circuit structure. - The cable should be 1.5m or less. - To prevent malfunction caused by noise, separate the circuit as much as possible from other signal cables and noise sources. CNT24-4(PCI)
The board's output transistor does not have a surge voltage protection circuit. As a result, to run inductive loads (for example, relays and lamps), install surge voltage protection at the loading side. See "Appendix C: Surge Voltage" for further information. CNT24-4(PCI)
Examples of measures against surge voltages are as shown in the Figure 3.14. below. Figure 3.14. Samples of Surge Voltage Protection Note! The protection circuit will not be effective unless it is installed less than 50cm from the load and contact. CNT24-4(PCI)
In this case, the data is set from the lower bite, the middle byte and the upper byte. Data of 24 bits is read from the lower byte, the middle byte and the upper byte. Similarly, to set 32 bit data, output data four times to the +1 port. CNT24-4(PCI)
CH3 LT CH2 LT CH1 LT CH0 LT Latch count value (4) No used TIME nterrupt latch (5) No used TIME Sense set (5) Programmable timer setting data Timer data (32) No used START Timer start (1) One-shot pulse width data One-shot pulse (8) CNT24-4(PCI)
CH2 read count value CH2 Read count value (24) CH2 Status data (8) CH3 read count value CH2 Read count value (24) CH2 Status data (8) TIME CH3 CH2 CH1 CH0 Interrupt mask (5) TIME CH3 CH2 CH1 CH0 Sense port (5) CNT24-4(PCI)
SEL1 Execute an OUT command for output port +0, then set an operation mode on output port +1. RESET Clears the 24 bit up-down counter to "00000h." During RESET=0, counting is disabled. 0 : Clear counter 1 : Count CNT24-4(PCI)
I/O Ports and Registers Switches The rotary encoder counting direction. Table 4.4. Switching Counting Direction Rotary encoder rotation Clockwise Counterclockwise DOWN DOWN Note! In the default setting, all of channels are set 00h. CNT24-4(PCI)
Counting Figure 4.5. Single-phase Counting Example Note! This is a counting operation when DIR=1. If DIR=0, the counter counts down with the rising edge of an UP pulse and counts up with the rising edge of a DOWN pulse. CNT24-4(PCI)
This is a counting operation when DIR=1. If DIR=0 and the gate control signal (B-phase/DOWN) is HIGH, the counter counts down with the rising edge of a single-phase pulse (A-phase/UP). If DIR=0 and the gate control signal is LOW, the counter stops. CNT24-4(PCI)
Counting Figure 4.8. Example of Asynchronization Clear If DIR=0 and the B-phase is LOW, the counter starts counting down with the falling edge of the A-phase input. If ZSEL=0, the Z-phase input is available only when it is LOW. CNT24-4(PCI)
- Double-phase input - Single-phase input For single-phase input, only the single multiplication mode is available. (There is no double or quadruple multiplication.) - Single-phase input with gate control Figure 4.9. Counting Example for Multiplied Count Inputs CNT24-4(PCI)
Only the next Z-phase input is available. Every Z-phase input is available. * mark is the default setting. - Disabled Z-phase input - Only next Z-phase input is available - Every Z-phase input is available Figure 4.10. Number of Z-phase Inputs Available ZSE=0 (Positive Logic) CNT24-4(PCI)
OUT Address+0h, 03h (CH1 : Select comparison register) OUT Address+1h, E8h (Lower bits) OUT Address+1h, 03h (Middle bits) OUT Address+1h, 00h (Upper bits) In addition, a particular setting can output a one-shot pulse. (For more details, see "One-shot Pulse" description.) CNT24-4(PCI)
Since external input signals (except the general input signal) are read into the internal counter through the digital filter, these signals are read after a four clock delay of the sampling frequency. With the default setting, external input signal is read with 400nsec delay. CNT24-4(PCI)
- Some noise causes more than a four clock delay of the set frequency. - If the level changes faster than the sampling clock frequency that has been set, the level change is invalid and there is no count. Latch count. CNT24-4(PCI)
Setting these bits "0," enables the interrupt. Notes! - In the default setting, all of the four channels and the timer are disabled (1Fh). - However, to mask a channel or the timer will not effect the function of setting/resetting the related status. CNT24-4(PCI)
+1 clear the sense bit. The next interrupt signal can be generated. TIME : Resets the sense bit when the programmable timer count is up. CH3-CH0 : Resets the sense bit for count match of the channels. CNT24-4(PCI)
OUT Address+1h, FFh (Lowest bits) OUT Address+1h, 2Ch (Lower bits) OUT Address+1h, 31h (Upper bits) OUT Address+1h, 01h (Highest bits) OUT Address+0h, 18h (Select timer start) OUT Address+1h, 1h (Timer start) Note! In the default setting, the timer is disabled. CNT24-4(PCI)
About 40.14msec About 49.97msec About 60.2msec About 70.04msec About 80.28msec About 90.11msec About 100.35msec About 104.45msec Notes! - The default is "Pulse width = 0 (00h)" (not output). - The pulse width may fluctuate depending on the connection load specification. CNT24-4(PCI)
The default of the read-out register is not determined. The following sample program shows how to read the CH2 counter value : Address+0, 0Ah (Select CH2 count data) Address+1, (Lower bits) Address+1, (Middle bits) Address+1, (Upper bits) Note! First set the CH2 data latch to "1." CNT24-4(PCI)
This status bit shows the counting direction of the current. 0 : Counting up 1 : Counting down EQ : Detected match 0 : Counter value and register value matched. 1 : Counter value and register value did not match. CNT24-4(PCI)
Page 64
- Since the status data of A-phase, B-phase and Z-phase is the data after the filtering process, it has a 4 clock delay in the frequency that has been set. - Z-phase logic is set by the ZSEL of the operation mode setting. CNT24-4(PCI)
- If an interrupt is enabled and generated and the TIME bit or one of the CH3 to CH0 bits changes to "1" reset the corresponding sense bit to enable the next interrupt. For details on sense bit resetting, see "Sense Bit Reset" of the output port. CNT24-4(PCI)
System Reference Block Diagram The following is a block diagram of the CNT24-4(PCI) interface board. Sampling clock 16-bit counter for digital filter Photocoupler 24-bit read register resistance input (4channels) TTL level input 24-bit counter (4 channels) 24-bit comparator 24-bit compare register...
- Selected interrupt levels don't conflict with interrupts required by other devices or cards. - Try one of the sample programs provided on the disk and see if it works. Does the sample program work? Check the following: - Signals are connected to the correct pins. CNT24-4(PCI)
- Pin connections on the I/O cables are secure. - Signals are present at the external connectors. - Try using the CNT24-4(PCI) board with other non-essential boards removed. Remove other boards one by one, checking the CNT24-4(PCI) for successful operation after each board is removed.
Page 72
4. Name of the CONTEC board that you are using. 5. Names of other boards in the computer. 6. I/O addresses for the CONTEC board and all other boards. 7. Interrupt levels for the CONTEC board and all other boards.
Page 73
Troubleshooting 10. Different I/O addresses you have tried. 11. Are you using your own program or a CONTEC sample program. 12. List AUTOEXEC.BAT. 13. List CONFIG.SYS. CNT24-4(PCI)
Need help?
Do you have a question about the CNT24-4 and is the answer not in the manual?
Questions and answers