Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Tektronix MSO56 Image Acquire

What I do is use the LDIR? query to get the list of files in the directory, pull out the line for the file of the image, and a little more parsing to get the size of the file.  I then do the READFILE and read the data in chunks.  The below VI is my code for reading in 4kB chunks.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 11 of 14
(892 Views)

Did you save read data to png file and try to open it with Paint, as an example?

The image file is not too big, so, there is no need to read it by chanks. I found that data read by VISA is different from an original file transferred by USB memory dongle...

0 Kudos
Message 12 of 14
(698 Views)

@odessa667785 wrote:

Did you save read data to png file and try to open it with Paint, as an example?

The image file is not too big, so, there is no need to read it by chanks. I found that data read by VISA is different from an original file transferred by USB memory dongle...


I didn't have any issues opening the files.  But it has been a long time since I messed with that code.  I could have a look on Monday when I get back in the lab.

 

A thought on why you might be having different data:  If you are using the Write Text File and do not turn off the Convert End Of Line, then any bytes that are 0x0D or 0x0A will be converted to a 0x0D0A (assuming Windows here).  The other possible issue is if you are using the Write Binary File you should write a False constant to the "Prepend Array Or String Size" input.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 13 of 14
(677 Views)

Well, I did some experimenting.  The copied images open in Paint and Photos and I see no difference between the VISA copied image and the USB copied image.  But a binary comparison does show some changes.  But that could be from a bunch of different things (I think I accidentally altered one of the files in the Photos viewer, but I'm not sure which one).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 14 of 14
(658 Views)