LabVIEW-DCAF / StandardEngine

The Standard Execution Engine plugin for DCAF.
http://forums.ni.com/t5/Distributed-Control-Automation/Standard-Engine-Documentation/gpm-p/3539201
7 stars 3 forks source link

Add "iteration start time" tag based on the High Resolution Relative Seconds VI #64

Closed ryanpoulos closed 7 years ago

ryanpoulos commented 7 years ago

Moving this issue from TagEditorCore as it was mistakenly created there.

Some upcoming modules based around C code will need to have an idea of when the current iteration of the engine began executing based on an absolute time value, which the High Resolution Relative Seconds provides. It would be nice if this start time could be published as a tag so that modules could then reference it for their own use.

smithed commented 7 years ago

you should probably look into what this function uses for a timebase and also be sure to identify to any users what you are providing. For iteration start time I would expect a timestamp or the tick counter (or micro-tick). I'm also not sure what tradeoffs there are for that function vs normal tick counts (if any).

ryanpoulos commented 7 years ago

I have. The HiRes Timing VI in LabVIEW queries the OS Realtime clock which returns the current time in seconds (as a double) since the UNIX Epoch. This is identical to using clock_gettime(CLOCK_REALTIME, &timespec) and converting the timespec to floating-point seconds. So the HiRes Timing VI will work fine for correlating time between C and LabVIEW.

Beazurt commented 7 years ago

Implemented in 66e8ca6