04-08-2015 07:47 AM
Hi,
I am using a desktop PC as LabVIEW RT target. I compiled the attached VI on the RT PC target. I expect to have a constant iteration duration time, but when I plot the results (check the attachment) I figured out that it was not. Why did iteration duration change when there was no OS like windows to handle the threads? Was there a thread running that I was not aware of?
Also, I want to know if a code is compiled on an RT desktop PC target for a very long time (say 10 years), would it work properly or it needs to restart once in a while? What about running it on a Windows OS?
Thanks in advance
04-08-2015 08:04 AM
04-09-2015 02:36 AM
Thanks GerdW,
The attached code was just a test code to determine the iteration duration of the loop and nothing else was running on RT PC target.
Let me ask my question more precisely. If I compile a deterministic code on a desktop PC used as an RT target, the iteration duration of the code changes? Does PharLab manage the threads like in windows or every things are completely 100% real time? How can I check that no other threads were running on RT PC target?
04-09-2015 02:46 AM
Hi mads,
in theory your TWL should run with it's set iteration time.
But:
- when the code inside the loop takes longer than expected to execute the loop will miss it's time target. The TWL tells you such occurances with it's inner loop terminals.
- when your target uses a single core CPU it may run out of CPU time and so the RTOS will prioritize certain tasks. What about all those network handling stuff? What about file handling stuff done by the OS? (On my new cRIO9066 with a dual core CPU I can have my RTEXE run at full load but it will not block RTOS tasks…)
04-09-2015 03:33 AM
So you meant in every RT target there is an RT OS and it handles some other threads beside my code. What about AVR or ARM micro-controller? Do they have something like RT OS or they are completely real time? In other words, if I run a deterministic code on a micro-controller for 10 times and calculate the run time very precisely every time, do get the same results? I get different results in RT PC target with PharLab OS.
04-09-2015 04:07 AM
Hi msad,
in every RT target there is an RT OS and it handles some other threads beside my code
Yes, that's the purpose of any OS…
What about AVR or ARM micro-controller?
Those µC neither run your LabVIEW code nor a full blown RTOS. Most often they just run your special code…