PEX/PIO/PISO-DA Series Card
Analog Output Boards
User Manual/ Ver. 3.1/ Oct. 2013/ PMH-0010-31/ Page: 54
ICP DAS provides the following necessary functions:
1.
PIO_DriverInit(&wBoard, wSubVendor, wSubDevice, wSubAux)
2.
PIO_GetConfigAddressSpace(wBoardNo,*wBase,*wIrq, *wSubVendor,
*wSubDevice, *wSubAux, *wSlotBus, *wSlotDevice)
3.
Show_PIO_PISO(wSubVendor, wSubDevice, wSubAux)
6.1.2 PIO_DriverInit
PIO_DriverInit(&wBoards, wSubVendor,wSubDevice,wSubAux)
wBoards=0 to N
The number of boards found in this PC
wSubVendor
The subVendor ID of the board you are seeking
wSubDevice
The subDevice ID of the board your are seeking
wSubAux
The subAux ID of the board you are seeking
This function can be used to detect all PIO/PISO series cards within your system.
Implementation is based on the PCI Plug&Play mechanism. The function locates all PIO/PISO
series cards installed in this system and save the relevant resource information in the library.
Sample program 1: Detect all
PEX/PISO/PIO-DA series
cards installed in this PC.
/* Step 1: Detect all PEX/PISO/PIO-DAx series cards installed in this PC */
wSubVendor=0x80; wSubDevice=4; wSubAux=0x00;
/* For PIO-DA4/8/16 series cards*/
wRetVal=
PIO_DriverInit
(&wBoards, wSubVendor,wSubDevice,wSubAux);
printf("There are %d PIO-DA16 Cards in this PC\n",wBoards);
/* Step 2: Save the resource information for all
PIO-DA4/8/16 series cards installed in this PC */
for (i=0; i<wBoards; i++)
{
PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&wID1,&wID2,&wID3,&wID4,&wID5);
printf("\nCard_%d: wBase=%x, wIrq=%x", i,wBase,wIrq);
wConfigSpace[i][0]=wBaseAddress;
/*Save the resource information for this card */
wConfigSpace[i][1]=wIrq;
/*Save the resource information for this card */
}
ГК
Атлант
Инжиниринг
–
официальный
представитель
в
РФ
и
СНГ
+7(495)109-02-08 [email protected] www.bbrc.ru