ICP DAS USA PCI-P16R16 Series Software Manual

ICP DAS USA PCI-P16R16 Series Software Manual

Classic driver dll
Hide thumbs Also See for PCI-P16R16 Series:

Advertisement

Quick Links

PCI-P16R16 Series Classic
DLL Software Manual
Driver
S
UPPORT
This manual relates to the following boards: PCI-P8R8, PCI-P8R8U, PCI-P16R16U,
PCI-P16R16,
PCI-P16C16,
PEX-P8POR8i and PEX-P16POR16i.
W
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.
W
ARNING
ICP DAS assumes 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, nor for any infringements of
patents or other rights of third parties resulting from its use.
C
OPYRIGHT
Copyright © 2015 by ICP DAS. All rights are reserved.
T
RADEMARK
Names are used for identification only and may be registered trademarks of their
respective companies.
C
US
ONTACT
If you have any question, please feel to contact us at:
service@icpdas.com; service.icpdas@gmail.com
We will give you quick response within 2 workdays.
PCI-P16C16U,
PCI-P16POR16,
Version 1.3, Oct. 2015
PCI-P16POR16U,

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PCI-P16R16 Series and is the answer not in the manual?

Questions and answers

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.
  • Page 2: Table Of Contents

    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 ....................
  • Page 3: Introduction

    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.
  • Page 4: Reference

    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.
  • Page 5: Software Installation

    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...
  • Page 6: Driver Installing Procedure

    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...
  • Page 8: Plug And Play Driver Installation

    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...
  • Page 10: Uninstalling The Pci-P16R16 Series Classic Driver

    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.
  • Page 12: Dll Function Descriptions

    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);...
  • Page 14: Error Code Table

    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.
  • Page 15: Test Functions

    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);...
  • Page 16: Pci_Shortsub2

    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:...
  • Page 17: Pci_Getdllversion

    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.
  • Page 18: Driver Initialization Functions

    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 :...
  • Page 20: Pci_Driverclose

    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);...
  • Page 21: Pci_Getconfigaddressspace

    [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...
  • Page 23: Digital I/O Functions For Pci-P16R16 Series

    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:...
  • Page 24: P16R16_Di

    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...
  • Page 28: Digital I/O Functions For Pci-P8R8 Series

    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.
  • Page 29: P8R8_Di

    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);...
  • Page 33: Demo Programs

    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 ...
  • Page 34: For Dos

    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...
  • Page 36: Problems Report

    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.

Table of Contents