From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
01-11-2020 11:18 AM
I'm trying to develop a VI that
I've attached my VI along with the output I want to obtain. I'm stuck at the last step and not sure how to proceed. I'm trying to develop the header part of the txt file. In addition, I'm not sure how to get the iterations in 0.1 s time interval as an output.
Expected output
My output
I've attached the VI.
Thanks,
Solved! Go to Solution.
01-11-2020 11:48 AM
You are almost there. I just saw two things in your VI that need to be fixed.
1. I couldn't pick a file path using the browse button on the path control. You need to right click on the control and pick Browse Options.... Choose New or Existing. The default setting is existing which means it won't let you enter a new file name.
2. Once I did #1, I ran and had an error on the file open. You need to right click on the Open File function's Operation terminal and pick Create Constant. Default is Open which means the file must exist already. Change the enum to Open or Create.
01-11-2020 12:47 PM
Although I've been using LabVIEW for more than a decade, I only realized the reason and use of Wait until Next ms (Multiple) a few months ago, and now that I know and understand it, I wonder why NI doesn't explain it better and stress its very-limited utility. So the first change (which is actually pretty trivial, and won't significantly change the function of this VI) is to use Wait (ms) -- you will probably never need the "Metronome" Wait function, which is used only to synchronize (emphasis mine, but this is the key word in the Help for the Metronome Wait) independent timed loops.
So you need to output the time (not the iteration number) in the first column. You have an input, "Frequency", that you currently are wiring to a Delay (or "time") function.
Bob Schor
01-11-2020 12:56 PM - edited 01-11-2020 01:12 PM
A few more quick notes:
01-11-2020 01:09 PM - edited 01-11-2020 01:11 PM
01-11-2020 02:37 PM
Thank you. I was just confused because I assumed that time lapsed was already included. Is it possible to format the output such that I have the header " time (s), number" on the top of the data written to txt as shown in the first image?
01-11-2020 08:54 PM
Yes, write the header line before the loop.