Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading .CSV file from Agilent E4407B

I'm trying to save the spurious measurement results from the Aglilent E4407B spectrum analyzer to my computer.  I could get the analyzer to save to a .csv file using LabView 8.5.  However, I can't seem to be able to move the .csv file from the spectrum analyzer to my hard drive.

Any suggestions?

Julian
0 Kudos
Message 1 of 6
(6,777 Views)

Hi Julian,

Are you using the LabVIEW driver for your device, available on our instrument driver website?  We have one that specifically works for the E4407B.  Within this library, I believe that the Store Measurement Results function should help with obtaining the data, as it can be used to save or restore measurement information to or from the device.

Regards,

Lauren

Applications Engineering
National Instruments
0 Kudos
Message 2 of 6
(6,758 Views)
Hello Julian,
        I looks like with Store Measurement Results.vi you can choose to store results on either the instrument's hard drive or floppy drive.  You could then read the data from the floppy drive.  Sometimes the drivers don't implement ALL of the functionality that the instrument has, so it would be worthwhile for you to look through the instrument's programming manual and see if there is a command to transfer a .csv file to your PC.  It also might not hurt to contact the manufacturer regarding this issue, since they should know all of the capabilities of the instrument.

Another approach would be to just read the measurements from the instrument and store them on your PC with the file I/O VIs in LabVIEW.  I am not sure what a .csv file stores, so any additional information there would help me and other posters help you.

Please let us know what you find out from the programming manual and possibily the instrument's manufacturer.

Cheers,

NathanT
0 Kudos
Message 3 of 6
(6,747 Views)

Hello Julian,

I actually worked on parts of the instrument driver and after checking again I can say that unfortunately neither the ESA nor the PSA models have support for saving their data files directly to an external harddrive.  As for working around this, Nathan summed the best ways.  Saving onto a floppy disk probably would be the fastest way to backup a relatively low number of files.  However if you need to use the data from the .CSV file on the computer or you are going to back up many files, exporting the data from LabVIEW would be much better since you can use the driver to fetch the data as an array and automate the process.

.CSV extension stands for "Comma seperated trace values" but I couldn't find any more information on the actual file formating specifications.  I don't know if an application would be able to open and directly modify the data.  However since the Read Measurement (Others) VI already gives you the array of measurements, you can format it and write to a file of your own choice using the various write to file blocks in LabVIEW.

Are you controlling the instrument completely remotely or are you using it manually and then trying to save the data onto the computer?  Also do you want to save a measurement that is already done and can not be reproduced or is it ok to re-measure and try to save the new results?

Regards,
Berk
Instrument Drivers / IVI
0 Kudos
Message 4 of 6
(6,734 Views)
Hi Berk,

Thanks for looking into this.

You mentioned the Read Measurement VI gives me the array of measurements.  However, I'm having trouble getting the measurements when I tried it.  I kept on getting a "timeout before operation expired" error.  Do you think it's possible to give me a block diagram example of obtaining spurious measurements?

Ideally, I'm hoping to control the instrument fully with LabView.  Then, importing the spurious measurement data combining it with other measurement data and outputting everything to our ATP test data sheet in Excel format.  So, it should be ok to re-measure and try to save the new results.

Thanks for your time.  I hope to hear back from you in the near future.

Julian

0 Kudos
Message 5 of 6
(6,728 Views)

Hello again Julian,

So I made a basic example VI that should theoretically return the measurements of the spurs found but I unfortunately can't generate an appropriate signal to actually validate the full functionality.  I ran the VI with the E4404B and it seems like it is working and returns 0 as the measurement since there are no spurs (flashes no spurs found on the display).

As for the timeout issue you are having, most common reason for that is not configuring the instrument correctly.  For example if you can focus on a smaller frequency range, you need to adjust your frequency start and frequency stop controls accordingly.  Also if you look at the block diagram, there is a Maximum Time constant (20000).  Increasing that value should allow the VI to tolerate a longer measurement period and can also solve your timeout problem (These instruments are quite slow so if you actually go into the driver VI's you would see a lot of hardwired delays like that).

I attached the VI block diagram and front panel.  The red circles show the controls or constants that I created.

Let me know if it works.



Message Edited by BerkOzdogan on 02-12-2008 02:59 PM
Regards,
Berk
Instrument Drivers / IVI
Download All
0 Kudos
Message 6 of 6
(6,720 Views)