NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
R.Gibson
Posts: 29
0 Kudos
Accepted Solution

Screen capture of Tektronix MSO4104B using LabVIEW

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!

Active Participant
Wayne.C
Posts: 1,948
0 Kudos

Re: Screen capture of Tektronix MSO4104B using LabVIEW

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.

Active Participant nyc
Active Participant
Posts: 1,568
0 Kudos

Re: Screen capture of Tektronix MSO4104B using LabVIEW

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.

 

 

Member
R.Gibson
Posts: 29
0 Kudos

Re: Screen capture of Tektronix MSO4104B using LabVIEW

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...

Active Participant
Wayne.C
Posts: 1,948
0 Kudos

Re: Screen capture of Tektronix MSO4104B using LabVIEW

[ Edited ]

 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.

Member
R.Gibson
Posts: 29
0 Kudos

Re: Screen capture of Tektronix MSO4104B using LabVIEW

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

Member
R.Gibson
Posts: 29
0 Kudos

Re: Screen capture of Tektronix MSO4104B using LabVIEW

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.

Trusted Enthusiast
crossrulz
Posts: 3,721
0 Kudos

Re: Screen capture of Tektronix MSO4104B using LabVIEW

[ Edited ]

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.

 



Kudos always welcome for helpful posts...Kudos always welcome for any post.
Member
R.Gibson
Posts: 29

Re: Screen capture of Tektronix MSO4104B using LabVIEW

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! :smileyhappy:

 

Acquire Screen Capture VI.jpg

Trusted Enthusiast
crossrulz
Posts: 3,721

Re: Screen capture of Tektronix MSO4104B using LabVIEW

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



Kudos always welcome for helpful posts...Kudos always welcome for any post.
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page