NuDAQ® PCI-7258 PhotoMos Relay Cards User’s Guide Recycled Paper
©Copyright 2002 ADLINK Technology Inc. All Rights Reserved. Manual Rev: 1.04: October 18, 2002 Part NO: 50-11132-100 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 the most important priority for ADLINK Tech Inc. If you need any help or service, please contact us. ADLINK Technology Inc. Web Site http://www.adlinktech.com Sales & Service Service@adlinktech.com NuDAQ + USBDAQ nudaq@adlinktech.com Technical Automation automation@adlinktech.com Support NuIPC nuipc@adlinktech.com NuPRO / EBC nupro@adlinktech.com TEL +886-2-82265877 FAX Address 9F, No.
Table of Contents Tables and Figures.........................................................iii How to Use This Guide ..................................................iv Introduction .....................................................................1 1.1 1.2 1.3 1.4 Features ............................................................................... 2 Applications.......................................................................... 2 Specifications ............................................
Operation Theory...........................................................20 4.1 4.2 4.3 PhotoMos Relay Output..................................................... 20 Isolated Digital Input .......................................................... 22 Interrupt Architecture ......................................................... 22 C/C++ DOS Libraries .....................................................23 5.1 Programming Guide........................................................... 23 5.1.1 5.1.
Tables and Figures Tables Table 1. Board ID Setting Conditions ................................................. 11 Table 2. Registers Address Map ........................................................ 15 Table 3. Data Types and Range......................................................... 24 Figures Figure 1: PCI-7258 PCB Layout ............................................................ 9 Figure 2: Board ID Dipswitch ...............................................................
How to Use This Guide This manual is intended to assist users to configure the PCI-7258 PhotoMos Relay Card. It is divided into 5 chapters. Chapter 1, “Introduction”, gives an overview of the product features, applications, and specifications. Chapter 2, “Getting Started”, describes how to install the PCI-7258. The Board ID switch and connectors’ pin assignments are also described. Chapter3, “Registers”, describes the registers that are available to the PCI-7258.
1 Introduction The PCI-7258 PhotoMos relay card is a basic Digital I/O card for PCI bus computers used in industrial applications. This PCI-7258 provides 32 PhotoMos relay actuators and 2 opto-isolated digital inputs. All relays are of Form A type and is very suited for constant ON/OFF control devices. Other useful feature includes the Board ID. It is convenient for board identification when two or more PCI-7258 cards are in a system. All I/O signals are routed via a 68-pin SCSI connector.
1.1 Features The PCI-7258 PhotoMos relay actuator and D/I Card provides the following advanced features: • 32-bit PCI-Bus, Plug and Play • 32 PhotoMos relay actuator outputs • 2 opto-isolated digital inputs • On-board relay driving circuits • Digital input channel 0 & 1 interrupt • Board ID 1.
• Input Voltage: 3 Up-to 24 VDC or 24V AC 3 Logic Low: 0~2V 3 Logic High 5~24V • Input impedance: 2.4 KΩ / 0.5W • Isolated voltage: 2,500 Vrms channel-to-system ♦ Relay Output • Output channels: 32 • Relay type: 32 SPST (Form A) • Load voltage (peak AC): 350V • Continuous load current (peak AC): 0.12A • Peak load current: 0.
1.4 Software Support ADLINK provides versatile software drivers and packages for users’ different approach to building a system. ADLINK not only provides programming libraries such as DLL for most Windows based systems, but also provide ® TM TM drivers for other software packages such as LabVIEW , VEE , InTouch , TM TM InControl , ISaGRAF , and so on. All software options are included in the ADLINK CD. Non-free software drivers are protected with licensing codes.
1.4.3 PCIS-VEE: VEE Driver The PCIS-VEE includes user objects, which are used to interface with the VEE software package. PCIS-VEE supports Windows 95/98/NT. The VEE drivers are shipped free with the board. You can install and use them without a license. For more information about PCIS-VEE, please refer to the user’s guide in the CD. (\\Manual_PDF\Software\PCIS-VEE). 1.4.
1.4.7 PCIS-ICL: InControlTM Driver PCIS-ICL is the InControl driver, which supports Windows NT. The PCIS-ICL is included in the ADLINK CD. It is not free and requires a license. Please contact ADLINK dealers or ADLINK to purchase the license. 1.4.8 PCIS-OPC: OPC Server PCIS-OPC is an OPC server, which can be used to link with other OPC clients. There are many software packages on the market that can provide the OPC clients. The PCIS-OPC supports Windows 98, NT, and 2000. It is not free.
2 Getting Started This chapter describes how to install and setup the PCI-7258. The contents in the package and unpacking information that you should be aware of are outlined first. 2.1 What you have In addition to the User’s Manual, the package should include the following items: • PCI-7258 PhotoMos relay cards • ADLINK Software CD • Software Installation Guide If any of these items are missing or damaged, contact ADLINK or the dealer from whom you purchased the product.
2.2 Unpacking The card contains electro-static sensitive components that can be easily be damaged by static electricity. Therefore, the card should be handled 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 damages. Shipping and handling may cause damage to your module. Be sure there are no shipping and handling damages on the modules carton before continuing.
2.3 PCB Layout The location of the connectors and switches on the PCI-7258 are shown in figure 1 below. Descriptions are outline in the proceeding sections.
2.4 External LED K A JP1 K A JP2 LED16 LED32 LED10 LED26 LED1 LED17 Figure 2: PCI-7258 External LED connector The PCI-7258 card is designed with 32 LEDs, each indicating the operation status of the 32 relays. In addition, there are also 32 external LED connectors available for users’ to use as so pleases. Utilizing the external LEDs connecting to JP1 or JP2, users can have a visual status of each relay displayed on a chassis, panel or on any apparatus.
2.5 Board ID When two or more data acquisition cards are installed in a system, it can be tedious trying to identify a specific card. For easier identification, the PCI7258 implemented a Board ID function. By setting the Dipswitch located at S1, users can assign an ID address to a specific card and access the card through software programming. For more details about the Board ID in programming, please refer to chapter 5. Table 1 below shows all dipswitch setting conditions.
2.6 Connector Pin Assignments The PCI-7258 card is equipped with a 68-pin SCSI connector (CN1). Figure 3 defines the pin assignment for the connector.
2.7 Termination Board Connection The available termination board for the 68-pin SCSI connector is the DIN68S/1S. The DIN-68S/1S is a general-purpose 68-pin screw terminal with a DIN socket. It is also equipped with a 68-pin SCSI cable that allows for easy installation of the PCI-7258.
3 Registers Detailed descriptions of the registers are specified in this chapter. This information is useful for programmers who wish to handle the card with lowlevel programming. However, we suggest users to have an understanding of the PCI interface before starting any low-level programming. 3.1 I/O Address Map The PCI-7258 registers are all 16-bits long. Users can access these registers by 16-bit I/O instructions only.
3.2 Relay Output Control Register There are 32 PhotoMos relays on the PCI-7258; each bit of the register corresponds to a relay channel. Writing “1” to the register will cause the relay to close and “0” will cause it to open.
3.3 Relay Output Read Back Register The status of the PhotoMos relay can be read back from the readback register. If the relay is in the close position, the corresponding bit value is ‘1’. If the relay is open, then the bit value is ‘0’.
3.4 Isolated Digital Input Register There are 2 isolated input channels on PCI-7258 card. The status of the 2 channels can be read from the isolated input register. Each bit corresponds to each channel. A “1” means the input logic is high and “0” means the input logic is low. Address: BASE + 0x04 Attribute: Read 7 6 5 4 3 2 1 0 --- --- --- --- --- --- DI1 DI0 15 14 13 12 11 10 9 8 --- --- --- --- --- --- --- --- DIx: isolated digital input channel x, x=0, 1 3.
3.6 Handling PCI Controller Registers The PCI bus controller adopted in PCI-7258 is the PCI-9030, which is provided by PLX technology Inc. When users attempt to handle low-level programming, some registers in the PCI-9030 should be noticed. The interrupt control register (INTCSR; 0x4Ch) of the PCI-9030 takes charge of all interrupt information from the local bus to PCI bus.
4 Operation Theory 4.1 PhotoMos Relay Output The PhotoMos relay has LED inputs and MOSFET outputs that provide inputoutput isolation. When a signal current flows into the LED input pin, the emitted light from the LED is detected by the photoelectric element (solar cell), which is mounted opposite to the LED. The photoelectric element then converts the received light to a voltage, which charges the MOSFET gate on the output side.
The PhotoMos relay incorporates the advantages of both a semiconductor and an electro-mechanical relay. The PhotoMos relay utilizes the MOSFET as a switch instead of the mechanical contact. Thus the contact resistance remains stable through the life of the relay. Furthermore, dithering problems is eliminated. The PCI-7258 is equipped with 32 PhotoMos relays, which are all form A type. The load voltage can either be AC or DC. The basic wiring diagram is shown in figure 5 below.
4.2 Isolated Digital Input The PCI-7258 contains 2 opto-isolated digital input channels. The circuit diagram of the isolated input channel is shown below. 2.4 KΩ DI DIGND Figure 8: Photo-Coupler The digital input is routed through a photo-coupler (PC3H4), so that the connections are not polarity sensitive whether using positive or negative voltages. The PCI-7258 digital input has an inline 2.4kΩ resistor and the input voltage can ranges from 0 to 24V. 4.
5 C/C++ DOS Libraries This chapter describes the software libraries for operating this card. The function prototypes and useful constants are defined in the header files located in the LIB and INCLUDE directory. 5.1 Programming Guide 5.1.1 Naming Convention The functions of the NuDAQ PCI or NuIPC CompactPCI card software drivers uses full-names to represent the functions' real meaning. The naming convention rules are: _{hardware_model}_{action_name}. e.g. _7258_Initial().
5.1.2 Data Types We have defined some data types in the ACL_PCI.h header file. These data types are used by the NuDAQ Cards’ library. We suggest you use these data types in your application programs. The following table shows the data type names and their range.
5.2 _7258 Initial @ Description The PCI-7258 cards are initialized according to the card number. Because the PCI-7258 is designed with the PCI bus architecture and meets the plug and play specifications, the IRQ and base_address (pass-through address) are assigned by system BIOS directly. Every PCI-7258 card has to be initialized by this function before using any other functions. @ Syntax U16 _7258_Initial (U16 *existCards, PCI_INFO *pciInfo) @ Argument existCards: The number of installed PCI-7258 cards.
5.3 _7258_DO @ Description @ Syntax U16 _7258_DO (U16 boardID, U16 Group, U16 doData) @ Argument boardID: Board ID for the specific board. Group: group 0 represents DO channel 1~16, group 1 represents DO channel 17~32. doData: value which will be written to digital output port. @ Return Code ERR_NoError, ERR_BoardNoInit, ERR_InvalidDOChannel 5.4 _7258_DO_Read_Back @ Description This function is used to read data back from the digital output port controlled by the 7258_DO function.
5.5 _7258_DI @ Description This function is used to read data from the digital input port. There are 2 bits in the Isolated Digital Input Register for digital inputs purposes. You can read the input data by using this function. @ Syntax U16 _7258_DI (U16 boardID, U16 *diData) @ Argument boardID : Board ID for the specific board. diData : return 16-bit value from digital input port. Only last 2 bit data are valid. @ Return Code ERR_NoError, ERR_BoardNoInit 5.
5.9 _7258_CLR_IRQ @ Description This function is used to clear the interrupt request. @ Syntax U16 _7258_CLR_IRQ (U16 boardID) @ Argument boardID: Board ID for the specific board. @ Return Code ERR_NoError, ERR_BoardNoInit 5.10 _7258_GET_IRQ_Status @ Description This function is used to obtain the interrupt status. @ Syntax U16 _7258_GET_IRQ_Status (U16 boardID, U16 *int1Status, U16 *int2Status) @ Argument boardID: Board ID for the specific board.
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 which can be downloaded from: http://rma.adlinktech.com/policy/. 2. All ADLINK products come with a limited two-year warranty, one year for products bought in China.
• Damage caused by leakage of battery fluid during or after change of batteries by customer/user. • Damage from technicians. improper repair by unauthorized ADLINK • Products with altered and/or damaged serial numbers are not entitled to our service. • This warranty is not transferable or extendible. • Other categories not protected under our warranty. 4. Customers are responsible for all fees necessary to transport damaged products to ADLINK.