Omega Products OME-TMC12A Installation Manual

www.omega.com
e-mail: info@omega.com
User’s Guide
OME-TMC12(A) PCI-Bus Digital I/O
Board
Hardware Manual
Servicing North America:
USA: One Omega Drive, P.O. Box 4047
ISO 9001 Certified Stamford CT 06907-0047
TEL: (203) 359-1660 FAX: (203) 359-7700 e-mail: info@omega.com
Canada: 976 Bergar
Laval (Quebec) H7L 5A1, Canada TEL: (514) 856-6928 FAX: (514) 856-6886 e-mail: info@omega.ca
For immediate technical or application assistance:
USA and Canada: Sales Service: 1-800-826-6342 / 1-800-TC-OMEGA
®
Customer Service: 1-800-622-2378 / 1-800-622-BEST
®
Engineering Service: 1-800-872-9436 / 1-800-USA-WHEN
®
TELEX: 996404 EASYLINK: 62968934 CABLE: OMEGA
Mexico: En Espan˜ ol: (001) 203-359-7803 e-mail: espanol@omega.com
FAX: (001) 203-359-7807 info@omega.com.mx
Servicing Europe:
Benelux: Postbus 8034, 1180 LA Amstelveen, The Netherlands
TEL: +31 (0)20 3472121 FAX: +31 (0)20 6434643 Toll Free in Benelux: 0800 0993344 e-mail: sales@omegaeng.nl
Czech Republic: Frystatska 184, 733 01 Karviná, Czech Republic
TEL: +420 (0)59 6311899 FAX: +420 (0)59 6311114 Toll Free: 0800-1-66342 e-mail: info@omegashop.cz
France: 11, rue Jacques Cartier, 78280 Guyancourt, France
TEL: +33 (0)1 61 37 29 00 FAX: +33 (0)1 30 57 54 27 Toll Free in France: 0800 466 342 e-mail: sales@omega.fr
Germany/Austria: Daimlerstrasse 26, D-75392 Deckenpfronn, Germany
TEL: +49 (0)7056 9398-0 FAX: +49 (0)7056 9398-29 Toll Free in Germany: 0800 639 7678 e-mail: info@omega.de
United Kingdom: One Omega Drive, River Bend Technology Centre
ISO 9002 Certified Northbank, Irlam, Manchester
M44 5BD United Kingdom TEL: +44 (0)161 777 6611 FAX: +44 (0)161 777 6622 Toll Free in United Kingdom: 0800-488-488 e-mail: sales@omega.co.uk
OMEGAnet®Online Service Internet e-mail
www.omega.com info@omega.com
It is the policy of OMEGA to comply with all worldwide safety and EMC/EMI regulations that apply. OMEGA is constantly pursuing certification of its products to the European New Approach Directives. OMEGA will add the CE mark to every appropriate device upon certification.
The information contained in this document is believed to be correct, but OMEGA Engineering, Inc. accepts no liability for any errors it contains, and reserves the right to alter specifications without notice. WARNING: These products are not designed for use in, and should not be used for, patient-connected applications.
OME-PCI-TMC12(A)
User Manual
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 1
Tables of Contents
1.
1. INTRODUCTION ....................................................................................................................4
1.1 OME-PCI-TMC12(A)........................................................................................................5
1.2 PRODUCT CHECK LIST ........................................................................................................5
2. HARDWARE CONFIGURATION ........................................................................................6
2.1 BOARD LAYOUT.................................................................................................................. 6
2.2 COUNTER ARCHITECTURE...................................................................................................7
2.3 D/I/O BLOCK DIAGRAM...................................................................................................... 8
2.4 JUMPER SETTING................................................................................................................. 9
2.5 DAUGHTER BOARDS ......................................................................................................... 13
2.6 PIN ASSIGNMENT ..............................................................................................................17
3. I/O CONTROL REGISTER......................................................................................................19
3.1 HOW TO FIND THE I/O ADDRESS........................................................................................19
3.2 THE ASSIGNMENT OF I/O ADDRESS ...................................................................................21
3.3 THE I/O ADDRESS MAP ..................................................................................................... 22
3.4 NEW FEATURES OF OME-PCI-TMC12A..........................................................................27
4. 8254 PROGRAMMING ........................................................................................................ 32
4.1 CONTROL WORD FORMAT ................................................................................................ 32
4.2 COUNTER LATCH COMMAND .............................................................................................33
4.3 READ BACK COMMAND .....................................................................................................33
4.4 STATUS BYTE FORMAT ......................................................................................................33
5. DEMO PROGRAM....................................................................................................................34
5.1 DEMO1: USE D/O................................................................................................................. 35
5.2 DEMO2: USE D/I ..................................................................................................................36
5.3 DEMO3: WAVE GENERATOR ................................................................................................37
5.4 DEMO4: DELAY ONE MSEC...................................................................................................39
5.5 DEMO5: 16-BIT EVENT COUNTER.........................................................................................40
5.6 DEMO6: SOFTWARE COUNTER .............................................................................................41
5.7 DEMO7: WATCHDOG TIMER.................................................................................................42
5.8 DEMO8: PULSE WIDTH MEASURE ........................................................................................44
5.9 DEMO9: FREQUENCY MEASURE...........................................................................................46
5.10 DEMO10: FIND CARD NUMBER ............................................................................................48
5.11 DEMO11: COUNT LOW PULSE ..............................................................................................49
5.12 DEMO12: LOW PULSE WIDTH ..............................................................................................51
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 2
5.13 DEMO13: HIGH PULSE WIDTH ............................................................................................. 54
5.14 NDEMO1: USING LEDS ........................................................................................................56
5.15 NDEMO2: GENERATE 2 CLOCKS...........................................................................................57
5.16 NDEMO3: NEW DEMO7 ........................................................................................................60
5.17 NDEMO4: ACTIVE HIGH INT .................................................................................................63
5.18 NDEMO5: ACTIVE LOW INT.................................................................................................. 66
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 3
1. Introduction
The OME-PCI-TMC12(A) is a general purpose counter/timer and digital I/O card
PC AT compatible PCI bus
On-board four 8254 chips
5 different interrupt sources, 4 internal + 1 external, jumper selectable
Flexible clock sources and gate control signals selectable
2 stable internal clock sources, CLOCK1=8M/1.6M, CLOCK2=0.8M/80K,
jumper selectable
12 external clock sources
12 external gate control signals
16 bits general purpose TTL-compatible D/O or relay (with daughter board OME-
DB-16R or OME-DB-24PR)
16 bits general propose TTL-compatible D/I or isolated input (with daughter
board OME-DB-16P)
12 independent 16 bits timer/counter
All signals are TTL compatible
Operating Temperature: 0°C to 60°C
Storage Temperature: -20°C to 80°C
Humidity: 0 to 90% RH non-condensing
Dimension: 150mm X 105mm
Power Consumption: +5V @ 500mA
Note: PCI_TMC12(A) = OME-PCI-TMC12 or OME-PCI-TMC12A
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 4
1.1 OME-PCI-TMC12(A)
All old programs designed for OME-PCI-TMC12 can be executed on OME-PCI-
TMC12A without any modification
OME-PCI-TMC12A provides additional features to OME-PCI-TMC12, refer to
Sec. 3.4 for more information.
1.2 Product Check List
In addition to this manual, the package includes the following items:
OME-PCI-TMC12(A) card
One companion CD for software driver & related documents
Attention!
If any of these items are missing or damaged, contact Omega Engineering
immediately. Save the shipping materials and the box in case you want to ship or
store the product.
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 5
2. Hardware configuration
K
2.1 Board Layout
PCI BUS
J22, J23, J24
J19, J20, J21
J16, J17, J18
EXT
SPARE
J13, J14, J15
CH9
CH12
80
1.6M
J10, J11, J12
CH3
CH6
800K
CLOCK2
8M
CLOCK1
J7, J8, J9
J25
J26
J27
J4, J5, J6
J1, J2, J3
LED2 LED1
LED3
OMEPCI-TMC12 /OME- PCI-TMC12A
Note: J28, LED1, LED2 & LED3 are designed for OME-PCI-TMC12A only.
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 6
PCI BUS
D/I
TMC12A
CON2
TMC-12
Int
J28
CON3
D/O
2.2 Counter Architecture
G
G
G
G
G
G
G
G
G
G
G
G
There are four 8254 chips on the OME-PCI-TMC12(A) card. The block diagram is
given as following:
CLK1
GATE1
CLK2
GATE2
8254 CHIP #1 (U12)
Counter 1
CLK
OUT
ATE
Counter 2
CLK
OUT
ATE
CLK4
COUT1
GATE4
CLK5
COUT2
GATE5
8254 CHIP #2 (U8)
Counter 4
CLK
OUT
ATE
Counter 5
CLK
OUT
ATE
COUT4
COUT5
CLK3
GATE3
CLK7
GATE7
CLK8
GATE8
CLK9
GATE9
Counter 3
CLK
OUT
ATE
8254 CHIP #3 (U3)
Counter 7
CLK
OUT
ATE
Counter 8
CLK
OUT
ATE
Counter 9
CLK
OUT
ATE
COUT3
COUT7
COUT8
COUT9
CLK6
GATE6
CLK10
GATE10
CLK11
GATE11
CLK12
GATE12
Counter 6
CLK
OUT
ATE
8254 CHIP #4 (U1)
Counter 10
CLK
OUT
ATE
Counter 11
CLK
OUT
ATE
Counter 12
CLK
OUT
ATE
COUT6
COUT10
COUT11
COUT12
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 7
2.3 D/I/O Block Diagram
The OME-PCI-TMC12(A) provides 16 digital input channels and 16 digital
output channels. All levels are TTL compatible. The connections diagram and block
diagram are given as following:
I/O read
signal
Local Data Bus
DO port
D0..D15
I/O write
signal
DI port
CON3
CON2
The D/I port can be connected to the OME-DB-16P. The OME-DB-16P is a 16-
channel isolated digital input daughter board. The D/O port can be connected to the
OME-DB-16R or OME-DB-24PR. The OME-DB-16R is a 16-channel relay output
board. The OME-DB-24R is a 24-channel power relay output board.
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 8
2.4 Jumper Setting
K
2.4.1 CLOCK1 & CLOCK2
There are two stable internal clock sources in OME-PCI-TMC12(A) which named
as CLOCK1 & CLOCK2. The CLOCK1 may be 8M or 1.6M selectable by J27. The
CLOCK2 may be 0.8M or 80K selected by J26. The block diagram of internal clock
sources is given as following:
8 M
CLOCK1= 8M
1.6 M 0.8M
J27 select
CLOCK1
8M
CLOCK1
1.6M
CLOCK1= 1.6M
800K
CLOCK2
80
80 K
J26
select
CLOCK2
8M
CLOCK1
1.6M
800K
CLOCK2
80K
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 9
CLOCK2= 800K
CLOCK2= 80K
2.4.2 CLK1 to CLK12
1: select CLOCK1
2: select CLOCK2
5: select COUTn-1
6: select external CLKn from CN1
Select
CLOCK1
Select
COUTn-1
(last channel)
1 2
5 6
1 2
5 6
Select
CLOCK2
Select
EXT_CLKn
(external
CLKn)
1 2
5 6
1 2
5 6
CLK1-12 jumper Select sources
CLK1 JP22 CLOCK1, CLOCK2, COUT6, ECLK1
CLK2 JP23 CLOCK1, CLOCK2, COUT1, ECLK2
CLK3 JP24 CLOCK1, CLOCK2, COUT2, ECLK3
CLK4 JP13 CLOCK1, CLOCK2, COUT3, ECLK4
CLK5 JP14 CLOCK1, CLOCK2, COUT4, ECLK5
CLK6 JP15 CLOCK1, CLOCK2, COUT5, ECLK6
CLK7 JP10 CLOCK1, CLOCK2, COUT12, ECLK7
CLK8 JP11 CLOCK1, CLOCK2, COUT7, ECLK8
CLK9 JP12 CLOCK1, CLOCK2, COUT8, ECLK9
CLK10 JP1 CLOCK1, CLOCK2, COUT9, ECLK10
CLK11 JP2 CLOCK1, CLOCK2, COUT10, ECLK11
CLK12 JP3 CLOCK1, CLOCK2, COUT11, ECLK12
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 10
2.4.3 GATE1 TO GATE12
GATE Jumper Select source
GATE1 J19 Inverted COUT6, EXTG1
GATE2 J20 Inverted COUT1, EXTG2
GATE3 J21 Inverted COUT2, EXTG3
GATE4 J16 Inverted COUT3, EXTG4
GATE5 J17 Inverted COUT4, EXTG5
GETE6 J18 Inverted COUT5, EXTG6
GATEn = EXTGn
3
2
1
GATEn = Inverted COUTn-1
3
2
1
GATE Jumper Select source
GATE7 J7 COUT12, EXTG7
GATE8 J8 COUT7, EXTG8
GATE9 J9 COUT8, EXTG9
GATE10 J4 COUT9, EXTG10
GATE11 J5 COUT10, EXTG11
GETE12 J6 COUT11, EXTG12
GATEn = EXTGn
3
2
1
3
2
1
GATEn = COUTn-1
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 11
2.4.4 J25: Interrupt Source Selection
(
(
)
(
(
)
There are five signals can be used as interrupt sources: CH3, CH6, CH9, CH12 &
EXT as following:
CH3: comes from COUT3, output of counter 3
CH6: comes from COUT6, output of counter 6
CH9: comes from COUT9, output of counter 9
CH12: comes from COUT12, output of counter 12
EXT: comes from ECLK11, external CLK for counter 11, from CN1.
(SPARE): no interrupt source
SPARE)
Interrupt source=ECLK11
SPARE)
No interrupt source
CH3
CH6
CH9
CH12
EXT
CH3
CH6
CH9
CH12
EXT
CH3
CH6
CH9
CH12
EXT
SPARE
Interrupt source=COUT6
CH3
CH6
CH9
CH12
EXT
SPARE
Interrupt source=COUT3
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 12
2.5 Daughter Boards
2.5.1 OME-DB37
The OME-DB-37 is a general purpose daughter board for D-sub 37 pins. It is
designed for easy wire connection.
2.5.2 OME-DN37 & OME-DN20
The OME-DN-37 is a general purpose daughter board for D-sub 37 pins. The
OME-DN-20 is designed for the 20-pin flat-cable. They are designed for easy wire
connection. These boards are DIN-Rail mountable.
37pin cable
OME-DN-37
2.5.3 OME-DB-8125 & OME-DB-8025
The OME-DB-8125 is a general purpose screw terminal board. It is designed for
ease of wiring. There is one D-sub 37-pin connector & two 20-pin flat-cable headers in
the OME-DB-8125. The OME-DB-8025 is designed for 20-pin flat-cable header.
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 13
37pin cable
OME-DB-8125
(D-sub 37 or
20-pin flat-cable header)
2.5.4 OME-DB-16P Isolated Input Board
The OME-DB-16P is a 16-channel isolated digital input daughter board. The
optically isolated inputs of the OME-DB-16P consist of a bi-directional opto-coupler
with a resistor for current sensing. You can use the OME-DB-16P to sense DC signal
from TTL levels up to 24V or use the OME-DB-16P to sense a wide range of AC
signals. You can use this board to isolate the computer from large common-mode
voltage, ground loops and transient voltage spike that often occur in industrial
environments.
OME-PCI-TMC12 D/I
Opto-Isolated
OME-PCI-TMC12(A)
CON2=D/I
20-Pin cable
OME-DB-16P
AC or DC Signal
0V to 24V
+
-
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 14
2.5.5 OME-DB-16R Relay Board
The OME-DB-16R, 16-channel relay output board, consists of 16 form C relays
for efficient switching of load by programmed control. The relays are energized by
applying 5 volt signal to the appropriated relay channel on the 20-pin flat connector.
There are 16 enunciator LEDs for each relay. They light when their associated relays
are activated. To avoid overloading your PC’s power supply, this board provides a
screw terminal for external power supply.
From C Relay
20Pin cable
CON3=D/O
OME-PCI-TMC12(A)
Normal Open
Normal Close
Com
OME-DB-16R
Note:
Channel: 16 From C Relay
Relay: Switching up to 0.5A at 110ACV
or 1A at 24DCV
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 15
2.5.6 OME-DB-24PR/24POR/24C
OME-DB-24PR 24*power relay, 5A/250V
OME-DB-24POR 24*photo MOS relay, 0.1A/350VAC
OME-DB-24C 24*open collector, 100mA per channel, 30V max.
The OME-DB-24PR, 24-channel power relay output board, consists of 8 form C
and 16 form A electromechanical relays for efficient switching of load by
programmed control. The contact of each relay can control a 5A load at
250ACV/30VDCV. The relay is energized by applying a 5 volt signal to the
appropriate relay channel on the 20-pin flat cable connector (only uses 16 relays) or
50-pin flat cable connector.(compatible to the OME-DIO-24 series). Twenty four
enunciator LEDs (one for each relay) light when their associated relay is activated. To
avoid overloading your PC’s power supply, this board needs a +12VDC or +24VDC
external power supply.
Normal Open
From A Relay
Com
20Pin cable
To 20pin connector
OME-DB-24PR
CON3=D/O
OME-PCI-TMC12(A)
Note:
50-Pin connector (compatible with OME-DIO-24/48/144)
20-Pin connector for 16-channel digital outputs (Compatible with OME-A-82X, OME-
A-62X, OME-DIO-64, OME-ISO-DA16/DA8)
Channel: 16 Form A Relays, 8 Form C Relays
Relay: switching up to 5A at 110ACV / 5A at 30DCV
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 16
2.6 Pin Assignment
The CON1 is a 37-pin D-type female connector.
Pin Number Description Pin Number Description
1 ECLK1 20 EXTG1
2 COUT1 21 ECLK2
3 EXTG2 22 COUT2
4 ECLK3 23 EXTG3
5 COUT3 24 ECLK4
6 EXTG4 25 COUT4
7 ECLK5 26 EXTG5
8 COUT5 27 ECLK6
9 EXTG6 28 COUT6
10 ECLK7 29 EXTG7
11 COUT7 30 ECLK8
12 EXTG8 31 COUT8
13 ECLK9 32 EXTG9
14 COUT9 33 ECLK10
15 EXTG10 34 COUT10
16 ECLK11 35 EXTG11
17 COUT11 36 ECLK12
18 EXTG12 37 COUT12
19 GND XXXXXXX This pin not available
ECLKn: external clock source for counter n
EXTGn: external gate control signal for counter n
COUTn: output of timer/counter n
All signals are TTL compatible.
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 17
CON2: pin assignment of digital input connector.
Pin Name Pin Name
1 Digital input 0 2 Digital input 1
3 Digital input 2 4 Digital input 3
5 Digital input 4 6 Digital input 5
17 Digital input 6 8 Digital input 7
9 Digital input 8 10 Digital input 9
11 Digital input 10 12 Digital input 11
13 Digital input 12 14 Digital input 13
15 Digital input 14 16 Digital input 15
17 PCB ground 18 PCB ground
19 PCB +5V 20 PCB +12V
CON3: pin assignment of the digital output connector.
Pin Name Pin Name
1 Digital output 0 2 Digital output 1
3 Digital output 2 4 Digital output 3
5 Digital output 4 6 Digital output 5
17 Digital output 6 8 Digital output 7
9 Digital output 8 10 Digital output 9
11 Digital output 10 12 Digital output 11
13 Digital output 12 14 Digital output 13
15 Digital output 14 16 Digital output 15
17 PCB ground 18 PCB ground
19 PCB +5V 20 PCB +12V
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 18
3. I/O Control Register
3.1 How to Find the I/O Address
The plug & play BIOS will assign a proper I/O address to every OME-PCI-
TMC12(A) card in the power-on stage. The IDs of OME-PCI-TMC12(A) are given
as following:
Vendor ID = 10B5
Device ID = 9050
Sub-vendor ID= 2129
Sub-device ID = 9912
We provide all necessary functions as following:
1. PTMC12_DriverInit(&wBoard)
This function can detect how many OME-PCI-TMC12(A) cards in the system.
It is implemented based on the PCI plug & play mechanism. It will find all
OME-PCI-TMC12(A) cards installed in this system & save all their resource
in the library.
wBoard=1 Æ only one OME-PCI-TMC12(A) in this PC system.
wBoard=2 Æ there are two OME-PCI-TMC12(A) in this PC system.
2. PTMC12_GetConfigAddressSpace(wBoardNo,*wBase,*wIrq,*wPLX)
The user can use this function to save resource of all OME-PCI-TMC12(A)
installed in this system. Then the application program can control all
functions of OME-PCI-TMC12(A) directly.
wBoardNo=0 to N Æ totally N+1 cards of OME-PCI-TMC12(A)
wBase Æ base address of the board control word
wIrq Æ allocated IRQ channel number of this board
wPLX Æ base address of PCI-interface-IC
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 19
The sample program source is given as following:
/* step1: detect all OME-PCI-TMC12(A) card first */
wRetVal=PTMC12_DriverInit(&wBoards);
printf("Threr are %d OME-PCI-TMC12 Cards in this PC\n",wBoards);
/* step2: save resource of all OME-PCI-TMC12(A) cards installed in this PC */
for (i=0; i<wBoards; i++)
{
PTMC12_GetConfigAddressSpace(i,&wBase,&wIrq,&wPLX);
printf("\nCard_%d: wBase=%x, wIrq=%x, wPLX=%x", i,wBase,wIrq,wPLX);
wConfigSpace[i][0]=wBaseAddress; /* save all resource of this card */
wConfigSpace[i][1]=wIrq; /* save all resource of this card */
wConfigSpace[i][2]=wPLX; /* save all resource of this card */
}
/* step3: control the OME-PCI-TMC12(A) directly */
wBase=wConfigSpace[0][0]; /* get base address the card_0 */
outport(wBase+0x14,wDoValue); /* control the D/O states of card_0 */
wDiValue=inport(wBase+0x14); /* read the D/I states of card_0 */
wBase=wConfigSpace[1][0]; /* get base address of card_1 */
outport(wBase+0x14,wDoValue); /* control the D/O states of card_1 */
wDiValue=inport(wBase+0x14); /* read the D/I states of card_1 */
wPLX=wConfigSpace[2][2]; /* get PCI-interface base address of card-
2 */
_outpd(wPLX+0x4c,0x41); /* channel_1, interrupt active_Low */
.. .. _outpd(wPLX+0x4c,0); /* disable all interrupt */
OME-PCI-TMC12(A) User Manual (Ver. 2.0, Sep/2002) --- 20
Loading...
+ 49 hidden pages