Home

PISO-730/730A

image

Contents

1. 2 730 idi printf n DO 0 15 9e4Ix DI 0 15 4Ix lOutPad1 IlnPad1 print nIDO 9e4lx IDI 4Ix OutPad2 IInPad2 amp Oxffff lOutPad1 lOutPad1 lt lt 1 amp Oxffff lOutPad2 lOutPad2 gt gt 1 amp Oxffff if 1 0 1 1 lOutPad2 0 IOutPad2 0x8000 if kbhit 0 break PIO DriverClose long piso 730 di void long IDiValue IDiValue inportb wBase 0xcc lt lt 8 IDiValue IDiValue inportb wBase 0xc8 amp Oxffff return IDiValue long piso 730 idi void long IDiValue IDiValue inportb wBase 0xc4 lt lt 8 IDiValue IDiValue inportb wBase 0xcO0 amp Oxffff return IDiValue PISO 730 730A User s Manual Ver 3 0 9 9 2004 43 4 4 PISO 730 730A interrupt DIO initial high step 1 DIO to function generator step 2 run DEMO3 EXE AT include PIO H define A1 8259 0x20 define 2 8259 OxAO define EOI 0x20 WORD init_high void interrupt oldfunc static void interrupt irq_service int COUNT_L COUNT_H irqmask now_int_state void piso_730_do long IDoValue long piso 730 di void void piso 730 ido long IDoValue long piso 730 idi void WORD wBase wlrq int main int i j K k1 k2 11 12 jj dd j1 i1 j2 i2 WORD wBoards wRetVal t1 t2 t3 t4 t5 WORD wSubVendor wSubDevice wSub
2. ps Note Refer to Sec 3 1 for more information about wBase outportb wBase 0xc0 O0xff Writes Oxff to IDOO IDO7 DiValue inportb wBase 0xc0 Reads states from IDIO IDI7 outportb wBase 0xc8 0x55 Writes 0x55 000 007 DiValue inportob wBase 0xcc Reads states from DI8 DI15 PISO 730 730A User s Manual Ver 3 0 9 9 2004 37 4 Demo Program It is recommended to read the release note first All of the following important information will be given in release note The location of the software driver amp utility Installing the software amp utility The location of the diagnostic program FAQ There are many demo programs given in the company floppy disk or CD After the software installation the driver will be installed as follows RON e TC gt for Turbo C 2 xx or above e MSC gt for MSC 5 xx or above e BC gt for BC 3 xx or above e TC LIB gt for TC library TC DEMO gt for TC demo program TC DIAG gt for TC diagnostic program e TC LIB Large gt TC large model library e TC LIB Huge gt TC huge model library e TC LIB Large PIO H gt TC declaration file e TC LIB Large TCPIO_L LIB gt TC large model library file TC LIB Huge PIO H gt TC declaration file e TC LIB Huge TCPIO_H LIB gt TC huge model library file MSC LIB Large PIO H gt MSC declaration file MSC LIB Large MSCPIO_L LIB MSC lar
3. 7 23 BOARD LAYOUT ZS su s maana um aP m La 7 2 27 OPERATION a e asia 8 2 3 INTERRUPT u n a uu aga m at sus Talis St Sula q 13 2 4 IDAUGHTER BOARDS e e Santu kunata ah Sauna uu 21 2 5 25 25 3 CONTROL aa u u u 27 3 1 How TOFIND THE I O 5 27 3 2 THE ASSIGNMENT OF I O 5 4 004000 neret una 32 332 hEHE 5 e bet ll net dat e ces 33 4 DEMO PROGRAM tea ce 38 AAs gt PIOSPISQUT stehe tec im eb e te ioa 39 4 07 mamam R 41 423 DEMO ee e eto eie bet oM RED EL RU 43 AA DEMOS tort eme tt c EM e 44 45 S XZ 46 4 6 ncm uenit tede Mee aet nae Bead eels 48 PISO 730 730A User s Manual Ver 3 0 9 9 2004 2 1 Introduction The PIS
4. CON3 gt Clock input d D O buffer CKT PISO 730 730A User s Manual Ver 3 0 9 9 2004 8 2 2 2 Nonrisolated DI Port Architecture CON2 When the PC is powered up non isolated DI port operations are disabled The enable disable for non isolated DI ports is controlled by the RESET signal Refer to Sec 3 3 1 for more information about the RESET signal The RESET is Low state gt all non isolated DI operation are disabled The RESET is in High state gt all non isolated DI operation are enabled RESET Data disable CON2 Buffer input lt Clock input D I buffer CKT PISO 730 730A User s Manual Ver 3 0 9 9 2004 9 2 2 3 Isolated DO Port Architecture When the PC is powered up all operations of isolated DO states are cleared 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 in Low state gt all isolated DO states are clear to low state Each eight open collector output channel shares EO COM IDOO IDO7 use EO COM1 IDO8 IDO15 use 2 The block diagram of isolated DO current sinking is as follows External Power supply External Internal of PISO 730 The block diagram of isolated DO current sourcing is as follows peso se sb ae a a External Power supply PISO 730 730A User s Manu
5. Read Write wBase 2 Note Refer to Sec 3 1 for more information about wBase 0 gt this Aux is used as a Aux 1 gt this Aux is used as a D O When the PC is first powered 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 ead ey wBase 3 Note Refer to Sec 3 1 for more information about wBase When the Aux is used as a D O this register controls the output state This register has been designed for future extensions so please don try to control this register now PISO 730 730A User s Manual Ver 3 0 9 9 2004 34 3 3 4 INT Mask Control Register Bead Write wBase 5 pb P b b b E Note Refer to Sec 31 for more information about wBase 1 0 gt Disables INT CHAN 0 1 as interrupt signal default 1 1 gt Enables CHAN 0 1 as a interrupt signal outportb wBase 5 0 Disables all interrupts outportb wBase 5 1 Enables interrupt of INT CHAN 0 Enables interrupt of INT CHAN 1 Enables all two channels of interrupt outportb wBase 5 2 outportb wBase 5 3 ee 1 2 Refer to the following demo program for more information DEMO3 C gt For INT_CHAN_0 only initial high state DEMO4 C gt ForINT CHAN only initial low state 5 For multi channel interrupt sources PISO 730 730A User s
6. PISO 730 730A User s 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 assumes 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 not for any infringements of patents or other rights of third parties resulting from its use Copyright Copyright 1999 by ICP DAS All rights are reserved Trademark The names used for identification only may be registered trademarks of their respective companies PISO 730 730A User s Manual Ver 3 0 9 9 2004 1 Tables of Contents 1 aiiepilejeEm 3 121 fed Y ee Se E 3 1225 4 1 3 ORDER DESCRIPTION Zar testet nae iis e DE sa baee d best a LO EE DO ERE ER denice 5 1 4 PCI DATA ACQUISITION FAMILY 5 1 5 PRODUCT GHECKLIST I R eshte tek ea oa 6 2 HARDWARE CONFIGURATIONN J U U
7. 7 ShowPioPiso wSubVendor wSubDevice wSubAux PISO 730 730A User s Manual Ver 3 0 9 9 2004 29 3 1 2 GetConfigAddressSpace GetConfigAddressSpace wBoardNo wBase wlrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice wBoardNo 0toN gt total number of N 1 boards found by PIO_Drivelnit wBase gt base address of the board control word gt allocates IRQ channel number of this board e wSubVendor gt subVendor ID of this board e wSubDevice gt subDevice ID of this board e wSubAux gt subAux ID of this board e wSlotBus gt hardware slot ID1 of this board wSlotDevice gt hardware slot ID2 of this board Use this function to save the resources of all PIO PISO cards installed in this system Afterward the application program can directly control all functions of PIO PISO series card Find the configure address space of PISO 730 730A step detect all PISO 730 730A cards first wSubVendor 0x80 wSubDevice 8 wSubAux 0x40 for PISO 730 wSubAux 0x80 for PISO 730A wRetVal PIO Driverlnit amp wBoards wSubVendor wSubDevice wSubAux printf There are d PISO 730 Cards in this PC n wBoards step2 save resource of all PISO 730 730A cards installed in this PC for i20 iewBoards i GetConfigAddressSpace i amp wBase amp wlrq amp t1 amp t2 8 amp t3 amp t4 amp t5 printf nCard_ d wBase x wirq x i wBase wlrq wConfig
8. DB 16R step 2 run DEMO1 EXE Eee cpm zr include PIO H void piso 730 do long IDoValue void piso 730 ido long IDoValue WORD wBase wlrq int main int i j k1 k2 11 12 jj dd j1 i1 j2 i2 WORD wBoards wRetVal t1 2 3 4 15 WORD wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice long lOutPad 1 lOutPad2 char c clrscr step 1 find address mapping of PIO PISO cards wRetVal PIO Driverlnit amp wBoards 0x80 0x08 0x40 for PISO 730 0x80 for PISO 730A printf nThere are d PISO 730 730A Cards in this PC wBoards if wBoards 0 exit 0 printf n The Configuration Space 2 for i 0 iewBoards i GetConfigAddressSpace i amp wBase amp wlrq amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf nCard_ d wBase x wlrq x subID x x x SlotID x x i wBase wlrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice printf gt ShowPioPiso wSubVendor wSubDevice wSubAux PIO_GetConfigAddressSpace 0 amp wBase amp wirg amp t1 amp t2 amp t3 amp t4 amp t5 step 2 enable all D I O port outportb wBase 1 enable D I O printf n n 1 1 2 0 8000 for gotoxy 1 6 piso 730 do lOutPad1 printf nOutput DO 0 15 Ve4Ix JOutPad1 piso 730 ido lOutPad2 print nOutput IDO 0 15 964 1 2 delay 12
9. PISO series card in the system Implemented is based on the PCI plug amp play mechanism 1 It will find all installed PIO PISO series cards in this system and saves all their resource in the library Sample program 1 Finds all PISO 730 730A in this PC wSubVendor 0x80 wSubDevice 8 wSubAux 0x40 for PISO 730 wSubAux 0x80 for PISO 730A wRetVal PIO Driverlnit amp wBoards wSubVendor wSubDevice wSubAux printf There are PISO 730 Cards in this PC n wBoards step2 Save resource of all PISO 730 730A cards installed in this PC for i20 iewBoards i PIO GetConfigAddressSpace i amp wBase amp wlrq amp wID1 amp wID2 amp wID3 amp wID4 amp wID5 printf nCard_ d wBase x wirq x i wBase wlrq 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 Driverlnit amp wBoards Oxff Oxff Oxff all PISO printf nThere are d PISO Cards in this PC wBoards if wBoards 0 exit 0 printf n for i 0 iewBoards i PIO_GetConfigAddressSpace i awBase amp wirq amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf nCard_ d wBase x wlrq x subID x x x SlotID x x i wBase wirq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice printf gt
10. for source program These three falling edge amp rising edge scenarios can be detected by DEMO5 C Note When the interrupt is active the user program has to identify the active signals More than one signal may be simultaneously The interrupt service routine has to service all active signals at the same time PISO 730 730A User s Manual Ver 3 0 9 9 2004 19 Initial setting now int 0 2 Initial state DIO at low level at high level invert Ox1 non invert DIO amp invert DII outportb wBase 0x2a invert void interrupt irq_service new_int_state inportb wBase 7 amp 0x03 read all interrupt state int int state now int state compare which interrupt signal has changed if int_c amp 0x1 0 INT CHAN Oisactive if new int state amp 0x01 0 now DIO changes to high 7 CNT_H1 else now DIO changes low CNT_L1 invert invert 1 to generate high pulse Jif int amp 0 2 0 if new int state amp 0x02 0 now change to high CNT_H2 else now 011 changes low CNT_L2 invert invert 2 to generate high pulse now int state new int state outportob wBase 0x2a invert if wlrq gt 8 outportb A2 8259 0x20 outportb A1 8259 0x20 PISO 730 730A User s Manual Ver 3 0 9 9 2004 20 2 4 Daughter Boards 2 4 1 DB 16P Isolated Input Board T
11. wBase 7 amp 1 2z0 the DIO is still fixed in LOW gt needs to generate a high pulse outportb wBase 0x2a 1 INVO select the non inverted input d INT CHAN 0 DIO LOW gt INT CHAN 0 generate a high pulse 7 now int 0 now DIOZLOW else now int state 1 now DIO HIGH doesn 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 If inport wBase 7 amp 1 1 the DIO is still fixed in HIGH needs to generate high pulse outportb wBase 0x2a 0 INVO select the inverted input 6 INT CHAN Oz DIO LOW gt INT CHAN 0 generate a high pulse now int state 1 now DIO HIGH else now_int_state 0 now DIOZLOW doesn have to generate high pulse if wlrq gt 8 outportb A2 8259 0x20 outportb A1 8259 0 20 INT CHAN 0 PISO 730 730A User s Manual Ver 3 0 9 9 2004 18 2 3 6 Multiple Interrupt Source Assume DIO is initial Low active High is initial High active Low as follows DIO DI1 DIO amp are DIO Dil are return to active atthe lt gt u normal at the same time u u same time DI1 IS return is active to normal Refer to DEMOS C
12. 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 D I O init_Low doe xx printf n n for show the count of High_pulse n gotoxy 1 8 printf nNCOUNT_H 5d COUNT_H if kbhit 0 break disable outportb wBase 5 0 disable all interrupt if wlrq 8 setvect wlrq 8 oldfunc else setvect wlrq 8 0x70 oldfunc PIO DriverClose PISO 730 730A User s Manual Ver 3 0 9 9 2004 46 Forte tet rele iw hte Sr ta le WORD init_low DWORD dwVal disable outportb wBase 5 0 disable all interrupt if wirq lt 8 oldfunc getvect wirq 8 irgmask inportb A1 8259 1 outportb A1 8259 1 irqmask amp Oxff 1 lt lt wlrq setvect wirq 8 service else oldfunc getvect wirq 8 0x70 irgmask inportb A1 8259 1 outportb A1 8259 1 irqmask amp Oxfb IRQ2 irgmask inportb A2 8259 1 outportb A2 8259 1 irqmask amp Oxff 1 lt lt wlrq 8 setvect wirq 8 0x70 irq service outportb wBase 0x2a 1 non invert DIO now int 0 0 now DIO is low outportb wBase 5 0x1 enable DIO interrupt enable void interrupt service if now i
13. 000 lOutPad1 lOutPad1 lt lt 1 amp Oxffff lOutPad2 IOutPad2 1 amp Oxffff if OutPad1 0 lOutPad121 lOutPad220x8000 if kbhit 0 break PIO DriverClose PISO 730 730A User s Manual Ver 3 0 9 9 2004 41 void piso 730 do long IDoValue outportb wBase 0xc8 IDoValue amp Oxff outportb wBase 0xcc IDoValue gt gt 8 amp Oxff uz te lt hr ol void piso 730 ido long IDoValue outportb wBase 0xcO IDoValue amp Oxff outportb wBase 0xc4 IDoValue gt gt 8 amp Oxff PISO 730 730A User s Manual Ver 3 0 9 9 2004 43 DEMO2 DEMO2 C PISO 730 730A demo Hi step 1 connect DO 0 15 to DI 0 15 ul IDO O 15 to IDI 0 15 step 2 run DEMO2 EXE Ne ree MEM xf include PIO H long piso 730 di void long piso 730 idi void WORD wBase wlrq int main int i K1 k2 11 12 jj dd j1 i1 j2 i2 WORD wBoards wRetVal t1 t2 t3 t4 t5 WORD wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice long lOutPad 1 lOutPad2 InPad_1 llnPad2 char c clrscr step 1 find address mapping of PIO PISO cards step 2 enable all D I O port outportb wBase 1 enable D I O 1 0 0001 2 0 8000 for gotoxy 1 8 piso 730 do lOutPad1 IInPad1 piso 730 di piso 730 ido lOutPad2 delay 10000
14. 31 3 2 The Assignment of I O Address The plug amp play BIOS assigns the proper I O address to each PIO PISO series card If there is only one PIO PISO board the board is identified as card 0 If there two PIO PISO boards in the system identifying card 0 becomes more difficult The software driver can support a maximum of 16 boards Therefore you can install up to 16 boards of PIO PSIO series in one PC system Here how to identify each address The easiest way to identify which card is card 0 is to use wSlotBus amp wSlotDevice as follows 1 Remove all PISO 730 730A from this PC 2 Install one PISO 730 730A into the PCI 901 run PISO EXE amp record the wSlotBus1 amp wSlotDevice1 3 Remove all PISO 730 730A from this PC 4 Install one PISO 730 730A into the PC 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 PCI slot WSlotBus wSlotDevice 0x07 0x08 0x09 Ox0A e PCI BRIDGE 0x0A 0x08 0x09 0x07 The above procedure will record all wSlotBus amp wSlotDevice in this PC These values will be mapped to this PC physical slot This mapping will not be changed for any PIO PISO cards Use it to identify the specified PIO PISO card as follows Step1 Record all wSlotBus amp wSlotDevice Step2 Use PIO GetConfigAddressSpace to get th
15. Aux 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 D I O init_high printf n n show the count of Low_pulse n for gotoxy 1 8 printf nNCOUNT_L 5d COUNT_L if kbhit 0 break disable outportb wBase 5 0 disable all interrupt if wlrq 8 setvect wlrq 8 oldfunc else setvect wlrq 8 0x70 oldfunc PIO_DriverClose PISO 730 730A User s Manual Ver 3 0 9 9 2004 44 tele tea ates i es he gt WORD init high DWORD dwVal disable outportb wBase 5 0 disable all interrupt if wirq lt 8 oldfunc getvect wirq 8 irgmask inportb A1 8259 1 outportb A1 8259 1 irqmask amp Oxff 1 lt lt wlrq setvect wirq 8 service else oldfunc getvect wirq 8 0x70 irgmask inportb A1 8259 1 outportb A1 8259 1 irqmask amp Oxfb IRQ2 irgmask inportb A2 8259 1 outportb A2 8259 1 irqmask amp Oxff 1 lt lt wlrq 8 setvect wirq 8 0x70 irq service outportb wBase 0x2a 0 invert DIO 7 now_int_state 0x1 now DIO is high 2 outportob wBase 5 0x1 enable DIO interrupt enable ee es ee eae 2 Be void interrupt s
16. ID 0x00 e Sub Aux ID 0x80 PISO 730 730A User s Manual Ver 3 0 9 9 2004 27 We provide the following all necessary functions as follows 1 PIO Driverlnit amp wBoard wSubVendor wSubDevice wSubAux 2 GetConfigAddressSpace wBoardNo wBase wlrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice 3 Show_PIO_PISO wSubVendor wSubDevice wSubAux All functions are defined in PIO H Refer to Chapter 4 for more information Here important driver information 1 Resource allocated information wBase BASE address mapping in this PC wirg IRQ channel number allocated in this PC 2 PIO PISO identification information wSubVendor subVendor ID of this board e wSubDevice subDevice ID of this board e wSubAux subAux ID of this board 3 PC physical slot information wSlotBus hardware slot ID1 in this slot position wSlotDevice hardware slot 1 2 in this slot position The utility program PIO PISO EXE aetects amp shows all PIO PISO cards installed in this PC Refer to Sec 4 1 for more information PISO 730 730A User s Manual Ver 3 0 9 9 2004 28 3 1 1 Driverlnit Driverlnit amp wBoards wSubVendor wSubDevice wSubAux wBoards 0 gt number of boards found in this PC wSubVendor 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 detects all PIO
17. Manual Ver 3 0 9 9 2004 35 3 3 5 Aux Status Register Bead Write 7 Note Refer to Sec 3 1 for more information about wBase 0 CHAN 0 Aux1 INT CHAN 1 Aux7 4 Aux ID Refer to Sec 4 1 for more information The Aux0 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 o b b b b JNVO Note Refer to Sec 3 1 for more information about wBase INV0 1 0 gt Selects the inverted signal from INT CHAN 0 1 INVO 121 Selects the non inverted signal from INT 0 1 outportb wBase 0x2a 0 Selects the invert input from all 2 channels outportb wBase 0x2a 0x3 Selects the non invert input from all 2 channels outportb wBase 0x2a 0x2 Selects the inverted input of INT CHAN 0 Selects the non inverted input of INT CHAN 1 Refer to Sec 2 6 7 for more information Refer to DEMO5 C for more information PISO 730 730A User s Manual Ver 3 0 9 9 2004 36 3 3 7 Data Register BeadWrite wBase 0xCO p joe os os Read Write wBase 0xC4 Dns Di4 943 fone pio po wBase 0xC8 p be s bm P Read Write wBase 0xCC pns ona pio
18. O 730 provides 32 channel isolated digital 16xDI and 16xDO and 32 channel TTL level digital 16xDI and 16xDO Each digital output offers a NPN transistor and an integral suppression diode for inductive loads The PISO 730A provides 32 channel isolated digital 16xDI and 16xDO 32 channel TTL level digital 16xDI and 16xDO Each digital output offers a PNP transistor and an integral suppression diode for inductive loads Both boards interface to field logic signals eliminate any ground loop problems and isolate the host PC from damaging voltages The isolated I O channels provide up to 3750Vdc of protection The PISO 730 730A has one 37 pin D type connector and two 20 pin flat cable connectors The flat cable can be connected to an ADP 20 PCI adapter The adapter can be fixed on the chassis installs in a 5V PCI slot and can support true Plug and Play 1 1 Features PCI Bus 32 isolated DIO channels 16xDI and 16xDO 32 TTL level DIO channels 16 01 and 16xDO 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 3750Vdc 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 730A User s Manual Ver 3 0 9 9 2004 3 1 2 S
19. Space i O wBaseAddress save all resource of this card wConfigSpace i 1 wlrq save all resource of this card step3 control the PISO 730 730A directly wBase wConfigSpace 0 0 get base address the card 0 l 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 730A User s Manual Ver 3 0 9 9 2004 30 3 1 3 Show PIO PISO Show PlSO wSubVendor wSubDevice wSubAux wSubVendor 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 shows a text string for these special subIDs This text string is the same as that defined in PIO H Here the demo program for this function wRetVal PIO Driverlnit amp wBoards Oxff Oxff Oxff find all PISO printf nThrer are d PISO Cards in this PC wBoards if wBoards 0 exit 0 printf n for i 0 iewBoards i PIO_GetConfigAddressSpace i awBase amp wirq amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf nCard_ d wBase x wlrq x SubID x x x SlotID x x i wBase wirq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice printf gt 7 ShowPioPiso wSubVendor wSubDevice wSubAux PISO 730 730A User s Manual Ver 3 0 9 9 2004
20. T CHAN 0 DIO LOW gt INT CHAN 0 generate a high pulse 7 now int 0 now DIOZLOW else now int state 1 now DIO HIGH doesn have to generate high pulse else now DIO is changed to HIGH c INT CHAN 0 DIO HIGH now l COUNT find a HIGH pulse DIO If inport wBase 7 amp 1 1 the DIO is still fixed in HIGH needs to generate a high pulse outportb wBase 0x2a 0 INVO select the inverted input INT CHAN Oz DIO LOW gt INT CHAN 0 generate a high pulse now int state 1 now DIO HIGH else now_int_state 0 now DIOZLOW doesn have to generate high pulse if wlrq gt 8 outportb A2 8259 0x20 outportb A1 8259 0 20 INT CHAN 0 PISO 730 730A User s Manual Ver 3 0 9 9 2004 17 2 3 5 nitial 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 and the DI1 is similarly Initial set now int state 0 initial state for DIO loutportb 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_0 DIO HIGH now COUNT_L find a LOW pulse DIO If inport
21. 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 D I O init printf n n show the count of High pulse n for gotoxy 1 8 printf nNCNT_L1 CNT_L2 5d 5d CNT_L1 CNT_L2 printf NCNT_H1 CNT_H2 5d 5d CNT_H1 CNT_H2 if kbhit 0 break disable outportb wBase 5 0 disable all interrupt if wlrq 8 setvect wlrq 8 oldfunc else setvect wlrq 8 0x70 oldfunc PIO DriverClose WORD init DWORD dwVal disable outportb wBase 5 0 disable all interrupt if wirq lt 8 oldfunc getvect wirq 8 irgmask inportb A1 8259 1 outportb A1 8259 1 irqmask amp Oxff 1 lt lt wlrq setvect wirq 8 service else oldfunc getvect wirq 8 0x70 irgmask inportb A1 8259 1 outportb A1 8259 1 irqmask amp Oxfb IRQ2 irgmask inportb A2 8259 1 outportb A2 8259 1 irqmask amp Oxff 1 lt lt wlrq 8 setvect wirq 8 0x70 service invert 0x1 outportob wBase 0x2a invert non invert DIO invert now int state 0x2 now DIO is low now is high outportob wBase 5 0x3 enable all interrupt enable void interrupt service int_num new int state inportb wBase 7 amp 0
22. a normal low level state 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 EN1202INT CHAN 1 disable EN1 13INT_CHAN_1 enable The INV1 can be used to invert non invert the DI1 as follows Refer to Sec 3 3 6 1 0 51 1 invert state of DI1 INV1 1 gt INT_CHAN_1 non invert state of 011 Refer to demo program for more information as follows DEMOS C gt for INT_CHAN_0 initial high 4 gt for INT CHAN 0 initial low DEMO5 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 730A User s Manual Ver 3 0 9 9 2004 16 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 DI1 is similarly Initial set now int state 1 initial state for DIO outportb wBase 0x2a 0 select the inverted DIO void interrupt irq_service if now int state 1 now DIO is changed to LOW a gt INT_CHAN_0 DIO HIGH now COUNT_L find a LOW pulse DIO Uu If inport wBase 7 amp 1 2z0 the DIO is still fixed in LOW gt needs to generate a high pulse outportb wBase 0x2a 1 INVO select the non inverted input b IN
23. al Ver 3 0 9 9 2004 11 2 2 44 Isolated DI Port Architecture The PISO 730 730A provides 16 channel isolated digital input Each of the isolated digital input can accept voltages from 3 5 30Vdc Each eight input channels share one external common end point IDIO IDI7 use El COM1 and 1218 10115 use EI COM2 IDIO 2K 1W 1 2KAW External power supply 3 5 30 Vdc External PISO 730 amp PISO 730A E E PISO 730 730A User s Manual Ver 3 0 9 9 2004 12 2 3 Interrupt Operation There are two interrupt sources in PISO 730 730A These two signals are named as INT CHAN 0 and INT 1 Their signal sources are given as follows INT CHAN 0 DIO INT CHAN 1 DI1 If only one interrupt signal source is used the interrupt service routine does not have to identify the interrupt source Refer to DEMO3 C and DEMOA C for more information If there is more than one interrupt source the interrupt service routine will identify the active signals as follows refer to DEMO5 C 1 Reads the new status of all interrupt signal sources refer to Sec 3 3 5 Compares the new status with the old status to identify the active signals If INT CHAN 015 active services it If INT CHAN 1 is active services it Updates interrupt status gro qu Note i
24. e release note 1 The location of the software driver amp utility 2 Howto install software amp utility 3 The location of the diagnostic program 4 FAQ Attention If any of these items are missing or damaged contact the dealer from whom you purchased the product Save all shipping materials and the carton in case you want to ship or store the product in the future PISO 730 730A User s Manual Ver 3 0 9 9 2004 6 2 Hardware configuration 2 1 Board Layout 2 1 1 V0 Z 0 7 OSId SNd 19 1e O4 1u09 2 2 z nooooooooo o 7 o N CON 1 16 channel isolated and 16 channel isolated D O CON2 16 channel TTL level non isolated D I CONG 16 channel TTL level non isolated D O JP1 Reserved PISO 730 730A User s Manual Ver 3 0 9 9 2004 7 2 2 Operation 2 2 1 Non isolated DO Port Architecture CON3 When the PC is powered up all operations of non isolated DO states are cleared to low state The RESET signal is used to clear non isolated DO states Refer to Sec 3 3 1 for more information about the RESET signal e The RESET is in Low state gt all non isolated DO states are clear to low state Here s block diagram of the non isolated DO RESET Data clear input Latch
25. e specified card wSlotBus amp wSlotDevice Step3 Identify the specified PIO PISO card by comparing the wSlotBus amp wSlotDevice in step2 to step1 Slot 7 PISO 730 730A User s Manual Ver 3 0 9 9 2004 32 3 3 Thel O Address Map A PIO PISO series card address is automatically assigned by the main board ROM BIOS The I O address can also be re assigned if needed It is strongly recommended not to change the I O address The plug amp play BIOS assigns the proper I O address for each PIO PISO series card Here are the of PISO 730 730A I O addresses Address Red O RESET control register WBase 2 control register WBase 5 mask control register 7 Aux pin status register Same WBase 0x2 INT polarity control register Same a pum C _ 0 4 8 Wbase 0xcc DI8 DI15 DO8 DO15 Note Refer to Sec 3 1 for more information about wBase PISO 730 730A User s Manual Ver 3 0 9 9 2004 33 3 3 1 RESET Control Register Read Write wBase 0 Note Refer to Sec 3 1 for more information about wBase When the PC is first powered up the RESET signal is in Low state This disables all D I O operations Please set the RESET signal to High state before issuing any D I O command outportb wBase 1 RESET High gt all D I O are enable now outportb wBase 0 RESET Low 2 all D I O are disable now 3 3 2 AUX Control Register
26. ector output board e DB 16P 16 channel isolated board e 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 e DB 37 37 pin D type connector pin to pin screw terminal for any 37 pin D type connector I O board 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 PCl series first generation isolated or non isolated cards PCI 1002 1202 1800 1802 1602 multi function family non isolated PCI P16R16 P16C16 P16POR16 P8R8 D I O family isolated PCI TMC12 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 I O family PIO DA16 DA8 DA4 D A family 3 PISO series cost effective generation isolated cards PISO 813 A D card PISO P32C32 P32A32 P64 C64 A64 D I O family PISO P8R8 P8SSR8AC P8SSR8DC D I O family PISO 730 730A D I O card PISO DA2 D A card PISO 730 730A User s Manual Ver 3 0 9 9 2004 3 1 5 Product Check list In addition to this manual the package includes the following items e One PISO 730 PISO 730A card e One company floppy diskette or CD e One release note Please read the release note first All of the following important information will be given in th
27. errupt source is used the interrupt service routine doesn t have to read the status of interrupt source The demo programs DEMOS C and DEMOA C are designed for single channel interrupt demo as follows amp DEMO4 C gt for INT CHAN 0 only PISO 730 730A User s Manual Ver 3 0 9 9 2004 14 2 3 2 INT CHAN O0 INT CHAN 0 SN Inverted Noninverted select INVO Enable Disable select ENO The INT CHAN must be fixed in a normal low level state and generate a high pulse to interrupt the PC The ENO can be used to enable disable the INT CHAN as follows refer to Sec 3 3 4 0 0 gt CHAN O disable ENO 1 INT CHAN 0 The INVO can be used to invert non invert the DIO as follows Refer to Sec 3 3 6 INVO 0 gt INT_CHAN_O invert state of DIO INVO21 INT CHAN state of DIO Refer to the following demo program for more information DEMOS C gt for INT CHAN 0 initial high DEMOA C gt for INT CHAN 0 initial low DEMO5 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 730A User s Manual Ver 3 0 9 9 2004 15 2 3 3 INT CHAN 1 INT CHAN 1 SN Inverted Noninverted select INV1 Enable Disable select EN1 The INT CHAN 1 must be fixed in
28. ervice if now int state 1 now DIO change to low INT_CHAN_O DIO COUNT Lc find a low pulse DIO if inporto wBase 7 amp 1 0 DIO still fixed in low need to generate a high pulse outportb wBase 0x2a 1 INVO select noninverted input now int state O0 now DIO low else now_int_state 1 now DIO High else now DIO change to high INT CHAN 0 DIO COUNT_H find a high pulse DIO if inporto wBase 7 amp 1 1 DIO still fixed in high need to generate a high pulse outportb wBase 0x2a 0 INVO select inverted input 7 now int state 1 now DlOzhigh else now_int_state 0 now DIO low if wlrq gt 8 outportb A2 8259 0x20 outportb A1 8259 0x20 PISO 730 730A User s Manual Ver 3 0 9 9 2004 45 4 5 4 DEMO4 C PISO 730 730A Interrupt DIO initial low step 1 DIO to function generator step 2 run DEMO4 EXE Yi Ee ae a ea elas xh include PIO H define A1 8259 0x20 define 2 8259 define EOI 0x20 WORD init low void interrupt oldfunc static void interrupt irq_service int COUNT L COUNT Hiirqmask now int state void piso 730 do long IDoValue long piso 730 di void void piso 730 ido long IDoValue long piso 730 idi void WORD wBase wlrq int main int i j K k1 k2 11 12 jj dd j1 i1 j2 i2 WORD wBoards
29. f 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 a micro second or as long as a second In general 20ms is enough for any O S PISO 730 730A User s Manual Ver 3 0 9 9 2004 13 2 3 1 Interrupt Block Diagram of PISO 730 730A INT CHAN 0 INT CHAN 1 INT Level trigger 0 initial low active high The interrupt output signal of PISO 730 730A INT is a level trigger Active Low signal If the INT generates 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 INT CHAN 0 1 must be controlled by pulse type signals They must be fixed in low level state normally and generate a high pulse to interrupt the PC The priority of INT CHAN 0 1 is the same If these two signals are active at the same time then INT will be activated only once So the interrupt service routine has to read the status of all interrupt channels for a multi channel interrupt Refer to Sec 2 6 7 for more information DEMOBS C gt for multi channel interrupt source If only one int
30. ge model library file MSC LIB Huge PIO H gt MSC declaration file MSC LIB Huge MSCPIO_H LIB gt MSC huge model library file e BC LIB Large PIO H gt BC declaration file e BC LIB Large BCPIO_L LIB gt BC large model library file e BC LIB Huge PIO H gt BC declaration file e BC LIB Huge BCPIO_H LIB gt BC huge model library file NOTE The library is available for all PIO PISO series cards PISO 730 730A User s Manual Ver 3 0 9 9 2004 38 4 1 PIO PISO rrr Find all PIO PISO series cards in this PC system step 1 plug all PISO cards into PC Ei step 2 run PISO EXE WS A include PIO H WORD wBase wlrq WORD wBase2 wlrq2 int main int ij j1 j2 j9 j4 k jj dd j11 j 22 j33 j44 WORD wBoards wRetVal WORD wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice char C float ok err clrscr wRetVal PIO_Driverlnit amp wBoards Oxff Oxff Oxff for PIO PISO printf nThere are d PIO_PISO Cards this PC wBoards if wBoards 0 exit 0 printf n for i 0 iewBoards i PIO_GetConfigAddressSpace i awBase amp wirq amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf nCard_ d wBase x wlrq x subID x x x SlotID x x i wBase wirq wSubVendor wSubDevice wSubAux wSlotB
31. he 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 that acts as a current senser Use the DB 16P to sense DC signals from TTL levels up to 24V or use the DB 16P to sense a wide range of AC signals This board can also isolate the computer from large common mode voltages ground loops and transient voltage spikes that often occur in industrial environments PISO 730 730A Photo Isolated PISO 730 730A 20Pin cable 2 AC or DC Signal OV to 24V PISO 730 730A User s Manual Ver 3 0 9 9 2004 21 2 4 2 DB 16R Relay Board The DB 16R is a 16 channel relay output board consisting of 16 form C relays for optimum program controlled load switching efficiency The relays are energized by applying a 12V 24V voltage signal to the appropriate relay channel on the 20 pin flat connector There are 16 enunciator LEDs for each relay which light when their associated relay is activated Form C Relay Note Channel 16 Form C Relay Relay Switches up to 0 5A at 110ACV or 1A at 24DCV PISO 730 730A PISO 730 730A User s Manual Ver 3 0 9 9 2004 22 2 4 3 DB 24PR DB 24POR DB 24C DB 24PR 24 power relay 5A 250V B 24POR 24 photoMOS relay 0 1A 350VAC DB 24C 24 open collector 100mA per channel 30V max The DB 24PR is a 24 channel power relay output board It cons
32. ists of 8 form C and 16 form A electromechanical relays providing efficient program controlled load switching Each relay contact can control a 5A load at 250ACV 30VDCV The relay is energized by applying a 5 volt signal to the appropriate relay channel on the 20 pin flat cable connector only 16 are used 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 power supply this board needs a 12VDC or 24VDC external power supply Normal Open Form A Relay 20 50 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 Relays Relay Switches up to 5A at 110ACV 5A at 30DCV PISO 730 730A User s Manual Ver 3 0 9 9 2004 23 2 4 4 Daughter Board Comparison Table LIAE header was 71 08 37 37 No DB 4PD No jYes Ye Yes Yes DB 24PR Yes Db 24PRD DB 24POR west 17 DB24SSR _ NOTE The PISO 730 730A has two 20 pin flat cable headers and one 37 pin D type Connector PISO 730 730A User s Manual Ver 3 0 9 0 2004 24 2 5 Pin Assignment 2 5 1 Isolated I O connector CON1 The 37 pins of the D type female connector 3
33. m 2 m __2 i w 1014 1015 o ms mo Di C SS 4 26 IDI14 L ons mw i mo 3 apes 04 007 15 8 3 woo 16 wo 3 17 IDO12 36 IDO13 18 IDO14 IDO15 19 _ __ 2 5 2 JP1 Note Reserved 2 4 6 8 JP1 B OOO COO 1 3 5 7 PISO 730 730A User s Manual Ver 3 0 9 0 2004 25 2 5 3 TTL level I O connector CON2 The 20 pins of the flat cable connector Description Description All signals are TTL compatible PISO 730 730A User s Manual Ver 3 0 9 9 2004 26 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 during the power up stage The fixed IDs of PIO PISO series cards are given as follows PISO 730 lt Rev1 0 Rev2 0 gt Vender ID OxE159 Device ID 0x02 e Sub Vendor ID 0x80 e Sub Device ID 0x08 e Sub Aux ID 0x40 PISO 730 lt Rev3 0 gt e Vender ID OxE159 Device ID 0x01 Sub Vendor ID Oxc2ff e Sub Device ID 0x00 Sub Aux ID 0x40 PISO 730A lt Rev3 0 gt Vender ID OxE159 e Device ID 0x02 e Sub Vendor ID 0x80 Sub Device ID 0x08 e Sub Aux ID 0x80 PISO 730A lt Rev4 0 gt e Vender ID OxE159 Device IDz 0x01 e Sub Vendor ID 0 62 e Sub Device
34. nt state 1 now DIO change to low INT CHAN 0 DIO COUNT Lc find a low pulse DIO if inporto wBase 7 amp 1 0 DIO still fixed in low need to generate a high pulse outportb wBase 0x2a 1 INVO select noninverted input now_int_state 0 now DIO low else now_int_state 1 now DIO High else now DIO change to high INT CHAN 0 DIO A COUNT_H find a high pulse DIO if inporto wBase 7 amp 1 1 DIO still fixed in high need to generate a high pulse outportb wBase 0x2a 0 INVO select inverted input 7 now int state 1 now DlOzhigh E else now_int_state 0 now DIO low a if wlrq gt 8 outportb A2 8259 0x20 outportb A1 8259 0x20 PISO 730 730A User s Manual Ver 3 0 9 9 2004 47 4 6 5 PISO 730 730A Interrupt Multi interrupt source DIO initial low initial high zi step 1 connect 010 amp 011 to function generator step 2 run DEMO5 EXE a a A A 2 1 37 include PIO H define A1_8259 0x20 define A2 8259 OxAO define 0x20 WORD init void interrupt oldfunc static void interrupt irq_service int irqmask now_int_state new_int_state invert int_c int_num int CNT_L1 CNT_L2 CNT_H1 CNT_H2 WORD wBase wlrq int main int i j k WORD wBoards wRetVal t1 t2 t3 t4 t5
35. pecifications Isolated DIO channels e Optical isolated input channel Channel Number 16 digital inputs Type Isolated current input Isolation voltage 3750Vdc Input voltage 5 30Vdc Input impedance 1 2KQ 1W Response time 10KHz Max e Optical isolated output channel Channel Number 16 digital outputs Output voltage open collector 10 30Vdc Isolation voltage 3750Vdc Current Sinking PISO 730 100mA Max Current Sourcing PISO 730A 100mA Max Response time 10KHz Max TTL level DIO channels TTL level input channel Channel Number 16 digital inputs Input voltage level TTL compatible 0 8V Max 2 4V Min TTL level output channel Channel Number 16 digital outputs 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 of PISO 730 640mA Power consumption of PISO 730A 600mA PISO 730 730A User s Manual Ver 3 0 9 9 2004 1 3 Order Description e PISO 730 16 channel isolated digital input amp 16 channel isolated digital output current sinking board e PISO 730A 16 channel isolated digital input amp 16 channel isolated digital output current sourcing board 1 3 1 Options DB 24PR DB 24PR 24 channel power relay board DB 24POR 24 channel PhotoMos output board DB 24C 24 channel open coll
36. us wSlotDevice printf gt 7 ShowPioPiso wSubVendor wSubDevice wSubAux PIO_DriverClose NOTE the PIO PISO EXE is valid for all PIO PISO cards It is located in TC DIAG directory Execute the PIO PISO EXE to get the following information Alist all PIO PISO cards installed in this PC e Alist all resources allocated to every PIO PISO cards e Alist the wSlotBus amp wSlotDevice for specified PIO PISO card identification Refer to Sec 3 2 for more information PISO 730 730A User s Manual Ver 3 0 9 9 2004 39 4 1 1 PISO EXE for Windows PIO PISO EXE is a software utility for Windows95 98 For detailed information about this file please refer to the readme txt of your Windows 95 98 development toolkit It is useful for all PIO PISO series cards Here are the setup steps from the CD ROM e Step1 Toolkit Software Manuals Step2 1 Agree e Step3 PCI Bus DAQ Card Step4 PIO PISO e Step5 Installs Toolkits for Windows95 98 Step6 After installation this program will be extracted in user define directory After executing the utility all detailed information for all PIO PISO cards installed in the PC will be shown as follows f PIO PISO series card 0 0001 0 Board Name Base Address IRQ Number PISO 730 730A User s Manual Ver 3 0 9 9 2004 40 4 2 DEMO1 DEMO1 C PISO 730 730A D O demo step 1 connect CONS to
37. x3 int int state now int state if int_c amp Ox1 0 now INT CHAN 0 change to high 7 if new int state amp 0x01 20 _ 1 else now INT CHAN 0 change to low ONT 11 invert invert 1 generate a high pulse iH if int_c amp 0Ox2 0 now INT CHAN 1 change to high 7 if new int state amp 0x02 20 2 else now INT CHAN 1 change to low 12 invert invert 2 generate a high pulse 5 now int state new int state outportob wBase 0x2a invert if wlrq gt 8 outportb A2 8259 0x20 outportb A1 8259 0x20 PISO 730 730A User s Manual Ver 3 0 9 9 2004 49

Download Pdf Manuals

image

Related Search

PISO 730/730A

Related Contents

Layher del Pacífico S.A. MANUAL DEL USUARIO LAYWEB  100 und 180 mm papierloser Graphikschreiber  Panasonic NC-DF1WXE coffee maker    Manuale di istruzioni in italiano  Instruções de Operação Plattformwaage  Doc complet memoires Journee 2010  manual de usuario pcdi-10v cdi programable y  

Copyright © All rights reserved.
Failed to retrieve file