> I have raised this with NI about two years ago
> thinking that it would not require a huge architectural change but
> rather a compiler addition only but it has yet to surface in the last
> three releases.
Adding a structure like this would be a decent amount of work. It would
be yet another way of specifying parallel diagrams. I'm not saying that
LV will never add a structure to make something like this easier, but it
is more than ajust a compiler tweak. In the meantime, try something
like the following.
Place your code to do instrument control in a VI.
Make the VI reentrant.
Decide how many parallel tasks you want to carry out. Yes, this is
static, but there are real limits to how many of these that can be
carried out anyway.
So something like two or four is probably a good
start. Four threads is how many threads LV now spins up for the
standard execution system by default in LV7 so that seems like a good
number.
In your For loop, place N of the reentrant subVIs, index out the
elements and pass them to the subVI.
Make sure the subVI tests for a refnum of not a refnum so that you can
handle indexing past the array.
This pattern, especially with a diagram comment, should make it pretty
obvious that you have unrolled the loop and should make it pretty easy
to change the unrolling number.
Greg McKaskle