Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Tektronix MDO3014 save screenshot VISA command inquiry;

Solved!
Go to solution

Hello All, I've search around for this trivial question, but I still don't get the answer.

My question is that, should I create a empty png file before saving the screenshot?

Currently my VISA write-in flow is that, SAVe:IMAGe:INKSaver OFF; > SAVe:IMAGe:FILEFormat PNG; > SAVe:IMAGe "C:\Plot\OutRip20241610_175654.png" (note that C:\Plot\ is created beforehand, while OutRip20241610_175654.png is the file name that is expected to be specified for the screenshot file") > HARDCopy; 

(sorry for mere text description, my screenshot function got broken)

 

and I got this error message

Error -1074000000 occurred at Tektronix DPO MSO 2000 4000 Series.lvlib:Error Query.vi

Possible reason(s):

Instrument reports:
252,"Missing media; SAVe:IMAGe ""C:\Plot\OutRip20241610_175654.png"""
256,"File name not found; FILESystem:READFile ""C:\ARTS-Panel\Plot\Plot\OutRip20241610_175654.png"""
0,"No events to report - queue empty"

0 Kudos
Message 1 of 4
(113 Views)

@peggyliu wrote:

Currently my VISA write-in flow is that, SAVe:IMAGe:INKSaver OFF; > SAVe:IMAGe:FILEFormat PNG; > SAVe:IMAGe "C:\Plot\OutRip20241610_175654.png" (note that C:\Plot\ is created beforehand, while OutRip20241610_175654.png is the file name that is expected to be specified for the screenshot file") > HARDCopy; 


Is that folder created on the scope or your PC? That folder must exist on the oscilloscope as it has no clue about your computer's folder structure.

 

What my code for the MSO5, which uses the same commands for this, is to save the image to "C:\screen.png". I chose this location since I know that the directory will exist on the oscilloscope. I use the generic file name because my very next step is to do a file dump to save the image on the computer.


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 2 of 4
(94 Views)
Solution
Accepted by peggyliu

You can find the programming manual here - https://www.tek.com/en/oscilloscope/mso4000-dpo4000-manual/mdo4000c-mdo4000b-mdo4000-mso4000b-dpo400...

 

The SAVe:IMAGe SCPI command is used to save scren images of the scope display on the local instrument drive or attached storage - a USB or to a network drive, but NOT directly to your PC. 

 

On pg 2-595 it describes the proper format for specifying the location/directory where images can be saved.  See below,.

 

md3000_saveimg.png

 

If you want to save to PC, you'll need to look at transfering the data and then rebuilding the plot yourself.  Alternately some scopes have a file transfer method, but I'm not sure if that's available on this vintage/level of Tek scope.

 

Hope that helps.

Craig

Message 3 of 4
(79 Views)

Ohhhhhhh that does help! Thank you Carig!

I have read that manual and also that part about saving image, but I just simply skipped that NOTE because I totally have no idea about what the "external file structure" means, quite a abstract description, and it also mentioned something about USB port while I connect the VISA via Ethernet port so I just simply ignore that part.lol

 

To be specified, I take advantage of the the subvi in instrument driver ReadPlot.vi, cataloged to palette menu, and convert the output string to cluster of png data(PNG data to LV Image), followed by connecting to the WritePNGFile.vi, which allows to me the set the PC directory to save my png file.

For people have further problems, please refer to https://forums.ni.com/t5/LabVIEW/how-to-send-image-converted-to-string-to-remote-pc-over-tcp-ip/td-p...

 

 

0 Kudos
Message 4 of 4
(70 Views)