Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

File transfer from network analyzer to computer via USB

 

I am attempting to write some LabVIEW code that will allow me to transfer information from my Agilent E5071 network analyzer to my computer via USB. The file is an instrument state file (.sta extension). I can specify a save directory for the network analyzer using my LabVIEW code. However, I am at a loss for how to transfer this data via USB to C:\StateData on my local computer. I have attached what is coded so far. I'm not sure how to proceed with using the VISA Read. Any ideas or confirmed tested VIs?

0 Kudos
Message 1 of 9
(8,522 Views)

Hi atm1111,

 

Try looking at this KnowledgeBase Article http://digital.ni.com/public.nsf/allkb/457E3ADD7D2C1E7486257323007BAC0D?OpenDocument

 

 

Thomas N.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(8,484 Views)
MajorTom

The instrument is USBTMC compliant and a RAW transfer will not work.

atm1111

You have to write something to the number of bytes to read. What does the manual say? Can you attach the pertinent part? Have you looked at any of the other posts related to screen shots?
0 Kudos
Message 3 of 9
(8,475 Views)

I have looked at other code regarding screenshots, specifically a piece of code Agilent sent me, but it doesn't seem to work. I followed the format and understand how the data is being transfered. I do not wish to write it as a binary file, so I use the "Format into File" VI. After my code runs, there is a file saved on the network analyzer (Agilent E5071-C) and a file saved on my computer. When transfered from my computer to the network analyzer, the copied .sta file is not recognized, which leads me to believe there is some issue with using this method for .sta formated files. Opening up the .sta files in notepad, I noticed that the copied files have more tabs and new lines than the original file. I don't want to use the "Search and Replace String" VI to remove all tabs because some are necessary to maintain the original format. I've attached my code and the screenshot Agilent sent me.

Download All
0 Kudos
Message 4 of 9
(8,460 Views)
Which file did Agilent send you? What happens when you run that?
0 Kudos
Message 5 of 9
(8,450 Views)

Agilent sent me the "VISA Read Binary Block Data to File" jpeg, mentioning it was used for saving screenshots as a binary file. Found the code Agilent sent me. It saves a screenshot to my laptop, as expected. When I use the same VIs and VISA commands for an .sta file, the new file saved to my computer is not recognized by the network analyzer.

0 Kudos
Message 6 of 9
(8,443 Views)
I don't have the instrument to try. It seems that this is an instrument specific question and you should continue your support with Agilent.
0 Kudos
Message 7 of 9
(8,437 Views)

are you able to perform the screen copy/save png from analyser to pc.

 

0 Kudos
Message 8 of 9
(5,363 Views)

I fear that you can't do what you want. There is no SCPI command that does a file transfer from the analyzers filesystem ( the .sta file is a file on the analyzers file system) to the controling PCs file system (or vice versa).

0 Kudos
Message 9 of 9
(5,339 Views)