LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Record Data only Once a Day at 10hz

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!

 

0 Kudos
Message 1 of 12
(3,736 Views)

@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.


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 12
(3,732 Views)

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.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 12
(3,731 Views)

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.

0 Kudos
Message 4 of 12
(3,726 Views)

Thanks GerdW,  I haven't used programming language as im certainly not versed in it... Sorry; im very new to this

0 Kudos
Message 5 of 12
(3,724 Views)

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.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 12
(3,723 Views)

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

0 Kudos
Message 7 of 12
(3,709 Views)

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!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 12
(3,704 Views)

@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 pathstrip 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.

0 Kudos
Message 9 of 12
(3,677 Views)

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. 

 

SMapture.PNG

========================
=== Engineer Ambiguously ===
========================
Message 10 of 12
(3,658 Views)