Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Screen capture of Tektronix MSO4104B using LabVIEW

Solved!
Go to solution

I am trying to acquire a screen capture from a Tektronix MSO4104B 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 reviewed the programmers reference for this device, and have made countless searches on Google for an answer, but haven't been able to find a solution. It appears that a few people have been able to accomplish this on OTHER Tek scopes by sending a hardcopy through the communications port (GPIB, USB, Ethernet, etc...) however according to the programmers reference for this particular device, it appears that it will only send a hard copy to an installed printer, rather than simply as a data stream to the port that can be read using VISA commands.

 

The other solution I have seen is to save the screen shot to a flash drive, then copy the file through the port to the PC. However, neither of these solutions seem to be available on this device...this is one of the most advanced scopes that Tek makes...I can't believe this is so difficult!? Please help!

0 Kudos
Message 1 of 49
(23,204 Views)

R.Gibson,

 

I don't have this particular model but I would think that SAVe:IMAGe  would be the place to start to save the screen to say a .png file.

 

After that, I'd take a look at FILESystem:READFile for the file transfer.

0 Kudos
Message 2 of 49
(23,182 Views)

Since the SAVe:IMAGe command can save a capture of the screen image into a specified file including network storage, you might want to create a local network between the PC running the test program and the scope.

 

 

0 Kudos
Message 3 of 49
(23,179 Views)

Wayne, I think you may have nailed it, I hadn't seen the FILESystem:READFile command yet, it sounds like that might do it!

 

One thing that is unclear to me from the programmers manual is that it reads the file to "the specified interface," but that command does not seem to offer the "specified interface" argument, nor do I see another USBTMC style command that specifies this...does it just assume that the specified interface is whichever interface is currently connected (USB, or Ethernet)? I don't like to assume anything in my code...

0 Kudos
Message 4 of 49
(23,164 Views)

 R.Gibson wrote:

One thing that is unclear to me from the programmers manual is that it reads the file to "the specified interface," but that command does not seem to offer the "specified interface" argument, nor do I see another USBTMC style command that specifies this...does it just assume that the specified interface is whichever interface is currently connected (USB, or Ethernet)? I don't like to assume anything in my code...


That's how I read it.  A quick call to TI would probably get the best answer.

0 Kudos
Message 5 of 49
(23,160 Views)

NYC, I had considered that option as well, however would prefer a single-wire interface, and we are using USB. However, I think that is probably a valid option if the READFile command doesn't work.

 

Thanks for your help guys. I'll try to post the solution when when I get it working.

 

-Ryan

0 Kudos
Message 6 of 49
(23,156 Views)

I just got off Tek tech support, and they agreed that the SAVe:IMAGe and FILESystem:READFile commands should work, but will require an external flash drive to temporarily store the screen capture (which may or may not be a bad thing). Also, the "specified port" text is probably a carryover from a previous manual on an older scope, the newer scope should be smart enough to know which port to send it to apparently.

 

However he also suggested using the "HARDCopy START" command (which also allows use of the inksaver option), and said that it should write the image file to the current port as well. The programmers manual does not indicate this functionality, so I'll give it a shot and see what happens.

0 Kudos
Message 7 of 49
(23,152 Views)

I used a TDS3000 series scope from Tek and had success using the Hardcopy command.  Note that I used the GPIB.  Here are the commands I used.

HARDC:PORT GPIB;
HARDC:INKS ON;
HARDC:FORM PNG;
HARDC START

 I also had fun because I had to recieve the data in chunks since an entire png file could not be transfered in one chunk due to buffer limitations.

 


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
Message 8 of 49
(23,146 Views)

Thanks for all the help guys. Attached is a screenshot of the code I generated for capturing the screenshots, it works great. Hopefully it will help someone else in the same situation at some point! 🙂

 

Acquire Screen Capture VI.jpg

Message 9 of 49
(23,135 Views)

Glad to see it worked for you.  You might want to concider using a PNG format as it will make the file size smaller.


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
Message 10 of 49
(23,129 Views)