11-30-2009 10:45 AM
I am trying to create two numeric indicators that will show the total number of over/undershoot values (please see attachement) when I attach an indicator to the for loop a wire error appears. Any advice would be appreaciated!
Regards,
Kadeel
11-30-2009 10:50 AM
Can you attach some real world data in the "sampled data" control in your program. I did not see any errors.
Are you telling about the red color coercion dots?
11-30-2009 11:00 AM
11-30-2009 11:13 AM
I don't see any issues with the code:
The code determines if a value is within limits and returns the index (iteration count of the for-loop) if a value falls outside of those limits.
What issue do you have with this?
-Bob
11-30-2009 11:20 AM
One major problem is the use of 0 as a false value. If the first element in the input array matches one or the other condition, the value in the output is the same as if it does not match one or the other condition. I would recomend a value of -1 for the false value or simply build an array of Booleans.
For an array of Booleans, you could sum the number of True's and for a numeric array, sum the number of non -1 occurences.
11-30-2009 12:57 PM