EasyManua.ls Logo

HP Agilent E8491A - Page 53

HP Agilent E8491A
82 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
52 VXI Programming Using the IEEE 1394 Serial Bus Chapter 3
// turn off autorange, set a 30V DCV range
errStatus = hpe1410_voltDcRang(vi, 0, 30);
check(vi, errStatus);
// set a 10 us aperture time
errStatus = hpe1410_voltDcAper(vi, 10.0e-6);
check(vi, errStatus);
// set 8000 readings
errStatus = hpe1410_sampCoun(vi, 8000);
check(vi, errStatus);
// store the readings in HP E8491A shared memory
// specify the E8491A shared memory base address
errStatus = hpe1410_memVmeAddr(vi, start_addr);
check(vi, errStatus);
// specify the amount of memory required
// (8000 readings * 8 bytes/reading)
errStatus = hpe1410_memVmeSize(vi, 64000);
check(vi, errStatus);
// enable the readings to be stored
errStatus = hpe1410_memVmeStat(vi, 1);
// disable multimeter error detection
hpe1410_errorQueryDetect(vi, 0);
// initiate the multimeter to take the readings
errStatus = hpe1410_initImm(vi);
// pause 30s to allow readings to complete
Sleep (30000);
// transfer the 8,000 readings (64,000 bytes) from the multimeter using
// the VISA function viMoveIn8
err = viMoveIn8(fw, VI_A24_SPACE, 0, 64000, (ViPUInt8)rdgs);
if(err < VI_SUCCESS) err_handler(fw, err);
// swap the bytes once they are transferred from shared memory
for (i=0;i<7999;i++)
{
SWAP_FLOAT64(&rdgs[i]);
}
// print some readings to verify the transfer was successful
for (i=0; i<10; i++)
{
printf("%lf\n", rdgs[i]);
}
// close the device sessions
hpe1410_close(vi); // close E1410 session
viClose(fw); // close E8491 session
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Table of Contents