04-11-2007 02:12 PM
04-11-2007 02:25 PM - edited 04-11-2007 02:25 PM
you could also try using clusters
Message Edited by James R on 04-11-2007 02:27 PM
04-11-2007 02:35 PM - edited 04-11-2007 02:35 PM
A 2-d array must be rectangular.
Bundle the sub-array into a cluster and build a 1-d array of these cluster on the edge of the loop.
Ben
Message Edited by Ben on 04-11-2007 02:35 PM
04-11-2007 02:51 PM
04-11-2007 03:10 PM
04-11-2007 03:22 PM
04-11-2007 03:32 PM - edited 04-11-2007 03:32 PM
For whatever reason when i saved this vi for 7.1 i left the scroll bars in and since 7.1 doesn't have scroll bars on the indicators it messed up the remaining elements indicator so just delete it and then add another indicator.
Message Edited by James R on 04-11-2007 03:37 PM
04-11-2007 07:10 PM - edited 04-11-2007 07:10 PM
Cruncher loop!
Easy correction: place a smal wait inside that loop!
Message Edited by altenbach on 04-11-2007 05:12 PM
04-11-2007 09:37 PM
04-11-2007 10:15 PM
@madgreek wrote:
By putting the wait inside the while loop, will that introduce any delay to the rest of the vi?
On the contrary, it will free up more CPU for all other parallel tasks and will give them a chance to run after each iteration of the small loop. Without a wait, the loops will spin successively at a very fast rate for many milliseconds, during which time nothing else can run. You are actually causing delays in the rest of the code because you don't have wait statements.
RULES:
Any loop that depends on user input needs a wait statement. Else it would just recalculate the same old calculations over and over again without producing anything new. Often, an event structure is a better choice. Why repeat a calculation with the same input values if we already calculated it before?
The only loops that should not have a wait are loops that do pure finite computations, e.g. an iterative calculation, indexed operations on arrays, etc.