Pio_Getconfigadressspace - ICP DAS USA PEX Series User Manual

Analog output boards
Table of Contents

Advertisement

ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ
+7(495)109-02-08 sales@bbrc.ru www.bbrc.ru
PEX/PIO/PISO-DA Series Card
Analog Output Boards
6.1.3

PIO_GetConfigAdressSpace

PIO_GetConfigAddressSpace(wBoardNo,*wBase,*wIrq,
*wSubVendor,*wSubDevice,*wSubAux,*wSlotBus, *wSlotDevice)
wBoards=0 to N
wBase
wIrq
wSubVendor
wSubDevice
wSubAux
wSlotBus
wSlotDevice
The function can be used to save the resource information for all PIO/PISO cards installed in
this system. The application program can then directly control all functions of the PIO/PISO
series card.
Detect the configuration address space for your PEX/PISO/PIO-DA series cards.
/* Step 1: Detect all PEX/PISO/PIO-DA series cards */
wSubVendor=0x80; wSubDevice=4; wSubAux=0x00;
wRetVal=PIO_DriverInit(&wBoards, wSubVendor,wSubDevice,wSubAux);
printf("There are %d PIO-DA16/8/4 Cards in this PC\n",wBoards);
/* Step 2: Save the resource information for all PEX/PISO/PIO-DA 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;
wConfigSpace[i][1]=wIrq;
}
/* Step 3: Control the PEX/PISO/PIO cards directly */
wBase=wConfigSpace[0][0]
outport(wBase,1);
wBase=wConfigSpace[1][0];
outport(wBase,1);
The total number of boards using the PIO_DriverInit(...) function
The base address of the board control word
The allocated IRQ channel number for this board
The subVendor ID of this board
The subDevice ID of this board
The subAux ID of this board
The bus number of the slot used by this board
The device number of the slot used by this board
/*Save the resource information for this card*/
/*Save the resource information for this card*/
;
/* get the base address for card_0 */
/* enable all D/I/O operations of card_0 */
/* get the base address for card_1 */
/* enable all D/I/O operations of card_1 */
User Manual/ Ver. 3.1/ Oct. 2013/ PMH-0010-31/ Page: 56
/*For PIO_DA4/8/16 series cards */

Advertisement

Table of Contents
loading

Table of Contents