16-channel isolation digital input 32-bit counter power over ethernet i/o data acquisition module (8 pages)
Summary of Contents for ICP DAS USA PCI-P16R16 Series
Page 1
PCI-P16R16 Series Classic DLL Software Manual Driver Version 1.3, Oct. 2015 UPPORT This manual relates to the following boards: PCI-P8R8, PCI-P8R8U, PCI-P16R16U, PCI-P16R16, PCI-P16C16, PCI-P16C16U, PCI-P16POR16, PCI-P16POR16U, PEX-P8POR8i and PEX-P16POR16i. ARRANTY 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.
PCI-P16R16 Series Classic Driver DLL Software Manual ABLE OF ONTENTS INTRODUCTION ..............................2 ................................3 EFERENCE SOFTWARE INSTALLATION ........................... 4 ........................ 4 BTAINING THE RIVER NSTALLER ACKAGE ..........................5 RIVER NSTALLING ROCEDURE ........................7 LUG AND RIVER NSTALLATION PCI-P16R16 S ....................
PCI-P16R16 Series Classic Driver DLL Software Manual Introduction The software is a collection of Digital Input/Output subroutines for PCI-P16R16 Series card add-on cards for Windows 95/98/NT, Windows 2000 and 32-bit Windows XP/2003/Vista/7/8 applications. The application structure is presented in the following diagram.
DLL Software Manual 1.1 Reference Please refer to the following user manuals: PCI-P16R16_PnP_Driver_Installation.pdf: Describes how to install the PnP (Plug and Play) driver for PCI-P16R16 series card under Windows 95/98. http://ftp.icpdas.com/pub/cd/iocard/pci/napdos/pci/pci-p16r16/manual/ PCI-P16R16_DLL_OCX_Installation.pdf: Describes how to install the software package under Windows 95/98 and Windows NT.
XP/2003/Vista/7/8 based systems, and the drivers are fully Plug & Play (PnP) compliant for easy installation. The driver installer package for the PCI-P16R16 series can be found on the supplied CD-ROM, or can be obtained from the ICP DAS FTP web site. The location and addresses are indicated in the table...
The hardware user manual is contained in: CD:\NAPDOS\PCI\PCI-P16R16 \Manual\ http://ftp.icpdas.com/pub/cd/iocard/pci/napdos/pci/pci-p16r16/manual/ To install the PCI-P16R16 series classic drivers under Windows XP, follow the procedure described below. Note that if operating system is the Windows 95/98 and Windows NT, refer to “PCI-P16R16_DLL_OCX_Installation.pdf” for more detailed information.
Page 7
PCI-P16R16 Series Classic Driver DLL Software Manual Step 3: Click the “Next>” button to install the driver into the default folder. Step 4: Selection “Yes, restart computer now” and then click the “Finish” button. User Manual, Ver. 1.3, Oct. 2015, Page: 6...
PCI-P16R16 Series Classic Driver DLL Software Manual 2.3 Plug and Play Driver Installation Note that if operating system is the Windows 95 and Windows 98, refer to “PCI-P16R16_PnP_Driver_Installation.pdf” for more detailed information. Step 1: The system should find the new card and then continue to finish the Plug and Play steps.
Page 9
PCI-P16R16 Series Classic Driver DLL Software Manual Step 3: Click the “Finish” button. Step 4: Windows pops up “Found New Hardware” dialog box again. User Manual, Ver. 1.3, Oct. 2015, Page: 8...
DLL Software Manual Uninstalling the PCI-P16R16 Series Classic Driver The ICP DAS PCI-P16R16 Series Classic Driver includes an uninstallation utility that allows you remove the software from your computer. To uninstall the software, follow the procedure described below: Step 1: Select Settings >> Control Panel >> Add/Remove Programs from the Windows Start menu.
Page 11
PCI-P16R16 Series Classic Driver DLL Software Manual Step 3: When the message box loads, click the “Yes” button to uninstall the software. Step 4: After the uninstallation process is complete, a dialog box will be displayed to you that the driver was successfully removed.
DLL Function Descriptions All of the functions provided for PCI-P16R16 series card are listed below in Tables 3-2 to 3-5. This list of functions is expanded on in the text that follows. However, in order to make a clear and simplified description of the functions, the attributes of the input and output parameters for every function is indicated as [input] and [output] respectively, as shown in following Table 3-1.
Page 13
WORD PCI_GetConfigAddressSpace(WORD wBoardNo, WORD *TypeID, WORD *wAddress0, WORD *Waddress1, WORD *wAddress2, WORD *wAddress3, WORD *wAddress4, WORD *wAddress5); Table 3-4: Digital I/O Functions for PCI-P16R16 Series Table Section Function Definition Digital I/O Functions for PCI-P16R16 Series void CALLBACK P16R16_DO(WORD BoardAddr, WORD OutData);...
PCI-P16R16 Series Classic Driver DLL Software Manual 3.1 Error Code Table For the most errors, it is recommended to check: 1. Does the device driver installs successful? 2. Does the card have plugged? 3. Does the card conflicts with other device? 4.
PCI-P16R16 Series Classic Driver DLL Software Manual 3.2 Test Functions PCI_FloatSub2 This function is used to perform the subtraction (as fA - fB in float data type), and is provided for testing DLL linkage purpose. Syntax: float PCI_FloatSub2(float fA, float fB);...
PCI-P16R16 Series Classic Driver DLL Software Manual PCI_ShortSub2 This function is used to perform the subtraction (as nA - nB in short data type), and is provided for testing DLL linkage purposes. Syntax: short PCI_ShortSub2(short nA, short nB); Parameters:...
PCI-P16R16 Series Classic Driver DLL Software Manual PCI_GetDllVersion This function is used to retrieve the version number of the P16R16.DLL. Syntax: WORD PCI_GetDllVersion(void); Parameters: None Returns: DLL version information. For example: If 200(hex) value is return, it means driver version is 2.00.
PCI-P16R16 Series Classic Driver DLL Software Manual 3.3 Driver Initialization Functions PCI_DriverInit This function is used to initialize the kernel driver (napwnt.sys for Windows NT/2K/XP/Vista/7, nappci.vxd for Windows 95/98). It is necessary to call on the function the first time you use this program.
Page 19
PCI-P16R16 Series Classic Driver DLL Software Manual Example: The following is a source code sample: Visual C LRESULT CALLBACK WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM, lParam) static char cBuf[80]; hdc; TEXTMETRIC tm; PAINTSTRUCT ps; switch (iMsg) case WM_CREATE :...
PCI-P16R16 Series Classic Driver DLL Software Manual PCI_DriverClose Terminates the device driver (napwnt.sys for window NT/2K/XP/Vista/7, nappci.vxd for Windows 95/98). In DOS version, this function is provided just for uniformity or Win32 program. It can only return a NoError. Syntax: vio PCI_DriverClose(void);...
[Input] Address of wType as follow: wTypeID Model This board is PCI-P16R16 series This board is PCI-P8R8 series This board is PCI-TMC12 series This board is PIO-DA16 This board is PIO-DA8 User Manual, Ver. 1.3, Oct. 2015, Page: 20...
Page 22
PCI-P16R16 Series Classic Driver DLL Software Manual wAddress0 wAddress1 wAddress2 wAddress3 wAddress4 wAddress5 [Output] The six base address of a PCI device will be stored in these variables. Returns: Refer to “Section 3.1 Error Code Table” User Manual, Ver. 1.3, Oct. 2015, Page: 21...
3.4 Digital I/O Functions for PCI-P16R16 Series Note that PCI-P16R16 series board includes PCI-P16R16(U), PCI-P16C16(U), PCI-P16POR16(U) and PEX-P16POR16i. P16R16_DO This function is used to send 16 bits of data to the DO port for PCI-P16R16 series boards. Syntax: void P16R16_DO(DWORD BaseAddr, WORD OutData); Parameters:...
PCI-P16R16 Series Classic Driver DLL Software Manual P16R16_DI This function is used to read 16 bits of data from the PCI-P16R16’s DI port. Syntax: WORD P16R16_DI(DWORD BaseAddr); Parameters: BaseAddr [Input] DO port base addresses. Returns: The 16-bit value read from DI port ...
Page 25
PCI-P16R16 Series Classic Driver DLL Software Manual /* initiating PCI-P16R16 card and detect how many P16R16/P8R8 card in PC */ wRetVal=PCI_DriverInit(&wBoards); printf("Threr are %d P16R16 Cards in this PC\n",wBoards); if( wBoards==0 ) putch(0x07); putch(0x07); putch(0x07); printf("There are no P16R16/P8R8 card in this PC !!!\n");...
Page 26
PCI-P16R16 Series Classic Driver DLL Software Manual /* getting the Driver version */ wRetVal=PCI_GetDriverVersion(&wVal); printf("Driver Version=%x\n",wVal); /* call a function to test if exact calling LIB */ nVal=PCI_ShortSub2(1,2); printf("PCI_ShortSub2(1,2) = %d\n",nVal); /* call another function to test if exact calling LIB */ fVal=PCI_FloatSub2(1.0,2.0);...
Page 27
PCI-P16R16 Series Classic Driver DLL Software Manual P16R16_DO(P16R16_BaseAddress,0xAAAA); /* Digital output */ delay(500); /* Delay a little time 500ms */ wInData=P16R16_DI(P16R16_BaseAddress); /* Digital input */ printf("Digital Output -> AAAAH | Digital Input -> %04xH\n",wInData); PCI_DriverClose(); return 0; User Manual, Ver. 1.3, Oct. 2015, Page: 26...
PCI-P16R16 Series Classic Driver DLL Software Manual 3.5 Digital I/O Functions for PCI-P8R8 Series Note that PCI-P8R8 series board includes PCI-P8R8(U) and PEX-P8POR8i. P8R8_DO This function is used to send 8 bits of data to the DO port for PCI-P8R8 series boards.
PCI-P16R16 Series Classic Driver DLL Software Manual P8R8_DI This function is used to read 8 bits of data from the PCI-P8R8’s DI port. Syntax: WORD P8R8_DI(DWORD BaseAddr); Parameters: BaseAddr [Input] DO port base addresses. Returns: The 8-bit value read from DI port ...
Page 30
PCI-P16R16 Series Classic Driver DLL Software Manual /* initiating PCI-P16R16 card and detect how many P16R16/P8R8 card in PC */ wRetVal=PCI_DriverInit(&wBoards); printf("Threr are %d PCI-P8R8/P16R16 Cards in this PC\n",wBoards); if( wBoards==0 ) putch(0x07); putch(0x07); putch(0x07); printf("There are no P8R8/P16R16 card in this PC !!!\n");...
Page 31
PCI-P16R16 Series Classic Driver DLL Software Manual /* getting the Driver version */ wRetVal=PCI_GetDriverVersion(&wVal); printf("Driver Version=%x\n",wVal); /* call a function to test if exact calling LIB */ nVal=PCI_ShortSub2(1,2); printf("PCI_ShortSub2(1,2) = %d\n",nVal); /* call another function to test if exact calling LIB */ fVal=PCI_FloatSub2(1.0,2.0);...
Page 32
PCI-P16R16 Series Classic Driver DLL Software Manual wInData=P8R8_DI(P8R8_BaseAddress); /* Digital input */ printf("Digital Output -> 5555H | Digital Input -> %04xH\n",wInData); P8R8_DO(P8R8_BaseAddress,0xAAAA); /* Digital output */ delay(500); /* Delay a little time */ wInData=P8R8_DI(P8R8_BaseAddress); /* Digital input */ printf("Digital Output -> AAAAH | Digital Input -> %04xH\n",wInData);...
Note that none of the demo programs will function correctly if the DLL driver has not been properly installed. The demo programs for PCI-P16R16 Series Classic Driver can be found in the following locations: CD:\NAPDOS\PCI\PCI-P16R16\DLL_OCX\Demo\ http://ftp.icpdas.com/pub/cd/iocard/pci/napdos/pci/pci-p16r16/dll_ocx/demo/ BCB3 for Borland C Delphi3 ...
PCI-P16R16 Series Classic Driver DLL Software Manual For DOS ICP DAS provides a range of demo programs that can be used in a DOS environment, together with the source code for the library and are designed for a variety of development environments.
Page 35
PCI-P16R16 Series Classic Driver DLL Software Manual The available demo programs available are as follows: The list of demo programs Demo1 DI/DO demo for one PCI-P16R16 card Demo2 DI/DO demo for one PCI-P8R8 card Demo3 DI/DO demo for one PCI-P16R16 and one PCI-P8R8 cards...
PCI-P16R16 Series Classic Driver DLL Software Manual Problems Report Technical support is available at no charge as described below. The best way to report problems is to send electronic mail to Service@icpdas.com Service.icpdas@ gmail.com on the Internet. When reporting problems, please include the following information: 1.
Need help?
Do you have a question about the PCI-P16R16 Series and is the answer not in the manual?
Questions and answers