11-19-2025 01:39 AM - edited 11-19-2025 01:40 AM
Hi rikimancio,
@rikimancio98 wrote:
I'm wondering if is normal to have 20us of jitter with a basically empty loop.
There is a call into the OS to request the current high-res timestamp.
Which jitter do you expect? ("0" is not a valid answer…)
And there STILL is the problem of the invalid array index in the last iteration of your loop.
(You may also divide the whole array by 1M after the loop, but that is irrelevant to your question.)
11-19-2025 02:14 AM
@GerdW ha scritto:
Hi rikimancio,
@rikimancio98 wrote:
I'm wondering if is normal to have 20us of jitter with a basically empty loop.There is a call into the OS to request the current high-res timestamp.
Which jitter do you expect? ("0" is not a valid answer…)
And there STILL is the problem of the invalid array index in the last iteration of your loop.
(You may also divide the whole array by 1M after the loop, but that is irrelevant to your question.)
Hi Gerd,
I'm a new user of Labview and NI systems so I don't know what to expect in term of performance.
I'm only wondering if 20us is normal jitter or if there could be something wrong in my VI setting that cause this random delay.
Do you mean that the remaining high res timestamp inside the loop could cause the delay?
11-19-2025 02:59 AM
20us does not seem extraordinary for a real time system. While hardware gets faster and faster every year there is a clear distinction between the different systems for repeatability and determinism:
-desktop OSes can give you a repeatibility in the range of a few ms to 10s of ms but no determinisme, meaning there are no guarantees. Your loop could run 999999 times with an interval of +-10ms and suddenly it takes a second or more. Nothing wrong here it’s simply Windows. With Linux it can be made a bit better if you know what you are doing but still no guarantees.
- realtime systems have a repeatability of about 100us to 1ms and unless you bork the system somehow by installing rogue drivers or something they also have a soft guarantee of repeatability. It’s still software and can not guarantee always the same execution time but there is an upper limit to it
- if you want to get better than this you have to use hardware. With FPGA hardware you can reach 1us or better and with dedicated custom hardware you can go down to 10s of ns. But this gets very expensive very fast.
11-19-2025 05:14 AM
This article states Real Time mode is for control loops up to 5kHz: https://www.ni.com/en/support/documentation/supplemental/08/understanding-ni-compactrio-scan-mode.ht...
So I would not expect a loop to reliably run at 8kHz on a cRIO.