NuDAQ PCI-7348/7396 48/96-CH Digital I/O Cards DIN-96DI, DIN-96DO User’s Guide
©Copyright 2002 ADLINK Technology Inc. All Rights Reserved. Manual Rev. 1.22 June 7, 2002 Pato No : 50-11107-200 The information in this document is subject to change without prior notice in order to improve reliability, design and function and does not represent a commitment on the part of the manufacturer.
Getting service from ADLINK Customer Satisfaction is always the most important thing for ADLINK Tech Inc. If you need any help or service, please contact us and get it. ADLINK Technology Inc. http://www.adlinktech.com Web Site Sales & Service service@adlinktech.com NuDAQ nudaq@adlinktech.com Technical automation automation@adlinktech.com Support NuIPC nuipc@adlinktech.com NuPRO/EBC nupro@adlinktech.com TEL +886-2-82265877 FAX +886-2-82265717 Address 9F, No.
Table of Contents Chapter 1 Introduction......................................................1 1.1 Features................................................................................. 1 1.1.1 1.1.2 1.1.3 1.2 1.3 1.4 Digital I/O Ports ............................................................................... 1 Timer / Counter and Interrupt System .......................................... 2 Miscellaneous.................................................................................
3.5 3.6 3.7 3.8 3.9 3.10 3.11 External Trigger Enable Register .......................................... 19 External Trigger Disable Register ......................................... 20 Change of State (COS) Control Register .............................. 20 Interrupt Source Control (ISC) Register ................................ 21 Clear Interrupt Register ........................................................ 22 Timer/Counter Register.........................................................
5.14 _7396_Timer_Read .......................................................... 46 Appendix 1 DIN-96DI ....................................................47 A1.1 A1.2 A1.3 A1.4 A1.5 Introductions ..................................................................... 47 Features ........................................................................... 47 Specifications ................................................................... 47 Layout of DIN-96DI .............................................
How to Use This Guide This manual is designed to help you use the PCI-7396. It describes how to modify and control various functions on the PCI-7396 card to meet your requirements. It is divided into three chapters: u Chapter 1, "Introduction," gives an overview of the product features. applications, and specifications. u Chapter 2, "Installation," describes how to install the PCI-7396. The layout of PCI-7396 is shown.
1 Introduction The PCI-7396 is a 48/96-bit parallel digital input/output (DIO) card designed for industrial applications. The plug and play feature of PCI-Bus architecture make it easy for users to install their systems quickly. The PCI-7396 emulates two/four 8255 Programmable Peripheral Interface (PPI) chips. Each PPI offers 3 8-bit DIO ports which can be accessed simultaneously. The total 6/12 ports can be programmed as input or output independently.
1.1.2 u u u u A programmable 32-bit timer to generate timer interrupt A programmable 16-bit event counter to generate event interrupt 48/96-bit change of state (COS) interrupt Dual interrupt system 1.1.3 u u Timer / Counter and Interrupt System Miscellaneous Provide 12V and 5V power supply on SCSI-type 100-pin connectors(only for PCI-7348) On board resettable fuses to protect power supply from external damage. (only for PCI-7348) 1.
1.3 Specifications I/O channels Output Signal 48-bit for PCI-7348 96-bit for PCI-7396 Logic High Voltage Logic Low Voltage Logic High Current Logic Low Current Logic High Voltage Operating Temperature Storage Temperature Humidity I/O Connectors Bus IRQ Level I/O port address Power Consumption (without external devices) Transfer Rate Size Logic Low Voltage Logic High Current Logic Low Current 0° ~ 60° C -20° ~ 80° C 5% ~ 95% non-condensing 100-pin SCSI connector PCI bus, rev 2.
1.4 Software Supporting ADLink provides versatile software drivers and packages for users’ different approach to built-up a system. We not only provide programming library such as DLL for many Windows systems, but also provide drivers for many ® software package such as LabVIEW , HP VEETM, DASYLab TM, InTouchTM, TM TM InControl , ISaGRAF , and so on. All the software options are included in the ADLink CD. The non-free software drivers are protected with serial licensed code.
1.4.2 ® PCIS-LVIEW: LabVIEW Driver PCIS-LVIEW contains the VIs, which are used to interface with NI’s ® LabVIEW software package. The PCIS-LVIEW supports Windows ® 95/98/NT/2000. The LabVIEW drivers are free shipped with the board. You can install and use them without license. For detail information about PCIS-LVIEW, please refer to the user’s guide in the CD. (\\Manual_PDF\Software\PCIS-LVIEW) 1.4.
1.4.7 PCIS-ICL: InControlTM Driver PCIS-ICL is the InControl driver which support the Windows NT. The PCISICL is included in the ADLINK CD. It needs license. 1.4.8 PCIS-OPC: OPC Server PCIS-OPC is an OPC Server, which can link with the OPC clients. There are many software packages on the market can provide the OPC clients now. The PCIS-OPC supports the Windows NT. It needs license.
2 Installation This chapter describes how to install the PCI-7396. The contents in the package and unpacking information that you should be careful are described. Please follow the steps to install the PCI-7348/7396. u u u u u Check what you have (section 2.1) Unpacking (section 2.2) Check the PCB (section 2.3) Install the hardware (section 2.4) Please refer to the “Software Installation Guide” to install the software drivers. 2.
2.2 Unpacking Your PCI-7396 card contains sensitive electronic components that can be easily damaged by static electricity. The card should be done on a grounded anti-static mat. The operator should be wearing an anti-static wristband, grounded at the same point as the anti-static mat. Inspect the card module carton for obvious damage. Shipping and handling may cause damage to your module. Be sure there are no shipping and handing damages on the module before processing.
2.3 PCI-7396 Layout Figure 2.
2.4 Hardware Installation Outline Hardware configuration The PCI cards (or CompactPCI cards) are equipped with plug and play PCI controller, it can request base addresses and interrupt according to PCI standard. The system BIOS will install the system resource based on the PCI cards’ configuration registers and system parameters (which are set by system BIOS). Interrupt assignment and memory usage (I/O port locations) of the PCI cards can be assigned by system BIOS only.
2.5 Connectors’ Pin Assignment of PCI-7348 The I/O pin assignment of PCI-7348 is shown in the Figure 2.2.
2.
2.7 Jumpers’ Description The PCI-7396 is a ‘plug and play’ add-on card using PCI bus. It is unnecessary for user to setup its base address and IRQ level to fit the hardware of your computer system. However, to fit users’ versatile operation, there are still a few jumpers to set the power-on-states of all I/O ports. 2.7.1 Power-on-state For all I/O ports of the PCI-7396, the power-on-states could be pulled high, pulled low, or floating. It is depended on the jumper settings. Table 2.
2.8 Termination Boards Supporting PCI-7396 can be connected with several different daughter boards, including DIN-100S, DIN-96DI, and DIN-96DO. The functionality and connections are specified as follows. 2.8.1 Connect with DIN-100S DIN-100S is a direct connector for the add-on card that is equipped with SCSI-100 connector. It is suitable for the simple applications that do not need isolated connection in front of the digital inputs or outputs of PCI-7396. 2.8.
3 Registers Format The detailed descriptions of the registers format are specified in this chapter. This information is quite useful for the programmers who wish to handle the card by low-level programming. However, we suggest user have to understand more about the PCI interface then start any low-level programming. In addition, the contents of this chapter can help users understand how to use software driver to manipulate this card. 3.
Please do not try to modify the base address and interrupt which assigned by the PCI PnP BIOS, it may cause resource confliction in your system.
3.2 I/O Address Map Most of the PCI-7396 registers are 32 bits. The users can access these registers by 32 bits I/O instructions. The following table shows the registers map, including descriptions and their offset addresses relative to the base address.
The PCI-7396 has 2/4 PPIs on board. Each PPI contains 5 registers, including Digital Data Register, Control Register, External Trigger Enable Register, External Trigger Disable Register, and COS Interrupt Control Register. In the following sections, the 5 registers of PPI1 will be introduced respectively. The registers of the other 3 PPIs are of the same configuration which will not be repeated in this manual. 3.
3.4 Control Register Each PPI’s control register is used to set its three ports to be as input or output one independently. Address: BASE + 04h Attribute: write only Data Format: Bit 7 6 BASE+ 04h BASE+ 05h BASE+ 06h BASE+ 07h x x x x x x x x 5 4 3 2 1 0 x x x x x x x x x x x x P1C x x x P1B x x x P1A x x x P1n : n: port number Set to be ‘0’ for input port , ‘1’ for output port 3.
3.6 External Trigger Disable Register Users can write anything to this register to disable the function of external trigger. Address: BASE + 0Ch Attribute: write only Data Format: Bit 7 6 5 4 3 2 1 0 BASE+0C h BASE+0D h BASE+0E h BASE+0Fh x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x 3.7 Change of State (COS) Control Register This register is used to configure the COS interrupt.
3.8 Interrupt Source Control (ISC) Register The PCI-7396 has a dual interrupt system, two interrupt sources can be generated and be distinguished by software setting. This register is used to select the interrupt sources.
3.9 Clear Interrupt Register Users can write anything to this register to clear the interrupt request of the PCI-7396. Address: BASE + 54h Attribute: write only Data Format: Bit 7 6 BASE+54h BASE+55h BASE+56h BASE+57h 3.10 x x x x x x x x 5 4 3 2 1 0 x x x x x x x x x x x x x x x x x x x x x x x x Timer/Counter Register The 8254 chip occupies 4 I/O addresses in the PCI-7396. Please refer to NEC's or Intel's data sheet for the full description of the 8254 operation.
4 Operation Theorem The operation theorem of the functions on PCI-7396 card is described in this chapter. The operation theorem can help you to understand how to manipulate or to program the PCI-7396. 4.1 Digital I/O Ports 4.1.1 Introduction The PCI-7396 has 2/4 PPIs on board. Each 24-bit PPI is divided into three 8-bit I/O ports: A, B, and C. All of these 6/12 ports can be programmed as input or output independent. 4.1.
EXTTRG Latch Data (Latch input data to registers) Read Data (Read date from registers to PC) Figure 4.
4.2 8254 Timer/Counter Operation 4.2.1 Introduction One 8254 programmable timer/counter chip is installed in the PCI-7396. There are three counters in one 8254 chip and 6 possible operation modes for each counter. The block diagram of the timer /counter system is shown in Figure 4.3. EVENT (PIN 51) 8254 Chip Event Edge Control Counter #0 Event IRQ Gate='H' Timer #1 2 MHz Clock Gate='H' Timer #2 Timer IRQ Gate='H' Figure 4.3 Timer / counter system of PCI-7396.
4.3 Interrupt Circuit 4.3.1 System Architecture The PCI-7396‘s interrupt system is powerful and flexible, which is suitable for many applications. It is a Dual Interrupt System. The dual interrupt means the hardware can generate two interrupt request signals in the same time and the software can service these two request signals by ISR. Note that the dual interrupt do not mean the card occupy two IRQ levels.
4.3.3 Dual Interrupt System The PCI controller can receive two hardware IRQ requests. However, only one IRQ will be sent to PCI bus, the two IRQ requests must be distinguished by user’s interrupt service routine (ISR). The two IRQ requests are named as INT1 and INT2. INT1 comes from COS P1 & P2, P1C0, P1C3, or the event counter interrupt. INT2 comes from COS P3 & P4, P2C0, P2C3, or the timer interrupt. The sources of INT1 and INT2 is selectable by using the Interrupt Source Control (ISC) Register.
4.3.4 Interrupt Source Control (ISC) There are four bits to control the IRQ sources of INT1 and INT2. Table 4.1 shows the selection of the IRQ sources and the interrupt trigger condition. If the application needs one IRQ only, you can disable one of the IRQ sources by software. You can also disable both the two interrupts If you do not need any IRQ source.
By using the four signals: P1C0, P2C0, P1C3, and P2C3, user can utilize their combination to generate a proper IRQ for versatile applications. 4.3.5 Change of State (COS) Interrupt What is COS? The COS (Change of State) means when the input state (logic level) is changed from low to high, or from high to low. The COS detection circuit will detect the edge of level change. In the PCI-7396 card, the COS detection circuit is applied to all the input channels.
4.4 12V and 5V Power Supply The SCSI-100 connector CN1 provides +12V and +5V power supply (only for PCI-7348) for external devices. To avoid the short circuit or the overload of the power supply, the resettable fuses are added on all the power supply signals. The maximum current for 5V power supply is 0.5 A. If the load current is larger than this limitation, the resistance of the resettable fuse will increase for the reason of the rising temperature.
5 C/C++ Libraries This chapter describes the software library for operating this card. Only the functions in DOS library and Windows 95 DLL are described. Please refer to the PCIS-DASK function reference manual, which included in ADLINK CD, for the descriptions of the Windows 98/NT/2000 DLL functions. The function prototypes and some useful constants are defined in the header files LIB directory (DOS) and INCLUDE directory (Windows 95). For Windows 95 DLL, the developing environment can be Visual Basic 4.
5.2 Programming Guide 5.2.1 Naming Convention The functions of the NuDAQ PCI cards or NuIPC CompactPCI cards’ software driver are using full-names to represent the functions' real meaning. The naming convention rules are: In DOS Environment : _{hardware_model}_{action_name}. e.g. _7396_Initial(). In order to recognize the difference between DOS library and Windows 95 library, a capital "W" is put on the head of each function name of the Windows 95 DLL driver. e.g. W_7396_Initial(). 5.2.
5.3 _7396_Initial @ Description This function is used to initialize the PCI-7396. Every PCI-7396 has to be initialized by this function before calling other functions. @ Syntax C/C++ (DOS) U16 _7396_Initial (U16 *existCards, PCI_INFO *pciInfo) C/C++ (Windows 95) U16 W_7396_Initial (U16 *existCards, PCI_INFO *pciInfo) Visual Basic (Windows 95) W_7396_Initial (existCards As Integer, pciInfo As PCI_INFO) As Integer @ Argument existCards: The numbers of installed PCI-7396 cards.
5.4 _7396_DI @ Description This function is used to read the 24-bit digital inputs data from the input port of the PCI-7396.The written data and read in data is 24 bits data. Each data is mapped to a signal as the table below.
@ Return Code ERR_NoError C/C++ Libraries • 35
5.5 _7396_DO @ Description This function is used to write data to digital output ports. There are 6 ports (P1A, P1B, P1C, P2A, P2B, P2C) could be configured as digital outputs on the PCI-7348. And there are totally 12 digital output ports (P1A, P1B, P1C, P2A, P2B, P2C, P3A, P3B, P3C, P4A, P4B, P4C) could be configured as digital outputs on the PCI-7396.
5.6 _7396_Config_Port @ Description This function is used to configure the Input or Ouput of each Port. Each I/O Port of PCI-7396 is either input or output, so it has to configure as input or output before I/O operations are applied.
P3CWR P3WR : CH3’s Port C output port : CH3’s Port A,B,C output port P4ARD P4BRD P4CRD P4RD E_P4RD : : : : : P4AWR P4BWR P4CWR P4WR : : : : CH4’s CH4’s CH4’s CH4’s CH4’s latch CH4’s CH4’s CH4’s CH4’s @ Return Code ERR_NoError 38 • C/C++ Libraries Port Port Port Port Port data Port Port Port Port A input port B input port C input port A,B,C input port A,B,C input port use external clock to A output port B output port C output port A,B,C output port
5.7 _7396_Software_Reset @ Description This function is used to reset the I/O port configuration. After resetting PCI7396, all ports will be set as input ones. Note that this function will not re-start the PCI bus and all the hardware settings will not be changed, neither.
5.8 _7396_INT_Source_Control @ Description The PCI-7396 has dual interrupts system, two interrupt sources can be generated and be checked by software. This function is used to select and control PCI-7396’s interrupt sources by writing associated data to interrupt control register.
5.9 _7396_COSIRQ_Control @ Description This function is used to programe every channel port A,B,C‘s COS is enable or disable.
5.10 _7396_CLR_IRQ @ Description This function is used to clear the interrupt request of PCI-7396. @ Syntax C/C++ (DOS) void _7396_CLR_IRQ (U16 cardNo) C/C++ (Windows 95) void W_7396_CLR_IRQ (U16 cardNo) Visual Basic(Windows 95) W_7396_CLR_IRQ (ByVal cardNo As Integer) @ Argument cardNo : The card number of PCI7396 card initialized.
5.11 _7396_Set_Event_Edge @ Description This function is used to set the edge trigger of event signal (Pin51) and external trigger signal (Pin99). The following table shows the possible settings.
5.12 _7396_Cascaded_Timer @ Description The function is used to program the timer#1 & timer#2 of 8254, the 32bit timer, to generate the timer interrupt .
5.13 _7396_Timer_Start @ Description The function is used to program the timer#0 of 8254, 16bit timer, to generate the event interrupt . @ Syntax C/C++ (DOS, Windows 95) U16 _7396_Timer_Start (U16 *existCards, U16 timer_mode, U16 c0) C/C++ (DOS, Windows 95) U16 W_7396_Timer_Start (U16 *existCards, U16 timer_mode, U16 c0) Visual Basic (Windows 95) W_7396_Initial (existCards As Integer, ByVal timer_mode As Integer, ByVal c0 As Integer) @ Argument cardNo: The card number of PCI7396 card initialized.
5.14 _7396_Timer_Read @ Description This function is used to read the counter value of the Counter#0. @ Syntax C/C++ (DOS) U16 _7396_Timer_Read (U16 cardNo, U16 *c0) C/C++ (Windows 95) U16 W_7396_Timer_Read (U16 cardNo, U16 *c0) Visual Basic (Windows 95) W_7396_Timer_Read (ByVal cardNo As Integer, c0 As Integer) As Integer @ Argument cardNo : The card number of PCI7396 card initialized.
Appendix 1 DIN-96DI A1.1 Introductions DIN-96DI digital input termination board features high-voltage opto-isolation on all inputs to prevent floating potential and ground loop problems from damaging your PC system. It is composed of one TB-96 base board, one TB-96DI daughter board, and one DIN socket for easy maintenance, wiring, and installation. It provides 96 channels that are accessed through a SCSI100 connector. A1.
u Power consumption: w 490mA(max.) for 24V PS w 250mA(max.) for 12V PS w 102mA(max.
Layout of DIN-96DI A1.4 CN1 G ......... X 1 X 4 G 48 47 46 ......... P G P G P G P G P G ......... 49 50 51 52 ......... X 2 X 3 TB-96DI ......... ......... ......... .........
Legend: CN1 : SCSI II 100 pin connector to connect PCI-7396 and DIN-96DI X1~X4 : 50 pin Opto-22 connectors to connect TB96 and Tb96DI n(1~96) : Input signal n G : External ground P : External power (5~24V) A1.5 DI Circuits and Wiring The outputs of the opto-isolated digital input circuits are open collector transistors. PCI-7396 should provide pull-high resistors by correct jumper setting. The connection between outside signal and PCI-7396 as well as the jumper setting are shown below. Power 24V 2.
Appendix 2 DIN-96DO A2.1 Introductions DIN-96DO digital output termination board features high-voltage optoisolation on all outputs to prevent floating potential and ground loop problems from damaging your PC system. It is composed of one TB-96 base board, one TB-96DO daughter board, and one DIN socket for easy maintenance, wiring, and installation. It provides 96 channels that are accessed through a SCSI-100 connector. A2.
w w w w 4.294A(max.) for 24VPS 4.244A(max.) for 12VPS 4.215A(max.) for 12VPS 102mA(max.
Layout of DIN-96DO A2.4 CN1 ......... X 1 X 4 G G 48 47 46 ......... P G P G P G P G P G ......... 49 50 51 52 ......... X 2 X 3 TB-96DO ......... ......... P G P G 5 4 3 2 1 G ......... P G P G P .........
Legend: CN1 : SCSI II 100 pin connector to connect PCI-7396 and DIN-96DO X1~X4 : 50 pin Opto-22 connectors to connect TB96 and Tb96DO n(1~96) : Output signal n G : External ground P : External power (5~24V) A2.5 Circuits and Wiring The connection of isolated digital output is shown as the following diagram. The DIN-96DO need external 5~24V DC power from the POWER pin to provide the power source of the digital output circuit.
If the loading is a inductance loading such as relay, you can use the following wiring diagram. The POWER must connect to the external power to form a fly-wheel current loop. Power Inductance Loading + - VDD 5~24V GND Figure A2.
Warranty Policy Thank you for choosing ADLINK. To understand your rights and enjoy all the after-sales services we offer, please read the following carefully. 1. Before using ADLINK’s products, please read the user manual and follow the instructions exactly. When sending in damaged products for repair, please attach an RMA application form. 2. All ADLINK products come with a two-year guarantee,free of repair charge.
5. To ensure the speed and quality of product repair, please download an RMA application form from our company website www.adlinktech.com. Damaged products with RMA forms attached receive priority. For further questions, please contact our FAE staff. ADLINK: service@adlinktech.com Test & Measurement Product Segment: NuDAQ@adlinktech.com Automation Product Segment: Automation@adlinktech.com Computer & Communication Product Segment: NuPRO@adlinktech.com ; NuIPC@adlinktech.