LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

StripChart offset in UTC

Solved!
Go to solution

I collect measurement values in equal time intervals starting from some time. I would like to present them on the StripChart. Each point on the StripChart should be marked on the X-axis by the time stamp expressed in Coordinated Universal Time. Therefore, I made up, that when I get the first measurement I get also the current UTC time and set the X-axis offset on this time and the gain on the value of the interval. Unfortunately, I don’t know how to get the current UTC time in the format accepted by the function which sets the offset?

0 Kudos
Message 1 of 3
(3,319 Views)
Solution
Accepted by topic author MirKoz

If you're using CVI 9.0 or later, there are several functions in the Programmer's Toolbox that allow you to convert between several time formats (look for "Time Conversions" in the function tree). I'm not sure which format you currently have, but the format that you need to have is UIL Time. This is the format returned by the GetCurrentDateTime function in the UI Library (which unfortunately is in local time, so you can't use it).

 

If you have an older version of CVI, then you'll need to obtain the individual time elements from your UTC representation, and then build a UIL Time using the MakeDateTime function.

 

Luis

0 Kudos
Message 2 of 3
(3,306 Views)
MakeDateTime function solves my problem. Thank you.
0 Kudos
Message 3 of 3
(3,302 Views)