background image

  

C/C++ Libraries 

 35 

Visual Basic(Windows 95) 

W_7396_CLR_IRQ (ByVal cardNo As Integer)  

 

@ Argument  

cardNo : 

The card number of PCI7396 card initialized. 

 

@ Return Code  

None 

 

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.  
 

Set_Event_Edge 

 

C0 

External Trigger (Pin99) 

Active Low 

Active High 

Event (Pin51) 

Rising Edge 

Count 

Falling  Edge 

Count 

@ Syntax 

C/C++ (DOS) 

U16 _7396_Set_Event_Edge (U16 cardNo, U16 *c0) 

 

C/C++ (Windows 95)

 

U16 W_7396_Set_Event_Edge (U16 cardNo, U16 *c0)

  

Visual Basic (Windows 95)

 

W_7396_ Set_Event_Edge (ByVal cardNo As Integer, c0 

As Integer) As Integer 

 

@ Argument 

 

cardNo :The card number of PCI7396 card initialized. 

c0: The event signal and external clock signal 

setting. 

@ Return Code

  

ERR_NoError 

 

 

5.12  _7396_Cascaded_Timer 

Summary of Contents for NuDAQ DIN-96DI

Page 1: ...NuDAQ P C I 7 3 9 6 DIN 96DI DIN 96DO 96 CH Digital I O Cards U s e r s G u i d e ...

Page 2: ......

Page 3: ...ng out of the use or inability to use the product or documentation even if advised of the possibility of such damages This document contains proprietary information protected by copyright All rights are reserved No part of this manual may be reproduced by any mechanical electronic or other means in any form without prior written permission of the manufacturer Trademarks NuDAQ DAQBench are register...

Page 4: ...RO nupro Adlink com tw Software sw Adlink com tw AMB amb Adlink com tw TEL 886 2 82265877 FAX 886 2 82265717 Address 9F No 166 Jian Yi Road Chungho City Taipei 235 Taiwan R O C Please inform or FAX us of your detailed information for a prompt satisfactory and constant service Detailed Company Information Company Organization Contact Person E mail Address Address Country TEL FAX Web Site Questions ...

Page 5: ...1 4 5 PCIS DDE DDE Server and InTouchTM 4 1 4 6 PCIS ISG ISaGRAF TM driver 4 1 4 7 PCIS ICL InControlTM Driver 4 1 4 8 PCIS OPC OPC Server 5 Chapter 2 Installation 6 2 1 What You Have 6 2 2 Unpacking 7 2 3 PCI 7396 Layout 8 2 4 Hardware Installation Outline 9 2 5 Device Installation for Windows Systems 9 2 6 Connectors Pin Assignment 10 2 7 Jumpers Description 11 2 7 1 Power on state 11 2 8 Termin...

Page 6: ...ger 20 4 2 8254 Timer Counter Operation 21 4 2 1 Introduction 21 4 2 2 Cascaded 32 bits Timer 22 4 2 3 Event Counter and Edge Control 22 4 3 Interrupt Circuit 22 4 3 1 System Architecture 22 4 3 2 IRQ Level Setting 22 4 3 3 Dual Interrupt System 22 4 3 4 Interrupt Source Control ISC 23 4 3 5 Change of State COS Interrupt 24 4 4 12V and 5V Power Supply 25 Chapter 5 C C Libraries 26 5 1 Libraries In...

Page 7: ...96_Timer_Read 37 Appendix A1 DIN 96DI 38 A1 1 Introductions 38 A1 2 Features 38 A1 3 Specifications 38 A1 4 Layout of DIN 96DI 39 A1 5 DI Circuits and Wiring 40 Appendix A2 DIN 96DO 41 A2 1 Introductions 41 A2 2 Features 41 A2 3 Specifications 41 A2 4 Layout of DIN 96DO 42 A2 5 Circuits and Wiring 43 Product Warranty Service 45 ...

Page 8: ...n The jumper settings the connectors pin assignment and the other notes for installation are described Chapter 3 Registers Format describes the details of registers format and structure of the PCI 7396 this information is very important for the programmers who want to control the hardware by low level programming language Chapter 4 Operation Theorem describes more details about the versatile funct...

Page 9: ...atch the digital input data The function of Change of State COS interrupt is provided It means when anyone of these digital inputs changes its state an interrupt will be generated for user to handle this external event 1 1 Features The PCI 7396 Digital I O boards provide the following advanced features 1 1 1 Digital I O Ports 48 96 TTL compatible digital I O lines SCSI type 100 pin connector AMP 7...

Page 10: ...ls 48 bit for PCI 7348 96 bit for PCI 7396 Input Signal Logic High Voltage Logic Low Voltage Logic High Current Logic Low Current 2 0 V to 5 25V 0 0 V to 0 80V 0 1 uA 8 mA Output Signal Logic High Voltage Logic Low Voltage Logic High Current Logic Low Current Typical 3 3 V Minimum 2 4 V Maximum 0 5V 15 0 mA 48 0 mA Operating Temperature 0 60 C Storage Temperature 20 80 C Humidity 5 95 non condensi...

Page 11: ... C C and Microsoft C the functions descriptions are included in this user s guide u Windows 95 DLL For VB VC Delphi BC5 the functions descriptions are included in this user s guide u PCIS DASK Include device drivers and DLL for Windows 98 Windows NT and Windows 2000 DLL is binary compatible across Windows 98 Windows NT and Windows 2000 That means all applications developed with PCIS DASK are compa...

Page 12: ...y for developing applications The DAQBench TM is designed under Windows NT 98 For more detailed information about DAQBench please refer to the user s guide in the CD Manual_PDF Software DAQBench DAQBench Manual PDF 1 4 5 PCIS DDE DDE Server and InTouchTM DDE stands for Dynamic Data Exchange specifications The PCIS DDE includes the PCI cards DDE server The PCIS DDE server is included in the ADLINK ...

Page 13: ...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 ...

Page 14: ...B section 2 3 w Install the hardware section 2 4 w Please refer to the Software Installation Guide to install the software drivers 2 1 What You Have In addition to this User s Manual the package includes the following items PCI 7396 96 bits Parallel Digital I O Card ADLINK CD Software Installation Guide If any of thes e items is missing or damaged contact the dealer from whom you purchased the pro...

Page 15: ...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 After opening the card module carton exact the system module and place it only on a grounded anti static surface component side up Note DO NOT APPLY POWER TO THE CARD IF IT ...

Page 16: ...8 Installation 2 3 PCI 7396 Layout Figure 2 1 PCI 7396 Layout ...

Page 17: ...res 1 Turn off your computer 2 Turn off all accessories printer modem monitor etc connected to your computer 3 Remove the cover from your computer 4 Setup jumpers on the PCI or CompactPCI card 5 Select a 32 bit PCI slot PCI slot are short than ISA or EISA slots and are usually white or ivory 6 Before handling the PCI cards discharge any static buildup on your body by touching the metal case of the...

Page 18: ...P2A1 52 P3A1 77 P4A1 3 P1A2 28 P2A2 53 P3A2 78 P4A2 4 P1A3 29 P2A3 54 P3A3 79 P4A3 5 P1A4 30 P2A4 55 P3A4 80 P4A4 6 P1A5 31 P2A5 56 P3A5 81 P4A5 7 P1A6 32 P2A6 57 P3A6 82 P4A6 8 P1A7 33 P2A7 58 P3A7 83 P4A7 9 P1B0 34 P2B0 59 P3B0 84 P4B0 10 P1B1 35 P2B1 60 P3B1 85 P4B1 11 P1B2 36 P2B2 61 P3B2 86 P4B2 12 P1B3 37 P2B3 62 P3B3 87 P4B3 13 P1B4 38 P2B4 63 P3B4 88 P4B4 14 P1B5 39 P2B5 64 P3B5 89 P4B5 15...

Page 19: ...s depended on the jumper settings Table 2 1 lists the reference numbers of jumpers and their corresponding port names Jumper Port Name Jumper Port Name JA1 P1A JA3 P3A JB1 P1B JB3 P3B JC1 P1C JC3 P3C JA2 P2A JA4 P4A JB2 P2B JB4 P4B JC2 P2C JC4 P4C Table 2 1 Jumpers and port names list All the jumpers are identical physically The power on state of each port can be set independently To pull all sign...

Page 20: ...tage 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 SCSI 100 connector see Appendix A1 2 8 3 Connect with DIN 96DO DIN 96DO digital output termination b...

Page 21: ...ion Registers LCR and PCI 6308 registers The PCR which is compliant to the PCI bus specifications is initialized and controlled by the plug play PnP PCI BIOS User s can study the PCI BIOS specification to understand the operation of the PCR Please contact with PCISIG to acquire the specifications of the PCI interface The PCI bus controller PCI 9050 is provided by PLX technology Inc www plxtech com...

Page 22: ... 0x00 P1ABC P1ABC 0x04 P1Control No used 0x08 P1EXTTRG Enable No used 0x0C P1EXTTRG Disable No used 0x10 P2ABC P2ABC 0x14 P2Control No used 0x18 P2EXTTRG Enable No used 0x1C P2EXTTRG Disable No used 0x20 P3ABC P3ABC 0x24 P3Control No used 0x28 P3EXTTRG Enable No used 0x2C P3EXTTRG Disable No used 0x30 P4ABC P4ABC 0x34 P4Control No used 0x38 P4EXTTRG Enable No used 0x3C P4EXTTRG Disable No used 0x4...

Page 23: ... I O data of the PCI 7396 is accessed from to this register by software The digital data can also be read back through this register Address BASE 00h Attribute read and write Data Format Bit 7 6 5 4 3 2 1 0 BASE 00h P1A7 P1A6 P1A5 P1A4 P1A3 P1A2 P1A1 P1A0 BASE 01h P1B7 P1B6 P1B5 P1B4 P1B3 P1B2 P1B1 P1B0 BASE 02h P1C7 P1C6 P1C5 P1C4 P1C3 P1C2 P1C1 P1C0 BASE 03h X X X X X X X X P1X7 P1X0 Digital I O...

Page 24: ...16 Registers Format BASE 07h x x x x x x x x P1n n port number Set to be 0 for input port 1 for output port ...

Page 25: ...E 0Ah x x x x x x x x BASE 0Bh x x x x x x x x 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 0Ch x x x x x x x x BASE 0Dh x x x x x x x x BASE 0Eh x x x x x x x x BASE 0Fh x x x x x x x x 3 7 Change of State COS Control Register This register is u...

Page 26: ..._1 Select source INT 1 C2_0 C2_1 Select source INT 2 INT1 C1_1 C1_0 IRQ Sources IRQ Trigger Condition Mode 1 0 0 COS P1 P2 48bits Change of State for PCI 7396 P1 P2 Mode 2 0 1 P1C0 OR P1C3 see Table 4 2 Mode 3 1 0 P1C0 falling edge of P1C0 Mode 4 1 1 Event Counter Counter count down to 0 INT2 C2_1 C2_0 IRQ Sources IRQ Trigger Condition Mode 1 0 0 COS P3 P4 48bits Change of State for PCI 7396 P3 P4...

Page 27: ...n Address BASE 40h BASE 4Ch Attribute read write Data Format Base 40h Bit 7 Bit 0 Counter 0 Register Base 44h Bit 7 Bit 0 Counter 1 Register Base 48h Bit 7 Bit 0 Counter 2 Register Base 4Ch Bit 7 Bit 0 Control Register 3 11 High Level Programming To operate the PCI 7396 quickly you can bypass the detailed register structures and use the high level application programming interface API directly The...

Page 28: ...ction 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 2 External Trigger The pin 99 EXTTRG support user to receive an external trigger to latch input data User can use function _7396_Set_Event_Edge to set EXTTRG pin to be active high or active low Figure 4 1 External Trig...

Page 29: ...in Figure 4 3 Event IRQ Counter 0 2 MHz Clock Timer 1 Timer IRQ Timer 2 8254 Chip Gate H Gate H Gate H EVENT PIN 51 Event Edge Control Figure 4 3 Timer counter system of PCI 7396 Timer 1 and timer 2 of the 8254 chip are cascaded as a 32 bits programmable timer In the software library timer 1 and 2 are always set as mode 2 rate generator Counter 0 is used as an event counter that is there is an int...

Page 30: ... 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 The two interrupt request signals INT1 and INT2 comes from digital inputs or the timer counter outputs Two multiplexers MUX are used to select the IRQ sources Fig 4 4 shows the interrupt system 4 ...

Page 31: ... also disable both the two interrupts If you do not need any IRQ source However the PCI BIOS still assign a IRQ level to the PCI card and occupy the PC resource if you only disable the IRQ sources without change the initial condition of the PCI controller INT1 C1 C2 IRQ Sources IRQ Trigger Condition Disable 4 X INT1 disable Mode 1 0 X COS P1 P2 48bits Change of State for PCI 7396 Mode 2 1 X P1C0 O...

Page 32: ...Q Low 1 0 P2C3 falling edge trigger when P2C0 L 0 1 High P2C0 rising edge trigger when P2C3 H Table 4 2 IRQ Trigger conditions 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 hi...

Page 33: ... 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 The rising resistance will further cause the power...

Page 34: ...eloping environment can be Visual Basic 4 0 or above Visual C C 4 0 or above Borland C 5 0 or above Borland Delphi 2 x 32 bit or above or any Windows programming language that allows calls to a DLL It provides the C C VB and Delphi include files 5 1 Libraries Installation Please refer to the Software Installation Guide for the detail information about how to install the software libraries for DOS ...

Page 35: ...s We defined some data type in Pci_7396 h DOS and Acl_pci h Windows 95 These data types are used by NuDAQ Cards library We suggest you to use these data types in your application programs The following table shows the data type names and their range Type Name Description Range U8 8 bit ASCII character 0 to 255 I16 16 bit signed integer 32768 to 32767 U16 16 bit unsigned integer 0 to 65535 I32 32 b...

Page 36: ...installed PCI 7396 cards The returned value shows how many PCI 7396 cards are installed in your system pciinfo It is a structure to memorize the PCI bus plug and play initialization information which is decided by P P BIOS The PCI_INFO structure is defined in ACL_PCI H The base I O address and the interrupt channel number is stored in this variable Return Code ERR_NoError ERR_PCIBiosNotExist 5 4 _...

Page 37: ...lPort As Integer diData As Integer As Integer Argument cardNo The card number of PCI7396 card initialized channelPort port of each channel P1_A CH1 s Port A P1_B CH1 s Port B P1_C CH1 s Port C P1_ABC CH1 s Port A Port B Port C P2_A CH2 s Port A P2_B CH2 s Port B P2_C CH2 s Port C P2_ABC CH2 s Port A Port B Port C The following items are for PCI 7396 only P3_A CH3 s Port A P3_B CH3 s Port B P3_C CH...

Page 38: ...Data C C Windows 95 U16 W_7396_DO U16 cardNo U16 channelPort U32 doData Visual Basic Windows 95 W_7396_DO ByVal cardNo As Integer ByVal channelPort As Integer ByVal doData As Integer As Integer Argument cardNo The card number of PCI7396 card initialized channelPort The same as the arguments in the previous section doData value will be written to digital output port Return Code ERR_NoError 5 6 _739...

Page 39: ... output port P1CWR CH1 s Port C output port P1WR CH1 s Port A B C output port P2ARD CH2 s Port A input port P2BRD CH2 s Port B input port P2CRD CH2 s Port C input port P2RD CH2 s Port A B C input port E_P2RD CH2 s Port A B C input port use external clock to latch data P2AWR CH2 s Port A output port P2BWR CH2 s Port B output port P2CWR CH2 s Port C output port P2WR CH2 s Port A B C output port P3AR...

Page 40: ...4RD CH4 s Port A B C input port E_P4RD CH4 s Port A B C input port use external clock to latch data P4AWR CH4 s Port A output port P4BWR CH4 s Port B output port P4CWR CH4 s Port C output port P4WR CH4 s Port A B C output port Return Code ERR_NoError ...

Page 41: ...Argument cardNo The card number of PCI7396 card initialized Return Code ERR_NoError 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 Syntax C C DOS void _7396_INT_Source_Co...

Page 42: ...t A Int B int C Visual Basic Windows 95 W_7396_COSIRQ_Control ByVal cardNo As Integer ByVal ch_no As Integer ByVal A As Integer ByVal B As Integer ByVal C As Integer Argument cardNo The card number of PCI7396 card initialized ch_no channel number set 1 or 2 or 3 or 4 A port A control enable set 1 disable set 0 B port B control enable set 1 disable set 0 C port C control enable set 1 disable set 0 ...

Page 43: ...hows the possible settings Set_Event_Edge C0 0 1 External Trigger Pin99 Active Low Active High Event Pin51 Rising Edge Count Falling Edge Count Syntax C C DOS U16 _7396_Set_Event_Edge U16 cardNo U16 c0 C C Windows 95 U16 W_7396_Set_Event_Edge U16 cardNo U16 c0 Visual Basic Windows 95 W_7396_ Set_Event_Edge ByVal cardNo As Integer c0 As Integer As Integer Argument cardNo The card number of PCI7396 ...

Page 44: ...number of PCI7396 card initialized c1 frequency divider of timer 1 c2 frequency divider of timer 2 About the settings of C1 C2 please refer to section 3 2 2 Return Code ERR_NoError ERR_PCIBiosNotExist 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 t...

Page 45: ...imer_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 c0 count value of counter 0 Return Code ERR_NoError ...

Page 46: ...provides 96 channels that are accessed through a SCSI 100 connector A1 2 Features l 96 Opto Isolated digital input channels l For use with the PCI 7396 l AC or DC polarity free digital input l Screw terminals for easy field wiring A1 3 Specifications Numbers of channel 96 Opto isolator PC3H4 Input impedance 4 7K Ohms Input voltage range 0 24VDC Threshold voltage 20VDC for 24V PS 8 8VDC for 12V PS ...

Page 47: ...non condensing Power consumption 490mA max for 24V PS 250mA max for 12V PS 102mA max for 5V PS A1 4 Layout of DIN 96DI TB 96DI 94 95 96 G G 52 51 50 49 P G P G G G P G P P G P G P P P G P G G 46 47 48 G G 1 2 3 4 5 1 2 3 4 5 CN1 X 3 X 2 X 4 X 1 TB96 ...

Page 48: ... 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 2 4K Ohm Power 24V Input PCI 7396 DIn Figure A1 1 opto isolated input circuit PCI 7396 DIn JPxx Vcc GND TTL Device Figure A1 2 PCI 7396 ju...

Page 49: ...ed through a SCSI 100 connector A2 2 Features l 96 Opto Isolated digital output channels l For use with the PCI 7396 l On board relay driver circuitry l Screw terminals for easy field wiring A2 3 Specifications Numbers of channel 96 Opto isolator PC3H7 Output type Darlingtoin transistors open collector up to 35Vdc Sink current 350mA max 100 duty one of transistors device ON 370mA duty 10 for all t...

Page 50: ...sing Power consumption 4 294A max for 24VPS 4 244A max for 12VPS 4 215A max for 12VPS 102mA max from cable A2 4 Layout of DIN 96DO TB 96DO 94 95 96 G G 52 51 50 49 P G P G G G P G P P G P G P P P G P G G 46 47 48 G G 1 2 3 4 5 1 2 3 4 5 CN1 X 3 X 2 X 4 X 1 TB96 ...

Page 51: ...an protect the driver if the loading is inductance loading such as relay motor or solenoid If the loading is resistance loading such as resistor or LED the connection to fly wheel diode is not necessary Therefore the first step for connecting the output with external device is to distinguish the type of loading For example if the loading is LED or resistor you can use the following wiring diagram ...

Page 52: ...44 DIN 96DI DO DD V Inductance Loading 5 24V GND Power Figure A2 2 opto isolated output circuit for inductance loading ...

Page 53: ...g its specifications or if the serial number has been removed Seller does not assume any liability for consequential damages as a result from our products uses and in any event our liability shall not exceed the original selling price of the equipment The equipment warranty shall constitute the sole and exclusive remedy of any Buyer of Seller equipment and the sole and exclusive liability of the S...

Reviews: