LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sample data - indicator not working

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

0 Kudos
Message 1 of 6
(3,517 Views)

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?

0 Kudos
Message 2 of 6
(3,510 Views)
When I key data into the VI and save it to desktop the info in the sampled data vanishes. it is a 5 element array with numbers 1, -1, 3, 6. 2.
0 Kudos
Message 3 of 6
(3,504 Views)

I don't see any issues with the code:

 

2009-11-30_110956.jpg

 

2009-11-30_110928.jpg

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

 

 

Message 4 of 6
(3,494 Views)

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.

Message 5 of 6
(3,488 Views)
Too true.
0 Kudos
Message 6 of 6
(3,462 Views)