ICP DAS USA PCI-1002L User Manual page 43

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
Here's the sample program source code:
/* Step1: Detect all PCI-1002 cards first */
wRetVal=P1002_DriverInit(&wBoards);
printf("Threr are %d PCI-1002 Cards in this PC\n",wBoards);
/* Step2: Save resources of all PCI-1002 cards installed in this PC */
for (i=0; i<wBoards; i++)
{
P1002_GetConfigAddressSpace(i,&wBase,&wIrq,&wPLX);
printf("\nCard_%d: wBase=%x, wIrq=%x, wPLX=%x", i,wBase,wIrq,wPLX);
wConfigSpace[i][0]=wBaseAddress;
wConfigSpace[i][1]=wIrq;
wConfigSpace[i][2]=wPLX;
}
/* Step3: Control the PCI-1002 directly */
wBase=wConfigSpace[0][0];
outpw(wBase+0x20,wDoValue);
wDiValue=inpw(wBase+0x20);
wBase=wConfigSpace[1][0];
outpw(wBase+0x20,wDoValue);
wDiValue=inpw(wBase+0x20);
wPLX=wConfigSpace[2][2];
_outpd(wPLX+0x4c,0x41);
...
...
_outpd(wPLX+0x4c,0);
/* save all resource of this card */
/* save all resource of this card */
/* save all resource of this card */
/* get base address the card_0 */
/* control the DO states of card_0 */
/* read the DI states of card_0 */
/* get base address of card_1 */
/* control the DO states of card_1 */
/* read the DI states of card_1 */
/* get PCI-interface base address of card-2 */
/* channel_1, interrupt active_Low
/* disable all interrupt
User Manual, Ver. 3.0, Jun. 2018, PMH-015-30, Page: 42
*/
*/

Advertisement

Table of Contents
loading

This manual is also suitable for:

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

Table of Contents