10-16-2024 05:11 AM
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"
Solved! Go to Solution.
10-16-2024 07:44 AM
@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.
10-16-2024 04:18 PM
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,.
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
10-16-2024 09:52 PM - edited 10-16-2024 10:03 PM
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...