Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Screen Capture of MSO4104 using Labview

Hi All,

 

 I am trying to acquire a screen capture from a Tektronix MSO4104 oscilloscope using LabVIEW. I currently am able to collect data from the device, and have a waveform displayed on my VI front panel. However for various reasons, our preference is to capture the actual screen shot from the scope. I have tried ryan gs method, but for some reason i cant get it to work on the MSO4104. If anyone can share the solution for the MSO4104 that would be great. Thanks

 

cjones86_0-1615895526752.png

 

0 Kudos
Message 1 of 5
(1,205 Views)

1. I recommend using a png format.  It is A LOT smaller than a bitmap and is a lossless compression.  PNGs work amazingly well for scope plots.

2. You will want to turn off the termination character when doing the hardcopy because a byte that just happens to be the termination character will stop to VISA Read.

3. Unfortunately, the transfer protocol does not have a file length in it.  So what I did was use a short timeout (something like 500ms) and read the data in chunks.  If I got a timeout, it is fairly safe to assume I got the whole file.  You will want a delay after the VISA Write to make sure you don't get a timeout before any data comes through (I think I used 100ms).

4. You will want to use the Open/Create/Replace File to actually create or replace the file before you start writing to it.  Be sure to close it when you are done writing.

 

You can see what I did for a TDS3000 scope (which, as far as I can tell, works the same) here: https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Screen-capture-of-Tektronix-MSO4104B-using-L....  It is dated (not including the timeout updates or turning off the termination character), but you can get some ideas.


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 2 of 5
(1,181 Views)

Hi Knight,

 

I am little confused as to what i need to change. I have attached the VI, would you be able to annotate the changes?

 

Thanks

 

0 Kudos
Message 3 of 5
(1,170 Views)

Here is a quick clean up of your code that I put together.  I think I incorporated everything.


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 4 of 5
(1,159 Views)

Thanks so much. I am not in the lab just now to test, but i will most certainly let know how i get on.

 

Thanks again.

0 Kudos
Message 5 of 5
(1,151 Views)