LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tektronix 3054B Screenshot

I'm looking to capture a screen shot from my ocilliscope.  Does anyone have any advise on how I can go about doing this?  I have downloaded the driver package through LabVIEW and I can't find this feature in the driver pack.
 
I've found examples where people have made a file on the oscope and then sent the file to the comptuer, but I can't figure out how to do that on the 3054B.
 
I could just get the data set.  However with another Tektronix scope I use (can't remember the model number) I often take 10 million samples, which is more than I want to send across GPIB.
 
I know this can be done because the macro TekW that Tektronix wrote for Microsoft Word and Excel both work with this scope, and it does take a screenshot from the device.
 
Any help would be appricated.  I'm getting tired of using word to obtain screen shot images.
 
Using LabVIEW 8.2
Been programming with heavily in LabVIEW for 4 months.
 
Thanks
0 Kudos
Message 1 of 33
(6,795 Views)

Turn on NI-Spy in MAX and then run the macro. This will give you the commands you need to send to the scope. Or, open the macro and determine from that what commands are being sent to the scope. You could attach the NI-Spy capture or the macro if you need some help interpreting what is there. You don't mention what you want to do with the screen capture. Do you just want to save it or do you want to display it in LabVIEW?

You could also try doing a search of the Instrument Control board for 'screen capture'. This is a fairly common question though I don't remember if this particular model of scope has ever been discussed.

0 Kudos
Message 2 of 33
(6,785 Views)
Thanks for the advise.  I didn't know there was a packet sniffer for GPIB like NI Spy.  I actually tried to look for something like this last week but couldn't find it.
 
I can't open the macro because it seems to be locked.  Then again I've never programmed in word before.
 
I don't know what I want to do with the picture yet.  It depends on the format it comes across the bus in.
 
I will respond back when I get some code thrown together.
 
Thanks again.
0 Kudos
Message 3 of 33
(6,764 Views)
Below is the code I used to capture a screen shot.  The code is very close to what the TekW macro does.  I switched the order up a little and changed the file format.
 
Here's what happens.
1) I tells the oscope to write a hardcopy to the GPIB port.
2) I take that data and save it as a file.
3) I then read the file for a picture in the GUI.
4) If I don't want to keep that file around I delete it, but most of the time I will proably keep it around for a recoard.
 
Here is another thread that does the same thing with a different oscope.
Oddly enough that thread was started for the same model as this thread.
 
Sorry I had to cut off part of my code, there is more to the program than just taking a screen shot from the oscope.  I don't want others to see the entire program.
 
Thanks again for the NI Spy advise.  That program pretty well designed this code for me.
0 Kudos
Message 4 of 33
(6,748 Views)

Hello,

I am attempting the exact same setup as you are.

I only used the 2nd part of your code, since I don't need to put the format back to the way it used to be.

I made a string array with the following listing:

[head off; HardCopy:Format PNG;Hardcopy:Layout Landscape;Hardcopy:Compression Off;Hardcopy:Port ETHERNET; HardCopy Start]

i use VISA- write and then i attempt to use VISA read to File. I used the same bytecount, but i end up getting the following error code -1073807339

I don't understand why it would work. I am using LabVIEW 7.1

 

0 Kudos
Message 5 of 33
(5,933 Views)
You aren't using the exact same setup since it appears you have an Ethernet connection. Have you done an ERR? query to the scope? Have you tried manually enterering the commands in MAX and seeing if you can read any data?
0 Kudos
Message 6 of 33
(5,928 Views)
You are right. I am using Ethernet instead of GPIB. I am able to execute all the HardCopy:* commands and the hardcopy start in MAX. But when i try to Read to a file, or just plain read, i get a timeout problem. I didn't think changing the connection type would've mattered, but it may be the case? I am not sure
0 Kudos
Message 7 of 33
(5,900 Views)

Well, if you are sending a command that is unsupported, the ERR? query should return with an error code. You should also check the manual.

0 Kudos
Message 8 of 33
(5,897 Views)

Well I was looking at the manual and the commands are the same. I adjusted the time out event, but the problem seems to appear. I used the error to string subvi provided by the visa toolset, but it didn't help. I also tried using the Excel macro/word provided and loaded NI spy, I can see all the commands going through the ethernet, except the final step before acquisition takes place. (i.e. hardcopy start).

 

 

0 Kudos
Message 9 of 33
(5,854 Views)

I have no idea what error to string subVI is or why something like that could possibly help. What I asked was whether you sent the ERR? command to the scope and what was the response.

 

Your problem does not seem to be anything related to LabVIEW or any NI hardware. Why don't you ask Tek?

0 Kudos
Message 10 of 33
(5,841 Views)