Home

1. Introducton

image

Contents

1. 7 24 lt o 7 2 2 MONO PERA TON ii 8 2 2 255 eet etes e hr qe o etd td 12 214 DAUGHTER BOABDS 5 EX CE err 20 2 5 PIN ASSIGNMEN RET 24 2 26 3 1 HOW TO FIND THE I O 5 26 3 2 THE ASSIGNMENT OF I O 5 4 44 4 66000 31 3 3 kehrte tede eerte te Titel el 32 DEMO PROGRAM cuida aca 37 41 PIO PISO 38 AD DEMO Er 40 437 IDEMO2 rn A TTD MOS tote 42 44 DEMOS 52 26 43 45 DEMO td de ates T 45 4 62 47 PISO 730 User Manual Ver 1 0 12 30 99 2 1 Introduction PISO 730 provides 32 channels isolated digital I O 16xDI 16xDO 32 channels TTL level digital I O 16xDI and 16xDO The board
2. Low gt all D I O are disable now 3 3 2 AUX Control Register Read Write wBase 2 Note Refer to Sec 3 1 for more information about wBase Aux 0 gt this Aux is used as Aux 1 gt this Aux is used as a D O When the PC is first power on All Aux signal are in Low state All Aux are designed as D I for all PIO PISO series Please set all Aux in D I state 3 3 3 AUX data Register Read Write wBase 3 Note Refer to Sec 3 1 for more information about wBase When the Aux is used as D O the output state is controlled by this register This register is designed for feature extension so don t control this register now PISO 730 User Manual Ver 1 0 12 30 99 33 3 3 4 INT Mask Control Register Read Write wBase 5 off Note Refer to Sec 3 1 for more information about wBase ENO0 1 0 disable INT_CHAN_0 1 as a interrupt signal default 1 1 gt enable INT CHAN 0 1 as a interrupt signal outportb wBase 5 0 disable all interrupts outportb wBase 5 1 enable interrupt of INT CHAN 0 outportb wBase 5 2 enable interrupt of INT CHAN 1 outportb wBase 5 3 enable all two channels of interrupt Refer to the following demo program for more information DEMO3 C gt for INT_CHAN_0 only initial high state DEMO4 C gt for INT_CHAN_0 only initial low state DEMOS C gt for multi channel interrupt source PISO 730 User Manual Ver 1 0 12
3. DB 24PR 24 power relay 5A 250V DB 24POR 24 photoMOS relay 0 1A 350VAC DB 24C 24 open collector 100 per channel 30V max The DB 24PR is a 24 channel power relay output board consists of 8 form C and 16 form A electromechanical relays for efficient switching of load programmed control The contact of each relay can control a 5A load at 250ACV 30VDCV The relay is energized by applying a 5 voltage signal to the appropriate relay channel on the 20 pin flat cable connector just used 16 relays or 50 pin flat cable connector OPTO 22 compatible for DIO 24 series 24 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 Form A Relay 20 header 50 pin header Note 50 Pin connector OPTO 22 compatible for DIO 24 DIO 48 DIO 144 PIO D144 PIO D96 PIO D56 PIO D48 PIO D24 Channel 16 Form A Relays 8 Form C Relay Relay switching up to 5A at 110 5A at 30DCV PISO 730 User Manual Ver 1 0 12 30 99 22 2 4 4 Daughter Board Comparison Table 20 pin flat cable 50 pin flat cable DB 37 header header header DB 37 No No Yes DN 37 No No Yes ADP 37 PCI No Yes Yes ADP 50 PCI No Yes No DB 24P No Yes No DB 24PD No Yes Yes DB 16P8R No Yes Yes DB 24R No Yes No DB 2
4. e TTL level input channel Channel NO 16 digital input Input voltage level TTL compatible 0 8 Max 2 4 TTL level output channel Channel NO 16 digital output Driver capacity TTL compatible lot 8 mA sink 0 4 mA source General specifications Operation Temp 0 50 C Storage Temp 20 C to 70 C Humidity 0 90 non condensing Dimensions 180mmx105mm Power consumption 640mA PISO 730 User Manual Ver 1 0 12 30 99 1 3 Order Description PISO 730 PCI bus 32 channel isolated digital I O board 1 31 Options DB 24PR DB 24PR 24 channels power relay board DB 24POR 24 channel PhotoMos output board DB 24C 24 channel open collector output board DB 16P 16 channel isolated board DB 16R 16 channel relay board ADP 20 PCI Extender 20 pin header to 20 pin header for PCI bus I O boards DN 37 I O connector block with DIN Rail mounting and 37 pin D type connector DB 37 37 pin D type connector pin to pin screw terminal for any 37 pin D type connector of I O board NAPPCl win DLLs for Windows 95 98 NAPPCl wnt DLLs for Windows NT 4 0 NAPVIEW 1 LabVIEW driver for Windows 95 98 NAPVIEW 2 LabVIEW driver for Windows NT 1 4 PCI Data Acquisition Family We provide a family of PCI BUS data acquisition cards These cards can be divided into three groups as follows 1 first generation isolated or non isolated cards PCI 1002 1202 1800
5. now_int_state new_int_state outportb wBase 0x2a invert if gt 8 outportb A2 8259 0x20 outportb 1_8259 0x20 PISO 730 User Manual Ver 1 0 12 30 99 19 2 4 Daughter Boards 2 4 1 DB 16P Isolated Input Board The DB 16P is a 16 channel isolated digital input daughter board The optically isolated inputs of the DB 16P consist of a bi directional photo coupler with a resistor for current sensing You can use the DB 16P to sense DC signal from TTL levels up to 24V or use the DB 16P to sense a wide range of AC signals You can use this board to isolated the computer from large common mode voltage ground loops and transient voltage spike that often occur in industrial environments PISO 730 PISO 730 20Pin cable photo Isolated DC Signal OV to 24V PISO 730 User Manual Ver 1 0 12 30 99 20 2 4 2 DB 16R Relay Board The DB 16R is a 16 channels relay output board consists of 16 form C relays for efficient switch of load by programmed control The relay are energized by applying 12V 24V voltage signal to the appropriated relay channel on the 20 pin flat connector There are 16 enunciator LEDs for each relay light when their associated relay is activated From C Relay Note Channel 16 From C Relay Relay Switching up to 0 5A at 110 or 1A at 24DCV PISO 730 User Manual Ver 1 0 12 30 99 21 2 4 3 DB 24PR DB 24POR DB 24C
6. 0 break disable outportb 5 0 disable all interrupt if lt 8 setvect wIrq 8 oldfunc else setvect wIrq 8 0x70 01dfunc PIO_DriverClose WORD init DWORD dwVal disable outportb 5 0 disable all interrupt if lt 8 oldfunc getvect wIrqt8 PISO 730 User Manual Ver 1 0 12 30 99 47 irqmask inportb 1_8259 1 outporth A1_8259 1 irgmask Oxff 1 lt lt wIrq setvect wIrq 8 service else oldfunc getvect wIrq 8 0x70 irqmask inportb 1 825941 outporth A1_8259 1 irgmask Oxfb irqmask inportb A2 825941 outporth A2_8259 1 irgqmask amp Oxff 1 lt lt wlrq 8 setvect wIrq 8 0x70 irq service invert 0x1 outportb wBase 0x2a invert now_int_state 0x2 outportb wBase 5 0x3 enable non invert DIO invert DI1 now DIO is low now DIL high IRQ2 enable all interrupt void interrupt irq service int_num new_int_state inportb 7 amp 0 3 int c new int state now int state if int c amp 0x1 0 new_int_state amp 0x01 0 disc rere cade L if NOR E JE if new_int_state amp 0x02 0 CNT_H2 else Ls CNT_L2 invert invert 2 Ls now_int_state new_int_state outportb wBase 0x2a invert if gt 8
7. Ver 1 0 12 30 99 outporth A2_8259 0x20 now DIO change to low 0 DIO find low pulse DIO DIO still fixed in low need to generate a high pulse INVO select noninverted input now DIO 1low DIO High now DIO change to high INT CHAN 0 DIO find a high pulse DIO DIO still fixed in high need to generate a high pulse INVO select inverted input now DIO high now DIO low de 44 A T A E 4 5 DEMO4 4 50 730 Interrupt DIO initial low E step 1 DIO to function generator E step 2 run DEMO4 EXE include PIO H define A1 8259 0x20 define 2 8259 0 0 define EOI 0x20 WORD init_low void interrupt oldfunc static void interrupt service int COUNT L COUNT H irqmask now int state void piso 730 do long lDoValue long piso 730 di void void piso 730 ido long lDoValue long piso 730 idi void WORD wBase wlrq int main Int pk E 2 12 4254 25 WORD wBoards wRetVal t1 t2 t3 t4 t5 WORD wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice char c clrscr step 1 find address mapping of PIO PISO cards x step 2 enable all D I O port outportb wBase 1 enable D I O init Low printf n n show the count of High pulse n for gotoxy 1 8 printf nCOUNT_H 5d COUNT_H
8. if kbhit 0 break DriverClose long piso_730_di void long 1DiValue lDiValue inportb 0 lt lt 8 lDiValue lDiValue inportb wBase 0xc8 80xffff return 1DiValue long piso_730_idi void long 1DiValue lDiValue inportb 0 4 lt lt 8 lDiValue lDiValue inportb wBase 0xc0 8 0xffff return 1DiValue PISO 730 User Manual Ver 1 0 12 30 99 42 4 4 include define A1 8259 0x20 define 2 8259 OxAO define EOI 0x20 WO RD init high DEMO3 C PISO 730 Interrupt DIO initial high step 1 DIO to function generator step 2 run DEMO3 EXE void interrupt oldfunc static void interrupt service int void piso 730 1 lDoValue t COUNT L COUNT H irqmask now int state long piso_730_di void void piso_730_ido long lDoValue long piso 730 idi void WORD wBase wlrq int main jut 2 12 ida 71 1013212 WORD wBoards wRetVal t1 t2 t3 t4 t5 WORD wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice char clrscr step 1 step 2 enable all D I O port outportb wBase 1 init_high find address mapping of PIO PISO cards enable D I O printf n n show the count of Low pulse n for gotoxy 1 8 printf nCOUNT_L 5
9. outportb A2 8259 0x20 outportb 1 8259 0x20 now 0 change now 0 change generate high pulse now INT_CHAN_1 change now INT_CHAN_1 change generate a high pulse PISO 730 User Manual Ver 1 0 12 30 99 48 to to to to high low high low 2 77 T T A
10. 30 99 34 3 3 5 Aux Status Register Read Write wBase 7 Note Refer to Sec 3 1 for more information about wBase Aux0 INT_CHAN_0 Auxl INT_CHAN_1 Aux7 4 Aux ID Refer to Sec 4 1 for more information The 0 1 are used as interrupt sources The interrupt service routine has to read this register for interrupt source identification Refer to Sec 2 5 for more information 3 3 6 Interrupt Polarity Control Register Read Write wBase 0x2A b b b nv Note Refer to Sec 3 1 for more information about wBase INV0 1 0 gt select the invert signal from INT CHAN 0 1 0 1 1 gt select the non invert signal from INT CHAN 0 1 outportb wBase 0x2a 0 select the invert input from all 2 channels outportb wBase 0x2a 0x3 select the non invert input from all 2 channels outportb wBase 0x2a 0x2 select the inverted input of INT CHAN 0 select the non inverted input of INT CHAN 1 Refer to Sec 2 6 7 for more information Refer to DEMOS C for more information PISO 730 User Manual Ver 1 0 12 30 99 35 3 3 7 Data Register Read Write wBase 0xC0 Read Write wBase 0xC4 Read Write wBase 0xC8 Read Write wBase 0xCC Note Refer to Sec 3 1 for more information about wBase outportb wBase 0xc0 0xff write Oxff to IDOO IDO7 DiValue inportb wBase 0xc0 read states from 1010 1017 outportb wBase 0xc8 0x55 write 0
11. Ver 1 0 12 30 99 30 3 2 Assignment of I O Address The plug amp play BIOS will assign the proper I O address to PIO PISO series card If there is only one PIO PISO board the user can identify the board 0 If there are two PIO PISO boards in the system the user will be very difficult to identify which board is 0 The software driver can support 16 boards max Therefore the user can install 16 boards of PIO PSIO series in PC system How to find the 0 amp card_1 It is difficult to find the card NO The simplest way to identify which card is card_0 is to use wSlotBus amp wSlotDevice as follows 1 Remove all PISO 730 from this PC 2 Install one PISO 730 into the PC s PCI slot1 run PISO EXE amp record the wSlotBus1 amp wSlotDevicel 3 Remove all PISO 730 from this PC 4 Install one PISO 730 into the PC s PCI slot2 run PIO_PISO EXE amp record the wSlotBus2 amp wSlotDevice2 5 repeat 3 amp 4 for all PCI slot record all wSlotBus amp wSlotDevice The records may be as follows PC s PCI slot wSlotBus wSlotDevice Slot 1 0 0x07 Slot 2 0 0x08 Slot 3 0 0x09 Slot 4 0 0x0A PCI BRIDGE Slot 5 1 0x0A Slot 6 1 0x08 Slot 7 1 0x09 Slot 8 1 0x07 The above procedure will record all wSlotBus amp wSlotDevice in this PC These values will be mapped to this PC s physical slot This mapping will not be changed for any
12. and the is similarly Initial set now_int_state 0 initial state for DIO outportb wBase 0x2a 1 select the non inverted DIO void interrupt irq_service if now_int_state 1 now DIO is changed to LOW gt INT CHAN O DIO HIGH now COUNT find a LOW pulse DIO inport wBase 7 amp 1 0 the DIO is still fixed in LOW gt need to generate high_pulse outportb wBase 0x2a 1 INVO select the non inverted input d INT CHAN 0 DIO LOW KY INT 0 generate a high pulse now int state 0 now DIO LOW x else now_int_state 1 now DIO HIGH don t have to generate high_pulse else now DIO is changed to HIGH a gt INT_CHAN_0 DI0 HIGH now ES COUNT_H find a High pulse DIO inport wBase 7 amp 1 1 the DIO is still fixed HIGH need to generate high_pulse outportb wBase 0x2a 0 INVO select the inverted input b INT CHAN 0 DIO LOW gt dd INT CHAN 0 generate a high pulse E now_int_state 1 now DIO HIGH else now_int_state 0 now DIO LOW don t have to generate high pulse if gt 8 outportb A2 8259 0x20 outportb 1_8259 0x20 INT CHAN O PISO 730 User Manual Ver 1 0 12 30 99 17 2 3 6 Multiple Interrupt Source Assume DIO is initia
13. interface to field logic signals eliminating ground loop problems and isolating the host PC from damaging voltages Its isolated I O channels provide up to 2 500Vdc of protection The PISO 730 has one 37 pin D type connector and two 20 pin flat cable connectors The flat cable can be connected to ADP 20 PCI adapter The adapter can be fixed on the chassis It can be installed in a 5V PCI slot and can support truly Plug and Play 1 1 Features PCI Bus 32 isolated DIO channels 16 01 and 16xDO 32 TTL level DIO channels 16xDI and 16 00 DC DC converter build in One DB 37 D type connector for isolated input and output Two separate 20 pin connectors for non isolated input and output Up to 2500 isolated voltage Interrupt source 2 channels Connects directly to DB 24PR 24POR DB 24C DB 16P DB 16R SMD short card power saving Automatically detected by Windows 95 98 NT No base address or IRQ switches to set PISO 730 User Manual Ver 1 0 12 30 99 3 1 2 Specifications Isolated DIO channels e Optical isolated input channel Channel NO 16 digital inputs Type Isolated current input Isolation voltage 2 500Vdc Input voltage 3 5 30Vdc Input impedance 1 2KQ 1W Response time 10KHz Max e Optical isolated output channel Channel NO 16 digital outputs Output voltage open collector 5 30Vdc Isolation voltage 2 500 Sink current 200mA Max Response time 10KHz Max TTL level DIO channels
14. level state normally and generated a high_pulse to interrupt the PC The priority INT CHAN 0 1 is the same If all these two signals are active at the same time then INT will be active only once a time So the interrupt service routine has to read the status of all interrupt channels for multi channel interrupt Refer to Sec 2 6 7 for more information DEMOS C gt for multi channel interrupt source If only one interrupt source is used the interrupt service routine doesn t have to read the status of interrupt source The demo program DEMO3 C and DEMO4 C are designed for single channel interrupt demo as follows DEMO3 C amp DEMO4 C gt for INT CHAN 0 only PISO 730 User Manual Ver 1 0 12 30 99 13 2 3 2 0 INT_CHAN_O 29 Inverted Noninverted select INVO Enable Disable select ENO The INT_CHAN_0 must be fixed in low level state normally and generated a high_pulse to interrupt the PC The ENO can be used to enable disable the INT CHAN 0 as follows refer to Sec 3 3 4 ENO 0 gt INT_CHAN_0 disable ENO 1 gt INT_CHAN_0 enable The INVO can be used to invert non invert the DIO as follows Refer to Sec 3 3 6 INVO 0 gt INT_CHAN_ state of DIO INVO 1 gt INT_CHAN_0 non invert state of DIO Refer to demo program for more information as follows DEMO3 C gt forINT CHAN 0 initial high DEMOA C gt for INT_CHAN_0 ini
15. 0 User Manual Ver 1 0 12 30 99 40 outportb 0 1DoValue gt gt 8 0xff void piso 730 ido long lDoValue outportb wBase 0xc0 1DoValues0xff outportb wBase 0xc4 1DoValue gt gt 8 0xff PISO 730 User Manual Ver 1 0 12 30 99 E 43 DEMO2 DEMO2 C PISO 730 D I O demo step 1 connect DO 0 15 to DI 0 15 TDO 0 145 to IDI O0 15 step 2 run DEMO2 EXE include PIO H long piso_730_di void long piso_730_idi void WORD wBase wlrq int main jut 12 dey 11 11 129125 WORD wBoards wRetVal t1 t2 t3 t4 t5 WORD wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice long lOutPad1 10utPad2 1lInPadl l1InPad2 char clrscr step 1 find address mapping of PIO PISO cards E step 2 enable all D I O port ky outportb wBase 1 enable lOutPad1 20x0001 lOutPad2 20x8000 for gotoxy 1 8 piso 730 l1OutPadl1l lInPadl piso 730 di piso 730 ido 10utPad2 delay 10000 lInPad2 2piso 730 idi printf An DO 0 15 41x DI 0 15 2 41x lOutPad1l lInPad1 printf MnIDO 41x IDI 41x lOutPaG2 lInPad2 amp 0xffff 1 1 10utPadl1 lt lt 1 80xffff lOutPad2 2 10utPad2 gt gt 1 0xffff if l0utPadl 0 lOutPadl 1 if 10utPad2 0 lOutPad2 0x8000
16. 1802 1602 multi function family non isolated PCI P16R16 P16C16 P16POR16 P8R8 D I O family isolated PCI TMC 12 timer counter card non isolated 2 PIO series cost effective generation non isolated cards PIO 823 821 multi function family PIO D144 D96 D64 D56 D48 D24 D VO family PIO DA16 DA8 DA4 D A family 3 PISO series cost effective generation isolated cards PISO 813 A D card PISO P32C32 P64 C64 D I O family PISO P8R8 P8SSR8AC P8SSR8DC D I O family PISO 730 D I O card PISO DA2 D A card PISO 730 User Manual Ver 1 0 12 30 99 5 1 5 Product Check List In addition to this manual the package includes the following items e one piece of PISO 730 card e one piece of company floppy diskette or CD e one piece of release note It is recommended to read the release note firstly All importance information will be given in release note as follows 1 where you can find the software driver amp utility 2 how to install software amp utility 3 where is the diagnostic program 4 FAQ Attention If any of these items is missing or damaged contact the dealer from whom you purchased the product Save the shipping materials and carton in case you want to ship or store the product in the future PISO 730 User Manual Ver 1 0 12 30 99 6 2 Hardware configuration 2 1 Board Layout y N J9 04 U09 2 o
17. 2 CONI 16 channels isolated and 16 channels isolated D O 2 16 channels TTL level non isolated D I 16 channels TTL level non isolated D O JP1 Reserved PISO 730 User Manual Ver 1 0 12 30 99 7 2 2 Operation 2 2 1 Non isolated DO Port Architecture CON3 When the PC is power up all operations of non isolated DO states are clear to low state The RESET signal is used to clear non isolated DO states Refer to Sec 3 3 1 for more information about RESET signal The RESET is in Low state gt all non isolated DO states are clear to low state The block diagram of non isolated DO is given as follows RESET clear input Latch gt Clock input D O buffer CKT PISO 730 User Manual Ver 1 0 12 30 99 8 2 2 2 Non isolated Port Architecture CON2 When is power up all operations of non isolated DI port are disable enable disable of non isolated DI port is controlled by the RESET signal Refer to Sec 3 3 for more information about RESET signal The RESET is in Low state gt all non isolated DI operation is disable The 5 is in High state gt all non isolated DI operation is enable RESET disable Buffer input Clock input buffer PISO 730 User Manual Ver 1 0 12 30 99 9 2 2 3 Isolated DO Port Architecture CON1 When the PC is power up all operations of isolated DO states ar
18. 4RD No Yes Yes DB 24C Yes Yes Yes DB 24PR Yes Yes No Db 24PRD No Yes Yes DB 24POR Yes Yes Yes DB 24SSR No Yes Yes NOTE The PISO 730 has two 20 pin flat cable header and one 37 pin D type connector PISO 730 User Manual Ver 1 0 12 30 99 2 5 Pin Assignment 2 5 1 Isolated I O connector 37 pin of D type female connector Pin No Description Pin No Description 1 IDIO 20 IDI 2 IDI2 21 IDI3 3 IDI4 22 IDI5 4 IDI6 23 IDI7 5 IDIS 24 IDI9 6 IDI10 25 IDO 1 T 1012 26 IDI13 8 1014 27 10115 9 ELCOMI 28 ELCOM2 10 EO COMI 29 IGND 11 IDOO 30 IDOI 12 IDO2 31 IDO3 13 IDO4 32 IDO5 14 IDO6 33 IDO7 15 IDO8 34 IDO9 16 IDO10 35 17 IDO12 36 IDO13 18 IDO14 37 IDO15 19 EO COM2 2 5 2 2 4 6 8 JP1 OOO OO 135 7 Note Reserved PISO 730 User Manual Ver 1 0 12 30 99 24 2 5 3 TTL level I O connector 2 20 pin of flat cable connector Pin no Description Pin no Description 1 DIO 2 3 DI2 4 DI3 5 DI4 6 DI5 7 DI6 8 DI7 9 DI8 10 DI9 11 12 Dni 13 DI12 14 DI13 15 DI14 16 DI15 17 D GND 18 D GND 19 5V 20 12V 20 pin of flat cable connector Pin no Description Pin no Description 1 DOO 2 DOI 3 DO2 4 DO3 5 DO4 6 205 7 DO6 8 DO7 9 DO8 10 DO9 11 DO10 12 DO11 13 DO12 14 DO13 15 DO14 16 DOI5 17
19. A 80 0B 00 Note the sub IDs will be added more amp more without notice The user can refer to PIO H for the newest information PISO 730 User Manual Ver 1 0 12 30 99 3 1 2 GetConfigAddressSpace GetConfigAddressSpace wBoardNo wBase wlIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice e wBoardNo 0toN gt totally N 1 boards found by Drivelnit e wBase gt base address of the board control word wlrq gt allocated IRQ channel number of this board e wSubVendor gt subVendor ID of this board e wSubDevice gt subDevice ID of this board wSubAux gt subAux ID of this board e wSlotBus gt hardware slot ID1 of this board e wSlotDevice hardware slot ID2 of this board The user can use this function to save resource of all PIO PISO cards installed in this system Then the application program can control all functions of PIO PISO series card directly The sample program source is given as follows step1 detect all PISO 730 cards first wSubVendor 0x80 wSubDevice 8 wSubAux 0x40 for PISO 730 wRetVal PIO_DriverInit amp wBoards wSubVendor wSubDevice wSubAux printf Threr are 904 PISO 730 Cards in this PC n wBoards step2 save resource of all PISO 730 cards installed in this PC for 1 0 i lt wBoards i PIO_GetConfigAddressSpace i amp wBase amp wlrq amp t1 amp t2 amp t3 amp t4 amp t5 printf nCard_ d wBase x wIrq x 1 wB
20. D GND 18 D GND 19 5V 20 12V All signals are TTL compatible PISO 730 User Manual Ver 1 0 12 30 99 25 3 Control Register 3 1 How to Find the I O Address The plug amp play BIOS will assign a proper I O address to every PIO PISO series card in the power up stage The fixed IDs of PIO PISO series card are given as follows e Vendor ID E159 e Device ID 0002 The sub IDs of PISO 730 are given as follows e Sub vendor ID 80 e Sub device ID 08 e Sub auxID 40 We provide all necessary functions as follows 1 PIO_DriverInit amp wBoard wSubVendor wSubDevice wSubAux 2 GetConfigAddressSpace wBoardNo wBase wlIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice 3 Show PISO wSubVendor wSubDevice wSubAux functions are defined in PIO H Refer to Chapter 4 for more information The important driver information is given as follows 1 Resource allocated information wBase BASE address mapping in this PC e wIrq IRQ channel number allocated in this PC 2 PIO PISO identification information e wSubVendor subVendor ID of this board e wSubDevice subDevice ID of this board e wSubAux subAux ID of this board 3 PC s physical slot information e wSlotBus hardware slot ID1 in this PC s slot position e wSlotDevice hardware slot ID2 in this PC s slot position The utility program PIO PISO EXE will detect amp show all PIO PISO cards installed in this PC Refer to
21. PIO PISO cards So it can be used to identify the specified PIO PISO card as follows Step1 Record all wSlotBus amp wSlotDevice Step2 Use PIO GetConfigAddressSpace to get the specified card s wSlotBus amp wSlotDevice Step3 The user can identify the specified PIO PISO card if he compare the wSlotBus amp wSlotDevice in step2 to step1 PISO 730 User Manual Ver 1 0 12 30 99 31 3 3 Thel O Address The I O address of PISO series card is automatically assigned by the main board ROM BIOS The I O address can also be re assigned by user It is strongly recommended not to change the I O address by user The plug amp play BIOS will assign proper I O address to each PIO PISO series card very well The I O address of PISO 730 are given as follows WBase 0__ RESET control register wBase 3 Aux data register Same jwBase 5 INT mask control register wBase 0x2a INT polarity control register Note Refer to Sec 3 1 for more information about wBase PISO 730 User Manual Ver 1 0 12 30 99 32 3 31 RESET Control Register Read Write wBase 0 Note Refer to Sec 3 1 for more information about wBase When the PC is first power up the RESET signal is in Low state This will disable all D I O operations The user has to set the RESET signal to High state before any command outportb wBase 1 RESET High gt all D I O are enable now outportb w Base 0
22. PISO 730 User Manual Warranty All products manufactured by ICP DAS are warranted against defective materials for a period of one year from the date of delivery to the original purchaser Warning ICP DAS assume no liability for damages consequent to the use of this product ICP DAS reserves the right to change this manual at any time without notice The information furnished by ICP DAS is believed to be accurate and reliable However no responsibility is assumed by ICP DAS for its use nor for any infringements of patents or other rights of third parties resulting from its use Copyright Copyright 1999 by ICP DAS rights are reserved Trademark The names used for identification only maybe registered trademarks of their respective companies PISO 730 User Manual Ver 1 0 12 30 99 1 Tables of Contents 1 2 3 121 SR EATU RE Sic abate tans 3 1 2 SPEGIFIGATIONS a t ee ode dee 4 1 3 ORDER DESCRIPTION citet e Eee aceti clack 5 1 4 PCI DATA ACQUISITION 004 5 1 5 PRODUCT CHECK B Tina ete 6 HARDWARE
23. Sec 4 1 for more information PISO 730 User Manual Ver 1 0 12 30 99 26 3 1 1 PIO_DriverInit amp wBoards wSubVendor wSubDevice wSubAux wBoards 0 to gt number of boards found in this PC e wSubVendor gt subVendor ID of board to find e wSubDevice gt subDevice ID of board to find wSubAux gt subAux ID of board to find This function can detect all PIO PISO series card in the system It is implemented based on the PCI plug amp play mechanism 1 It will find all PIO PISO series cards installed in this system amp save all their resource in the library Sample program 1 find all PISO 730 in this PC wSubVendor 0x80 wSubDevice 8 wSubAux 0x40 for PISO 730 wRetVal PIO_DriverInit amp wBoards wSubVendor wSubDevice wSubAux printf Threr are PISO 730 Cards in this PC n wBoards step2 save resource of all PISO 730 cards installed in this PC for 1 0 i lt wBoards i GetConfigAddressSpace i amp wBase amp wlIrq amp wID1 amp wID2 amp wID3 amp wID4 amp wID5 printf nCard_ d wBase x wIrq x i wBase wlIrq wConfigSpace i 0 wBaseAddress save all resource of this card wConfigSpace i 1 wlrq save all resource of this card Sample program 2 find all PIO PISO in this PC refer to Sec 4 1 for more information wRetVal PIO_DriverInit amp wBoards Oxff Oxff 0xff find all PISO printf nThrer are d PIO_PISO Ca
24. ase wlIrq wConfigSpace i 0 wBaseAddress save all resource of this card wConfigSpace i 1 wlrq save all resource of this card step3 control PISO 730 directly wBase wConfigSpace 0 0 get base address the card_0 outport wBase 1 enable all D I O operation of card_0 wBase wConfigSpace 1 0 get base address the card_1 outport wBase 1 enable all D I O operation of card_1 PISO 730 User Manual Ver 1 0 12 30 99 29 3 1 3 5 5 Show_PIO_PISO wSubVendor wSubDevice wSubAux e wsSubVendor gt subVendor ID of board to find e wSubDevice gt subDevice ID of board to find e wSubAux gt subAux ID of board to find This function will show a text string for this special subIDs This text string is the same as that defined in PIO H The demo program is given as follows wRetVal PIO_DriverInit amp wBoards Oxff Oxff 0xff find all PISO printf nThrer are d PISO Cards in this PC wBoards if wBoards 0 exit 0 printf Mn for i 0 i wBoards i GetConfigAddressSpace 1 amp wBase amp amp wSubVendor amp wSubDevice wSubAux amp wSlotBus amp wSlotDevice printf nCard_ d wBase x subID x 3x Sx Slot ID x x i wBase wIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice Prine Has ye ShowPioPiso wSubVendor wSubDevice wSubAux PISO 730 User Manual
25. d COUNT_L if kbhit 0 break disable outportb 5 0 if wIrq lt 8 setvect wIrq 8 oldfunc else setvect wIrq 8 0x70 01dfunc PIO_DriverClose disable all interrupt WORD init high DWORD dwVal 2 E Kj PISO 730 User Manual Ver 1 0 12 30 99 43 disable outportb wBase 5 0 if wIrq 8 oldfunc getvect wIrqt8 irqmask inportb 1_8259 1 outportb A1 825941 irqmask amp setvect 8 else oldfunc getvect wIrq 8 0x70 irqmask inportb A1l 8259 41 outporth A1_8259 1 irgmask Oxfb irqmask inportb A2 825941 outportb A2 825941 irqmask amp setvect wIrq 8 0x70 outportb wBase 0x2a 0 now_int_state 0x1 outportb wBaset5 0 1 enable irq service Oxff OXEF irq service disable all interrupt 1 lt lt wlrq IRQ2 1 lt lt wIrq 8 invert DIO now DIO is high enable DIO interrupt void interrupt service if now_int_state 1 COUNT_L if inportb 7 amp 1 0 outportb 0 2 1 now_int_state 0 else now int state 1 COUNT_H if inportb 7 amp 1 1 outportb wBase 0x2a 0 now int state 1 else now_int_state 0 if wIrq 8 outportb 1_8259 0x20 PISO 730 User Manual
26. dl lOutPad2 char c clrscr step 1 find address mapping of PIO PISO cards wRetVal PIO DriverInit amp wBoards 0 80 0 08 0 40 for PISO 730 printf nThrer are d PISO 730 Cards in this PC wBoards if wBoards 0 exit 0 printf Mn The Configuration Spac ys for i 0 i lt wBoards 1 GetConfigAddressSpace i amp wBase amp amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf nCard_ d subID x x x SlotID x x i wBase wIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice print gt ShowPioPiso wSubVendor wSubDevice wSubAux PIO_GetConfigAddressSpace 0 amp wBase amp amp t1 amp t2 amp t3 amp t4 amp t5 step 2 enable all D I O port EJ outportb wBase 1 enable D I O printf NuNn lOutPadl 1 lOutPad2 20x8000 for gotoxy 1 6 piso_730_do l10utPadl printf An0utput DO 0 15 41x lOutPadl piso 730 10 4 2 printf An0utput IDO 0 15 41x 1lOutPadZ2 delay 12000 1OutPad1 lOutPadl lt lt 1 amp Oxffff 1lOutPad2 lOutPad2 gt gt 1 amp if if PIO_DriverClose lOutPad1 20 lOutPad1 1 lOutPad2 0x8000 kbhit 0 break ES Xj void piso 730 do long lDoValue outportb 0 8 1DoValues0xff PISO 73
27. e gt BC large model library file gt BC declaration file gt BC huge model library file NOTE The library is available for all PIO PISO series cards PISO 730 User Manual Ver 1 0 12 30 99 37 41 5 El Find all PIO_PISO series cards in this PC system step 1 plug all PISO cards into PC step 2 run 5 include PIO H WORD wBase wlrq WORD wBase2 wlrq2 int 790 927987947 71 48 1g 9227 333 4443 WORD wBoards wRetVal WORD wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice char float ok err clrscr wRetVal PIO DriverInit 8wBoards 0xff 0xff 0xff for PIO PISO printf nThrer are d PISO Cards in this PC wBoards if wBoards 0 exit 0 printf Mn for i 0 i wBoards i GetConfigAddressSpace i amp wBase amp wIrq amp wSubVendor wSubDevice wSubAux amp wSlotBus amp wSlotDevice printf d wBase x wIrq x subID x x x Slot ID x x i wBase wIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice printf gt ShowPioPiso wSubVendor wSubDevice wSubAux PIO_DriverClose NOTE the PIO_PISO EXE is valid for all PIO PISO cards It can be find in the TC DIAG directory The user can execute the PISO EXE to get the following information e List all PIO PISO cards i
28. e clear to low state The RESET signal is used to clear isolated DO states Refer to Sec 3 3 1 for more information about RESET signal e The RESET is Low state gt all isolated DO states are clear to low state Each eight open collector output channels share EO COM IDOO IDO7 use and IDO8 IDO15 use EO COM2 The block diagram of isolated DO is given as follows External Power supply External Internal PISO 730 PISO 730 User Manual Ver 1 0 12 30 99 10 2 2 44 Isolated DI Port Architecture CON1 The PISO 730 provides 16 channels isolated digital input Each of the isolated digital input accepts voltages from 3 5 30Vdc Each eight input channels share one external common end point IDIO IDI7 use ELCOM1 and IDI8 IDI15 use 2 pininlclzltll for A A A A IDIO 1 2K 1W External power supply 3 5 30 Vdc rl M M PISO 730 User Manual Ver 1 0 12 30 99 11 2 3 Interrupt Operation There are two interrupt sources in PISO 730 These two signals are named as INT CHAN 0 and Their signal sources are given as follows INT CHAN 0 DIO INT 1 DII If only one interrupt signal source is used the interrupt service routine does not have to identify the interrupt source Refer to and DEMOA C for more informati
29. he inverted DIO void interrupt irq_ service if now_int_state 1 now DIO is changed to LOW gt INT_CHAN_0 DIO HIGH now COUNT find a LOW pulse DIO inport wBase 7 amp 1 0 the DIO is still fixed in LOW gt need to generate high_pulse outportb wBase 0x2a 1 INVO select the non inverted input b INT CHAN 0 DIO LOW gt XJ INT CHAN 0 generate a high pulse now int state 0 now DIO LOW else now_int_state 1 now DIO HIGH don t have to generate high pulse else now DIO is changed to HIGH gt INT CHAN 0 DIO HIGH now COUNT find a HIGH pulse DIO inport wBase 7 amp 1 1 the DIO is still fixed in HIGH need to generate high_pulse outportb wBase 0x2a 0 INVO select the inverted input d INT CHAN 0 DIO LOW gt di INT CHAN 0 generate a high pulse E now_int_state 1 now DIO HIGH else now_int_state 0 now DIO LOW don t have to generate high pulse if gt 8 outportb A2 8259 0x20 outportb 1_8259 0x20 PISO 730 User Manual Ver 1 0 12 30 99 16 2 3 5 Initial_low active high Interrupt source If the DIO is an initial_low active_high signal the interrupt service routine should use INVO to invert non invert the DIO for high_pulse generation as follows Refer to DEMO4 C
30. if kbhit 0 break disable outportb 5 0 disable all interrupt if lt 8 setvect wIrq 8 oldfunc else setvect wIrq 8 0x70 01dfunc PIO_DriverClose WORD init_low DWORD dwVal PISO 730 User Manual Ver 1 0 12 30 99 45 disable outportb wBase 5 0 if wIrq 8 oldfunc getvect wIrqt8 irqmask inportb 1_8259 1 disable all interrupt outporth A1_8259 1 irgmask Oxff 1 lt lt wIrq setvect wIrq 8 service else oldfunc getvect wIrq 8 0x70 irqmask inportb 1 825941 outportb A1_8259 1 irqmask 6 Oxfb IRQ2 irqmask inportb A2 825941 outporth A2_8259 1 irgqmask amp Oxff 1 lt lt wlrq 8 setvect wIrq 8 0x70 service outportb 0 2 1 now_int_state 0x0 outportb wBaset5 0 1 enable non invert DIO now DIO is low enable DIO interrupt void interrupt service if now_int_state 1 LE COUNT_L if inportb 7 amp 1 0 outportb wBase 0x2a 1 now int state 0 else now_int_state 1 else LE COUNT_H LS if inportb 7 amp 1 1 i outportb wBase 0x2a 0 now_int_state 1 else now_int_state 0 if gt 8 outportb A2 8259 0x20 outportb 1 8259 0x20 now DIO change t
31. l Low active High DII is initial High active Low as follows DIO DIO amp DI1 are DIO amp are return to active at the normal at the same time same time is return to normal Refer to DEMOS C for source program All these three falling edge amp rising edge can be detected by DEMOS C Note when the interrupt is active the user program has to identify the active signals These signals may be active at the same time So the interrupt service routine has to service all active signals at the same time PISO 730 User Manual Ver 1 0 12 30 99 18 Initial setting now_int_state 0x2 Initial state DIO at low level DII at high level invert 0x1 non invert DIO amp invert outportb wBase 0x2a invert void interrupt irq_service new_int_state inportb 7 amp 0 03 read all interrupt state int int state now int state compare which interrupt signal be change if int_c amp 0x1 0 0 is active EJ if new_int_state amp 0x01 0 now DIO change to high CNT_H1 else now DIO change to low xy CNT_L1 invert invert 1 to generate a high pulse if int_c 0x2 0 if new_int_state amp 0x02 0 now DI1 change to high NA now DI1 change to low Rond jx oneris to generate a high pulse
32. nstalled in this PC e List all resources allocated to every PIO PISO cards e List the wSlotBus amp wSlotDevice for specified PIO PISO card identification refer to Sec 3 2 for more information PISO 730 User Manual Ver 1 0 12 30 99 38 4 1 1 PISO EXE for Windows There has an software utility PISO EXE for Windows95 98 for the detailed information about this file please refer to the Readme txt of development toolkit for Windows95 98 It is useful for all PIO PIS series card The setup steps from the CD ROM are given as follows Step1 Toolkit Software Manuals Step2 T Agree Step3 PCI Bus DAQ Card Step4 PIO PISO Step5 Install Toolkits for Windows95 98 Step6 After installation this program will be extracted in user define directory After executing the utility every detail information for all PIO PISO cards that installed in the PC will be shown as follows PID PIED seres card Aoerd Heme PISO 730 User Manual Ver 1 0 12 30 99 39 4 2 1 DEMO1 C 50 730 D O step 1 connect CON3 to DB 16R step 2 run 1 PX include void piso 730 do long lDoValue void piso 730 ido long lDoValue WORD wBase wlrq int main i 2KEbE2 T1lI T72 3j dd Lyudiq32 312 WORD wBoards wRetVal t1 t2 t3 t4 t5 WORD wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice long lOutPa
33. o low INT CHAN 0 DIO find low pulse DIO DIO still fixed in low need to generate a high pulse INVO select noninverted input now DIO 1low now DIO High now DIO change to high INT CHAN 0 DIO find a high pulse DIO DIO still fixed in high need to generate a high pulse INVO select inverted input now DIO high now DIO low PISO 730 User Manual Ver 1 0 12 30 99 46 A T 4 6 5 DEMO5 C 50 730 Interrupt Multi interrupt source E DIO initial low DII initial high step 1 connect DIO 5 to function generator step 2 run DEMO5 EXE include define A1_8259 0x20 define 2 8259 OxAO define EOI 0x20 WORD init void interrupt oldfunc static void interrupt service int irqmask now int state new int state invert int c int num int L1 CNT L2 CNT H1 CNT H2 WORD wBase wlrq int main int X qp WORD wBoards wRetVal t1 t2 t3 t4 t5 WORD wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice char c clrscr step 1 find address mapping of PIO PISO cards step 2 enable all D I O port outportb wBase 1 enable quts printf n n show the count of High pulse n for gotoxy 1 8 printf nCNT_ L1 CNT_L2 5d 5d CNT_L1 CNT_L2 printf AnCNT H1 CNT H2 5d 5d CNT H1 CNT H2 if kbhit
34. on If there are more than one interrupt source the interrupt service routine has to identify the active signals as follows refer to DEMOS C 1 Read the new status of all interrupt signal sources refer to Sec 3 3 5 2 Compare the new status with the old status to identify the active signals 3 IfINT 0 is active service it 4 IfINT 1 is active service it 5 Update interrupt status Note if the interrupt signal is too short the new status may be as same as old status In that condition the interrupt service routine can not identify which interrupt source is active So the interrupt signal must be hold active long enough until the interrupt service routine is executed This hold time is different for different O S The hold time can be as short as micro second or as long as second In general 20ms is enough for all O S PISO 730 User Manual Ver 1 0 12 30 99 12 2 31 Interrupt Block Diagram PISO 730 0 CHAN 1 INT Level_trigger 0 initial low active_high The interrupt output signal of PISO 730 INT is level trigger amp Active_Low If the INT generate a low pulse the PISO 730 will interrupt the PC once a time If the INT is fixed in low level the PISO 730 will interrupt the PC continuously So the 0 1 must be controlled in a pulse_type signals They must be fixed in low
35. rds in this PC wBoards if wBoards 0 exit 0 printf Mn for i 0 i lt wBoards i GetConfigAddressSpace 1 amp wBase amp amp wSubVendor wSubDevice wSubAux amp wSlotBus amp wSlotDevice printf nCard_ d wBase x subID x 3x Sx Slot ID x x i wBase wlIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice printi gt ys ShowPioPiso wSubVendor wSubDevice wSubAux PISO 730 User Manual Ver 1 0 12 30 99 27 The sub IDs of PIO PISO series card given as follows PIO PISO series card Description Sub vendor Sub device Sub AUX PIO D144 144 80 01 00 PIO D96 96 80 01 10 PIO D64 64 80 01 20 PIO D56 24 D I O 80 01 40 16 D I 16 D O PIO D48 48 D I O 80 01 30 PIO D24 24 D I O 80 01 40 PIO 823 Multi function 80 03 00 PIO 821 Multi function 80 03 10 PIO DA16 16 D A 80 04 00 PIO DA8 8 D A 80 04 00 PIO DA4 4 D A 80 04 00 PISO C64 64 isolated D O 80 08 00 PISO P64 64 isolated 80 08 10 PISO P32C32 32 32 80 08 20 5 8 8 8 isolated 80 08 30 8 220V relay PISO P8SSR8AC 8 isolated D I 80 08 30 8 SSR AC PISO P8SSR8DC 8 isolated D I 80 08 30 8 SSR DC PISO 730 16 DI 16 D O 80 08 40 16 isolated D I 16 isolated D O PISO 813 32 isolated A D 80 0A 00 PISO DA2 2 isolated D
36. tial low DEMOS C gt for multi channel interrupt source NOTE Refer to Sec 2 3 4 amp Sec 2 3 5 for active high pulse generation PISO 730 User Manual Ver 1 0 12 30 99 14 2 3 3 1 INT CHAN 1 Inverted Noninverted select INV1 Enable Disable select EN1 The INT_CHAN_1 must be fixed in low level state normally and generated a high_pulse to interrupt the PC The EN1 can be used to enable disable the INT_CHAN_1 as follows refer to Sec 3 3 4 EN1 0 gt INT_CHAN_1 disable EN1 1 gt INT_CHAN_ l enable The INV1 be used to invert non invert the DII as follows Refer to Sec 3 3 6 INV1 0 gt INT_CHAN _ 1 invert state INV1 1 gt INT_CHAN_ 1 non invert state of DII Refer to demo program for more information as follows DEMO3 C gt for INT_CHAN_0 initial high DEMOA C gt for INT_CHAN_0 initial low DEMOS C 2 for multi channel interrupt source NOTE Refer to Sec 2 3 4 amp Sec 2 3 5 for active high pulse generation PISO 730 User Manual Ver 1 0 12 30 99 15 2 3 4 Initial_high active low Interrupt source If the DIO is an initial_high active_low signal the interrupt service routine should use INVO to invert non invert the DIO for high_pulse generation as follows Refer to DEMO3 C and the is similarly Initial set now_int_state 1 initial state for DIO outportb wBase 0x2a 0 select t
37. x55 to DOO DO7 DiValue inportb wBase 0xcc read states from DIS DII5 PISO 730 User Manual Ver 1 0 12 30 99 36 4 Demo Program It is recommended to read the release note first All important information will be given in release note as follows 1 where you can find the software driver amp utility 2 how to install software amp utility 2 4 where is the diagnostic program There are many demo programs given in the company floppy disk or CD After the software installation the driver will be installed into disk as follows VIC BC TC LIB TC DEMO TC DIAG TC LIB Large TC LIB Huge TC LIB Large PIO H TC LIB Large TCPIO_L LIB TC LIB Huge PIO H TC LIB Huge TCPIO_H LIB MSC LIB Large PIO H gt for Turbo 2 xx or above gt for MSC 5 xx or above gt for BC 3 xx or above gt for TC library gt for TC demo program gt for TC diagnostic program gt TC large model library TC huge model library TC declaration file TC large model library file TC declaration file gt TC huge model library file gt MSC declaration file e MSC LIB Large MSCPIO_L LIB gt MSC large model library file e MSC LIB Huge PIO H gt MSC declaration file e MSC LIB Huge MSCPIO_H LIB gt MSC huge model library file e BC LIB Large PIO H e BC LIB Large BCPIO_L LIB e BC LIB Huge PIO H e BC LIB Huge BCPIO_H LIB gt BC declaration fil

Download Pdf Manuals

image

Related Search

Related Contents

Parts & Service Manual RW-1019  YH301B tuning fork level switch user manual  Operating Instructions for Universal Temperature  es de ma vie - Mathilde de l`Ecotais  Edital - Pregao Presencial 012 2011  Iron, Ferrous, Test Kit • Trousse d`analyse fer ferreux • Eisen, 2wertig  Optique Solidaire Mode d`emploi  VPAP™ ST A  

Copyright © All rights reserved.
Failed to retrieve file