LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading and Writing files to external controller with Agilent 4395A

Hi everyone,

 

I have been trying to store the Agilent 4395A Analyzer Compensation Files in an external controller, and then writing them back into the 4395A while running a program. I'm doing this because the 4395A's internal memory and disk storage are not large enough to store all the files I need. I know that the files are binary, and that they can only be read 16kB at a time (the maximum dump by the analyzer). I also know that each dump comes with a specific header that describes how long the dump is.

 

My problem is that when I read the files, I believe that something is being corrupted - either by the internal workings of LabVIEW or something in my program. In particular, I notice that when I attempt to use the "Write to Binary File" vi something is being added to the file that I had not intended. At the beginning of the file I notice the string of characters "  @" being added. I know that the analyzer is not giving me these characters so I suspect that LabVIEW is adding them somehow.

 

If anyone has any idea about where these extra characters may be coming from, or if you have previous experience with the read/write with the 4395A, any suggestions would be appreciated.

 

I have attached an image of the program which saves the files. It is pretty simple, and the only spot where data is actually being read is in the while loop.

 

Thank you!

Matt

0 Kudos
Message 1 of 2
(2,533 Views)

Changing the extension of a bitmap file to get around the prohibition of posting them, is really inappropriate behavior. Use paint to save them as either jpg or png.

 

Your problem is probably because the default behavior of the Write to binary File is to prepend array or string size. This is an input to the function and is explained in the on-line help. Turn on Context help and click on 'Details'.

0 Kudos
Message 2 of 2
(2,526 Views)