03-16-2021 06:54 AM
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
03-16-2021 08:06 AM
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.
03-16-2021 08:12 AM - edited 03-16-2021 08:13 AM
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
03-16-2021 08:31 AM - edited 03-16-2021 08:31 AM
Here is a quick clean up of your code that I put together. I think I incorporated everything.
03-16-2021 08:50 AM
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.