background image

 

 

5.4.6.    PISODIO_OutputByte 

 
This is function sends 8-bit data to the assigned I/O port. 

 

 

Syntax: 

void PISODIO_OutputByte(DWORD wPortAddr,  WORD bOutputVal); 

 

 

Parameters: 

wPortAddr      [In]  The 32-bit I/O address, where the leading 16 bits are all 0. 

Refer to the PISODIO_GetConfigAddressSpace function.  

 

bOutputVal    [In]  The 16-bit data sent to the I/O port, where the leading 8 bits 

are all 0. 

 

 

Return: 

 

None 

 
 
 
 

5.4.7.    PISODIO_InputByte 

 
This function reads 8-bit data from the assigned I/O port. 

 

 

Syntax: 

WORD PISODIO_InputByte(DWORD wPortAddr); 

 

 

Parameter: 

wPortAddr      [In]  The 32-bit I/O address, where the leading 16 bits are all 0. 

Refer to the PISODIO_GetConfigAddressSpace()function. 

 

 

Return: 

Returns 16-bit data, where the leading 8 bits are all 0. 
 

PISO-P8R8U/P16R16U/PEX-P8R8i/P16R16i  User Manual  (Ver.1.6,Mar/2010, PMH-021-16)   -

41

-

 

Summary of Contents for PISO-P8R8U

Page 1: ...be accurate and reliable However ICP DAS assumes no responsibility for its use nor for any infringements of patents or other rights of third parties resulting from its use Copyright Copyright March 19...

Page 2: ...YOUT 12 2 2 JUMPER SETTINGS 14 2 2 1 AC Filter Jumpers 14 2 3 RELAY OUTPUT 15 2 4 ISOLATED INPUT 16 2 5 DAUGHTER BOARDS 18 2 5 1 DB 37 18 2 5 2 DN 37 18 2 6 PIN ASSIGNMENTS 19 3 I O CONTROL REGISTERS...

Page 3: ...0 5 WINDOWS SDK 35 5 1 PIO_PISO EXE PROGRAM 35 5 2 PROGRAM ARCHITECTURE 36 5 3 ERROR CODES 37 5 4 DLL FUNCTIONS 37 5 4 1 PISODIO_DriverInit 38 5 4 2 PISODIO_DriverClose 38 5 4 3 PISODIO_GetConfigAddre...

Page 4: ...P8R8x series are relay actuator output isolation input interface cards for PCs and compatible computers The former provides 16 input and 16 output channels and the latter provides 8 input and 8 output...

Page 5: ...of 16 8 channel relay output and 16 8 channel input it can be install in PCI Express 1X 4X 8X 16X slot PCI E X16 PCI E X1 PCI E X1 Figure 1 2 PCI E X1 slots and PCI E X16 slots PISO P8R8U P16R16U PEX...

Page 6: ...DC digitally signed input z AC digital input with filter jumper selectable Input channel 8 16 Input type Optically isolated digital input Output channel 8 16 Output type Relay output Relay output Tab...

Page 7: ...Buffers Drivers Buffers Filters Photo couple Relay Relay Relay Relay PEX P16R16i PCI E to PCI Bridge Photo couple Photo couple Photo couple Figure 1 2 1 Function Block Diagram PISO P8R8U P16R16U PEX...

Page 8: ...ST Contact Rating AC 120 V 0 5 A DC 24 V 1 A Operating Time 1 ms typical Release Time 7 ms typical Insulation Resistance 1000 M Life Mechanical 5000000 ops Electrical 100000 ops General Bus Type 3 3 V...

Page 9: ...ng AC 120 V 0 5 A DC 24 V 1 A Operating Time 1 ms typical Release Time 7 ms typical Insulation Resistance 1000 M Life Mechanical 5000000 ops Electrical 100000 ops General Bus Type 3 3 V 5 V Universal...

Page 10: ...tatic wristband grounded at the same point as the anti static mat 3 Inspect the carton for obvious damage Either shipping or handing may cause damages Be sure there is no shipping or handing damage on...

Page 11: ...n isolated cards PISO 813 A D card PISO P32C32 P32S32WU P64 C64 D I O family PISO P8R8 P8SSR8AC P8SSR8DC P16R16U PEX P16R16i D I O family PISO 730 D I O card PISO DA2 D A card 1 7 Product Check List I...

Page 12: ...6R16U Board layout and components Item Description CON1 I O connector CON2 I O connector P16R16U only JP1 8 Filter jumpers JP9 16 Filter jumpers P16R16U only SW1 Card ID switch Table 2 1 1 Components...

Page 13: ...out and components Item Description CON1 I O connector CON2 I O connector P16R16i only JP1 8 Filter jumpers JP9 16 Filter jumpers P16R16i only SW1 Card ID switch Table 2 1 2 Components and description...

Page 14: ...JP8 DI7 JP16 DI15 Table 2 2 Jumper assignments The figure below shows how to select the digital input type Without Filter For DC Signal Default Settling With AC Filter For AC Signal 1 2 3 1 2 3 Figur...

Page 15: ...g relay and shorts the COM to NC contact When the power is first switched on or a reset signal from hardware or software is occurred the control register is 0 and all relays short to NC contact The fo...

Page 16: ...l be increased to a larger range by choosing suitable external resistors The following figure shows how to connect to a larger input Please note that the input current should be limited to between 2 m...

Page 17: ...oltage is ignored the result is Vin If Ri Vin 120 V If 10 mA Ri Vin If 120 V 0 01 A 12000 If the resistor Ri is replaced as 1 2 K the power consumption of Ri can be calculated as follows P I 2 Rex 10...

Page 18: ...or any 37 pin D type I O board connector Figure 2 7 DB 37 2 5 2 DN 37 I O connector block with DIN Rail mounting Two 37 pin D type connectors one for an extension Pin to pin screw terminal for the I O...

Page 19: ...n Cable CON 2 CON 2 CON 1 NO Normally Open COM Common NC Normally Closed DIA Digital Input Point A DIB Digital Input Point B Figure 2 9 Pin assignments PISO P8R8U P16R16U PEX P8R8i P16R16i User Manual...

Page 20: ...to Chapters 4 and 5 for more information regarding the SDK Software Development Kit The driver information is as follows 1 Resource allocated information wBase BASE address mapping for this PC wIrq I...

Page 21: ...single PISO P8R8U P16R16U or PEX P8R8i P16R16i into PCI_slot2 of the PC then run PIO_PISO EXE record the wSlotBus2 and wSlotDevice2 information 5 Repeat steps 3 and 4 for all PCI slots and record all...

Page 22: ...P16R16i card is as follows Address Read Write wBase 0 RESET WBase 7 Card ID Bit 5 2 wBase 0xC0 DI0 DI7 DO0 DO7 wBase 0xC4 DI8 DI15 DO8 DO15 Note Refer to Sec 3 1 for more information regarding wBase...

Page 23: ...us number slot number and total number of boards in the computer and may be changed when another card is added in another PCI slot In this case it may be difficult to know which card is being used to...

Page 24: ...utput Write wBase 0xC0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 DO7 DO6 DO5 DO4 DO3 DO2 DO1 DO0 Write wBase 0xC4 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 DO15 DO14 DO13 DO12 DO11 DO10 DO...

Page 25: ...nostic program can be used to identify all PIO PISO series cards currently installed in the PC and can be useful to check whether the cards are correctly installed in the PCI slot Note The PIO Lib for...

Page 26: ...PCI slot C Ensure that the 3 3 V 5 V jumper setting is correct 5 The specified board number is incorrect The board number must be between 0 and Total Boards 1 6 Refer to error code 3 4 3 Lib Function...

Page 27: ...fy all PIO and PISO series cards wRtn PIO_DriverInit wTotalBoardsFound 0xFF 0xFF 0xFF Syntax WORD PIO_DriverInit WORD wBoards DWORD wSubVendorID WORD wSubDeviceID BYTE wSubAuxID Parameters wBoards Out...

Page 28: ...wSlotDevice Parameters wBoardNo In The Board number starting from 0 wBase Out The base address of the board wIrq Out The IRQ number allocated to the board wSubVendor Out The Sub Vendor ID of the board...

Page 29: ...3 4 Show_PIO_PISO This function displays a text string for a specified PIO PISO ID and is the same as that defined in the PIO H header file Syntax WORD Show_PIO_PISO DWORD wSubVendorID WORD wSubDevice...

Page 30: ...BoardsFound 0x1800 0x0 0xFF if wTotalBoardsFound 0 wRtn 0 printf Driver initialization error Error Code d n int wRtn return 1 printf nThere are d PISO P16R16U Card s in this PC wTotalBoardsFound Get C...

Page 31: ...n printf 2 Display the Card ID n printf 3 DI DO test n printf Q Exit the program n c getch switch c case 1 Select Board printf Please select a board 0 d to active wTotalBoardsFound 1 c getch if c 0 c...

Page 32: ...dsFound printf nInvalid board number n return ExceedBoardNumber Get Card Infomation I O Address PIO_GetConfigAddressSpace wBoardNo wCardAddress wIrqNo wSubVendor wSubDevice wSubAux wSlotBus wSlotDevic...

Page 33: ...xC4 delay a while until DO is ready delay 100 Digital Input Lo inpb wCardAddress 0xC0 Low byte is at 0xC0 Hi inpb wCardAddress 0xC4 High byte is at 0xC4 wDI Hi 8 Lo delay 300 iCounts Compare the DO an...

Page 34: ...0x0000 if kbhit break DIO1 wCardAddress 0xFFFF if kbhit break DIO1 wCardAddress 0x0000 if kbhit break DIO1 wCardAddress 0xAAAA if kbhit break DIO1 wCardAddress 0x0000 if kbhit break DIO1 wCardAddress...

Page 35: ...s All source code for the VB VC Delphi and BCB sample programs are provided in enclosed CD or on the web site for free download 5 1 PIO_PISO EXE Program PIO_PISO exe diagnostic program can be used to...

Page 36: ...iver Access Control the Device Access Control the Device Enable All DI DO Reset Function Call to DLLs DLLs VXDs SYSs Device Driver Services Call to Kernel Mode Hardware Device Device Control User Appl...

Page 37: ...er DLL functions 9 The specified board was not found Please refer to the description for error code 1 10 The specified board number is incorrect The board number must be between 0 and Total Boards 1 5...

Page 38: ...efore calling any other PISO DIO functions Syntax WORD PISODIO_DriverInit Parameters None Return Refer to the error codes in Section 5 3 for more information 5 4 2 PISODIO_DriverClose This function cl...

Page 39: ...In The PISO DIO board number starting from 0 wBase Out The 32 bit base I O address of the card where the leading 16 bits are all 0 wIrqNo Out The IRQ number that the PISO DIO board using wSubVendor O...

Page 40: ...rVersion Out Version number Return Refer to the error codes in Section 5 3 for more information 5 4 5 PISODIO_GetDllVersion This function gets the version number of the PISO DIO DLL driver Syntax WORD...

Page 41: ...In The 16 bit data sent to the I O port where the leading 8 bits are all 0 Return None 5 4 7 PISODIO_InputByte This function reads 8 bit data from the assigned I O port Syntax WORD PISODIO_InputByte...

Page 42: ...user reference The screen capture below is the Delphi demo program that shows the DI DO and Card ID features of the PISO P16R16U card To run the program the Windows driver for the card must be instal...

Page 43: ...for details 4 If a dialog box with an error message was displayed please include the full text of the dialog box including the text in the title bar 5 If the problem involves other applications or har...

Reviews: