PISO-813 Series Card
32-channel Single-Ended Isolated A/D Board
User Manual, Ver. 1.5, Feb. 2014, PMH-003-15, Page: 28
/* step1: detect all PISO-813 cards first */
wSubVendor=0x80; wSubDevice=0xa; wSubAux=0x0;
/* for PISO-813 */
wRetVal=PIO_DriverInit(&wBoards, wSubVendor,wSubDevice,wSubAux);
printf("Threr are %d PISO-813 Cards in this PC\n",wBoards);
/* step2: save resource of all
PISO-813
cards installed in this PC */
for (i=0; i<wBoards; i++)
{
PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&t1,&t2,&t3,&t4,&t5);
printf("\nCard_%d: wBase=%x, wIrq=%x", i,wBase,wIrq);
wConfigSpace[i][0]=wBaseAddress;
/* save all resource of this card */
wConfigSpace[i][1]=wIrq;
/* save all resource of this card */
}
/* step3: control the
PISO-813
directly */
wBase=wConfigSpace[0][0];
/*
get base address the card_0
*/
outport(wBase,1);
/*
enable all D/I/O operation of card_0
*/
wBase=wConfigSpace[1][0];
/*
get base address the card_1
*/
outport(wBase,1);
/*
enable all D/I/O operation of card_1
*/
6.1.2 PIO_GetConfigAddressSpace
PIO_GetConfigAddressSpace(wBoardNo,*wBase,*wIrq, *wSubVendor, *wSubDevice, *wSubAux,
*wSlotBus, *wSlotDevice)
Parameter
Description
wBoardNo=0 to N
totally N+ oards fou d y PIO_Dri eI it ….
wBase
base address of the board control word
wIrq
allocated IRQ channel number of this board
wSubVendor
subVendor ID of this board
wSubDevice
subDevice ID of this board
wSubAux
subAux ID of this board
wSlotBus
hardware slot ID1 of this board
wSlotDevice
hardware slot ID2 of this board
The user can use this function to save resource of all PIO/PISO cards installed in this system. Then
the application program can control all functions of PIO/PISO series card directly.
The sample program source is given as follows:
ГК
Атлант
Инжиниринг
–
официальный
представитель
в
РФ
и
СНГ
+7(495)109-02-08 [email protected] www.bbrc.ru