LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Transferring a cable correction file from from computer to E4407B using GPIB/VISA


@ohboy5678 wrote:

duplicated what you created but goes into the loop at the read point and does nothing.  ☹️


You'll have to do some reading in the programmer reference manual and then some debugging. And watch out for typos and such. I do not have this device available so I can't check it. You may also want to experiment with adding an Error Query after the first command write, but not after the second or later as that might conflict with the data from the DATA? command.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 21 of 33
(1,102 Views)

Seems to work now that I have it saving to a file.  So the question is how do I do the reverse and upload a file to the machine?  I attached that I pulled from the machine.  I can obviously save it in any format.  I already have an excel program that will create the file format that is necessary for the machine to recognize.  Just need to upload it.  

 

ohboy5678_1-1653618418367.png

 

 

 

 

0 Kudos
Message 22 of 33
(1,096 Views)

Seems I guessed almost right. Try this (and ohh it is a VI snippet, as was the previous one. You would not have needed to recreate that code all from scratch)

Get Correction Values.png

The forum software is a little particular about this. With most browsers the LabVIEW specific snippet data gets stripped if you try to download it. For my Chrome browser it works as follows: Hover with the mouse pointer over the image. An arrow appears in the upper right corner. Click on that and the image is opened in a new tab. Drag that image to your desktop or some other location of your file system. Open an empty VI and drag the image from Windows Explorer into the diagram of this empty VI.

 

And the resulting VI is meant to be placed into the Agilent ESA PSA Series.lvlib file from the NI Instrument driver found here: http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=309EBE8FF8BC0E76E0440003BA7CCD...

 

I recommend to put it into Public->Data->Low Level->Get Correction.vi inside the library and according location on disk. Once you have the according data in the two arrays you can use the existing VI in Public->Configure->Advanced->Configure Correction.vi in that driver.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 23 of 33
(1,081 Views)

It didn't see to like that one.  Gets hung up at the first scan from string.

 

ohboy5678_0-1653659001513.png

 

0 Kudos
Message 24 of 33
(1,061 Views)

It's so very much NOT helpful to just see the error message. What is in the string from the device that makes this function cause this error?

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 25 of 33
(1,055 Views)

Sorry.  I'm in no way a labview expert and wouldn't know what is useful information to pass along if something isn't working.

 

I am able to push a file to the ESA however it is empty.  Trying to figure out how to convert a txt or csv file to a string then upload that to the ESA.

0 Kudos
Message 26 of 33
(1,050 Views)

You shouldn't need to upload a file, load its settings and make it active and then delete the file from its internal disk but should instead simply use the Configure Correction.vi function from the driver which uses a direct command to set these values. You just need to get the download function working as there is no equivalent to Configure Correction.vi for the reverse direction. And you need to make that work yourself. I do not have the hardware and neither would you learn much that way.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 27 of 33
(1,043 Views)

Let me know if I understand what you wrote.  All of the corrections parameters need to be entered into a labview program manually and then its transferred over to the machine?  If so that wouldn't work for my application.  The cables I have get frequency swept the day of usage and they are saved as txt files.  There are hundreds of data points.  If end up having to enter all of these corrections into a labview program manually it doesn't buy me anything.  Might as well just enter them by hand on the machine.  For my application I need to be able to grab a file containing all necessary corrections and load them onto the machine.

0 Kudos
Message 28 of 33
(1,037 Views)

Noooooooooo!

 

Have you taken a look at the driver? There is this Configure Correction.vi function. It accepts two arrays of equal length, one holds the frequency the other the amplitude (or whatever the units are for the respective setting).

 

With this you can send the parameters to use for a specific correction settings. If you define those correction settings somewhere in your software you are already done. If you create them manually on the device and somehow need to retrieve them for archiving you would need the routine we have been talking lately. But only then!

 

The typical operation for such an application is however different. You do not usually want to control part of your instrument automatically through software and another part manually on the front panel. It is normally either one or the other completely. And then you define the settings somehow in the software and send them to the device. And if you need them for archiving, reporting or whatever you save them directly fro the settings in the software, not sending them to the device to then again retrieve them in some more or less complicated way.

 

So you may have to lean back, relax, take your favorite rubber ducky and start meditating what it is you really want to do. So far it feels like you have some half baked and unfinished idea about how you want to make your measurements and how it could be done but haven't really figured out what it is that you really want to do.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 29 of 33
(1,029 Views)

I've already created fully automated testing but the correction factors have been an issue.  Getting correction factor onto these old machines is like cave man days.  We've been either entering them in manually, or using a 3 1/4 floppy or post processing.  I certainly know what I'm trying to achieve but not sure if it can be done via VISA.  I'll take a look at the configure correction and see if it can read a txt or csv file.  If so then it should be able to be transferred to the machine. 

0 Kudos
Message 30 of 33
(1,024 Views)