LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Number Array Comparison to String

I am using an arrary with an index of no more than 19 and comparing value to see if each position is healthy and display a string to indicate the health.  For some reason the values in the string are displaying up to 40 and when I change values are not displaying correctly.  Attached is the compare.vi, could someone tell/show me how to correct this.  Also is there a way of dispalying the health of the 20 slots in two columns?
0 Kudos
Message 1 of 4
(2,871 Views)
The two numeric controls have no data in them. Enter your default values, right click on each control, select data operations, make current value default. Then save the file and post the new version.
0 Kudos
Message 2 of 4
(2,864 Views)
Thanks,
 
I figured it out, I needed to add a null value to the shift register and add a range to the n terminal...Thanks for the input. 
0 Kudos
Message 3 of 4
(2,857 Views)
Yes, initializing the shift register is important. Ohterwise it retains its previous value, as you discovered.

A for loop runs the minimum of the number wired to N or the number of entries in an autoindexing array. If your Fault Status array never has more than 20 elements, wiring to N is not needed. If Fault Status has fewer than 20 elements, the loop will only run until they have all been tested.

You can also move constant parts of the strings outside the loop rather than rebuilding them on each iteration.

The comparison functions work on arrays and produce array results (unless Compare Aggregates mode is selected).

Here is a modified version of your VI.

Lynn
0 Kudos
Message 4 of 4
(2,852 Views)