07-29-2005 02:05 PM
07-29-2005 02:28 PM
I don't understand what you are trying to do. Your program works just fine. It adds when it is supposed to add and subtracts when it is supposed to subtract. Your loops are only running one time, so the output is only going to be based upon the first element in the array. If you could explain a little better what your result should be I expect that the solution will be simple.
07-29-2005 02:34 PM
07-29-2005 02:46 PM
I don't think I fully understand what you are trying to do either. Is this a simplified version of a more complex program? If not, the For Loops that execute only once and the shift registers are unnecessary, just feed in your data directly. See attached VI
It sound like you are looking for the Or Array function (on the Boolean palette), this will check if ANY elements of the boolean array are true.
Please post a little more explanation of what you need if this does not help.
Beth
07-29-2005 02:56 PM
07-29-2005 07:18 PM
@Danjohn wrote:
I have a vi that is supposed to add or subtract two array based on whether on the output of a boolean array. I have looked at the boolean array I created and it has both true and false values, but the structure I created only adds, indicating that somehow my data got distorted and it only reads false inside the loop. I would greatly appreciate any tips on what I need to change to get the vi to work properly
Get rid of all the shift registers and use plain autoindexing. Be aware that all your arrays should be the same size. If not, the shortest lengh in each dimension will take precendence.
The attached VI contains some default data in the inputs, just run and see. 🙂