Home

Omega OME-PIO-D144 User's Manual

image

Contents

1. pBpeee tgt yxy g 2T return end of while PIO DriverClose OME PIO D144 User s Manual 2 1 8 2001 o 47 4 8 10 Find Card Number demo 10 Find card number step 1 run demol0 exe step 2 connect a 50 pin flat cable to CON2 amp CON3 of card_ step 3 The card number is shown in screen as TEST OK include PIO H WORD wBase wIrq WORD wBoards wRetVal WORD wBase wIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice int main Int clrscr DriverInit amp wBoards 0x80 0x01 0x00 for OME PIO D144 printf n 1 Threr are d OME PIO D144 Cards in this PC wBoards if wBoards 0 putch 0x07 putch 0x07 putch 0x07 printf 1 There are no OME PIO D144 card in this PC n exit 0 printf n 2 The Configuration Space gt wBase for i 0 i lt wBoards i GetConfigAddressSpace i amp wBase amp wIrq amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf NnCard sd wBase x wIrq x subID x x x SlotID x x i wBase wIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice GetConfigAddressSpace 0 amp wBase amp amp wSubVendor amp wSubDevice B amp wSubAux amp wSlotBus amp wSlotDevice for 77 printf n press any key to stop for 0 i lt wB
2. amp 0 01 0 cc new int state amp 0x01 if cc 1 0 1 else 11 invert invert 1 4 IF is active if int c amp 0x02 0 cc new int state amp 0x02 if 0 else CNT_L2 invert invert 2 5 IF PC2 is active if int c amp 0x04 0 cc new int state amp 0x04 if 0 H3 else 13 invert invert 4 6 IF PC3 is active if int c amp 0x08 0 cc new int state amp 0x08 if 1 0 4 else 1444 invert invert 8 now int state new int state outp wBase 0x2a invert if wIrq gt 8 outp A2 8259 0x20 1 8259 0x20 OME PIO D144 User s Manual Ver 2 1 Sep 2001 12 2 6 Daughter Boards 2 6 1 OME DB 37 The OME DB 37 is a general purpose daughter board with D sub 37 pin connector It is designed for easy wire connection m OME DB 37 te In 2 6 2 37 50 OME DN 37 is a general purpose daughter board for D sub 37 pin connector OME DN 50 is designed for 50 pin flat cable header They are designed for easy wire connection Both boards are DIN rail mountable OME DN 37 2 6 3 OME DB 8125 The OME DB 8125 is general purpose
3. step 6 configure all I O port outp 0 8 0x00 1 to CN2 port are all output outp 0 0x00 CN3 to CN4 port are all output outp 0 0x00 CN5 to CN6 port are all output K PA PB PC xj OME PIO D144 User s Manual Ver 2 1 Sep 2001 en 37 0 1 2 gt key 0 CN2 K 3 4 5 key 3 CN3 K 6 7 8 gt key in 6 CN4 K 9 10 11 gt key in 9 CN5 K 12 13 14 gt key in 12 CN6 15 16 17 gt key in 15 printf NMnkz scanf d amp k for jjek 3jj 3 k 3344 PA PB PC outp wBase 0xc4 jj select the active port printf nSelect 54 33 outp wBaset 0xc0 0x55 D O 0x55 printf D O 0x55 getch outp 0 0 0xAA D O 0xAA printf D O 0xAA getch outp 0 0 0 1 getch outp wBase 0xc0 0x2 getch PA1 PB1 PC1 outp wBase 0xc0 0x4 getch PA2 PB2 PC2 outp 0 0 0 8 getch PA3 PB3 PC3 outp wBase 0xc0 0x10 getch PA4 PB4 PC4 outp wBase 0xc0 0x20 getch PA5 PB5 PC5 R outp wBase 0xc0 0x40 getch 6 6 6 outp wBase 0xc0 0x80 getch 7 7 7 DriverClose This demo program is designed for CN1 CN6 The user can install OM
4. application codes are given here outpd wBase 0x2a 0 select the non inverted signal if wIrq 8 outp A2 8259 0x20 outp Al 8259 0x20 Refer to DEMOA C for source code OME PIO D144 User s Manual Ver 2 1 Sep 2001 232210 Example 3 assume is initial Low active High CNI PCI is initial High active Low CNI PC2 is initial Low active High CNI PC3 is initial High active Low As follows PCO PC2 CN1 PCO amp PCO amp PCI active at the return to normal time at the same time PC2 amp PC2 amp are active at the same return to normal time at the same time Refer to DEMOS C for source program All these four 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 maybe all active at the same time So the interrupt service routine has to service all active signals at the same time OME PIO D144 User s Manual Ver 2 1 Sep 2001 rn 11 void interrupt service int num tt 1 Read interrupt signal status new int state inp wBase 0x07 amp Oxff 2 Find the active signal int c new int state now int state 3 IF PCO is active if
5. cc new int state amp 0x02 if 0 2 invert invert 2 int_c amp 0x04 0 cc new int state amp 0x04 if 0 invert invert 4 int_c amp 0x08 0 cc new int state amp 0x08 if 0 invert invert 8 else else else else now int state new int state outp wBase 0x2a invert if CNT_L1 CNT_L2 13 14 wIrq 8 outp A2 8259 0 20 outp 1 8259 0 20 OME PIO D144 User s Manual Ver 2 1 2001 47 DEMO 6 Outport of CN1 CN6 1 1 WO WO 1 pr if ex pr fo demo 6 D O demo step 1 connect a OME DB 24C to of 144 step 2 run DEMO6 EXE step 3 check the LED s of OME DB 24C turn on sequentially nclude nclude OME PIO D144 H t main t dj arse RD wBoards RD wBase wIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice rscr DriverInit amp wBoards 0x80 0x01 0x00 for OME PIO D144 intf Nn 1 Threr are d OME PIO D144 Cards in this PC wBoards wBoards 0 putch 0x07 putch 0x07 putch 0x07 printf 1 There are no OME PIO D144 card in this PC n it 0 intf n 2 The Configuration Space gt wBase r i 0 i wBoards i
6. include PIO H int main int WORD wBoards wRetVal WORD wBase wIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice char c clrscr DriverInit amp wBoards 0x80 0x01 0x00 for OME PIO D144 printf 1 There are d OME PIO D144 Cards in this PC wBoards if wBoards 0 putch 0x07 putch 0x07 putch 0x07 printf 1 There are no OME PIO D144 card in this PC n exit 0 printf n 2 The Configuration Space gt wBase for i 0 i wBoards i GetConfigAddressSpace i amp wBase amp wIrq amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf nCard_ d wBase x wlrg x subID x 3x SlotID x x i wBase wIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice select card 0 GetConfigAddressSpace 0 amp wBase amp wIrq amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice step 1 make sure which ports are D O ports in this demo gt all D O ports are output port iy step 2 enable all D I O port outp wBase 1 enable D I O step 3 select the active port step 4 send initial value to D O latch register of active port step 5 repeat for all D O ports for 0 1 lt 18 i outp wBaset 0xc4 i select CN1 to CN6 port outp wBaset 0xc0 0 set 8 bit D O latch register
7. GetConfigAddressSpace i amp wBase amp amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBu S amp wSlotDevice printf NnCard d wBase x wIrq x subID x x x SlotID x x i wBase wIrq wSubVendor wSubDevice wSub Aux wSlotBus wSlotDevice GetConfigAddressSpace 0 amp wBase amp wIrq amp wSubVendor amp wSubDevice 39d h O0 O HT TY GaGa Ga G amp G amp wSubAux amp wSlotBu intf n 3 Card 0 D O test wBase x tp D144 Disable Reset DIO of D1 tp D144 Enable tp IO SCRO 0x00 ile 1 ret 1 1 1 lt 0 80 1 1 lt lt 1 intf nCN1 PA 02xH 02 02 tp Act IOPCR CN1 RW 8BitDR i Act IOPCR CN1 PB RW 8BitDR i Act IOPCR CN1 PC tp RW 8BitDR i 1 1 1 1 lt 0 80 1 1 lt lt 1 intf nCN2 PA 02xH 02 02 tp Act IOPCR CN2 tp RW 8BitDR i tp Act IOPCR CN2 PB tp RW 8BitDR i tp tp tp tp tp tp Act IOPCR CN2 PC RW 8BitDR i OME PIO D144 User s Manual Ver 2 1 Sep 2001 S amp wSlotDevice xxx wBase 44 press Q to stop i i i press Q to stop i i i 46 Qo fa m utp IO_SCR1 0x00 cinti 1 1 1 lt 0 80 1 1 lt lt 1 intf nCN3 0
8. amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf nCard_ d wBase x wIrq x subID x x x SlotID x x 1 wBase wIrg wSubVendor wSubDevice wsubAux wSlotBus wSlotDevice printf gt ShowPioPiso wSubVendor wSubDevice wSubAux OME PIO D144 User s Manual Ver 2 1 Sep 2001 25 3 2 Assignment of I O Address The Plug amp Play BIOS will assign the proper I O address to OME PIO PISO series card If there is only one OME PIO PISO board the user can identify the board as card_0 If there are two OME PIO PISO boards in the system the user will be very difficult to identify which board is card 0 The software driver can support 16 boards max Therefore the user can install 16 boards of OME PIO PSIO series in one PC system How to find the card 0 amp 12 The simplest way to identify which card is card_0 is to use wSlotBus amp wSlotDevice as follows 1 Remove all OME PIO D144 from this PC 2 Install one OME PIO D144 into the PC s PCI slotl run PISO EXE amp record the wSlotBus1 amp wSlotDevicel 3 Remove all OME PIO D144 from this PC 4 Install one OME PIO D144 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 Sl
9. 4 HARDWARE CONFIGURATION eere 5 2 1 BOARD bAYOUT dite on RU ORIGO RR d RD 5 2 2 6 2 3 ENABLE OPERATION GUI E ITE 6 2 4 D I O ARCHITECTURE Se 7 2 5 INTERRUPT OPERATION eise e d ir 8 2 6 DAUGHTER 13 2 6 1 OME DB 37 ee ea et ec timenda emm 13 2 6 2 OME DN 37 amp 50 0 2 2 420 0000000000 13 2 6 3 25 e uina rg et Lr eoe e i oett pede ds 13 2 6 4 OME ADP 37 PCI amp OME ADP 50 PCI essere 14 2 6 5 OME DB 24P 24PD Isolated Input see 15 2 6 6 OME DB 24R 24RD Relay Board seen eene 16 2 6 7 OME DB 24PR24POR 24C inte a e tei edes 17 2 6 8 Daughter Board Comparison Table 18 2 7 PINXSSIGNMENIT je esee ter diam HOT OTHER Ee OR 19 CONTROL 21 3 1 How TO FIND THE I O 5 21 3 1 PIO Driverhnit edt te te i e Ete eee nett 23 3 1 2 GetConfigAddressSpace 24 3 23 ShowzPIO PISO o ie 25 3 2 THE ASSIGNMENT OF I O 26 3 3 TREVO ADDRESS e pite ee evite re r
10. 4 0 outp 0 0 0x55 outp 0 4 1 outp 0 0 0 4 2 outp 0 0 5 c getch if c Q printf nCN1 PA 0xAA outp 0 4 0 outp 0 0 0 4 1 outp 0 0 0x55 0 4 2 outp 0 0 5 c getch if c Q PIO DriverClose CN3 to CN4 port are all output CN5 to CN6 port are all output PB 0xAA PB 0x55 select CN1_ set 1 PA select CN1_ set CN1 select set CN1 PC b select CN1_ set CN1 PA select set CN1 select set CN1 PC c gqi yb OME PIO D144 User s Manual Ver 2 1 Sep 2001 PC 0x5A PA 0x55 PB reak PC 0xA5 PA OxAA PB 0x55 PC OxA5 reak press Q to stop Kof press Q to stop 0 36 4 3 2 Use D O CN1 CN6 demo 2 D O demo for CN1 CN6 step 1 connect OME DB 24C to CN6 of OME PIO D144 7 step 2 run DEMO2 EXE step 3 check the LED s of OME DB 24C turn on sequentially
11. all D O ports Step 6 Configure all eighteen D I O ports to their expected D I or D O state Refer to Sec 3 3 9 Refer to DEMOI C for demo program OME PIO D144 User s Manual Ver 2 1 Sep 2001 6 2 4 Architecture select Sec 3 3 9 RESET Sec 3 3 1 disable input Latch Sec 3 3 7 D O latch CKT disable Buffer input Sec 3 3 7 Clock input D I buffer CKT The RESET is in Low state gt all D I O operation is disable The RESET is in High state gt all D I O operation is enable f D I O is configured as port gt D I external input signal e If D I O is configured as D O port gt read back of D O f D I O is configured as port gt send to D O will change the D O latch register only The D I amp external input signal will not change OME PIO D144 User s Manual 2 1 Sep 200 gt 2 5 Interrupt Operation The PCO PCI PC2 of CN1_PC be used as interrupt signal source Refer to Sec 2 1 for 1 2 3 location The interrupt of OME PIO D144 is level trigger amp Active High The interrupt signal can be programmed to inverted or non inverted state The programming procedure is as follows 1 make sure the initial level is High or Low 2 if the initial state is High gt select the inverted signal Section 3 3 6 3 ifthe initial state is Low select the non inverted signal Section 3 3 6 4 enable the INT function Section
12. external interrupt signal WORD init_low DWORD dwVal disable outp 5 0 disable all interrupt if wIrq 8 irqmask inp Al 825941 outp Al 825941 amp Oxff 1 lt lt wIrq setvect wIrgt 8 service else irqmask inp Al 825941 outp Al 8259 1 amp Oxfb IRQ2 outp Al 8259 1 irgmask amp Oxff 1 lt lt wIrq irqmask inp A2 825941 outp A2 825941 amp Oxff 1 lt lt wIrq 8 setvect wIrq 840x70 irq service invert 0x05 outp wBase 0x2a invert PCO non inverte input 1_ 1 inverte input PC2 non inverte input e CN1 non inverte input now int state 0x0a Now PCO low m 1_ 1 high CN1 2 low a CN1 PC3 high L1 CNT L2 CNT L3 CNT 14 0 low pulse count H1 CNT H2 CNT H3 CNT H4 0 high pulse count int num 0 outp 5 0x0f enable interrupt 1 2 of 1 enable void interrupt irq service char cc int_numt new int state inp wBase 0x07 amp 0xff int c new int state now int state OME PIO D144 User s Manual Ver 2 1 Sep 2001 44 if if if int c amp 0x01 0 cc new int state amp 0x01 if 0 1 invert invert 1 int_c amp 0x02 0
13. i amp wBase amp wIrq amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf nCard wBase x wIrq x subID x x x SlotID x x i wBase wIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice select card 0 GetConfigAddressSpace 0 amp wBase amp wIrq amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf n 3 Card 0 wBaseAddr x wBaseAddr COUNT 0 outp 0 8 port 0 to port 5 are all input printf Nn 4 show the count of High pulse n init low for printf nCOUNT d COUNT if kbhit 0 getch break OME PIO D144 User s Manual Ver 2 1 Sep 2001 rn 39 outp wBaset5 0 disable all interrupt PIO DriverClose y Use PCO as external interrupt signal WORD init_low DWORD dwVal disable outp 5 0 disable all interrupt if wIrq 8 irqmask inp Al 825941 outp Al 825941 irqmask amp Oxff 1 lt lt wIrq setvect wIrgt 8 service else irqmask inp Al 825941 outp Al 825941 irqmask amp Oxfb IRQ2 outp Al 8259 1 irqmask amp Oxff 1 lt lt wIrq irqmask inp A2 825941 outp A2 825941 irqmask amp Oxff 1 lt lt wIrq 8 setvect wIrg 8 0x70 service outp 0 2 0 select the non inve
14. screw terminal board It is designed for easy wire connection There is one D Sub37 amp two 20 pin flat cable headers on the OME DB 8125 37pin cable OME DB 8125 D Sub37 or 20 flat cable header OME PIO D144 User s Manual Ver 2 1 Sep 2001 13 2 6 4 OME ADP 37 PCI amp OME ADP 50 PCI OME ADP 37 PCI amp OME ADP 50 PCI are extenders for the 50 pin headers One side of the OME ADP 37 PCI amp OME ADP 50 PCI can be connected to a 50 pin header The other side can be mounted on the PC chassis as following OME ADP 37 PCI 50 pin header to D Sub37 extender OME ADP 50 PCI 50 pin header to 50 pin header extender OME PIO D144 User s Manual Ver 2 1 Sep 2001 14 2 6 5 OME DB 24P 24PD Isolated Input Board The OME DB 24P is a 24 channel isolated digital input daughter board The optically isolated inputs of the OME DB 24P consist of a bi directional opto coupler with a resistor for current sensing You can use the OME DB 24P to sense DC signal from TTL levels up to 24V or use the OME DB 24P to sense a wide range of AC signals You can use this board to isolate the computer from large common mode voltage ground loops and transient voltage spike that often occur in industrial environments OME PIO D144 Opto Isolated OME PIO D144 AC or DC Signal OV to 24V OME DB 24P OME DB 24PD 50 pin flat cable header Yes Yes D sub 37 pin header N
15. second In general 20ms is enough for most operating systems OME PIO D144 User s Manual Ver 2 1 Sep 2001 8 Example 1 assume initial level Low PCO is used as interrupt source Initial Low Iniaial_sub now_int_state 0 _outpd wBase 0x2a 0 select the non inverted signal ISR_sub If now_int_state 0 old state low gt change to high now now_int_state 1 now int_signal is High application codes given here _outpd wBase 0x2a 1 select the inverted signal else old state high gt change to low now now int state 0 now int signal is Low int 515 application codes are given here _outpd wBase 0x2a 0 select the non inverted signal if gt 8 outp A2 8259 0x20 1 8259 0x20 Refer DEMO3 C for source code OME PIO D144 User s Manual Ver 2 1 Sep 2001 Example 2 assume initial level High PCO is used as interrupt source i Iniaial sub now int state 1 _outpd wBase 0x2a 1 select the inverted signal ISR_sub If now_int_state 0 old state low gt change to high now now_int_state 1 now int_signal is High i application codes are given here outpd wBase 0x2a 1 select the inverted signal T else old state high change to low now now_int_state 0 now int_signal is Low 7
16. the use of its products in accordance with information provided by OMEGA either verbal or written OMEGA warrants only that the parts manufactured by it will be as specified and free of defects OMEGA MAKES NO OTHER WARRANTIES OR REPRESENTATIONS OF ANY KIND WHATSOEVER EXPRESS OR IIVIPLIED EXCEPT THAT OF TITLE AND ALL IMPLIED WARRANTIES INCLUDING ANY WARRANTY OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE HEREBY DISCLAIMED LIMITATION OF LIABILITY The remedies of purchaser set forth herein are exclusive and the total liability of OMEGA with respect to this order whether based on contract warranty negligence indemnification strict liability or otherwise shall not exceed the purchase price of the component upon which liability is based In no event shall OMEGA be liable for consequential incidental or special damages CONDITIONS Equipment sold by OMEGA is not intended to be used nor shall it be used 1 as a Basic Component under 10 CFR 21 NRC used in or with any nuclear installation or activity or 2 in medical applications or used on humans Should any Product s be used in or with any nuclear installation or activity medical application used on humans or misused in any way OMEGA assumes no responsibility as set forth in our basic WARRANTY DISCLAIMER language and additionally purchaser will indemnify OMEGA and hold OMEGA harmless from any liability or damage whatsoever arising out of the use of the Product s in su
17. wSubDevice wSubAux wBoards 0 to gt Number of boards found in this PC 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 can detect all OME PIO PISO series card in the system It is implemented based on the PCI Plug amp Play mechanism It will find all OME PIO PISO series cards installed in this system amp save all their resources in the library Find all PIO PISO in this PC Step 1 Detect all OME PIO PISO series in this PC wRetVal PIO_DriverlInit amp wBoards Oxff Oxff Find all OME PIO PISO printf nThrer are od OME PIO PISO Cards in this PC wBoards if wBoards 0 exit 0 Step2 Save resource of all OME PIO ISO cards installed in this PC printf n for i 0 i lt wBoards i PIO_GetConfigAddressSpace i amp wBase amp wlrq amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf nCard_ d wBase x wIrq x subID x x x SlotID x x 1 wBase wIrg wSubVendor wSubDevice wsubAux wSlotBus wSlotDevice printf gt ShowPioPiso wSubVendor wSubDevice wSubAux Step1 Detect all OME PIO D144 cards first wSubVendor 0x80 wSubDevice 0x01 wSubAux 0x00 for PIO D144 wRetVal PIO_DriverInit amp wBoards wSubVendor wSubDevice wSubAux printf Threr are d OME PIO D144 Cards in this PC n wBoards Step2 Save resource of all
18. 0x00 We provide all necessary functions as following 1 PIO_DriverInit amp wBoard wSubVendor wSubDevice wSubAux 2 GetConfigAddressSpace wBoardNo wBase wlIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice 3 Show PIO PISO wSubVendor wSubDevice wSubAux functions are defined in PIO H Refer to Chapter 4 for more information The important driver information is given as following 1 Resource allocated information wBase BASE address mapping in this PC wlrq IRQ channel number allocated in this PC 2 PIO PISO identification information wSubVendor subVendor ID of this board wSubDevice subDevice ID of this board e wSubAux subAux ID of this board 3 PC s physical slot information wSlotBus hardware slot ID1 in this PC s slot position wSlotDevice hardware slot ID2 in this PC s slot position The utility program PISO EXE will detect amp show all OME PIO PISO cards installed in this PC OME PIO D144 User s Manual Ver 2 1 Sep 2001 ere 21 sub IDs of OME PIO PISO series card are given as following OME PIO PISO series card Description Sub vendor Sub device Sub AUX OME PIO D144 Rev 4 0 144 D I O 5C80 01 00 OME PIO D96 Rev 4 0 96 5880 01 10 OME PIO D64 Rev 2 0 64 DA O 4080 01 20 OME PIO D56 Rev 60 24 D I O C080 01 40 16 D I 16 D O OME PIO D48 R
19. 2 02 02 press to stop i i i tp Act IOPCR CN3 RW 8BitDR i Act IOPCR CN3 PB RW 8BitDR i Act IOPCR CN3 PC tp RW 8BitDR i leep 1 rint n 1 1 1 lt 0 80 1 1 lt lt 1 intf nCN4 02 02 02 press to stop i i i IOPCR CN4 PA RW 8BitDR i Act _IOPCR CN4 PB RW 8BitDR i Act PC tp RW 8BitDR i 1 SCR2 0x00 intf n 1 1 1 lt 0 80 1 1 lt lt 1 intf nCN5 02 02 02 press to stop i i i IOPCR CN5 RW 8BitDR i Act IOPCR CN5 PB RW 8BitDR i Act IOPCR CN5 PC tp RW 8BitDR i leep 1 rintf Nn s 1 1 1 lt 0 80 1 1 lt lt 1 intf nCN6 02 02 02 press to stop i i i tp IOPCR CN6 RW 8BitDR i Act IOPCR CN6 PB RW 8BitDR i Act IOPCR CN6 PC tp RW 8BitDR i sleep 1 if 1 0 80 1 0 01 break if kbhit 0 tp tp tp tp tp tp tp tp nOO0000 O O r c tp tp tp tp YO 0 eaacaaa tp tp tp tp 00000 0 D fer c getch LE
20. 3 3 4 5 Ifthe interrupt signal is active program will transfer into the interrupt service routine if INT signal is High now select the inverted input gt if INT signal is Low now gt select the non inverted input Refer to DEMO3 C amp DEMOA C for single interrupt source Refer to DEMOS for four interrupt sources If only one interrupt signal source is used the interrupt service routine does not have to identify the interrupt source Refer to DEMO3 C amp DEMOA C If there are more than one interrupt source the interrupt service routine has to identify the active signals as following refer to DEMOS C Read the new status of the interrupt signal source Compare the new status with the old status to identify the active signals If PCO is active service amp non inverter inverted the signal is active service PCI amp non inverted inverted the CN1 PCI signal If PC2 is active service 2 amp non inverted inverted the 1 PC2 signal If PC3 is active service amp non inverted inverted the 1 signal Save the new status to old status zd cbe ae Rr Note If the interrupt signal is too short the new status may be as same as old status So the interrupt signal must be held active until the interrupt service routine is executed This hold time is different for different operating systems The hold time can be as short as micro second or as long as
21. E DB 24C into CN6 of OME PIO D 144 This demo will request the user to input a number K as following If the OME DB 24C is installed in CN1 gt key in 0 If the OME DB 24C is installed in CN2 gt key in 3 If the OME DB 24C is installed in CN3 gt key in 6 If the OME DB 24C is installed in CN4 gt key in 9 If the OME DB 24C is installed in CN5 gt key in 12 If the OME DB 24C is installed in CN6 gt key in 15 Then this demo program will test D O of PA PB and PC sequentially OME PIO D144 User s Manual Ver 2 1 Sep 2001 4 4 Demos Interrupt demo1 demo 3 count high pulse of 1 PCO initial Low amp active High step 1 run demo3 exe include define 1 8259 0x20 define 2 8259 0xA0 define EOI 0x20 WORD init low static void interrupt irq service int COUNT irqmask now int state WORD wBase wIrq int main End hij WORD wBoards wRetVal WORD wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice char c DWORD dwVal clrscr PIO DriverInit amp wBoards 0x80 0x01 0x00 printf n 1 Threr are OME PIO D144 Cards in this PC wBoards if wBoards 0 putch 0x07 putch 0x07 putch 0x07 printf 1 There are no OME PIO D144 card in this PC n exit 0 printf n 2 Show the Configuration Space of all OME PIO D144 for 1 0 i lt wBoards i GetConfigAddressSpace
22. OME DB 24PRD No Yes Yes OME DB 24POR Yes Yes Yes OME DB 24SSR No Yes Yes OME PIO D144 User s Manual Ver 2 1 Sep 2001 me i 2 7 Pin Assignment 37 PIN of D type female connector ER 3 2 S J n PB7 pps NM 9 N d 9 d Jg p 0 e w Z AR fe N QN tA NO 00 az 6 All signals are TTL compatible OME PIO D144 User s Manual Ver 2 1 Sep 2001 XXXXXXX This pin not available CN2 CN3 CN4 CNS5 CN6 50 PIN in of flat cable connector Doo pc ND B pco 2 04 PC4 PC3 hl po l M as 6 pa 19 B6 21 BS Q 22 JI 58181818 13 Q 2 2 0 518181818 CO Q 2 2 JI Q 2 OME PIO D144 User s Manual Ver 2 1 Sep 2001 20 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 OME PIO PISO series card in the power on stage The fixed IDs of OME PIO PISO series cards are given as following lt REV 1 0 REV 3 0 lt REV 4 0 or above gt Vendor ID OxE159 Vendor ID OxE159 Device ID 0x0002 Device ID 0x0001 Sub vendor ID 0x80 Sub vendor ID 0x5C80 Sub device ID 0x01 Sub device ID 0x01 Sub aux ID 0x00 Sub aux ID
23. OME PIO D144 cards installed in this PC for 1 0 i lt wBoards i PIO_GetConfigAddressSpace i amp wBase amp wlrq amp wID1 amp wID2 amp wID3 amp wID4 amp wID5 printf nCard_ d wlIrq x 1 wBase wlrq wConfigSpace i 0 wBaseAddress save all resource of this card wConfigSpace i 1 wlrq save all resource of this card OME PIO D144 User s Manual 2 1 5 20 2595 2 5 5 23 3 1 2 PIO GetConfigAddressSpace GetConfigAddressSpace wBoardNo wBase wIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice wBoardNo 0 to gt totally N 1 boards found by Drivelnit wBase base address of the board control word wlrq gt allocated IRQ channel number of this board wSubVendor gt subVendor ID of this board wSubDevice gt subDevice ID of this board wSubAux gt subAux ID of this board e wSlotBus gt hardware slot ID1 of this board wSlotDevice hardware slot ID2 of this board The user can use this function to save resource of all OME PIO PISO cards installed in this system Then the application program can control all functions of OME PIO PISO series card directly Find the configure address space of OME PIO D144 Step1 Detect all OME PIO D144 cards first wSubVendor 0x80 wSubDevice 0x01 wSubAux 0x00 for OME PIO D144 wRetVal PIO_DriverInit amp wBoards wSubVendor wSubDevice wSubAux printf Threr a
24. SlotDevice char c DWORD dwVal clrscr PIO DriverInit amp wBoards 0x80 0x01 0x00 printf n 1 Threr are OME PIO D144 Cards in this PC wBoards if wBoards 0 putch 0x07 putch 0x07 putch 0x07 printf 1 There are no OME PIO D144 card in this PC n exit 0 printf n 2 Show the Configuration Space of all OME PIO D144 for 1 0 i lt wBoards i GetConfigAddressSpace i amp wBase amp wIrq amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf nCard_ d wBase x subID x 3x SlotID x x i wBase wIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice select card 0 GetConfigAddressSpace 0 amp wBase amp wIrq amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf Nin 3 0 wBaseAddr x wBaseAddr outp 0 8 Oxff to CN2 port are all input printf n 4 show the count of High pulse n init low OME PIO D144 User s Manual Ver 2 1 Sep 2001 ern 43 for 57 printf d d d d d d d d CNT L1 CNT H1 CNT L2 CNT H2 CNT L3 CNT H3 CNT L4 CNT H4 int num if kbhit 0 getch break outp 5 0 disable all interrupt PIO DriverClose Sai o a a Se o aa Use PCO as
25. User s omega om Shop online at www omega com e mail info omega com 1509001 1509002 CERTIFIED CERTIFIED CORPORATE QUALITY CORPORATE QUALITY STAMFORD CT MANCHESTER UK OME PIO D144 Digital Board Hardware Manual omega com CEOMEGA OMEGAnet Online Service Internet e mail www omega com info omega com USA ISO 9001 Certified Canada Servicing North America One Omega Drive P O Box 4047 Stamford CT 06907 0047 TEL 203 359 1660 FAX 203 359 7700 e mail info omega com 976 Bergar Laval Quebec H7L 5A1 Canada TEL 514 856 6928 FAX 514 856 6886 e mail info omega ca For immediate technical or application assistance USA and Canada Mexico Benelux Czech Republic France Germany Austria United Kingdom ISO 9002 Certified Sales Service 1 800 826 6342 1 800 TC OMEGA Customer Service 1 800 622 2378 1 800 622 BEST Engineering Service 1 800 872 9436 1 800 USA WHEN TELEX 996404 EASYLINK 62968934 CABLE OMEGA En Espa ol 001 203 359 7803 e mail espanol omega com FAX 001 203 359 7807 info omega com mx Servicing Europe Postbus 8034 1180 LA Amstelveen The Netherlands TEL 31 0 20 3472121 FAX 31 0 20 6434643 Toll Free in Benelux 0800 0993344 e mail sales amp omegaeng nl Frystatska 184 733 01 Karvin Czech Republic TEL 420 0 59 6311899 FAX 420 0 59 6311114 T
26. ace of all OME PIO D144 for 1 0 i lt wBoards i GetConfigAddressSpace i amp wBase amp wIrq amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf nCard d wBase x wlrq x x x SlotID x x i wBase wIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice select card 0 GetConfigAddressSpace 0 amp wBase amp wIrq amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf n 3 0 wBaseAddr x wBaseAddr COUNT 0 outp 0 8 Oxff to CN2 port are all input printf Nin 4 show the count of High pulse n init high for 7 printf nCOUNT d COUNT if kbhit 0 getch break OME PIO D144 User s Manual Ver 2 1 Sep 2001 ere 41 outp wBaset5 0 disable all interrupt PIO DriverClose Use PCO as external interrupt signal WORD init high DWORD dwVal disable outp wBaset5 0 disable all interrupt if wIrq 8 irqmask inp Al 825941 outp Al 825941 amp Oxff 1 lt lt wIrq setvect wIrgt 8 service else irqmask inp Al 825941 outp Al _ 8259 1 irqmask amp Oxfb IRQ2 outp Al 8259 1 amp Oxff 1 lt lt wIrq irqmask inp A2 825941 outp A2 825941 amp Oxff 1 lt lt wI
27. ch a manner RETURN REQUESTS INQUIRIES Direct all warranty and repair requests inquiries to the OMEGA Customer Service Department BEFORE RETURNING ANY PRODUCT S TO OMEGA PURCHASER MUST OBTAIN AN AUTHORIZED RETURN AR NUMBER FROM OMEGA S CUSTOMER SERVICE DEPARTMENT IN ORDER TO AVOID PROCESSING DELAYS The assigned AR number should then be marked on the outside of the return package and on any correspondence The purchaser is responsible for shipping charges freight insurance and proper packaging to prevent breakage in transit FOR WARRANTY RETURNS please have the FOR NON WARRANTY REPAIRS consult OMEGA following information available BEFORE for current repair charges Have the following contacting OMEGA information available BEFORE contacting OMEGA 1 Purchase Order number under which the product 1 Purchase Order number to cover the COST was PURCHASED of the repair 2 Model and serial number of the product under 2 Model and serial number of the product and warranty and 3 Repair instructions and or specific problems 3 Repair instructions and or specific problems relative to the product relative to the product OMEGA s policy is to make running changes not model changes whenever an improvement is possible This affords our customers the latest in technology and engineering OMEGA is a registered trademark of OMEGA ENGINEERING INC Copyright 2002 OMEGA ENGINEERING INC rights reserved This document may not be copi
28. e 0xd0 define AUX_CR define AUX_DR define INT MCR define AUX SR define INT PCR define RW 8BitDR define ACT IOPCR define CN1 PA define CN1 PB define CN1 PC define CN2 PA define CN2 PB define CN2 PC define CN3 PA define CN3 PB define CN3 PC define 4 PA define PB define 4 define 5 define 5 define CN5 PC define CN6_PA define CN6 PB define CN6 PC wBase 0x02 wBase 0x03 wBase 0x05 wBase 0x07 wBase 0x2a wBase 0xc0 wBase 0xc4 0 1 2 3 4 5 6 7 8 9 LX CX X lX ox WB N OME PIO D144 User s Manual Ver 2 1 Sep 2001 4 2 Demo1 Use D O 1 demo 1 D O demo ar step 1 connect a OME DB 24C to CN1 of OME PIO D144 step 2 run DEMO1 EXE step 3 check the LEDs of OME DB 24C turn sequentially 7 include PIO H int main int i WORD wBoards WORD wBase wIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice char c clrscr PIO DriverInit amp wBoards 0x80 0x01 0x00 for OME PIO D144 printf 1 Threr are d OME PIO D144 Cards in this PC wBoards if wBoards 0 putch 0x07 putch 0x07 putch 0x07 printf 1 There are no OME PIO D144 card in this PC n exit 0 printf n 2 The Configuration Space gt wBase for i 0 i lt wBoards i GetConfigAddressSpace i amp wBa
29. ed photocopied reproduced translated or reduced to any electronic medium or machine readable form in whole or in part without the prior written consent of OMEGA ENGINEERING INC Where Do Find Everything Need for Process Measurement and Control OMEGA Of Course Shop online at www omega com TEMPERATURE Zg Thermocouple RTD amp Thermistor Probes Connectors Panels amp Assemblies Wire Thermocouple RTD amp Thermistor Calibrators amp Ice Point References A Recorders Controllers amp Process Monitors A Infrared Pyrometers PRESSURE STRAIN AND FORCE 4 Transducers amp Strain Gages Load Cells amp Pressure Gages 4 Displacement Transducers A Instrumentation amp Accessories FLOW LEVEL 4 Rotameters Gas Mass Flowmeters amp Flow Computers Air Velocity Indicators A Turbine Paddlewheel Systems A Totalizers amp Batch Controllers pH CONDUCTIVITY pH Electrodes Testers amp Accessories A Benchtop Laboratory Meters Controllers Calibrators Simulators amp Pumps 4 Industrial amp Conductivity Equipment DATA ACQUISITION A Data Acquisition Engineering Software 4 Communications Based Acquisition Systems 4 Plug in Cards for Apple amp Compatibles Datalogging Systems A Recorders Printers amp Plotters HEATERS 4 Heating Cable A Cartridge amp Strip Heaters Immersion amp Band Heaters WF Flexible Heaters 4 Laborato
30. ev 2 0 48 D I O 0080 01 30 OME PIO D24 Rev 60 24 D I O C080 01 40 OME PIO 821 Multi function 80 03 10 OME PIO DA16 Rev 4 0 16 D A 4180 00 00 OME PIO DA8 Rev 4 0 8 D A 4180 00 00 OME PIO DA4 Rev 4 0 4 D A 4180 00 00 OME PISO C64 Rev 4 0 64 isolated D O 0280 00 00 Current Sinking OME PISO A64 Rev 3 0 64 isolated D O 0280 00 50 Current Sourcing OME PISO P64 Rev 4 0 64 isolated D I 0280 00 10 OME PISO P32C32 32 isolated D O 80 08 20 Rev 5 0 Current Sinking 32 isolated D I OME PISO P32A32 32 isolated D O 8280 00 70 Rev 3 0 Current Sourcing 32 isolated D I OME PISO P8R8 8 isolated D I 4200 00 30 Rev 2 0 8 220V relay OME PISO P8SSR8AC 8 isolated D I 4200 00 30 Rev 2 0 8 SSR OME PISO P8SSR8DC 8 isolated D I 4200 00 30 Rev 2 0 8 SSR DC OME PISO 730 Rev 2 0 16 DI 16 D O C2FF 00 40 16 isolated 16 isolated D O Current Sinking OME PISO 730A 16 DI 16 D O 62FF 00 80 Rev 3 0 16 isolated 16 isolated D O Current Sourcing OME PISO 813 Rev 2 0 32 isolated A D 4280 02 00 OME PISO DA2 Rev 5 0 2 isolated D A 4280 03 00 Note If your board is a different version it may also have different sub IDs We offer the same function calls irrespective of the board version OME PIO D144 User s Manual Ver 2 1 Sep 2001 3 1 1 PIO_DriverInit amp wBoards wSubVendor
31. ily if they install a 50 pin flat cable into OME PIO D144 sequentially OME PIO D144 User s Manual Ver 2 1 Sep 2001 rn 27 3 3 I O Address The I O address PIO 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 to the user to not change the I O address The Plug amp Play BIOS will assign proper I O address to each OME PIO PISO series card very well The I O addresses of OME PIO D 144 are given as follows WBase 0 RESET control register Same WWBase 2 Aux control register WBase 5 INT mask control register Same xc Oxed Note Refer to Sec 3 1 for more information about wBase 3 3 1 RESET Control Register 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 will disable all D I O operations The user has to set the RESET signal to High state before any D I O command outp wBase 1 RESET High 2 all D I O are enable now outp wBase 0 RESET Low gt all D I O are disable now OME PIO D144 User s Manual Ver 2 1 Sep 2001 Lus DS 3 3 2 AUX Control Register Read Write wBase 2 Note Refer to Sec 3 1 for more information about wBase Aux 02 this Aux is used as Aux 2 this Aux is used as a D O When the PC is first power on All Aux signal are in Low state All Aux a
32. ime outp wBase 0xc4 0 015 active now outp wBase 0xc4 1 port 1 is active now outp wBase 0xc4 17 port 17 is active now Refer to Sec 2 2 for I O port location OME PIO D144 User s Manual Ver 2 1 Sep 2001 nn 31 3 3 9 Selection Control Register Write wBase 0xc8 o p ena rc PB CN2 PA CNI PB oni Write o b CN4 PC PB ons PC ens PB PA Write wBase 0xd0 CN6 PC CN6 PB CN6 PA ons PC ons PB fens PA Note Refer to Sec 3 1 for more information about wBase For example PA 1 Port is used as a port 0 Port is used as a D O port There are eighteen 8 bit I O ports in the OME PIO D144 Every I O port can be programmed as D I or D O port When the PC is first powered up all eighteen ports are used as D I port The I O port location is given as follows Connector OME PIO PAO to PA7 PBO to PB7 PCO to PC7 D144 CNI CN2 CN2 PA CN2 PB CN2 PC CN3 CN3 PA CN3 PB CN3 PC CN4 CN4 PA CN4 PB CN4 PC CN5 CN5 PA 5 PB 5 PC CN6 CN6 PA CN6 PB CN6 PC outp wBase 0xc8 0 PA PB PC to CN2 PA PB PC are all D O port outp wBase Oxcc 0x3f CN3 PA PB PC to PA PB PC are all
33. ion about wBase For Example PC0 02 select the non inverted signal from PCO of PCO 12 select the inverted signal from PCO of PC outp wBase 0x2a 0x0f select the non inverted input 1 2 3 outp wBase 0x2a 0 select the inverted input of 0 1 2 3 2 0 0 select the inverted input of CN1_ PCO select the non inverted input 1 2 3 2 0 03 select the inverted input of CN1_PC0 1 select the non inverted input 2 3 Refer to Sec 2 5 for more information Refer DEMOS C for more information OME PIO D144 User s Manual Ver 2 1 Sep 2001 30 3 3 7 Read Write 8 bit data Register Read Write wBase 0xc0 D 6 14 jo Note Refer to Sec 3 1 for more information about wBase There are eighteen 8 bit I O port in the OME PIO D144 Every I O port can be programmed as D I or D O port Refer to Sec 3 3 9 for D I or D O selection When the PC is first power on all eighteen ports are used as D I port outp wBase 0xc0 Val write to D O port Val inp wBase 0xc0 read from D I port 3 3 8 Active Port Control Register Read Ware wBase 0xc4 VEM CNN CU Note Refer to Sec 3 1 for more information about wBase There are eighteen 8 bit I O port in the OME PIO D144 Only one I O port can be active at the same t
34. ive diee te 28 3 3 1 RESET Control Register eti top teet retener tme 28 3 3 2 AUX Control Register 29 3 3 3 AUX data Register teo Ee ette s 29 3 3 4 INT Mask Control 29 3 3 5 Aux Status Register 30 3 3 6 Interrupt Polarity Control Register 30 3 3 7 Read Write 8 bit data Register sese eren 31 3 3 8 Active I O Port Control 31 3 3 9 Selection Control Register 32 OME PIO D144 User s Manual Ver 2 1 Sep 2001 2 4 33 4 1 eet a tet pi ete ef 34 4 2 DEMOI USE D O OF CN eerie ea eee oe ia ia ns 35 4 3 DEMO2 USE D O OF i tte 37 4 4 DEMO32 INTERRUPT DEMO eee hr teneor ien 39 4 5 DEMO4 INTERRUPT DBMOZ2 41 4 6 DEMOS INTERRUPT DEMOS ttr iere tre TR 43 4 7 DEMO 6 OUTPORT OF 46 4 8 DEMO10 FIND CARD NUMBER recie nr re OH EUER RE brennt 48 OME PIO D144 User s Manual Ver 2 1 ep 2001 nee 3 1 Introduction The OME PIO D144 consists of one D Sub 37 amp five 50 pin flat cable connectors There are three 8 bit ports PA PB amp PC in each connector E
35. l eighteen ports are used as D I ports The I O port location is given as following Connector of OME PIO D144 PAO to PA7 PBO to PB7 PCO to PC7 CNI PB CNI PC CN2 CN2 PA CN2 PB CN2 PC CN3 CN3 PA CN3 PB CN3 PC CN4 CN4 PA CN4 PB CN4 PC CNS CNS CN5 PB CN5 PC CN6 CN6 PA CN6 PB CN6 PC Refer to Sec 2 1 for board layout amp I O port location Note PCO PC1 2 of CNI can be used as interrupt signal source Refer to Sec 2 5 for more information 2 3 Enable Operation When the PC is first powered up all operation of D I O port are disable The enable disable of D I O is controlled by the RESET signal Refer to Sec 3 3 1 for more information about RESET signal The power on states are given as following e All D I O operations are disable e All eighteen D I O ports are configured as port e All D O latch register are undefined refer to Sec 2 4 The user has to perform some initialization before using these D I Os The recommended steps are given as following Step 1 Make sure which ports are D O ports Step 2 Enable all D I O operation refer to Sec 3 3 1 Step 3 Select the active port refer to Sec 3 3 8 Step 4 Send initial value to the D O latch register of this active port Refer to Sec 2 4 amp Sec 3 3 7 Step 5 Repeat Step3 Step4 for
36. o Yes Other specifications Same OME PIO D144 User s Manual Ver 2 1 Sep 2001 nn 15 2 6 6 OME DB 24R 24RD Relay Board The OME DB 24R 24 channel relay output board consists of 24 form C relays for efficient switching of load via programmed control The relay are energized by apply 12V 24V signal to the appropriated relay channel on the 50 pin flat connector There are 24 enunciator LED s for each relay and they light when their associated relay is activated From C Relay Normal Open Normal Close OME PIO D144 Note 50 Pin cable Channel 24 From C Relay or at 24DCV OME DB 24R OME DB 24RD 50 pin flat cable header Yes Yes D sub 37 pin header No Yes Other specifications Same OME DB 24R OME DB 24RD 24 Relay 120V 0 5A OME DB 24PR OME DB 4PRD 24 x Power Relay 250V 5 OME DB 24POR 24 x Photo MOS Relay 350V 01 A OME DB 24SSR 24 x SSR 250VAC 4A OME DB 24C 24 x 30V 100 mA OME DB 16P8R 16 x Relay 120V 0 5A 8 x isolated input OME PIO D144 User s Manual Ver 2 1 Sep 2001 22 2476 Relay Switching up to 0 5A at 110ACV 2 6 7 OME DB 24PR 24POR 24C OME DB 24PR 24 x power relay 5A 250V OME DB 24POR 24 x Photo MOS relay 0 1 350 OME DB 24C 24 x open collector 100mA per channel 30V max The OME DB 24PR 24 channel power relay output board consists of 8 form C and 16 form A electr
37. oards i test_card i delay 1000 delay 1 sec if kbhit 0 getch break PIO DriverClose test_card int int i j k ok val GetConfigAddressSpace card amp wBase amp wIrq amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice outp wBase 1 enable D I O OME PIO D144 User s Manual Ver 2 1 Sep 2001 48 ok 1 outp 0 8 0x00 outp 0 0x01 outp 0 4 3 outp 0 0 0x55 outp 0 4 6 val inp 0 0 amp if val 0x55 ok 0 outp 0 4 3 outp 0 0 outp 0 4 6 val inp 0 0 amp 0 if val Oxaa ok 0 printf nCard Number d if ok 1 printf Test CN2 PA is output CN3 PA is input select CN2 PA CN2 PA 0x55 7 select CN2_PA read CN3 select CN2 PA 2 select CN3 read CN3 PA x wBase x card wBase OK else printf Test ERROR delay ms int t int i j k l m for 0 i lt t i for 1 0 j 100 j for k 0 k lt 100 k 1 3 6 1 m 1 OME PIO D144 User s Manual Ver 2 1 2001 WARRANTY DISCLAIMER OMEGA ENGINEERING INC warrants this unit
38. oll Free 0800 1 66342 e mail info omegashop cz 11 rue Jacques Cartier 78280 Guyancourt France TEL 33 0 1 61 37 29 00 FAX 33 0 1 30 57 5427 Toll Free in France 0800 466 342 e mail sales omega fr Daimlerstrasse 26 D 75392 Deckenpfronn Germany TEL 49 0 7056 9398 0 FAX 49 0 7056 9398 29 Toll Free in Germany 0800 639 7678 e mail info omega de One Omega Drive River Bend Technology Centre Northbank Irlam Manchester M44 5BD United Kingdom TEL 44 0 161 777 6611 FAX 44 0 161 777 6622 Toll Free in United Kingdom 0800 488 488 e mail sales omega co uk It is the policy of OMEGA to comply with all worldwide safety and EMC EMI regulations that apply OMEGA is constantly pursuing certification of its products to the European New Approach Directives OMEGA will add the CE mark to every appropriate device upon certification The information contained in this document is believed to be correct but OMEGA Engineering Inc accepts no liability for any errors it contains and reserves the right to alter specifications without notice WARNING These products are not designed for use in and should not be used for patient connected applications OME PIO D144 User s Manual OME PIO D144 User s Manual Ver 2 1 Sep 2001 PPH 009 21 Table of Contents 1 INTRODUCTION 4 11 SBECIEICATIONS 4 1 2 PRODUCT CHECK LIST rt ARTS e EUER SHEER Ir
39. omechanical relays for efficient switching of load via 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 Twenty four 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 From A Relay COM 50 Pin cable OME PIO D144 50 Note 50 connector OPTO 22 compatible for OME DIO 24 OME DIO 48 OME DIO 144 144 OME PIO D96 OME PIO D56 OME PIO D48 OME PIO D24 20 Pin connector for 16 channel digital output OME A 82X OME A 62X OME DIO 64 OME ISO DA16 DA8 Channel 16 Form A Relay 8 Form C Relay Relay switching up to 5 at 110ACV 5 at 30DCV OME DB 24PR OME PIO D144 User s Manual Ver 2 1 Sep 2001 en 17 2 6 8 Daughter Board Comparison Table 20 pin flat cable 50 pin flat cable D sub 37 pin OME DB 37 No No Yes OME DN 37 No No Yes OME ADP 37 PCI No Yes Yes OME ADP 50 PCI No Yes No OME DB 24P No Yes No OME DB 24PD No Yes Yes OME DB 16P8R No Yes Yes OME DB 24R No Yes No OME DB 24RD No Yes Yes OME DB 24C Yes Yes Yes
40. ot 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 the PC These values will be mapped to this PC s physical slot This mapping will not be changed for any OME PIO PISO cards So it can be used to identify the specified OME PIO PISO card as following Step1 Record all wSlotBus amp wSlotDevice Step2 Use GetConfigAddressSpace to get the specified card s wSlotBus amp wSlotDevice OME PIO D144 User s Manual Ver 2 1 Sep 2001 DG Step3 The user can identify the specified PIO PISO card if they compare the wSlotBus amp wSlotDevice step2 to step1 The simplest way to find the card number is to use DEM10 EXE given in DOS or WINDWS demo program This demo program will send a value to D O of CN2 and read back from D I of CN3 If the user installs a 50 pin flat cable between CN2 amp CN3 the value read from D I will be the same as D O The operation steps are given as follows 1 Remove all 50 pin flat cable between CN2 and CN3 2 Install all OME PIO D144 cards into this PC system 3 Power on and run DEM10 EXE 4 Now all D I value will be different from D O value 5 Install a 50 flat cable into CN2 amp CN3 of any OME PIO D144 card 6 There will be one card s D I value D O value the card number is also show in screen Therefore the user can find the card number very eas
41. port 0 0 38 CN5 PA PB PC are all D O port CN6 PA PB PC are all Refer to Sec 2 2 for I O Port Location OME PIO D144 User s Manual Ver 2 1 Sep 2001 32 4 Demo Program There are about 5 demo programs provided on the company floppy disk or CD ROM The source programs for library amp demo programs are all provided on the disk These demo programs will help users to solve real world problems e TC gt for Turbo 2 xx or above e TC LARGE for large model e TC LARGE LIB gt for library source code e TC LARGE DEMO gt demo program source code e TC LARGE LIB PIO H gt library header file e TC LARGE LIB PIO C gt library source file e TC LARGE LIB A BAT gt compiler file e TC LARGE LIB B BAT gt link file e TC LARGE LIB PIO LIB gt library file TC LARGE DEMO1 PIO H gt library header file TC LARGE DEMO1 DEMO1 C gt demol source file TC LARGE DEMOI DEMO1 PRJ gt TC project file TC LARGE DEMOI IOPORTL LIB gt I O port library file TC LARGE DEMOI PIO LIB gt library file TC LARGE DEMO1 DEMOI EXE gt demol execution file OME PIO D144 User s Manual Ver 2 1 Sep 2001 en 33 4 1 The header file for OME PIO D144 card define Disable define Enable define D144 define IO SCRO define lO SCR1 OME PIO D144 H 0 1 wBase 0x00 wBase 0xc8 wBase 0xcc define lO SCR2 wBas
42. re d OME PIO D144 Cards in this PC n wBoards Step2 Save resource of all OME PIO D144 cards installed in this PC for 1 0 i lt wBoards i GetConfigAddressSpace i amp wBase amp wlrq amp t1 amp t2 amp t3 amp t4 amp t5 printf nCard_ d wBase x wIrq x 1 wBase wlrq wConfigSpace i 0 wBaseAddress save all resource of this card wConfigSpace i 1 wlrq save all resource of this card Step3 Control 144 directly wBase wConfigSpace 0 0 get base address the card 0 outp wBase 1 enable all D IJO operation of card 0 wBase wConfigSpace 1 0 get base address the card 1 outp wBase 1 enable all D I O operation of card 1 OME PIO D144 User s Manual Ver 2 1 Sep 2001 22 2521 3 1 3 Show PISO Show_PIO_PISO wSubVendor wSubDevice wSubAux wSubVendor gt subVendor ID of board to find wSubDevice gt subDevice ID of board to find wSubAux gt subAux ID of board to find This function will output a text string for the 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 0Oxff find all PISO series card printf nThrer are OME PIO PISO Cards in this PC wBoards if wBoards 0 exit 0 printf n for i 0 i lt wBoards i PIO_GetConfigAddressSpace i amp wBase amp wlrq amp wSubVendor
43. re 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 3 3 4 INT Mask Control Register Read Write wBase 5 b p 0 Pc fen PC2 CNI PCI ent rco Note Refer to Sec 3 1 for more information about wBase 0 0 gt Disable PCO of CNI as a interrupt signal Default 0 1 gt Enable PCO of CNI as a interrupt signal outp wBase 5 0 Disable interrupt 5 1 Enable interrupt PCO outp wBase 5 0x0f Enable interrupt PCO CNI PCI CNI PC2 CNI OME PIO D144 User s Manual Ver 2 1 Sep 2001 ene 29 3 3 5 Aux Status Register Read Write wBase 7 Note Refer to Sec 3 1 for more information about wBase Aux0 CN PCO PCI Aux2 CN1 PC2 Aux3 PC3 Aux7 4 Aux ID Refer to DEMOS C for more information The Aux0 3 are used as interrupt source 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 PC2 CNI PCI CNI PCO Note Refer to Sec 3 1 for more informat
44. rq 8 setvect wIrg 8 0x70 service outp 5 1 enable interrupt now int state 1 now int signal is low outp 0 2 1 select the inverte input enable void interrupt irq service if now int state 0 find a high pulse here wBaset 0x2a 1 select the inverte input now int state 1 now int signal is High else COUNT find a low pulse outp wBase 0x2a 0 select the non inverte input now int state 0 now int signal is High Y if wIrq 8 outp A2 8259 0x20 outp Al 8259 0x20 Refer to Sec 2 5 2 for more information OME PIO D144 User s Manual Ver 2 1 Sep 2001 42 4 6 Demo5d Interrupt demo3 demo 5 four interrupt source LR CN1 PCO initial Low active High PCl initial High active Low 1 PC2 initial Low active High 1 initial High active Low step 1 run demo5 exe include PIO H define 1 8259 0x20 define 2 8259 0 0 define EOI 0x20 WORD init low WORD wBase wIrq static void interrupt irq service int irqmask now int state invert new int state int c int num int L1 CNT L2 CNT L3 CNT L4 int 1 H2 CNT H3 CNT int main int 1 7 WORD wBoards wRetVal WORD wBase wIrq wSubVendor wSubDevice wSubAux wSlotBus w
45. rte input now int state 0 now int signal is low outp 5 1 enable interrupt void interrupt irq service if now int state 0 COUNT find a high pulse 0 2 1 select the inverte input now int state 1 now int signal is High else find a low pulse here X outp wBase 0x2a 0 select the non inverte input now int state 0 now int signal is High if wIrq 8 outp A2 8259 0x20 outp Al 8259 0x20 Refer to Sec 2 5 1 for more information OME PIO D144 User s Manual Ver 2 1 Sep 2001 40 4 5 Demod4 Interrupt demo2 demo 4 count low pulse of PCO Initial High amp active Low AU step 1 run demo4 exe JE xj include PIO H define 1 8259 0x20 define 2 8259 0xA0 define EOI 0x20 WORD init high WORD wBase wIrq static void interrupt irq service int COUNT irqmask now int state int main End hij WORD wBoards WORD wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice char c DWORD dwVal clrscr DriverInit amp wBoards 0x80 0x01 0x00 printf 1 Threr are d OME PIO D144 Cards in this PC wBoards if wBoards 0 putch 0x07 putch 0x07 putch 0x07 printf 1 There are no OME PIO D144 card in this PC n exit 0 printf n 2 Show the Configuration Sp
46. ry Heaters ENVIRONMENTAL MONITORING AND CONTROL Metering amp Control Instrumentation 4 Refractometers Pumps amp Tubing A Air Soil amp Water Monitors Industrial Water amp Wastewater Treatment A pH Conductivity Dissolved Oxygen Instruments M4037 0104
47. se amp amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf NnCard d wBase x wIrq x subID x x x SlotID x x i wBase wIrq wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice select card 0 GetConfigAddressSpace 0 amp wBase amp wIrq amp wSubVendor amp wSubDevice amp wSubAux amp wSlotBus amp wSlotDevice printf Nn 3 0 D O test wBase x wBase step 1 make sure which ports are D O ports in this demo gt only CN1 PA CN1 PB 1 PC are D O port step 2 enable all D I O port m outp wBase 1 enable D I O step 3 select the active port 0 4 0 select CN1 step 4 send initial value to D O latch register of active port outp 0 0 0 set to CNI PAT to 0 step 5 repeat for all D O ports outp wBase 0xc4 1 select CN1 PB outp 0 0 0 set CNI to PB7 to 0 outp 0 4 2 select outp wBase 0xc0 0 set CN1 PCO to PCT to 0 step 6 configure all I O port outp 0 8 0x00 to CN2 port are all output OME PIO D144 User s Manual Ver 2 1 Sep 2001 ern 35 outp 0 0x00 outp wBase 0xd0 0x00 for 229 printf nCN1 PA 0x55 outp 0
48. to be free of defects in materials and workmanship for a period of 13 months from date of purchase OMEGA s WARRANTY adds an additional 1 month grace period to the normal one 1 year product warranty to cover handling and shipping time This ensures that OMEGA s customers receive maximum coverage on each product If the unit malfunctions it must be returned to the factory for evaluation OMEGA s Customer Service Department will issue an Authorized Return AR number immediately upon phone or written request Upon examination by OMEGA if the unit is found to be defective it will be repaired or replaced at no charge OMEGA s WARRANTY does not apply to defects resulting from any action of the purchaser including but not limited to mishandling improper interfacing operation outside of design limits improper repair or unauthorized modification This WARRANTY is VOID if the unit shows evidence of having been tampered with or shows evidence of having been damaged as a result of excessive corrosion or current heat moisture or vibration improper specification misapplication misuse or other operating conditions outside of OMEGA s control Components which wear are not warranted including but not limited to contact points fuses and triacs OMEGA is pleased to offer suggestions on the use of its various products However OMEGA neither assumes responsibility for any omissions or errors nor assumes liability for any damages that result from
49. very port consists of 8 bit programmable D I O So the OME PIO D144 can provide 144 channels of TTL compatible D I O 1 1 Specifications compatible PCI bus e One D Sub37 connector and five 50 pin flat cable connectors Each port consists of three 8 bit ports PA PB amp PC in every connector Each port be programmed as or D O independently Each board 6 connector 6 3 ports 6 3 8 bits 144 bits e 4 interrupt sources PCO PCI 2 e All signals are TTL compatible e Operating Temperature 0 C to 60 C e Storage Temperature 20 C to 80 C e Humidity 0 to 90 RH non condensing Dimension 180mm X 105mm Power Consumption 45V 1100mA 1 2 Product Check List In addition to this manual the package includes the following items OME PIO D144 card e Software diskette CD Attention If any of these items is missing or damaged please contact Omega Engineering immediately Save the shipping materials and the box in case you want to ship or store the product OME PIO D144 User s Manual Ver 2 1 Sep 2001 4 ion t igura Hardware conf 2 Board Layout 2 1 D Sub 37 PIN 50 PIN 50 PIN OME PIO D144 PCI BUS OME PIO D144 User s Manual Ver 2 1 2001 2 2 Port Location There are eighteen 8 bit I O ports in the OME PIO D144 Every I O port can be programmed as D I or D O port When the PC is first powered up al

Download Pdf Manuals

image

Related Search

Related Contents

Télécommande Nice Era FLO4RE  別紙 1 チェーンソー取扱い作業指針  SERVICE MANUAL  Samsung MRK-A00 Manuel de l'utilisateur    HHCONSULTANT, S.C. Despacho de Auditores y  G649 User Manual  

Copyright © All rights reserved.
Failed to retrieve file