LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Elapsed time Reseting time stamp on Write to mesurment file

I have been trying to have real time data monitored on the front panel with a NI 6009 DAQ card and capture the data into an excel sheet a constant rate. I am using a Elapse time function to capture the data into a excel file every 5 seconds. The problem is that the first value has a correct time of the current time but every other time has a time of the default 1/1/1904 00:00:00.000

I have the auto reset on and I have tried every feedback loop to reset the time properly.

 

thanks in advance for the help.

0 Kudos
Message 1 of 6
(3,463 Views)

Here is an example of the data I'm getting

0 Kudos
Message 2 of 6
(3,445 Views)

The main problem I see is your program is "one big loop".

 

Rewrite it using a proper program architecture like a state machine and properly timestamping your data is a piece of cake.

 

Fixing this, not so much...

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 6
(3,427 Views)

How would I use a state Machine this application? that would just switch between VI blocks right?

0 Kudos
Message 4 of 6
(3,416 Views)

@RTSLVU wrote:

The main problem I see is your program is "one big loop".

 

Rewrite it using a proper program architecture like a state machine and properly timestamping your data is a piece of cake.

 

Fixing this, not so much...


What do you mean? Ive looked up THIS tutorial and I'm not seeing how i can apply it to my case. Could you elaborate or point me in the right direction. 

0 Kudos
Message 5 of 6
(3,346 Views)

Well looking at your program I see several discrete steps 

  1. Configure DAQ
  2. Take measurements
  3. Process measurement data
  4. Display measurements
  5. Save data
  6. Manual Mode

If each one of these was a "state" in a state machine, adding a "Timer" state and using the timestamp from that for your data would be easy and future expansion or changes your program are far easier.

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 6
(3,338 Views)