01-16-2019 04:15 AM
I tested the attached VI on a Virtual Machine, running on a 32bit NON-real-time-system, LV2015 full develpement, Win7, 4 cores (Intel i7-4810MQ).
The last timed loop with priority 105 gets executed as completely latest loop. It seems for me that this depends on the number of cores (not number of Processors or CPUs as stated in some NI references and the timed loop help), and that the timed loop priority is not reliable if the number of timed structures is higher than the number of cores.
My questions:
- Why is the timed loop with priority 105 not executed as first loop?
- Is this behavior the same on a real-time system? What are the relevant aspects considering this observed behavior?
- I am wondering about the functioning of the two priority shemes in labview (VI Priority and timed structure priority) anyway. Do they work / make sense on non-real-time system at all?
Solved! Go to Solution.
01-16-2019 04:28 AM - edited 01-16-2019 04:30 AM
Hi sh,
Why is the timed loop with priority 105 not executed as first loop?
Because you programmed a DATAFLOW dependency!
I am wondering about the functioning of the two priority shemes in labview (VI Priority and timed structure priority) anyway. Do they work / make sense on non-real-time system at all?
On a non-RT system they don't make a lot of sense as they limit code execution to one thread.
In your VI the loops run at 1ms intervals which is by far enough to execute the loops in parallel each iteration of those loops will only take nano- or microseconds! So your example doesn't make any sense at all: what's the use of priorities when the code can be executed without any problems in parallel?
01-16-2019 05:39 AM
@shquick wrote:
- Why is the timed loop with priority 105 not executed as first loop?
To add to GerdW's comment, you have a wire going out of Loop4 and into Loop5. Therefore, Loop5 cannot run until Loop4 is complete.
@shquick wrote:
- I am wondering about the functioning of the two priority shemes in labview (VI Priority and timed structure priority) anyway. Do they work / make sense on non-real-time system at all?
Nope. I have found Timed Loops to do nothing but cause issues on non-RT systems (add overhead, single thread everything inside of them, can cause some really weird interactions with the OS due to prioritization). The only thing a Timed Loop can possibly be useful for, in my experience, is if you need to have a piece of code run on a specific CPU core. And if you are doing that, there is usually something wrong with your program to begin with.
01-16-2019 06:18 AM
My fault, connecting loop104 to loop105 was bad implementation.
Thank you for the quick replies and for solving my self-generated problem.