Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5625

Wrong reading operation with viRead() - CVI

$
0
0

I am trying to read trace points through a spectrum analyzer (Agilent (HP) 8563E). It is pretty old, by the way.

 

When using the test panel to get the traces, I get all data points from just one click on the "Read" button.

 

However, using C on CVI, I am getting only 11 bytes per reading operation:

 

sprintf(buffer_file,"TDF P;TRA?\n");
status = viWrite(instr, (ViBuf)buffer_file, strlen(buffer_file), &retCount);

/* for (bit = 0; bit < 50; bit++)
{
status = viRead(instr, (ViBuf)buffer_file, strlen(buffer_file), &retCount);
printf("%s\n", buffer_file);
}

 

I tried to put a for loop just to see what happens. When performing successive read operations, I get 11 bytes per reading, while I was expecting to get all traces points by one reading operation. The print screen of the results are attached.

 

Also, I was clearing the buffers before writing/reading.

 

I am using GPIB (VISA). Any help will be appreciated. 

 

Thanks!

 


Viewing all articles
Browse latest Browse all 5625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>