Home
        User`s Manual - ICP DAS USA`s I
         Contents
1.                                                Table 5 1  ET 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 ClearlntCountError Clear counter value Error  6 PIODIO GetlntCountError Get counter of interrput error  7 PIODIO RemovelrqError 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 PIO DI44 D168 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  O
2.        i  CreateThread       Create Event  for Device Driver  CreateEvent           Set Event  to Signal          PIGfDIO IntResetCount       Device               Driver       PIODIO IntInstall      Hardware  Device         Hardware  Interrupt Signal    Figure 5 2    PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         42        5 6 6 Program Architecture    PIODIO PDriverlnit    Enable All DI DO    PIODIO InputByte           PIODIO OutputByte            Figure 5 3    PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         43    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 declaration    header files for different development environments are presented as follows         Demo  gt  demo program      BCB3  gt  for Borland C   Builder 3      APIODIO H  gt  Header file    V PIODIO LIB  gt  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 O of CN1  DIO  
3.    DI O of CN5 and CN6  DIO2   DI O of all Ports  INT   Interrupt of P2CO    PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         44    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    m  Digital Output Demo    Choose a Board    Total Boards Number to Active       SPEZIE to CM of PIO D144   lt  lt  210 y of PIC 144   E Do   s       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     m  Digital Output Demo    Total Boards             Figure 6 2    PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26        45    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 Port    Then click the  Bits Status  to output the value      Digital Input Output Damo    Total Boards        seo ME    Port Number O 2 3 4 5 678 91011 121314151617  18132    ra     e O OF OF OF OR OR OF OF OF OF e O OF OF  Lee eee ee  so       Figure 6 3  6 4 Interrupt of P2C0    This demo program uses port0 as digital output port and P2CO as interrupt  source  Then portO will output a high and low
4.    Interrupt of P2CO   Initial high  amp  active low    DEMOS   4 interrupt sources    PIO D144 D 168 User   s Manual  Ver 2 6  May  2009  PMH 009 26        47    A 2 DOSLIB Function  A 2 1 Table of ErrorCode and ErrorString    Table A 1 ErrorCode and ErrorString                                        UT 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 ExcaedBeandiimber Tene board number   Valid range  0 to TotalBoards  1   6 NotFoundBoard Can t detect the board on the system       A 2 2 PIO Driverinit      Description    This function can detect all PIO PISO series card in the system  It is  implemented based on the PCI Plug  amp  Play mechanism 1  It will find all  PIO PISO series cards installed in this system and save all their  resource in the library       Syntax   WORD PIO Driverlnit  WORD  wBoards  WORD wSubVendorlD   WORD wSubDevicelD  WORD wSubAuxID       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 ID of the board     Return     Please refer to   Table A 1      PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26        48    A 2 3 PIO GetConfigAddressSpace      Description     The user can use this function to save resource of a
5.   PMH 009 26         20    132001   one of the following cards    detail information    0x00 OxC400 PIO D144    Slot Bus        Figure 3 1    PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         2     Table 3 1  Dd drum Description Sub Sendor   Sub Device   Sub AUX  PIO D168 168   DIO 9880 01  PIO D168A 168   DIO  PIO D144 REV4 0    144   D I O 80  5C80   PIO D96 96   D I O   80    PIO D64  REV2 0    64   D I O 80  4080     PIO D56 24   DIVO   01 40     PIO D48   1 48  DU O   80   o   30    PIO D24 24   D  O 80 01 40  PIO 821   Multi function  PIO DA16 16  D A                      PIO DA4   PISO C64 64   isolated D O   Current sinking    PISO A64 64   isolated D O   Current sourcing   64   isolated D I    PISO P32C32 32  isolated D O  p    Current sinking     32  isolated D I  PISO P32A32 32 isolated DO  ped  Current sourcing    32  isolated D I  8  isolated D I    8   220 V relay  8  isolated D I    8   SSR  AC  8  isolated D I    8   SSR  DC  16 DI   16 D O    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 6  May  2009  PMH 009 26         22    3 2 The Assignment of l O Address    The Plug  am
6.  0  2  4  6  8  0 ND  2  4  6  8  0  2  4  6  8      o3   P4B0  P7B0  P10B0  P13B0  P16B0  P19B0   3      ND  ND  ND  ND  ND  GND  GND    Fa   P3A1  P6A1  P9A1  P12A1  P15A1  P18A1   46   GND   232 4  P3A0  P6A0  P9A0  P12A0  P15A0  P18A0   48   GND    GND    2  2 3  3 3    41   P3A3  P6A3  P9A3  P12A3  P15A3 P18A3   42    4  4  4    Bega P3A2  P6A2  P9A2  P12A2  P15A2  P18A2 E    4  4  4  4       3  5  7  9  1  3  5  7    29   P4B1 P7B1  P10B1 P13B1 P16B1  P1981   30    1  3  5  7  9  1  3  5  7       PIO D144 D168 User   s Manual  Ver 2 6  May  2009  PMH 009 26         10    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   W D I O ports are all configured as Digital input port   W  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 
7.  No       I O Connector    Female DB37 x 1  50 pin box header x 6       Dimensions  L x W x D     200 mm x 105 mm x 22 mm       Power Consumption    1300 mA    5 V       Operating Temperature    0   60   C       Storage Temperature     20   70   C          Humidity       5   85  RH  non condensing       1 2 Features    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 2144 bits   PIO D168 board   7 connectors   7x3 ports   7x3x8 bits 2168 bits    e 4interrupt sources  P2C0  P2C1  P2C2  P2C3     PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         5       1 3 Product Check List    Your package includes the following items   e One PIO D144 D168 card   e One company floppy diskette or CD    e One Quick Start Guide    It is recommended to read the Quick Start Guide first  All the necessary and  essential information are given in the Quick Start Guide as follows    e Where to get the software driver  demo programs and other resources    e How to install the software    e How to test the card     Attention      If any of these items is missing or damaged  contact the dealer from whom you  purchased the product  Save the shipping material
8.  Write   wBase 7       Aux0 P2C0  Aux1 P2C1  Aux2 P2C2  Aux3 P2C3  Aux7 4 Aux ID  Refer  to DEMO5 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    pgs       ois inva invi  nvo      This register provides a function to control invert or non invert of the interrupt  signal source  The detail application example is shown in below     B INVO 1 gt  select the non inverted signal from P2C0  B INVO 0 gt  select the inverted signal from P2CO    PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         26    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 ui    outp wBase 0x2a  1      select the non inverted input of P2CO        select the inverted input P2C1 2 3      outp wBase 0x2a 3      select the non inverted input of P2C0 1 di     select the inverted input P2C2 3       Refer to Sec  2 6 and DEMOB5 C for more information     3 3 7 Read Write 8 bit data Register    Read Write   wBase 0xc0    pz be fs jp jp jp i no         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 
9.  and 2 3 pin assignments for more information     PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         8    2 3 Pin Assignments    The Pin assignments for all connectors 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 Port0 Port2    Lg cnp Welle     i0 eee  Eee Settala i ee D  Case Sb se dl  gt    eda    4    PiB6   29   Poe           PiB5   24   P205        L 66   j   sci   io   ped     7   pins   2   Pes      PiB2   27        P202             PiBi   28   P201       pios ER I     P2601  11   eno   30   POAT    02   ne   a   Pose    e  _am_   ee Pus           is   ono   se ome         16   noe   ss   Pose    17   ann   se   POA   18   voc   37   Por _       19   GND   XXXXXXX   This pin not available         PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         9    Table 2 3 CN2 3 4 5 6 7  50 PIN of flat cable connector for Port3 Port20    zm Description rn D ipti  Ipti escription  Number P Number P    1 P5C7  P8C7  P11C7  P14C7  P17C7  P20C7 GND   a P5C6  P8C6  P11C6  P14C6  P17C6  P20C6 GND    3  5 P5C5  P8C5  P11C5  P14C5  P17C5  P20C5 6e   GND  7   Psca paca Prica praca pizca poca   8   GND  9   Pscarpaca pricsrpraca przcs p20cs   10   GND  ND  ND  ND  ND  ND  2 ND  ND  2 ND    27   P4B2  P7B2  Pos P13B2  P16B2  P1982   28   GND    0  2  4  6  8 
10.  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 C  WINNT SYSTEM32    The NAPWNT SYS and PIO SYS will be copied into  C  WINNT 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 6  May  2009  PMH 009 26         30    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  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 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         31    5 1 Table of ErrorCode and ErrorString           
11.  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 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         35    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   16 bit data  Only the low WORD is valid     PIO D144 D168 User   s Manual  Ver 2 6  May  2009  PMH 009 26         36    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 su
12.  signal repeatedly according to  the trigger of the interrupt source     aw Inferrupt Demo for PIO D1 44    Total Bosrds E  Number to Active    Send the HIGH and LO to the Port 0 to generate the TRIGGER  i lace the internal    trigger by external   rigger     Output 0x01 to Port 0  c  Port 0    ait E  Got Event  na    Bale 0x01 o Port 0    ae    Test the PIODIO Card        Figure 6 4    PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26        46    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      gt  for Turbo C 2 xx or above  e  MSC      gt  for MSC 5 xx or above  e  BC      gt  for BC 3 xx or above    e  TC LIB      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 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 huge 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    DEMO4
13. 2 7 4 DB 37 14  2 7 2 DN 37  amp  DN 50 14  2 7 3 DB 8125 15  2 7 4 ADP 37 PCI  amp  ADP 50 PCI 15  2 7 5 DB 24P  DB 24PD Isolated Input Board 16  2 7 6 DB 24R  DB 24RD Relay Board 17  2 7 7 DB 24PR  DB 24POR  DB 24C 18  2 7 8 Daughter Board Comparison Table 19  V O Control Register iti iii iaia aiar  20  3 1 How to Find the VO Address    ia Air e as 20  3 2 The Assignment of I O Address    23  3 3 The IO Address MAD siu i trt It riali nent men 24  3 3 1 RESET Control Register 25  3 3 2 AUX Control Register 25  3 3 3 AUX data Register 25  3 3 4 INT Mask Control Register 26  3 3 5 Aux Status Register 26  3 3 6 Interrupt Polarity Control Register 26  3 3 7 Read Write 8 bit data Register 27  3 3 8 Active I O Port Control Register 27  3 3 9 I O Selection Control Register 28  Software Installation secto O  30  4 1 Software Installing Procedure  i et nbi at ds 30    2 PnP Driver Installation    tete aet atenta etta 30  DEE Function DeSofIpliOlt s uec i DAN m tp MAMMA ug  31  5 1 Table of ErrorCode and ErrorString                            eseesssssssuss 32  5 2 Function Descriptions sara tanins net 32  9 3 FUNCTIONS  OE TES  ns rr ir raro ra Roi lr raso Ra ep an to ursa 33  5 3 1 PIODIO GetDllVersion 33    PIO D144 D 168 User s Manual  Ver 2 6  May  2009  PMH 009 26      5 3 2 PIODIO ShortSub 34    5 3 3 PIODIO FloatSub 34   5 4  Digital VO FUNG TIONS  sommes 35  5 4 1 PIODIO OutputByte 35   5 4 2 PIODIO InputByte 35   5 4 3 PIODIO OutputWord 36   5 4 4 PIODIO InputWord 36   5 5 D
14. 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 applying 12 V 24 V 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 Normal Open    Normal Close    PIO D144 D168        Note  Channel  24 From C Relay  Relay  Switching up to 0 5 A at 110 Vac  or 1 Aat 24 Voc                                                    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  120 V  0 5 A   DB 24PR DB 24PRD 24 x Power Relay  250 V  5 A   DB 24POR 24 x Photo MOS Relay  350 V  01 A   DB 24SSR 24 x SSR  250 Vac  4 A   DB 24C 24 x O C   30 V  100 mA   DB 16P8R 16 x Relay  120 V  0 5 A    8 x isolated input             PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         17    2 7 7 DB 24PR  DB 24POR  DB 24C  Table 2 7       DB 24PR  24 x power relay  5 A 250 V       DB 24POR   24 x Photo MOS relay  0 1 A 350 Vac                DB 24C 24 x open collector  100 mA per channel  30 V max        The DB 24PR  24 channel power r
15. 26         38    5 5 5 PIODIO GetConfigAddressSpace      Description    Obtain the I O address and other information of PIODIO board      Syntax   WORD PIODIO GetConfigAddressSpace  WORD wBoardNo   DWORD  wAddrBase  WORD  wirqNo  WORD  wSubVendor   WORD  wSubDevice  WORD  wSubAux  WORD  wSlotBus   WORD  wSlotDevice        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     Return   Please refer to  Section 5 1 Error Code      PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         39    5 6 INTERRUPT FUNCTION    5 6 1    5 6 2    PIODIO IntResetCount  Description   This function will clear the counter 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 6  May  2009  PMH 00
16. 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 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         11    2 5 D I O Architecture    The digital I O control architecture for PIO D144  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 the 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     I O 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     D Clock input    DIT buffer CKT       Figure 2 2    PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         12    2 6 Interrupt Operation    The P2C0  P2C1  P2C2 and P2C3 of CN1 can be used as interrupt signal  source  Refer 
17. 68 channels of TTL compatible D I O     1 1 Specifications    Model Name PIO D144    Programmable Digital 1 0             Channels 144  Digital Input  Compatibility 5 V TTL       Input Voltage    Response Speed    Logic 0  0 8 V max     Logic 1  2 0 V min     1 2 MHz  Typical        Digital Output       Compatibility    5 V TTL       Output Voltage    Logic 0  0 4 V max   Logic 1  2 4 V min        Output Capability    Sink  0 8 mA   0 8 V  Source   2 4 mA   2 0 V       Response Speed       1 2 MHz  Typical                 General   Bus Type 5 V PCI  32 bit  33 MHz  Data Bus 8 bit   Card ID No       I O Connector    Female DB37 x 1  50 pin box header x 5       Dimensions  L x W x D     180 mm x 105 mm x22 mm       Power Consumption    1100 mA Q  5 V       Operating Temperature    0   60   C       Storage Temperature     20   70   C          Humidity       5   85  RH  non condensing       PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         4       Model Name PIO D168    Programmable Digital 1 0                Channels 168  Digital Input   Compatibility 5 V TTL  Input Voltage Logic 0  0 8 V max     Logic 1  2 0 V min        Response Speed    1 2 MHz  Typical        Digital Output       Compatibility    5 V TTL       Output Voltage    Logic 0  0 4 V max   Logic 1  2 4 V min        Output Capability    Response Speed    Sink  0 8 mA   0 8 V  Source   2 4 mA   2 0 V    1 2 MHz  Typical              General   Bus Type 5 V PCI  32 bit  33 MHz  Data Bus 8 bit   Card ID
18. 9  PMH 009 26         23    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 card0 and card installed  in slot is the cardi 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 I O address to each PIO PISO series card  very well  The I O addresses of PIO D144 D168 are given as follows  which are  based on the base address of each card    Table 3 3    Address     Read Write                            WBase 0      RESEn control register RESET control register  WBases2     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 
19. 9 26         40    5 6 3 PIODIO Intinstall        Description     This subroutine installs the IRQ service routine         Syntax     WORD PIODIO Intinstall WORD wBoardNo  HANDLE  hEvent   WORD wilnterruptSource  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    wlnterruptSource    Input  What the Interrupt Source to be used    Please refer to the following table     Table 5 4       Card No     winterruptSource    Description       PIO D48    PC3 PC7 from Port 2       PC3 PC7 from Port 5       Cout0       Cout2       PIO D56  PIO D24    OIN   oO    PCO       PC1       PC2       PC3       PIO D64    EXTIRQ       EVTIRQ       TMRIRQ       PIO D96    P2C0       P5CO       P8CO       P11C0       PIO D144 D168    P2C0       P2C1       P2C2             INI       CO  GO  TO   ON     Oo cn             P2C3       wActiveMode    Input  When to trigger the interrupt      0    PIODIO ActiveLow  1  gt  PIODIO ActiveHigh        Return     Please refer to  Section 5 1 Error Code      PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         41       5 6 4 PIODIO IntRemove      Description   This subroutine removes the IRQ service routine      Syntax   WORD PIODIO IntRemove  void           Parameter   None      Return   Please refer to  Section 5 1 Error Code      5 6 5 Architecture of Interrupt mode    
20. 9 26        50    
21. CI 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 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         19    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          PIO D168A  gt     e Vendor ID  e Device ID      0xE159    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 05    e Vendor ID z OxE159  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   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 6  May  2009
22. PC is first power on     outp wBase 0xc0  Val      write to D O port     Val inp wBase 0xc0      read from D I 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    De lbs oa  bs  b    bn bo         D7    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 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         27    outp wBase 0xc4 0      O portO is active now     outp wBase 0xc4 1      IO porti is active now     outp wBase 0xc4 17      IO port17 is active now       outp wBase 0xc4 20      VO port20 is active now       3 3 9 1 0 Selection Control Register    Write   wBase 0xc8       o  Ports  Porta  Pots  Ponta  Porn  Poro     Write   wBase 0xcc  o Jo  Pom  Porio  Pono  Ports  Porz  Pons     Write   wBase 0xd0  o  o  Pom7  Pore  Poris  Pois  Pori3  Pori2       Write   wBase 0xd4    p  de RE             o jPor20  porto  Porte      Port  1    This port is used as a D I port  Port  0  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 
23. 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 6  May  2009  PMH 009 26         1    Tables of Contents    1     MOC O a RARE HA SLM RAO RA SL RAM ERA SA ORA A CRAS a 4  HMS 0121071110721110  a c ua E 4  1 2 FOAIUICS                                      5  1 3 Product Check EISE oe esque iei Her anandia 6  Hardware contigUrallofrs   oe li eee e a e SUE UR UA QU ola 7  2 1   Board Eayolt ien ei dum iaia AR VAR ida 7  2 2 Pa FONLOCAlo PME 8  23 PT ASSIONMONIS s iore E aces abs ott IE oes abs ananas o RA Eo RA 9  24  Epable V0O Op  rati  rn riattare ii 11  2 5 DIVO Architecture asta ita apa rta dde 12  2 6 Interrupt Operation  scroller duse prune esapude 13  2  7 Date BOAS sanatorie neo CHI Foqv donnons 14  
24. S suit i   i MO AEn a  frDB3Ta   i tas Den ee un      ne M 4I 20 pinflat cable 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 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         15    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 24 V 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 and 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 D1 44168    AC or DC Signal                         0 Vto24V  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 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         16    
25. broutine 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 Driverlinit     Parameter    None  Return   Please refer to  Section 5 1 Error Code      PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         37    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  dwPlOCaralD      Parameter    wBoards    Output  Get the total boards   DwPlOCardiD    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  versions  no matter what version Sub ID you input  Following is the  example demonstration   wRtnzPIODIO SearchCard  amp wBoards  0x800100    you will get the total numbers of PIO D144 boards including all versions  in PC     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 6  May  2009  PMH 009 
26. e  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    DOE OT dx 09  O ics    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  20 ms is  enough for all O S     PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         13    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        A    TRO    l aay  T  DI  ni erar SE 37 PIN cable    UL TES Dn  ems     ile     ORE a a  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 cable header win DIN Rail  mounting  They are also designed for easy wire connection by pin to pin     wee  CODY 09  ni  D4    37 PIN cable    Ce    Le        imum oom m T  Figure 2 4    PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26      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 headers in the  DB 8125        de   DBS   abi PER
27. elay 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 5 A current load at 250  Vac 30 Voc  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  12 Voc or  24 Voc  external power supply  as shown in figure 2 9                  Normal Open  From A Relay    COM    50 Pin cable  PIO D144 D168    50 Pin cable    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 5 A at 110 Vac 5 A at 30 Voc     PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         18    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 P
28. given as follows and configuration example is also  presented in below     PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         28    Table 3 4                                        Connector of PIO  PAO   PA7   PBO   PB7   PCO   PC7  D144 D168  CNI Port0 Porti 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      PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         PortO to Port5 are all D O port          Port6 to Port11 are all D I port              Port12 to Port14 are all D O port        Port15 to Port17 are all D I port          4  Software Installation    The  PIO 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 Procedure  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
29. ll PIO PISO  cards installed in this system  Then the application program can control  all functions of PIO PISO series card directly       Syntax    WORD PIO GetConfigAddressSpace wBoardNo  wBase  wlrq   wSubVendor   wSubDevice  wSubAux  wSlotBus  wSlotDevice         Parameter     wBoardNo    Input  Board number  wBase    Output  The base address of the board  wlrq    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       Return    Please refer to   Table A 1      A 2 4 PIO GetDriverVersion      Description    This subroutine obtain the version number of PIODIO driver        Syntax   WORD PIO GetDriverVersion  WORD  wDriverVersion         Parameter   wDriverVersion    Output  Address of wDriverVersion        Return   Please refer to   Table A 1      PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26        49    A 2 5  ShowPIOPISO      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      Syntax   WORD ShowPIOPISO wSubVendor  wSubDevice  wSubAux       Parameter    wSubVendor    Input  SubVendor ID of the board  wSubDevice    Input  SubDevice ID of the board  wSubAux    Input  SubAux ID of the board       Return   Please refer to   Table A 1      PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 00
30. p  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 O  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 O0  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 wSlotDevice1   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 slot 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 Ox0A  PCI BRIDGE   Slot_5 1 Ox0A  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 D168 User s Manual  Ver 2 6  May  200
31. register   INT polarity control register    Note  Wbase 0xd4 is only for PIO D168        PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         24    3 3 1 RESET Control Register     Read Write   wBase 0       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 this Aux is used as a D I  Aux  1  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 feature extension  Therefore  do not use this  register     PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         25    3 3 4 INT Mask Control Register     Bead Write      wBase 5    o b b   F       Ens Jen ew Jena    EN0 0 gt  Disable P2CO of CN1 as a interrupt signal  Default    ENO 1  Enable P2C0 of CN1 as a interrupt signal    outp wBase 5 0      Disable interrupt     outp wBase 5 1      Enable interrupt P2CO y  outp wBase 5 0x0f       Enable interrupt P2C0 P2C1 P2C2 P2C3       3 3 5 Aux Status Register     Read
32. river Relative Functions occi elia oe aeo ea ia 37  5 5 1 PIODIO GetDriverVersion 37   5 5 2 PIODIO Driverinit 37   5 5 3 PIODIO SearchCard 38   5 5 4 PIODIO DriverClose 38   5 5 5 PIODIO GetConfigAddressSpace 39   56 INTERRUPT FUNG IION  iiiter d desees uetus ee te e t etinm 40  5 6 1 PIODIO IntResetCount 40   5 6 2 PIODIO IntGetCount 40   5 6 3 PIODIO Intinstall 41   5 6 4 PIODIO IntRemove 42   5 6 5 Architecture of Interrupt mode 42   5 6 6 Program Architecture 43   6  Demo Programs Tor Windows   esee exerce tex eden pen du xe dun Enn d eR ee 44  6 1 Digital Output of CN1 Port0 Port2                        esses 45  6 2 Digital input  output of CNS and CN6                                               45  6 3 Digital output   input of all Ports  Port0 20                                uuss  46  6 4 Interrupt of P2C0 Et tlc c nn 46  jeep etc UE 47  Appendix A  Related DOS Software                                                            47  A 1 Where is the related software    47   As  DOS EIB  EUnDctiol    cese rr cereo spem deca corp e 48    PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         3    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 1
33. s Manual  Ver 2 6  May  2009  PMH 009 26         33    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 FloatSub 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 6  May  2009  PMH 009 26         34    5 4 Digital 1 0 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 OutputByte DWORD wPortAddr  WORD bOutputVal     Parameter     WPortAdar    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 wPortAddr     Parameter     wPortAddr    Input  I O port addresses 
34. s and carton in case you want to ship    or store the product in the future     PIO D144 D168 User   s Manual  Ver 2 6  May  2009  PMH 009 26         6    Hardware configuration    2     2 1 Board Layout          CHI    Port  Pert   Port        DB 37 PIN       CNZ CN3    Furi    Port4  Ports    SO PIN O PIN       CN4    Por    Port   Port          50 PIN    PIO D144 D168    PCI BUS       CN5    Port12  Fort   Port 4       SO PIN       CN    Partis    Portl6  Portl         FIN    Unly  PIO D168    CN     Por     Port   Port         50 PIN          Figure 2 1    PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         7    2 2 1 0 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 location can be found in Figure 2 1                                      Table 2 1  Connector of PAO   PA7 PBO   PB7 PCO   PC7  PIO 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
35. 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  If the 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   f the interrupt signal is active  the interrupt service routine will be started    up     Note that DEMOS C  amp  DEMO4 C are demo programs for single interrupt  source and DEMO5 C is the demo program for four interrupt sources in DOS  operating system  If only one interrupt signal source is used  the interrupt  service routine does not need to identify the interrupt source   Refer to  DEMOS 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 DEMO5 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 P2C0  amp  non inverter inverted the P2CO signal  If P2C1 is active  service P2C1  amp  non inverted inverted the P2C1 signal  If P2C2 is activ
36. utput  Yes Yes                PIO D144 D168 User s Manual  Ver 2 6  May  2009  PMH 009 26         32       Table 5 3    Function Definition       float    PIODIO FloatSub float fA  float fB         short    PIODIO ShortSub short nA  short nB         WORD    PIODIO GetDllVersion void         WORD    PIODIO Driverlnit void         void    PIODIO DriverClose void         WORD    PIODIO SearchCard  WORD  wBoards  DWORD dwPlOCaralD         WORD    PIODIO GetDriverVersion  WORD  wDriverVersion         WORD    PIODIO Senio E pan WORD wBoardNo  DWORD   wAddrBase  WORD  wirqNo  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    PIODIO_Intinstall WORD wBoardNo  HANDLE  hEvent  WORD  wInterruptSource  WORD wActiveMode         WORD    PIODIO IntRemove void         WORD    PIODIO IntResetCount void         WORD       PIODIO IntGetCount DWORD  dwlIntCount      5 3 FUNCTIONS OF TEST    5 3 1    PIODIO GetDIlVersion        Description   To get the version number of PIODIO DLL driver       Syntax    WORD PIODIO GetDllVersion Void       Parameter    None      Return   200 hex  for version 2 00    PIO D144 D168 User 
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
Scarica documento  MODE D`EMPLOI FAUCHEUSE A DISQUES PORTEE  Whirlpool Roper FEP310KV3 User's Manual  Manual mini Compressor 24-01-2011  "取扱説明書"  Samsung Gear 2 Instrukcja obsługi  como diseñar su jardin  Wells WV-FG SERIES Specifications  System Description - Remote I/O-Systeme ANTARES  ADuC812 Errata Sheet    Copyright © All rights reserved. 
   Failed to retrieve file