03-14-2006 05:38 AM
03-14-2006 05:56 AM
03-15-2006 11:36 AM
03-16-2006 03:50 AM
03-16-2006
10:28 AM
- last edited on
04-21-2025
09:24 AM
by
Content Cleaner
Sam,
There are two very likely causes for the timing variation (jitter):
1) The Stop control terminal inside your loop will cause your Timed-Loop thread to interact with LabVIEW UI thread. One should avoid controls and indicators in time-critical tasks. See Chapter 3 of the LabVIEW Real-Time User Manual for more information on this topic.
2) The array allocation thought auto-indexing in the output tunnel of the loop will cause memory allocations. Memory allocations should also be avoided because they require access to the OS Memory Manager, which is a shared system resource and can therefore be held for an indefinite amount of time by lower priority tasks, inducing jitter on your time-critical task. The jitter will only be evident every so often, only when a memory-manager contention occurs. For more information on this topic see Chapter 5 of the LabVIEW Real-Time User Manual.
I attach a screenshot that highlights both points.
The LabVIEW Execution Trace-Tool is a great tool for finding the source of these jitter sources, allowing you to optimize the timing of your application
I hope this helps,
Alejandro
03-16-2006
10:32 AM
- last edited on
04-21-2025
09:25 AM
by
Content Cleaner
Sammy,
What you may want to do is use more of a real-time architecture to test this. When you use default communication (default communication is when you have the front panel of the Real-Time VI open on the host machine) there is actually a communication thread running on the background of the real-time target transferring the front panel information back to the host. This can sometimes degrade performance. In a normal real-time application you want to split your time-critical operations into a separate VI and make the priority of the VI time-critical, then have a communications VI that is normal priority that communicates information back to a host VI, usually using TCP/IP VIs or Datasocket.
The Real-Time Communications Wizard can take a single VI and split it into these three VIs for you. However, the Timed Loop structure should not be used in a VI that is set to Time-Critical Priority.
Even with the overhead of communication, it doesn't seem like you should see the disparity in numbers that you are seeing, however, so I'm a bit baffled as that goes, but I would still try splitting your application up to see if that improves the reliability.
03-17-2006 03:37 AM
03-17-2006 03:39 AM
03-17-2006 10:02 AM
03-21-2006 08:29 PM