LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

That's not gonna work. How should your device know what to do with the "C:\Users\Desktop\BOB.STA" file path, it can't look at your harddisk and if it could it would be a miracle and a security hazard.

 

This device is a different computer system with no understanding of anything outside its own interna and the GPIB link that connects it to your computer.

Rolf Kalbermatter
My Blog
0 Kudos
Message 11 of 33
(1,270 Views)

I know this program works well to store an image onto the 4407 drive and covert it, then transfer it to my PC.  It has something to do with the BINBLK 2 vi but I don't know what its doing or how to edit it to transfer a regular text file.

 

ohboy5678_0-1653494069407.png

 

 

0 Kudos
Message 12 of 33
(1,264 Views)

Oof!  I was assuming the A: and C: I was seeing was the filepath on the PC communicating with the ESA but of course that wouldn't work for simple SCPI commands.  It's the ESA's floppy and some flash memory on it mimicking a hard drive.  That makes sense now and I think Rolf was right about needing another program to transfer the data (and that it probably uses the E4407 Driver Library).  It looks like that program is the BINBLK 2 FILE (Binary block to file?) program you show in the screenshot. 

 

Where did you get that? 

Can you post it here?  (Also send the file off the floppy when you get your drive.)  

 

 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 13 of 33
(1,258 Views)

someone had posted a screen capture for the PSA.  I've attached it here.  I've had to modify it a bit for my applications but has worked fine.  I'm hoping I can perform somewhat of a reversal to move a txt file back over to the 4407.  Has been proving difficult since I don't really understand what the binary VI is really doing and if its necessary for txt files.  

0 Kudos
Message 14 of 33
(1,249 Views)

@ohboy5678 wrote:

I know this program works well to store an image onto the 4407 drive and covert it, then transfer it to my PC.  It has something to do with the BINBLK 2 vi but I don't know what its doing or how to edit it to transfer a regular text file.


It's simply doing the reverse of the Configure Correction VI shown earlier using the HP Binary Data Transfer mode.

 

Basically the flow is as follows:

 

:MMEM:STOR:SCR 'C:TMPIMAGE.GIF'; *OPC?      // store a screen capture to a temp GIF file, it also causes the OPC to be sent when the command is finished saving the file but that is never used

 

:MMEM:DATA? 'R:TMPIMAGE.GIF'                          // Request the image data in binary form, I wonder about the R: volume name here

 

:MMEM:DEL 'C:TMPIMAGE.GIF'                              // Delete the temporary file

 

The second command causes the instrument to send back the data in form of early HP Binary Transfer format.

Basically a # followed by a line feed

then an asci digit sequence indicating the number of bytes to follow with another line feed at the end

then the binary data of the number of bytes indicated by the previous line followed with yet another line feed

 

This returns the GIF file corresponding to the screen shot. The download of the correction waveform is similar except that the binary data is probably floating point values.

 

Rolf Kalbermatter
My Blog
0 Kudos
Message 15 of 33
(1,243 Views)

Don't worry about the "R". That was me playing around with it in the beginning and accidentally saving it.  Its supposed to be a "C".  So how much of a venture is it to upload a file based on being able to download a file from the spec an?

0 Kudos
Message 16 of 33
(1,238 Views)

I think it is pretty trivial and can be made a lot more flexible. Simply the opposite of what the Configure Correction function does.

 

:MMEM:STOR:CORR [ANT|CABL|OTH|USER],"<file name>"

:MMEM:DATA? "<file name>"   => returns data

:MMEM:DEL "<file name>"

 

The returned data is in the format as configured during the Initialize.vi and that sets :FORM ASC; so while binary data would be quicker I left it at ASCII format for now. Changing the initialization would require a lot of changes throughout the existing driver.

Get Correction Values.png

 

I'm not sure in what format the data is. It seems likely that the Decimate Array function should work but you have to try out.

 

Rolf Kalbermatter
My Blog
0 Kudos
Message 17 of 33
(1,232 Views)

were you able to pull a correction factor off of the ESA using that program?  If not the easiest way is to create a cable loss or antenna correction on the ESA itself then save it as a correction.  Then run the program and transfer it to your laptop.  From there you'll be able to see what format the file is in.

0 Kudos
Message 18 of 33
(1,226 Views)

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

0 Kudos
Message 19 of 33
(1,205 Views)

found the format it uses.

 

ohboy5678_0-1653598546401.png

 

0 Kudos
Message 20 of 33
(1,194 Views)