Home

Manual

image

Contents

1. select the inverted input P2C1 2 3 s outp wBase 0x2a 3 select the non inverted input of P2C0 1 ef select the inverted input P2C2 3 Refer to Sec 2 6 and DEMOS C for more information 3 3 7 Read Write 8 bit data Register Read Write wBase 0xc0 De 5 a De Di lo D7 There are 18 21 8 bit I O ports in the PIO D144 D168 Every I O port can be configured as D I or D O port User can send receive digital data to from this register for digital input or output Note that all ports are used as D I port when the PC is first power on outp wBase 0xc0 Val write to D O port Val inp wBase 0xc0 read from D port Note Make sure the I O port configuration DI or DO before read write the data register refer to sec 3 3 9 3 3 8 Active I O Port Control Register Read Write wBase 0xc4 Dz e Jos ou De pi There are 18 21 8 bit I O ports in the PIO D144 D168 Only one I O port can be activated at the same time The following example is demonstration for how to activate the port of the PIO series card PIO D144 D 168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 26 outp wBase 0xc4 0 VO porto is active now outp wBase 0xc4 1 VO port is active now outp wBase 0xc4 17 I O port17 is active now outp wBase 0xc4 20 I O port20 is active now 3 3 9 I O Selection Control Register Write wBase 0xc8 Bit 1 o Ports Porta Ports Port Poni Write
2. 0x5C80 Sub device ID 0x01 Sub aux ID 0x00 The utility program PIO PISO EXE will detect and present all information of PIO PISO cards installed in this PC as shown in following figure Besides for how to identify the PIO series cards of ICPDAS data acquisition board by the sub vender sub device and sub Aux ID is given in table 3 1 PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 19 cllowing cards ail information 0x00 O C400 PTO Di44 B re Address IBA Number Figure 3 1 PIO D144 D 168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 Table 3 1 KE di Description Sub Sendor Sub Device Sub AUX PIO D168 168 DIO 9880 01 50 PIO D168A 168 DIO 80 q 50 PIO D144 REV4 0 144 D I O 80 5080 01 oo PIO D96 96 D O 8 uo 10 PIO D64 REV2 0 64 D O 80 4080 PIO D56 24 DIO 01 40 16 D l 16 D O PIO D48 48 DIVO EN a 3 PIO D24 24 D O 80 01 40 PIO 821 Multi function 80 03 10 PIO DA16 16 D A 80 04 00 PO DAS 18 DA 1 80 o 00 PIO DA4 14 DA 1 80 o 00 PISO C64 64 isolated D O 80 08 00 Current sinking PISO A64 64 isolated D O Current sourcing 64 isolated D I PISO P32C32 32 isolated D O ro Current sinking 32 isolated D I PISO P32A32 32 isolated DO Current sourcing 32 isolated D I 8 isolated D I 8 220V relay 8 isolated D I 8 SSR AC 8 isolated D I 8 SSR DC PISO 730 16 DI 16 D O
3. DB 24C 24 x O C 30V 100 mA DB 16P8R 16 x Relay 120V 0 5A 8 x isolated input PIO D144 D 168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 16 2 7 7 DB 24PR DB 24POR DB 24C Table 2 7 DB 24PR 24 x power relay 5A 250V DB 24POR 24 x Photo MOS relay 0 1A 350VAC DB 24C 24 x open collector 100mA per channel 30V max The DB 24PR 24 channel power relay output board consists of 8 form C and 16 form A electromechanical relays for efficiently controlling the switch of the load by program The contact of each relay can allow 5A current load at 250ACV 30VDCV The relay is energized by applying a 5 voltage signal to the associate relay channel on the 20 pin flat cable connector just used 16 relays or 50 pin flat cable connector OPTO 22 compatible for DIO 24 series 24 enunciator LEDs for indicating the status of for each relay and the corresponding LED is 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 as shown in figure 2 9 50 Pin cable PIO D144 D168 Figure 2 9 1 50 Pin connector OPTO 22 compatible for DIO 24 DIO 48 DIO 144 PIO D144 PIO D96 PIO D56 PIO D48 PIO D24 PIO D168 2 20 Pin connector for 16 channel digital output A 82X A 62X DIO 64 ISO DA16 DA8 3 Channel 16 Form A Relay 8 Form C Relay 4 Relay switching up to 5A at 110ACV 5A at 30DC
4. The application structure is presented as following figure The user application program developed by designate tools like VB Delphi and Borland C Builder can call PIODIO DLL driver in user mode And then DLL driver will call the PIO sys to access the hardware system Function Call into DLLs Development Toolkit Services Call into Kernel Mode Device Control Figure 5 1 PIO D144 D 168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 30 5 1 Table of ErrorCode and ErrorString Table 5 1 ail Error ID Error String 0 PIODIO_NoError OK No error 1 PIODIO DriverOpenError Device driver can t be opened 2 PIODIO DriverNoOpen Users have to call the Driverlnit function firstly 3 PIODIO GetDriverVersionError Get driver version error 4 PIODIO InstalllrgError Install IRQ Error 5 PIODIO ClearintCountError Clear counter value Error 6 PIODIO GetlntCountError Get counter of interrput error 7 PIODIO RemovelrgError Remove IRQ Error 8 PIODIO FindBoardError Can not find board 9 PIODIO ExceedBoardNumber The Max boards is 8 10 PIODIO ResetError Can t reset interrupt count 11 PIODIO IrqMaskError Irq Mask is 1 2 4 8 or 1 to OxF 12 PIODIO ActiveModeError Active Mode is 1 2 or 1 to 3 13 PIODIO GetActiveFlagError Can t get interrupt active flag 14 PIODIO ActiveFlagEndOfQueue The flag queue is empty 5 2 Function Descriptions All of the functions provided for
5. wSubVendor Input SubVendor ID of the board wSubDevice Input SubDevice ID of the board wSubAux Input SubAux ID of the board e Return Please refer to Table A 1 PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 49
6. 16 isolated D I 16 isolated D O Current sinking PISO 730A 16 DI 16 D O 16 isolated D I 16 isolated D O Current sourcing PISO 813 32 isolated A D PISO DA2 2 isolated D A Note If the board has different version it may has different Sub IDs But no matter which version of the board you select we offer the same function calls PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 21 3 2 The Assignment of I O Address The Plug amp Play BIOS will assign the proper I O address to PIO PISO series card If there is only one PIO PISO board the user can identify the board as card 0 If there are two PIO PISO boards in the system the user will be very difficult to identify which board is card O The software driver can support the maximum 16 boards Therefore the user can install 16 boards of PIO PSIO series cards in one PC system For how to find and identify the card O amp card 1 is demonstrated as below The simplest way to identify which card is card 0 is to use wSlotBus amp wSlotDevice as follows 1 Remove all PIO D144 D168 from this PC 2 Install one PIO D144 D168 into the PC s PCI slot1 run PIO PISO EXE Then record the wSlotBus1 and wSlotDevice 1 3 Remove all PIO D144 168 from this PC 4 Install one PIO D144 168 into the PC s PCI slot2 and run PIO PISO EXE Then record the wSlotBus2 and wSlotDevice2 information 5 Repeat 3 amp 4 for all PCI slo
7. I O address to each PIO PISO series card very well The I O address of PIO D144 D168 are given as follows which are based on the base address of each card Table 3 3 Address Read Me o O WBase 0 RESET control register RESET control register WBase 2 Aux control register Aux control register WBase 3 Aux data register Aux data register INT mask control register INT mask control register WBase 7 Aux pin status register Aux pin status register WBase 0x2a INT polarity control register INT polarity control register Note Wbase 0xd4 is only for PIO D168 PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 23 3 3 1 RESET Control Register Read Write wBase 0 Reserved When the PC is first power on 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 application outp wBase 1 RESET High gt all D I O are enable now outp wBase 0 RESET Low gt all D I O are disable now 3 3 2 AUX Control Register Read Write wBase 2 Aux 0 gt this Aux is used as a D Aux 17 this Aux is used as a D O When the PC is first power on all Aux signal are in Low state All Aux are designed as D I for all PIO PISO series 3 3 3 AUX data Register Read Write wBase 3 When the Aux is used as D O the output state is controlled by this register This register is designed for
8. P4B7 P7B7 P10B7 P13B7 P16B7 P1987 18 19 paso P7B6 P10B6 P13B6 P16B6 P1986 20 21 P4B5 P7B5 P10B5 P13B5 Preps P1985 22 Z E U O U U O o l i l 2 2 2 2 3 3 3 3 U D EN P4B2 P7B2 P10B2 P13B2 P16B2 P19B2 28 0 2 4 6 8 0 2 4 6 8 0 2 4 6 8 0 2 4 6 8 Q O o Q O O IOIO O IOIO O O O D O O O 2 2 31 P4Bo P7Bo Propo P13B0 P16BO P19B0 32 38 P3A7 P6A7 P9A7 P12A7 P15A7 P18A7 34 35 Pane Pens Pons P12A6 P15AS Pisas 36 R P3A5 P6A5 P9A5 P12A5 P15A5 P18A5 38 Z UD O O DU Q Z U 3 3 41 P3A3 P6A3 P9A3 P12A3 P15A3 P18A3 42 43 P3A2 P6A2 P9A2 P12A2 P15A2 P18A2 44 4 4 E zZ Q Z U e Z U 45 P3A1 P6A1 P9A1 P12A1 P15A1 P18A1 46 4 4 4 47 P3A0P6AOI P9AO PI2A0 P15A0 P18A0 48 3 5 7 9 1 3 5 T7 29 papi pet P10B1 P13B1 P16B1 P19B1 30 1 3 5 T7 9 1 3 5 7 PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 9 2 4 Enable I O Operation When the PC is first power on all operations of digital I O channels of each port are disabled Note that the digital I O channel of each port is enabled or disabled by the RESET signal refer to Sec 3 3 1 for more information The power on states for all DI O ports are given as following m D I O operations of each port are all disabled m D I O ports are all configured
9. PIO D144 D 168 are listed as below and the detail information for every function will be presented in the following section However in order to make the description simplify and clearly the attribute of the input and output parameter of the function is indicated as input and output respectively as shown in following table Table 5 2 Keyword Setting parameter by user Get the data value before calling this function from this parameter after calling this function Input Yes No Output No Yes Input Output Yes Yes PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 31 Table 5 3 Function Definition PIODIO FloatSub float fA float fB PIODIO ShortSub short nA short nB PIODIO GetDilVersion void PIODIO Driverlnit void PIODIO DriverClose void PIODIO SearchCard WORD wBoards DWORD dwPIOCardlD PIODIO GetDriverVersion WORD wDriverVersion PIODIO GetConfigAddressSpace WORD wBoardNo DWORD wAddrBase WORD wlrqNo WORD wSubVendor WORD wSubDevice WORD wSubAux WORD wSlotBus WORD wSlotDevice WORD PIODIO_ActiveBoard WORD wBoardNo WORD PIODIO WhichBoardActive void void PIODIO_OutputWord DWORD wPortAddress DWORD wOutData void PIODIO_OutputByte DWORD wPortAddr WORD bOutputValue DWORD PIODIO InputWord DWORD wPortAddress WORD PIODIO InputByte DWORD wPortAddr WORD P
10. cable header win DIN Rail mounting They are also designed for easy wire connection by pin to pin Ui et imm unum Me o af Figure 2 4 PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 2 7 3 DB 8125 The DB 8125 is a general purpose screw terminal board It is designed for easy wire connection There are one DB 37 amp two 20 pin flat cable header in the DB 8125 per ELE e DB 8 if al j forDB 37 or ris i 17 00 vea mn aaua la 3 L A 20 pin flatcable header Figure 2 5 2 7 4 ADP 37 PCI amp ADP 50 PCI The ADP 37 PCI amp ADP 50 PCI are extender for 50 pin header One side of ADP 37 PCI and ADP 50 PCI can be connected to a 50 pin header The other side can be mounted on the PC chassis as shown in the following figure Note that ADP 37 PCI is 50 pin header to DB 37 extender and ADP 50 PCI is 50 pin header to 50 pin header extender Figure 2 6 PIO D144 D 168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 14 2 7 5 DB 24P DB 24PD Isolated Input Board The DB 24P is a 24 channel isolated digital input daughter board The optically isolated inputs of the DB 24P consist of a bi directional optocoupler with a resistor for current sensing You can use the DB 24P to sense DC signal from TTL levels up to 24V or use the DB 24P to sense a wide range of AC signals You can also use this board to isolate the computer from large common mode voltage ground loops an
11. the interrupt source Refer to DEMO3 C amp DEMO4 C However 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 P2CO is active service P2CO amp non inverter inverted the P2CO signal If P2C1 is active service P2C1 amp non inverted inverted the P2C1 signal If P2C2 is active service P2C2 amp non inverted inverted the P2C2 signal If P2C3 is active service P2C3 amp non inverted inverted the P2C3 signal Save the new status to old status SO OR ee Limitation if the interrupt signal is too short the new status may be as same as old status So the interrupt signal must be hold active until the interrupt service routine is executed This hold time is different for different O S The hold time can be as short as micro second or as long as second In general 20ms is enough for all O S PIO D144 D 168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 12 2 7 Daughter Boards 2 7 1 DB 37 The DB 37 is a general purpose daughter board for D sub 37 pins It is designed for easy wire connection by pin to pin 37 PIN cable ie l Mii a at TT Tm re Figure 2 3 2 7 2 DN 37 amp DN 50 The DN 37 is a general purpose daughter board for DB 37 with DIN Rail Mounting The DN 50 is designed for 50 pin flat
12. value on the device driver for the interrupt Syntax WORD PIODIO_IntResetCount void Parameter None Return Please refer to Section 5 1 Error Code PIODIO_IntGetCount Description This subroutine will read the dwIntCount defined in device driver Syntax WORD PIODIO_IntGetCount DWORD dwintCount Parameter dwintCount Output Address of dwIntCount which will stores the counter value of interrupt Return Please refer to Section 5 1 Error Code PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 39 5 6 3 PIODIO Intinstall Description This subroutine installs the IRQ service routine Syntax WORD PIODIO Intinstal WORD wBoardNo HANDLE hEvent WORD winterruptSource WORD wActiveMode Parameter wBoardNo Input Which board to be used hEvent Input Address of a Event handle The user s program must call the Windows API function CreateEvent to create the event object winterruptSource Input What the Interrupt Source to be used Please refer to the following table Table 5 4 Card No winterruptSource Description PIO D48 0 PC3 PC7 from Port 2 1 PC3 PC7 from Port 5 2 CoutO 3 Cout2 PIO D56 0 PCO PIO D24 1 PC1 2 PC2 3 PC3 PIO D64 0 EXTIRQ 1 EVTIRQ 2 TMRIRQ PIO D96 0 P2CO 1 P5C0 2 P8C0 3 P11C0 PIO D144 D168 0 P2C0 1 P2C1 2 P2C2 3 P2C3 wActiveMode Inout When to trigger the interrupt 0 g
13. 144 bits PIO D168 board 7 connectors 7x3 ports 7x3x8 bits 168 bits e 4 interrupt sources P2CO P2C1 P2C2 P2C3 e All operational signals are TTL compatible e Operating Temperature 0 C to 60 C e Storage Temperature 20 C to 80 C e Humility 0 to 90 non condensing e Dimension 180mm X 105mm PIO D144 200mm X 105mm PIO D168 e Power Consumption 5V 1100mA PIO D144 5V 1300mA PIO D168 1 2 Product Check List In addition to this manual the package includes the following items e PIO D144 D168 card e Demo program floppy diskette or CD Attention If any of these items is missing or damaged contact the dealer from whom you purchased the product Save the shipping materials and carton in case you want to ship or store the product in the future PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 5 Only PIO D168 CN Pol Porl 13 Port 14 DB 37 PIN 50 PIN PIN 50 PIN PIO D144 D 168 Hardware configuration 2 1 Board Layout 2 Figure 2 1 PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 6 2 2 WO Port Location There are 18 21 8 bit I O ports in the PIO D144 D168 Every port can be independently configured as D I or D O port When the PC is first power on all ports are set as Digital input port Therefore user needs to configure these ports as digital input or output port before application The I O port is named as following table and its loca
14. 6 bit data Only the low WORD is valid PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 35 5 5 Driver Relative Functions 5 5 1 5 5 2 PIODIO GetDriverVersion Description This subroutine reads the version number information from PIODIO driver Syntax WORD PIODIO GetDriverVersion WORD wDriverVersion Parameter wDriverVersion Output address of wDriverVersion Return Please refer to Section 5 1 Error Code PIODIO Driverlnit Description This subroutine opens the PIODIO driver and allocates the computer resource for the device This function must be called once before applying other PIODIO functions Syntax WORD PIODIO_Driverinit Parameter None Return Please refer to Section 5 1 Error Code PIO D144 D 168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 36 5 5 3 5 5 4 PIODIO_SearchCard Description This subroutine can search the card and get total boards This function must be called once before applying other PIODIO functions Syntax WORD PIODIO SearchCard WORD wBoards DWORD dwPIOCardlD Parameter wBoards Output Get the total boards DwPIOCardlD Input Sub id of PIODIO card Please refer table3 1 NOTE Different version PIO D168 144 boards may have different Sub IDs This function will find the total board of PIO D168 144 including all version no matter what version Sub ID you input Following is the example demonstratio
15. ID of the board e Return Please refer to Table A 1 PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 47 A 2 3 PIO GetConfigAddressSpace e Description The user can use this function to save resource of all PIO PISO cards installed in this system Then the application program can control all functions of PIO PISO series card directly o Syntax WORD PIO GetConfigAddressSpace wBoardNo wBase wlrg wSubVendor wSubDevice wSubAux wSlotBus wSlotDevice e Parameter wBoardNo Input Board number wBase Output The base address of the board wirq Output The IRQ number that the board using wSubVendor Output Sub Vendor ID wSubDevice Output Sub Device ID wSubAux Output Sub Aux ID wSlotBus Output Slot Bus number wSlotDevice Output Slot Device ID e Return Please refer to Table A 1 A 2 4 PIO GetDriverVersion e Description This subroutine obtain the version number of PIODIO driver o Syntax WORD PIO GetDriverVersion WORD wDriverVersion e Parameter wDriverVersion Output Address of wDriverVersion e Return Please refer to Table A 1 PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 48 A 2 5 ShowPlOPISO e Description This function will show a text string for this special Sub ID This text string is the same as that defined in PIO H o Syntax WORD ShowPIOPISO wSubVendor wSubDevice wSubAux e Parameter
16. IODIO Intinstall WORD wBoardNo HANDLE hEvent WORD winterruptSource WORD wActiveMode WORD PIODIO IntRemove void WORD PIODIO IntResetCount void WORD PIODIO IntGetCount DWORD dwiIntCount 5 3 FUNCTIONS OF TEST 5 3 1 PIODIO GetDllVersion e Description To get the version number of PIODIO DLL driver e Syntax WORD PIODIO GetDllVersion Void e Parameter None e Return 200 hex for version 2 00 PIO D144 D 168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 32 5 3 2 5 3 3 PIODIO_ShortSub Description To perform the subtraction as nA nB in short data type This function is provided for testing DLL linkage purpose Syntax short PIODIO ShortSub short nA short nB Parameter nA Input 2 bytes short data type value nB Input 2 bytes short data type value Return The value of nA nB PIODIO FloatSub Description To perform the subtraction as fA fB in float data type This function is provided for testing DLL linkage purpose Syntax float PIODIO FloatSubf float fA float fB Parameter fA Input 4 bytes floating point value fB Input 4 bytes floating point value Return The value of fA fB PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 33 5 4 Digital O FUNCTIONS 5 4 1 5 4 2 PIODIO_OutputByte Description This subroutine sends the 8 bits data to the specified I O port Syntax void PIODIO Outpu
17. PCI amp ADP 50 PCI 14 2 7 5 DB 24P DB 24PD Isolated Input Board 15 2 7 6 DB 24R DB 24RD Relay Board 16 2 7 7 DB 24PR DB 24POR DB 24C 17 2 7 8 Daughter Board Comparison Table 18 VO Control Register 19 3 1 How to Find the VO Address 19 3 2 The Assignment of I O Address rrrrrrvrrvrrrrrrrverrrrrrverrrvrrnenrnr 22 3 3 The VO Address Maps i sne Glede Ge 23 3 3 1 AUX Control Register 24 3 3 2 AUX data Register 24 3 3 3 INT Mask Control Register 25 3 3 4 Aux Status Register 25 3 3 5 Interrupt Polarity Control Register 25 3 3 6 Read Write 8 bit data Register 26 3 3 7 Active I O Port Control Register 26 3 3 8 I O Selection Control Register 27 4 Software Installation errar 29 4 1 Software Installing Procedure 29 4 2 PMP Driver Installation teens 29 5 DLL Function Description 30 5 1 Table of ErrorCode and ErrorString im 31 5 2 Function DeESCrDUONMS saiam ssa did Sa A 31 5 3 FUNG HONSOFTES Pad 32 5 3 1 PIODIO_GetDilVersion 32 5 3 2 PIODIO ShortSub 33 5 3 3 PIODIO FloatSub 33 5 4 Digital VO FUNCTIONS eternas 34 5 4 1 PIODIO OutputByte 34 5 4 2 PIODIO_InputByte 34 5 4 3 PIODIO OutputWord 35 5 4 4 PIODIO InputWord 35 5 5 Driver Relative Functions eretas 36 5 5 1 PIODIO GetDriverVersion 36 5 5 2 PIODIO Driverlnit 36 5 5 3 PIODIO SearchCard 37 5 5 4 PIODIO DriverClose 37 5 5 5 PIODIO GetConfigAddressSpace 38 5 6 INTERRUPT FUNCTION ear 39 5 6 1 PIODIO IntResetCo
18. PIO D144 D168 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 assume no liability for damages consequent to the use of this product ICP DAS reserves the right to change this manual at any time without notice The information furnished by ICP DAS is believed to be accurate and reliable However no responsibility is assumed by ICP DAS for its use not for any infringements of patents or other rights of third parties resulting from its use Copyright Copyright 2003 by ICP DAS All rights are reserved Trademark The names used for identification only may be registered trademarks of their respective companies PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 1 Tables of Contents PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 hss INFOCUS as sanear a 1 1 DO CHICA OUTS EEE 1 2 Product Check List hv 2 Hardware configuration 21 Board LON 2 2 VO Port Location hr PERS ETT PAS SITTIN xis tl tn Rn erin ek erin EIEEEI 2 4 Enable VO Operation assis srs ERA ERREI DER Dna 10 2 5 DIMO Architecture cccccccsceccsssssesessessescseseesesssscesssseseesssseseeseaeees 11 2 6 Interrupt Operation acess iea ied ied eee 12 2 7 Daughter BOAIOS SR 13 2 7 1 DB 37 13 2 7 2 DN 37 amp DN 50 13 2 7 3 DB 8125 14 2 7 4 ADP 37
19. V PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 17 2 7 8 Daughter Board Comparison Table Table 2 9 is the comparison table for the daughter application of PIO PISO series cards Table 2 9 20 pin flat cable 50 pin flat cable D sub 37 pin DB 37 No No Yes DN 37 No No Yes ADP 37 PCI No Yes Yes ADP 50 PCI No Yes No DB 24P No Yes No DB 24PD No Yes Yes DB 16P8R No Yes Yes DB 24R No Yes No DB 24RD No Yes Yes DB 24C Yes Yes Yes Db 24PRD No Yes Yes DB 24POR Yes Yes Yes DB 24SSR No Yes Yes PIO D144 D 168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 18 3 I O Control Register 3 1 How to Find the I O Address The plug amp play BIOS will assign a proper I O address to every PIO PISO series card in the power on stage The fixed IDs of PIO D168 144 cards are given as following For PIO D168 A lt PIO D168A gt e Vendor ID 0xE159 e Device ID 0x0002 e Sub vendor ID 0x80 e Sub device ID 0x01 e Sub aux ID 0x50 For PIO D144 lt REV 1 0 REV 3 0 gt e Vendor ID 0xE159 e Device ID 0x0002 e Sub vendor ID 0x80 e Sub device ID 0x01 e Sub aux ID 0x00 lt PIO D168 gt e Vendor ID 0xE159 e Device ID 0x0001 Sub vendor ID 0x9880 Sub device ID 0x01 Sub aux ID 0x50 REV 4 0 or above gt Vendor ID Device ID 0xE159 0x0001 Sub vendor ID
20. as Digital input port m D O latch register are all undefined refer to Sec 2 5 The user has to perform some initialization before using these digital I O ports The recommended steps are given as following Step 1 Find address mapping of PIO PISO cards Refer to Sec 3 1 Step 2 Enable all Digital I O operation Refer to Sec 3 3 1 Step 3 Select the controlled port Refer to Sec 3 3 8 Step 4 Send initial value to the D O latch register of this controlled port Refer to Sec 2 5 amp Sec 3 3 7 Step 5 Repeat Step3 amp Step4 to initiate the other D O ports Step 6 Configure all Digital I O ports to their expected D I or D O function Refer to Sec 3 3 9 For more information of initial procedure for digital I O port please refer to DEMO1 C demo program PIO D144 D 168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 10 2 5 D VO Architecture The digital I O control architecture for PIO D 144 D168 is demonstrated in Figure 2 2 The operation method of control signal is presented as below The RESET is in Low state means that all D I O operation is disabled The RESET is in High state means that all D I O operation is enabled If D I O is configured as D I port the port can accept digital input from external signal source If D I O is configured as D O port the digital output value can be read back from the port If D I O is configured as D I port sending data to Digital input port will change t
21. claration header files for different development environments are presented as follows Demo gt demo program BCB3 gt for Borland C Builder 3 PIODIO H gt Header file PIODIO LIB 3 Linkage library for BCB only Delphi3 gt for Delphi3 PIODIO PAS gt Declaration file VB6 gt for Visual Basic 6 PIODIO BAS gt Declaration file The list of demo programs DO D OofCN1 DIO DI O of CN5 and CN6 DIO2 DI O of all Ports INT Interrupt of P2CO PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 43 6 1 Digital Output of CN1 Port0 Port2 This demo program is used to check the digital output status of CN1 You can connect CN1 to a DB 24C and you can check the LED of DB 24C to find the digital output status of CN1 w Digital Output Demo Total Boards Figure 6 1 6 2 Digital input output of CN5 and CN6 This demo program is used to check the digital output and digital input status of CN5 and CN6 im Digital Output Dems Choose a Board Total Boards Number to Active Figure 6 2 PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 44 6 3 Digital output input of all Ports Port0 20 In this demo program you can read digital input status from porti to port20 by selecting Input Mode and Select Port And you can write a digital output value to the I O port by selecting Output Mode and Select P
22. d transient voltage spike that often is occurred in industrial environments as shown in Figure 2 7 Table 2 4 is the comparison of DB 24P and DB 24PD PIO D144 D168 PIO D144 D168 AC or DC Signal OW to 24v Figure 2 7 Table 2 4 DB 24P DB 24PD 50 pin flat cable header Yes Yes D sub 37 pin header No Yes Other specifications Same PIO D144 D 168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 15 2 7 6 DB 24R DB 24RD Relay Board The DB 24R 24 channel relay output board consists of 24 form C relays for efficiently controlling the switch of the load by program The relays are energized by appling 12V 24V voltage signal to the appropriated relay channel on the 50 pin flat cable connector There are 24 enunciator LEDs for each relay channel and the LED is light when their associated relay is activated The control scheme is presented as below Table 2 5 and 2 6 are the description of the daughter board for this application From C Relay PIO D144 D168 Channel 24 From C Relay Relay Switching up to 0 54 at 110ACV or 1A at 24DCV Figure 2 8 Table 2 5 DB 24R DB 24RD 50 pin flat cable header Yes Yes D sub 37 pin header No Yes Other specifications Same Table 2 6 DB 24R DB 24RD 24 x Relay 120V 0 5A DB 24PR DB 24PRD 24 x Power Relay 250V 5A DB 24POR 24 x Photo MOS Relay 350V 01 A DB 24SSR 24 x SSR 250VAC 4A
23. feature extension Therefore do not use this register PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 24 3 3 4 INT Mask Control Register Read Write wBase 5 bb b be Eno ene TEN ENO0 0 gt Disable P2CO of CN1 as a interrupt signal Default ENO 1 gt Enable P2C0 of CN1 as a interrupt signal outp wBase 5 0 Disable interrupt ar outp wBase 5 1 Enable interrupt P2CO Ki outp wBase 5 0x0f Enable interrupt P2C0 P2C1 P2C2 P2C3 3 3 5 Aux Status Register Read Write wBase 7 i Aux0 P2C0 Aux1 P2C1 Aux2 P2C2 Aux3 P2C3 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 6 for more information 3 3 6 Interrupt Polarity Control Register Read Write wBase 0x2A i o jo fo o o mvs finva Invit gt This register provides a function to control invert or non invert of the interrupt signal source The detail application example is shown in below E INVO 1 select the non inverted signal from P2C0 m INVO 0 select the inverted signal from P2CO PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 25 outp wBase 0x2a 0 select the inverted input P2C0 1 2 3 outp wBase 0x2a 0x0f select the non inverted input of P2C0 1 2 3 outp wBase 0x2a 1 select the non inverted input of P2CO
24. he D O latch register only And the latched data will be output when the port is configured as digital output and is activated right away IO select Sec 3 3 9 RESET Sec 3 3 1 disable input Latch Sec 3 3 7 Clock input D O latch CKT Sec 3 3 7 Clock mput Di buffer CRT Figure 2 2 PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 11 2 6 Interrupt Operation The P2C0 P2C1 P2C2 and P2C3 of CN1 can be used as interrupt signal source Refer to Sec 2 1 for P2C0 P2C1 P2C2 P2C3 location The interrupt of PIO D144 D168 is level trigger and Active_High The interrupt signal can be programmable as inverted or non inverted The procedures for how to configure the interrupt signal source are given as follows 1 Make sure the initial level is high or Low from the signal source 2 Ifthe initial state is High please select the inverted setting for interrupt signal source Section 3 3 6 If the initial state is Low please select the non inverted setting for interrupt signal source Section 3 3 6 3 Enable the interrupt function Section 3 3 4 4 lf the interrupt signal is active the interrupt service routine will be started up Note that DEMO3 C amp DEMO4 C are demo programs for single interrupt source and DEMOS C is the demo program for four interrupt sources in ODS operating system If only one interrupt signal source is used the interrupt service routine does not need to identify
25. n wRtn PIODIO SearchCard amp wBoards 0x800100 you will get the total numbers of PIO D144 boards including all versions in PG Return Please refer to Section 5 1 Error Code PIODIO DriverClose Description This subroutine closes the PIODIO Driver and releases the resource from computer device resource This function must be called once before exiting the user s application Syntax void PIODIO DriverClose Parameter None Return None PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 37 5 5 5 PIODIO_GetConfigAddressSpace e Description Obtain the I O address and other information of PIODIO board o Syntax WORD PIODIO GetConfigAddressSpace WORD wBoardNo DWORD wAddrBase WORD wlirqNo WORD wSubVendor WORD wSubDevice WORD wSubAux WORD wSlotBus WORD wSlotDevice e Parameter wBoardNo Input PIODIO board number wAddrBase Output The base address of PIODIO board Only the low WORD is valid wlrqNo Output The IRQ number that the PIODIO board using wSubVendor Output Sub Vendor ID wSubDevice Output Sub Device ID wSubAux Output Sub Aux ID wSlotBus Output Slot Bus number wSlotDevice Output Slot Device ID e Return Please refer to Section 5 1 Error Code PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 38 5 6 INTERRUPT FUNCTION 5 6 1 5 6 2 PIODIO_IntResetCount Description This function will clear the counter
26. ort Then click the Bits Status to output the value w Digital Input Output Damo Choose Total Boards number to Active E MENN Port Number 5 23 405 amp 7890 121314151617 181320 Input Mode e gt OF OF OF OF OR OF OF OF Figure 6 3 6 4 Interrupt of P2CO This demo program uses port0 as digital output port and P2CO as interrupt source Then portO will output a high and low signal repeatedly according to the trigger of the interrupt source Infercupt Demo for PLO DI 44 Total Boards Output 0x01 to Port O Output 0400 to Port O Test the PIODIO Card Figure 6 4 PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 45 Appendix Appendix A Related DOS Software A 1 Where is the related software The related DOS software and demos in the CD is given as following e TC e MSC e BC e TC LIB e TC DEMO e TC DIAG e TC LIB PIO H e TC LIB TCPIO_L LIB e TC LIB TCPIO_H LIB e MSC LIB PIO H e MSC LIB MSCPIO_L LIB e MSC LIB MSCPIO_H LIB e BC LIB PIO H e BC LIB BCPIO_L LIB e BC LIB BCPIO_H LIB gt for Turbo C 2 xx or above gt for MSC 5 xx or above gt for BC 3 xx or above gt for TC library gt for TC demo program gt for TC diagnostic program gt TC declaration file gt TC large model library file gt TC huge model library file gt MSC declaration file gt MSC large model library file gt MSC h
27. rocedure Step 1 Insert the companion CD into the CD ROM driver and wait a few seconds until the installation program starts automatically If it cannot be started automatically for some reasons please double click the file NAPDOS AUTO32 EXE in this CD Step 2 Click the item Install Toolkits Software Manuals Step 3 Click the item PCI Bus DAQ Card Step 4 Click PIO DIO Step 5 Click install Toolkit for Windows 98 Or Me NT 2000 XP Then the InstallShield will start the driver installation process to copy the related material to the indicated directory and register the driver on your computer The driver target directory is as below for different system Windows NT 2000 XP The PIODIO DLL will be copied into CAWINNTISYSTEM32 The NAPWNT SYS and PIO SYS will be copied into CAWINNT SYSTEM32 DRIVERS Windows 98 Me The PIODIO DLL and PIODIO Vxd will be copied into C Windows SYSTEM 4 2 PnP Driver Installation After installing the hardware PIO D144 D168 and power on your PC Windows 98 Me 2000 XP can find a PCI card device and ask user to provide a PIODIO inf to install hardware driver on the computer If user has trouble to precede this process please refer to PnPinstall pdf for more information PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 29 5 DLL Function Description The DLL driver is the collection of function calls of the PIO DIO cards for Windows 98 Me NT 2000 XP system
28. t PIODIO_ActiveLow 1 gt PIODIO_ActiveHigh Return Please refer to Section 5 1 Error Code PIO D144 D 168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 40 5 6 4 PIODIO_IntRemove e Description This subroutine removes the IRQ service routine o Syntax WORD PIODIO_IntRemove void e Parameter None e Return Please refer to Section 5 1 Error Code 5 6 5 Architecture of Interrupt mode N CreateThread Create Event for Device Driver CreateEvent PIODIO IntInstall Set Event to Signal PI DIO IntResetCount Device Dnver Hardware Device Hardware Interrupt Signal Figure 5 2 PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 41 5 6 6 Program Architecture PIODIO_DriverInit Enable All DI DO PIODIO InputByte PIODIO_OutputByte Figure 5 3 PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 42 6 Demo Programs For Windows All of demo programs will not work normally if DLL driver would not be installed correctly During the installation process of DLL driver the install shields will register the correct kernel driver to the operation system and copy the DLL driver and demo programs to the correct position based on the driver software package you have selected Win98 Me NT win2000 XP After driver installation the related demo programs and development library and de
29. t and record all information of wSlotBus and wSlotDevice 6 The records may be as follows Table 3 2 PC s PCI slot WslotBus WslotDevice Slot_1 0 0x07 Slot_2 0 0x08 Slot_3 0 0x09 Slot_4 0 0x0A PCI BRIDGE Slot 5 1 0x0A Slot_6 1 0x08 Slot_7 1 0x09 Slot_8 1 0x07 The above procedure records all information of wSlotBus and wSlotDevice in this PC These values will be mapped to this PC s physical slot And this PIO D144 D 168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 22 mapping will not be changed for any PIO PISO cards Therefore this information can be used to identify the specified PIO PISO card by following steps Step1 Using the information of wSlotBus and wSlotDevice in table 3 2 Step2 Input board number into funtion PIO GetConfigAddressSpace to get the specified card s information especially wSlotBus and wSlotDevice Step3 The user can identify the specified PIO PISO card by comparing the data of the wSlotBus amp wSlotDevice in step1 and step2 Note that normally the card installed in slot 0 is the cardO and card installed in slot1 is the card1 for PIO PISO series cards 3 3 The I O Address Map The I O address of 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 not to change the I O address by user The Plug amp Play BIOS will assign proper
30. tByte DWORD wPortAddr WORD bOutputVal Parameter WPortAddr Input I O port addresses please refer to function PIODIO_GetConfigAddressSpace Only the low WORD is valid bOutputVal Input 8 bit data send to I O port Only the low BYTE is valid Return None PIODIO_InputByte Description This subroutine reads the 8 bits data from the specified I O port Syntax WORD PIODIO InputByte DWORD wPortAdar Parameter wPortAddr Input I O port addresses please refer to function PIODIO_GetConfigAddressSpace Only the low WORD is valid Return 16 bits data with the leading 8 bits are all 0 Only the low BYTE is valid PIO D144 D 168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 34 5 4 3 5 4 4 PIODIO_OutputWord Description This subroutine sends the 16 bits data to the specified I O port Syntax void PIODIO OutputWord DWORD wPortAddr DWORD wOutputVal Parameter WPortAddr Input I O port addresses please refer to function PIODIO_GetConfigAddressSpace Only the low WORD is valid WOutputVal Input 16 bit data send to I O port Only the low WORD is valid Return None PIODIO_InputWord Description This subroutine reads the 16 bits data from the specified I O port Syntax DWORD PIODIO_InputWord DWORD wPortAddr Parameter wPortAddr Input I O port addresses please refer to function PIODIO_GetConfigAddressSpace Only the low WORD is valid Return 1
31. tion can be found in Figure 2 1 Table 2 1 Connector of PIO PAO PA7 PBO PB7 PCO PC7 D144 D168 CN1 PortO Port1 Port2 CN2 Port3 Port4 Port5 CN3 Port6 Port7 Port8 CN4 Port9 Port10 Port11 CN5 Port12 Port13 Port14 CN6 Port15 Port16 Port17 CN7 PIO D168 Only Port18 Port19 Port20 Refer to Sec 2 1 for board layout amp I O port location Note P2C0 P2C1 P2C2 P2C3 of CN1 can be used as interrupt signal source Refer to Sec 2 6 and 2 3 pin assignment for more information PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 7 2 3 Pin Assignment The Pin assignments for all connector of PIO D144 D168 are represented as Table 2 2 and 2 3 All signal source of each digital input or output pin channel are TTL compatible Note that CN7 Port18 Port20 is only for PIO D168 Table 2 2 CN1 37 PIN D type female connector for PortO Port2 E EE NES ae XXXXXXX This pin not available PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 8 Table 2 3 CN2 3 4 5 6 7 50 PIN of flat cable connector for Port3 Port20 Pin ut Pin sian Description Description Number Number 5 psos P80s P11C5 P1405 P17C3 P20c5 6 7 Psou peca Prica P1404 P17C4 P20c4 8 9 Pscs Peca P11c3 Praca pt7ca Pe0cs 10 R P5C2 P8C2 P11C2 P1402 P17C2 P20C2 EEN P5C1 P8C1 P11C1 P14C1 P17C1 P20C1 14 15 psco Peco prico Praco P17corP2oco 16 17
32. uge model library file gt BC declaration file gt BC large model library file gt BC huge model library file The list of demo programs DEMO1 D O of CN1 DEMO2 D O of CN1 CN6 DEMOS Interrupt of P2CO Initial low amp active high DEMOS Interrupt of P2CO Initial high amp active low DEMOS 4 interrupt sources PIO D144 D 168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 46 A 2 DOS LIB Function A 2 1 Table of ErrorCode and ErrorString Table A 1 ErrorCode and ErrorString o Error ID Error String 0 NoError OK No Error 1 DriverHandleError Device driver opened error 2 DriverCallError Got the error while calling the driver functions 3 FindBoardError Can t find the board on the system 4 TimeOut Timeout 5 Ede ae board number Valid range 0 to TotalBoards 1 6 NotFoundBoard Can t detect the board on the system A 2 2 PIO Driverlnit e Description This function can detect all PIO PISO series card in the system Itis implemented based on the PCI Plug amp Play mechanism 1 It will find all PIO PISO series cards installed in this system and save all their resource in the library o Syntax WORD PIO Driverlnit WORD wBoards WORD wSubVendorlD WORD wSubDevicelD WORD wSubAuxID e Parameter WBoards Output Number of boards found in this PC wSubVendor Input SubVendor ID of the board wSubDevice Input SubDevice ID of the board wSubAux Input SubAux
33. unt 39 5 6 2 PIODIO IntGetCount 39 5 6 3 PIODIO Intinstall 40 5 6 4 PIODIO IntRemove 41 5 6 5 Architecture of Interrupt mode 41 5 6 6 Program Architecture 42 6 Demo Programs For Windows 43 6 1 Digital Output of CN1 PortO0 Port2 44 6 2 Digital input output of CN5 and CNE 44 6 3 Digital output input of all Ports PortO 20 45 6 4 ANTSMUDE OR PACO EE EEE RR 45 PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 3 APPSNAX oser Appendix A Related DOS Software eme A 1 Where is the related software A 2 DOS LIB Function PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 4 1 Introduction The PIO D144 D168 consists of one DB 37connector and five 50 pin flat cable connectors six 50 pin flat cable connectors Note that there are three 8 bit ports PA PB amp PC in each connector Every port can be programmable and configured as 8 bit Digital input or output at the same time Therefore the PIO D144 D168 can provide 144 168 channels of TTL compatible D I O 1 1 Specifications e PC compatible PCI bus e PIO D144 One DB 37 connector and five 50 pin flat cable connectors PIO D168 One DB 37 connector and six 50 pin flat cable connectors e Each port consists of three 8 bit ports PA PB amp PC in every connector e Each port can be independently configured as DI or DO at the same time e PIO D144 board 6 connectors 6x3 ports 6x3x8 bits
34. wBase 0xcc er SE Write wBase 0xd0 Er Port12 Write wBase 0xd4 i Get foe iors o Jo oro Portia _ Portis Port 1 gt This port is used as a D I port Port 0 gt This port is used as a D O port These registers provide the function for configuration digital input output port of the PIO PISO series cards Every I O port can be programmed as D I or D O port Note that all ports are used as D I port when the PC is first power on The I O port location is given as follows and configuration example is also presented in below PIO D144 D168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 27 Table 3 4 Connector of PIO PAO PA7 PBO PB7 PCO PC7 D144 D168 CN1 PortO Port1 Port2 CN2 Port3 Port4 Port5 CN3 Port6 Port7 Port8 CN4 Port9 Port10 Port11 CN5 Port12 Port13 Port14 CN6 Port15 Port16 Port17 CN7 PIO D168 Only Port18 Port19 Port20 outportb wBase 0xc8 0 outportb wBase 0xcc 0x3f outportb wBase 0xd0 0x38 PortO to Port5 are all D O port Port6 to Porti1 are all D I port Port12 to Port14 are all D O port Port15 to Port17 are all D I port PIO D144 D 168 User s Manual Ver 2 4 Mar 09 2004 PPH 009 24 28 4 Software Installation The PIlO D144 D168 can be used in DOS and Windows 98 Me NT 2000 XP For Windows O S the recommended installation steps are given in Sec 4 1 4 2 4 1 Software Installing P

Download Pdf Manuals

image

Related Search

Manual manual manualslib manual car manual timesheet manual transmission manuale digitale manually meaning manual wheelchair manual arts high school manually update your device drivers windows manual labor manual definition manual for courts martial manual muscle testing manual muscle testing grades manually register devices with autopilot manual keyboard manual blood pressure cuff manualidades manual lawn mower manual transfer switch manual transmission cars for sale manual therapy cpt code manual libs manual autopilot enrollment

Related Contents

USB-3110 User`s Guide - Measurement Computing  FICHA TÉCNICA CARDIOLITE® 1. NOMBRE DEL  Câmara de vídeo digital HD HDR-AS15  Guida dell`utente - Tastiera remota  USER MANUAL  le mode d`emploi de la Ariete Café Retro  Version 1.0    FMCE Flange Mounted Clutch  The ANITA BONDING CONSOLE GMIEZH1401 for  

Copyright © All rights reserved.
Failed to retrieve file