beautypg.com

HP IEEE 1394 User Manual

Page 56

background image

VXI Programming Using the IEEE 1394 Serial Bus

55

Chapter 3

// install SICL error handler
ionerror(I_ERROR_EXIT);

// open a (SICL) interface session to the E8491A
// open a (SICL) device session to the E1410
e8491 = iopen("vxi");
e1410 = iopen("vxi,24");

// read the VXI resource manager information in order to determine
// the E8491A shared memory starting address
ivxirminfo(e8491, 0, &info);
start_addr = info.memstart;

// convert address from pages to an address
start_addr = (start_addr*256);

// map E8491A memory space for transfer of readings from
// E8491A shared memory to the computer
map = imapx(e8491, I_MAP_SHARED, 0, 1);

// set a 5s timeout period to allow functions to complete
itimeout(e8491, 5000);
itimeout(e1410, 5000);

// configure the multimeter for DCV measurements
iprintf(e1410, "CONF:VOLT:DC 30.0\n");

// set a 10 us aperture time

iprintf(e1410, "VOLT:APER 10.0e-6\n");

// set 8000 readings
iprintf(e1410, "SAMP:COUN 8000\n");

// store the readings in HP E8491A shared memory

// specify the E8491A shared memory base address
iprintf(e1410, "MEM:VME:ADDR %d\n", start_addr);

// specify the amount of memory required
// (8000 readings * 8 bytes/reading)
iprintf(e1410, "MEM:VME:SIZE 64000\n");

// enable the reading to be stored
iprintf(e1410, "MEM:VME:STAT 1\n");

// initiate the multimeter to take the readings
iprintf(e1410, "INIT\n");

// pause 30s to allow readings to complete and to transfer
// to shared memory
Sleep (30000);

Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

This manual is related to the following products: