ICP DAS USA PCI-1002L User Manual page 62

Pci-1002 series card 12-bit, 110 ks/s or 44 ks/s multi-function board version
Hide thumbs Also See for PCI-1002L:
Table of Contents

Advertisement

PCI-1002 Series Card
12-bit, 110 kS/s or 44 kS/s Multi-function Board
clrscr();
P1002_DriverInit(&wBoards);
printf("\n(1) Threr are %d PCI-1002 Cards in this PC",wBoards);
if ( wBoards==0 )
{
putch(0x07); putch(0x07); putch(0x07);
printf("(1) There are no PCI-1002 card in this PC !!!\n"); exit(0);
}
printf("\n(2) Show the Configuration Space of all PCI-1002:");
for(i=0; i<wBoards; i++)
{
P1002_GetConfigAddressSpace(i,&wBaseAddr,&wIrq,&wPLX);
printf("\n
Card_%d: wBaseAddr=%x, wIrq=%x, wPLX=%x",i,wBaseAddr,wIrq,wPLX);
}
P1002_GetConfigAddressSpace(0,&wBaseAddr,&wIrq,&wPLX);
printf("\n(3) *** Card_0, wBaseAddr=%x ***\n",wBaseAddr);
SetupTimer(0,1);
AdPolling(0,0,23);
for(i=0;i<10;i++)
{
outp(wBaseAddr+0x1c,01);
while(1)
{
if( ((inpw(wBaseAddr+0x10))&0x01)==1) // check if AD ready?
break;
}
wAdData=((inpw(wBaseAddr+0x30))&0x0fff);
printf("\nRang:+/-10V, Counter %d ,ADC channel 0 value: 0x%xH",i,wAdData);
}
P1002_DriverClose();
}
// AdPolling have to disable timer 0
// channel=0, gain=+/-10, delay=23us
// AD software trigger
User Manual, Ver. 3.0, Jun. 2018, PMH-015-30, Page: 61
/* select card_0 */

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pci-1002hPci-1002luPex-1002hPci-1002huPex-1002l

Table of Contents