7.1 How to discover the PXI Instrument?
76
Acqiris SA230E User's Manual
7.1 How to discover the PXI Instrument?
User has to link the AqLio.lib installed by MD3 in his project.
C:\Program Files (x86)\IVI Foundation\IVI\Lib_x64\msc
The C/C++ code below can be used to discover the PXI instruments on user system and get their
VISA addresses.
#include <stdio.h>
#include <visa.h>
int main()
{
ViSession rm = VI_NULL;
viOpenDefaultRM( &rm );
ViChar search[] = "PXI?*::INSTR";
ViFindList find = VI_NULL;
ViUInt32 count = 0;
ViChar rsrc[256];
ViStatus status = viFindRsrc( rm, search, &find, &count, rsrc );
if( status==VI_SUCCESS && count>0 )
{
do
{
printf( "Found: \"%s\"\n", rsrc );
status = viFindNext( find, rsrc );
} while( status==VI_SUCCESS );
viClose( find );
}
else if( count==0 )
{
printf( "No PXI instrument found\n" );
}
viClose( rm );
return 0;
}