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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write to Measurement timestamp resets to 1904, absolute checked and dynamic conversion set to now

Solved!
Go to solution

Hello,

 

I wrote a program that uses a state machine to keep watch of the temperature of a heated bath with some devices whose resistance I am measuring suspended inside. The user sets the two set point temperatures that the bath will reach, and the program controls the bath and takes the measurements at the at the appropriate times, outputting these measurements to a single spreadsheet. It uses express VIs Write to Measurement File in combination with Set Dynamic Data Attributes and Convert to Dynamic Data to create the spreadsheet.

 

This program works fine except for one small issue; the timestamp resets to 1/1/1904 for the second measurement. I know this has been a common issue for others, but the only two solutions available online (check Absolute in the Advanced settings of Write to Measurement File and check Now in the Convert to Dynamic Data node) did not fix my issue. I was wondering if there was some programmatic solution I could implement to fix this. 

 

The VIs are attached below, as well as an image of the output. RESISTANCE AUTOMATION v1.1.vi is the main code, and Resistance Scanner is the subVI. This is in LV2020 so please let me know if you would like an older version.

0 Kudos
Message 1 of 6
(1,442 Views)

Hi Clara,

 

can you provide your VIs for LV2017?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(1,439 Views)

Sounds like a problem between Relative Time and Absolute Time.  I'm sure you realize that 0, in units of TimeStamp, is midnight, 1 Jan 1904 UTC ...

 

Bob Schor

Message 4 of 6
(1,423 Views)
Solution
Accepted by topic author clara_b

Hi Clara,

 


@clara_b wrote:

I know this has been a common issue for others, but the only two solutions available online (check Absolute in the Advanced settings of Write to Measurement File and check Now in the Convert to Dynamic Data node) did not fix my issue.


Well, I immediately get a 3rd option: don't use ExpressVIs!

 


@clara_b wrote:

I was wondering if there was some programmatic solution I could implement to fix this.


Use "plain" LabVIEW functions to save your data as needed!

 

Btw. you are still using lots of local variables to display the "Current state"…

And what's the point of all those Select nodes with a TRUE constant wired to their selector input?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 6
(1,421 Views)

Hello again Gerd and Bob;

 

Darn, I was hoping to keep using the Express VIs, but I suppose if it would fix the issue I could use the regular blocks. I am a little nervous that it won't fix the problem but since it seems to be something in the Express VIs, I will look into it.

 

Also, I know I have a couple inefficient things that you mentioned in the last post Gerd; I will get to it I promise, just wanted to get everything working first! This is just because this is my first LabVIEW program and I didn't realize there were other options. I'll clean that up before posting again 😅

 

Thank you for your quick replies!

0 Kudos
Message 6 of 6
(1,393 Views)