06-28-2016 01:47 PM
I'm trying to pass an array of fault counters (starting at zero and counting +1 every time a fault condition is met) to a subVi that may or maynot add to the indvidual elements and then passes out to a shift register.
When the code runs the signal coming from the Main Vi outputs once the 2,0,0,0 array intot the subVI "shift register fault array" input, then goes grey (probe display).
The "shift register fault array" in the subVI never sees the 2,0,0,0 array and remains greyed out.
The build array correctly builds the current cycle fault elements but when added to the greyed "shift register fault array" the output becomes greyed 0s.
I built a simply array adding VI to test if my property node call was causing the issue but the test program works correctly.
Any ideas?
06-28-2016 01:48 PM
Test Program
06-28-2016 01:54 PM - edited 06-28-2016 01:56 PM
Hi ian,
what's the point in attaching images when you want help on debugging a VI?
Is there a reason NOT to attach the VI or a snippet?
From your images I would guess it's the heavy overuse of "value" property nodes in your VIs that causes the problem.
Ever heard of race conditions?
THINK DATAFLOW! (Or: Use more wires…)
The "shift register fault array" in the subVI never sees the 2,0,0,0 array and remains greyed out.
Here I suspect the race condition.
The build array correctly builds the current cycle fault elements but when added to the greyed "shift register fault array" the output becomes greyed 0s.
That's standard behaviour for array handling in LabVIEW. As is explained in the LabVIEW help and all those free beginner courses…
06-28-2016 01:56 PM
06-28-2016 01:59 PM - edited 06-28-2016 01:59 PM
Hi ian,
if you would attach snippets, I wouldn't complain!
But you are only providing us with stupid images…
06-28-2016 02:05 PM
Learned what Labview Snippets are
06-28-2016 02:09 PM
Snippets don't really work well in this case (lots of broken wires and artificial property node substitutions).
06-28-2016 02:14 PM
In your main VI snippet, you are reading values from a property node of the array. Where is the terminal for that array? Is it a control or indicator? Like Gerd stated, this seems like a race condition problem.
Note: Index Array is resizable. You don't need to drop down 4 index arrays and wire up constants to each one. Drop down one and drag the bottom border downwards. You'll get indices, 0, 1, 2, 3 all by default. You can also do a single comparison of >= 10 on the numeric array to get a boolean array, then do the index array on that.
06-28-2016 02:24 PM
06-28-2016 02:40 PM