06-12-2019 02:28 PM
Hello everyone. I am new to LabView and I would like to do something simple. I have this program from a wavemeter "BristolExample" which has an Autoscan mode. It reads the instantaneous wavelength on the equipment until the "Stop" button is pressed. I want to store those values as a function of time on a .txt file. No need to plot anything, I just need the file. How can I do that?
06-12-2019 02:29 PM
Check out the functions in the File IO tab. Write to Spreadsheet file would work if you want to write it all at once. Write to Text File is another good choice if you're writing it incrementally.
06-12-2019 02:35 PM - edited 06-12-2019 02:35 PM
Hi gibbsphe,
How can I do that? I am new to LabView and I would like to do something simple.
Well, the simple answer is: "Learn LabVIEW and program the changes according to your requirements!"
The longer answer is:
This is a very old example VI. It was created with a LabVIEW version lacking most current features of recent LabVIEW versions. It was created using a very bad coding style (especially to actual coding standards).
You would be better by creating a whole new program (and project)! (But then again: Learn LabVIEW.)
The quick&dirty answer is:
Add another loop to handle any FileIO and write your data to a file.
06-14-2019 10:00 AM
Hi,
First step, as you new in LabVIEW I recommend you to start learning LabVIEW. Link below is a quick LabVIEW Getting Started:
LabVIEW provides some built-in examples. You can just go to menu Help>> Find Examples and from NI Example Finder wizard, search for keywords: Write Text File, File and etc. Some examples will be filtered so that you can open them to learn how write text files.
LabVIEW help also provide function descriptions and example path to learn that. See the online help for File I/O functions:
Regards,
06-14-2019 11:34 AM
I am afraid I don't have time to rewrite the whole project just to get a file from that loop. I will try to find a workaround.
06-14-2019 01:56 PM
@gibbsphe wrote:
I am afraid I don't have time to rewrite the whole project just to get a file from that loop. I will try to find a workaround.
I don't have 7Zip so I can't see your code. It would be better to just zip the file in Windows and/or upload the file(s) directly. In any event, I suspect that GerdW was trying to give you advice to save time (and a lot of headaches).
06-15-2019 04:01 PM
@johntrich1971 escreveu:
@gibbsphe wrote:
I am afraid I don't have time to rewrite the whole project just to get a file from that loop. I will try to find a workaround.
I don't have 7Zip so I can't see your code. It would be better to just zip the file in Windows and/or upload the file(s) directly. In any event, I suspect that GerdW was trying to give you advice to save time (and a lot of headaches).
Here is a windows zip. I tried to contact the manufacturer for a newer version, but they don't have one.
06-17-2019 06:28 AM
You can write to file using the functions that SSPTest suggested, but I agree with GerdW that you would be much more well served to rewrite the program. There are lots of things in this program which could cause problems in the future.
06-17-2019 07:25 AM
Please don't use 7 Zip here.