05-13-2010 11:13 AM
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.
05-14-2010 10:09 AM
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!
05-14-2010 10:26 AM
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.
05-17-2010 10:21 AM
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:
... 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
05-17-2010 02:39 PM
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.