LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble Saving Report to File w/ Agilent 34401A

I am a new to LabView and I am trying to save data from the Agilent 34401A instrument to my computer using the 'Report to File' functionality. However, whenever I run the program and specify the file location nothing saves to my computer or alternatively if I choose to overwrite an old file then the program will delete the old file and not save the new file onto my computer. I know that the program is generating reports because I have been able to save them to my computer without using the 'Report to File' functionality. I have attached my code and a copy of my excel document/report for reference. Thanks!

Download All
0 Kudos
Message 1 of 5
(666 Views)

Welcome to the Forum.  I'm glad to see Techers use LabVIEW -- when I told my sons (who were undergrads there) about LabVIEW, they said "Oh, noone here uses that ...".

 

Is the "Report to File" functionality part of the Agilent package, or are you using LabVIEW File I/O functions to generate the Report?  I realize that you probably showed "how you did that" in the LabVIEW VI you attached, but LabVIEW VIs (being graphical, I suppose) is not viewable by earlier LabVIEW versions, so those of us using it (a lot), particularly if working with colleagues, update every few years.

 

Can you please open the VIs that do the file I/O and "Save for Previous Version", specifying LabVIEW 2019 or 2021, and attach the "back-saved" version?

 

Bob Schor

0 Kudos
Message 2 of 5
(598 Views)

Hello Bob - Of course we use LabView at Caltech! I have reattached the file with a back-dated version. The 'Save Report to File' functionality is part of the core LabView features not the Aligent driver.

0 Kudos
Message 3 of 5
(585 Views)

Hello.

 

     You've caught me at a bad time.  I'm about to "disappear" for a few days, and don't have time right now to respond (but am grateful for the code you sent, it will really help me to help you).

 

     I'll try to send you a brief Private Message (if you've enabled this in your Forum Profile).

 

Bob Schor

0 Kudos
Message 4 of 5
(566 Views)

I disabled the Agilent part of the code and wired a fixed array into the Build Matrix inputs.  After changing the front panel filename's browse options to "New or Existing", it created the Excel file just fine.  It works with both .XLS and .XLSX extensions.

 

Other causes:

1. You need to specify the entire path in the very small path control labeled "Fileanme". 

2. Is there a configuration error?  The default duration is 0 seconds.

3. Your file may already be open in Excel and cannot be saved.

4. My Excel driver did not work until I updated the Save As Invoke Node in Excel_Save_Workbook.vi. 

5. What version of Excel do you have?  Use XLS if it is not recent.

 

Other suggestions:

1. Do not use an integer 2 for the format type. Right click the input and create a constant of the enum and select Excel

2. The Build Matrix is overkill.  Just use Build Array instead.

3. The entire array constant, shift register and Insert to Array is "Old School".  Just enable Indexing on the single element outputs.

Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.0, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 5 of 5
(559 Views)