Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

In a NSV write operation can a timestamp be programmatically set?

I am trying to improve the timestamp accuracy of a cRIO that publishes data to an HMI using NSV's.  The cRIO NSV's are bound to NSV's on the HMI which have logging enabled.

The origin of the data is an IOV which contains the original timestamp when the channel was sampled.  I would like to have this timestamp propagate to the NSV's but there does not seem to be anyway to have the NSV inherit the original timestamp.

0 Kudos
Message 1 of 5
(3,927 Views)

Hello Sachsm!

 

Unfortunately, there isn't a way to write a timestamp to an NSV after the fact. The timestamp is recorded by the writer at whatever time the variable is written, and there isn't a way to manually write this value later.

 

For bound variables, the slave variable should inherit timestamps from the master (you can find more info on that here).

 

Hope that helps you out.

 

Thanks again!

Caleb Harris

National Instruments | http://www.ni.com/support
0 Kudos
Message 2 of 5
(3,910 Views)

Ok fair enough, you cannot change a NSV timestamp after the fact, but what I was looking for is a way to give a NSV a timestamp when it is being written to.

The idea is that the NSV write could include an optional timestamp input as opposed to the default of using the current system time.  That would open up the

possibility of  syncing events to there source, which in my case is a IOV timestamp.

0 Kudos
Message 3 of 5
(3,907 Views)

That is a good idea. If you have not submitted it, you ought to on the LabVIEW Idea Exchange.

 

Also, if you need a work around, you could make your NSV a custom data type of a cluster containing a numeric and a timestamp. Then you could make a reentrant subVI that does the bundling/unbundling and takes a URL input for the programmatic variable API.

 

Something like this:

 

 custom timestamp.png

 

... for some reason the bottom cluster shows up empty in this snippet, but it's not empty on my diagram. It has a numeric and a timestamp in it.

 

Kurt 

0 Kudos
Message 4 of 5
(3,882 Views)

Thanks for the suggestion, but I also rely heavily on built in capabilities of citadel and hypertrend to work with scaler data types.

This would probably require a custom viewer of some sort as DSM will not work with clusters.

0 Kudos
Message 5 of 5
(3,875 Views)