02-20-2018 07:13 AM
Hi,
I am running LabView 2011; I have a program where I will be running a test for 14 months. However; I would like to only record and write data once a day for 10 min at a rate of 10hz; the time during the day does not matter. I don't see any setting in the "write to file" function to do this. I cannot figure out how to do this; any help would be appreciated!
02-20-2018 07:18 AM
@CAS900 wrote:
Hi,
I am running LabView 2011; I have a program where I will be running a test for 14 months. However; I would like to only record and write data once a day for 10 min at a rate of 10hz; the time during the day does not matter. I don't see any setting in the "write to file" function to do this. I cannot figure out how to do this; any help would be appreciated!
First, Never think that any system can run for 14 months. You are going to need non-volatile memory. (a configuration file). Lets see where the rest of the crew sends you.
02-20-2018 07:24 AM
Hi CAS,
I don't see any setting in the "write to file" function to do this.
Why not use the powers of a programming language to actually program the algorithm you need?
I would like to only record and write data once a day for 10 min at a rate of 10hz;
I cannot figure out how to do this;
1. Wait for 1430 mins (=24h*60mins/h-10mins), then start a loop.
2. In the loop you read 50 samples and save them to your file.
3. Have the loop run for 10mins*60s/min*10samples/s*1/50sample=120 times.
4. When the loop has finished you go back to point 1.
02-20-2018 07:33 AM
I am very new at this; why wouldn't it be able to run for 14 months? I'd like to take the data from each day and have it written into it's own file.
02-20-2018 07:35 AM
Thanks GerdW, I haven't used programming language as im certainly not versed in it... Sorry; im very new to this
02-20-2018 07:37 AM - edited 02-20-2018 07:39 AM
Hi CAS,
why wouldn't it be able to run for 14 months?
Because Windows likes to reboot from time to time? (Usually once a month…)
I'd like to take the data from each day and have it written into it's own file.
Oh, one more requirement: you need to build the file path dynamically!
(Handling errors would be nice, too.)
LabVIEW provides functions for all your requirements: so you should start to learn it!
(In case you want someone else do your work you should post in a different board.)
02-20-2018 07:58 AM
Thanks for the quick replies.
This computer will be dedicated for the test and will have updates disabled (at least IT tells me this...)
I plan to learn as I go along; this is my first time with trying something this large.
Can you provide any insight on building the file path dynamically (opposed to..?) and how one handles errors?
Thanks again
02-20-2018 08:02 AM - edited 02-20-2018 08:03 AM
Hi CAS,
you can build paths in LabVIEW using different path constants and the BuildPath function.
Handling errors starts with using the error wire…
All this is basic LabVIEW stuff - you should learn this by going through all that free stuff provided by NI!
(There is a "Training resources" section right at the top of the LabVIEW forum!)
02-20-2018 09:13 AM
@CAS900 wrote:
Thanks for the quick replies.
This computer will be dedicated for the test and will have updates disabled (at least IT tells me this...)
I plan to learn as I go along; this is my first time with trying something this large.
Can you provide any insight on building the file path dynamically (opposed to..?) and how one handles errors?
Thanks again
Always, always, always, always, always plan on a system going down -- and have a contingency plan for that. Loss of power, acts of god, and even the mightiest IT sysadmin can be thwarted by Microsoft's nefarious updates.
Building a file path dynamically Can be done with the build path, strip path, and application directory VIs.
Think about where you want the log file to be with respect to your executable, and use those VIs to generate your filepath, relative to your executable.
02-20-2018 02:34 PM - edited 02-20-2018 02:37 PM
My State Machine Example shows how to create a new data file everyday for continuous logging. I have ran long term tests that have gone on for YEARS, with the computer only being rebooted once a year when the instruments are due for calibration.