05-04-2009 03:22 PM
05-04-2009 03:33 PM - edited 05-04-2009 03:35 PM
I've attached a VI with all the local variables gone. I think i preserved functionality, but it's hard to say. Anyway, back to the array issue. I think what you are looking for is just sending the result to an indexed array, like I have done.
In terms of controlling execution, you can do so simply by wiring things together. A piece of code can not execute until all of the lines coming into it are ready. Therefore, it has to wait for the part before it before it can execute.
05-04-2009 04:35 PM - edited 05-04-2009 04:36 PM
First of all, you should clean up the code, it is exceedingly complicated and convoluted. You also have tons of mismatched datatypes.
The following would be a rough draft with very similar functionality (please verify, it's not fully debugged). You don't need all that code!
(Sorry, I no longer have access to LabVIEW 7.1, so a picture is all you get ;))
05-04-2009 04:42 PM
05-05-2009 09:09 AM - edited 05-05-2009 09:11 AM
GMik,
Based on your posts and vi, I believe this is what you are trying to do:
1 - Healing pattern is randomly generated integer, 0 - 2
2 - Contents of healing array vary based on the healing pattern.
Healing Pattern = 0, Healing31 array contains randomly generated 0's and 1's
Healing Pattern = 1, Healing31 array contains eight 0's, followed by eight 1's
Healing Pattern = 2, Healing31 array contains four 0's, four 1's, four 2's, four 3's
3 - Force21 array contains randomly generated 0's, 1's, 2's or 3's
If this is correct, then here is one way to do it. I don't have LV7 loaded, so a picture will have to do. For the sake of documentation I have shown what is in the other cases of the case statement.

05-05-2009 09:26 AM
Hi GMik,
I converted the original VI posted for you to 7.1.
05-05-2009 09:38 AM
05-05-2009 01:22 PM