|
Re: Parallel loops vs. One loop?
Are you asking because you have CPU issues? LabVIEW is quite efficient at doing parallel loops, so ideally you make the decision based on what makes sense.
Let's compare having one 20ms loop where we place all subsystems that run at that rate into the single loop, to having multiple loops all running at 20ms. The biggest difference is that the parallel loops are not synchronized. You don't know which starts first, which finishes first, etc. Additionally, if something happens in one loop that would delay it, it will not have much impact on the other loops.
If the code is in one loop, the data connections can directly synchronize things. You may need this, you may not. Additionally, if one operation starts to take longer, it directly affects all things in that loop.
If you have CPU issues or want to gain understanding of how often a loop is running, please follow what is in Mike's post. If you have other questions, please post them in more detail, perhaps even including your code.
Greg McKaskle
|