LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

shift register not updating cluster from changes using bundle by name on subsequent loops

Solved!
Go to solution

Hello,

 

I'm not seeing expected behavior using a shift register in a while loop.  I'm initializing the register (which contains a cluster from a type def), using bundle by name to update a field from a user input, and two others from a constant, and then passing the value out to a shift register.  The next loop sends in the elements unchanged.  I expected to see the changed values on the next loop but the probe shows that it's empty coming out of the left shift register.

 

I can post the code if needed, but hoping my mistake is obvious from the picture.

 

0 Kudos
Message 1 of 7
(3,909 Views)

@EnterUserName wrote:

 

... but hoping my mistake is obvious from the picture.

 


No, we cannot see the the other cases. (Big case structure, event structure, etc.). Pictures are useless for debugging.

What is the next loop? (I only see one loop). If you mean next iteration, which state is executed in the next? If it remains at idle after 200ms, it will rewrite the cluster again from the same controls and diagram constants.

Where do you place the probe?

0 Kudos
Message 2 of 7
(3,900 Views)

It is not obvious from the picture, please upload for LV 2016 or earlier.

0 Kudos
Message 3 of 7
(3,897 Views)

Thanks for the quick reply.  I've attached the .ctl and the vi (though without some of the subVIs).  It is meant to simply sit in idle until an input from the user is seen and then a Program button appears and sits in idle again until the Program value change event happens.

 

The problem has been that the constants and the user input string works in the case structure, but it doesn't appear on the next loop from the shift register.

 

I place the probe after the bundle by name (looks fine), and after the shift register on the left side between the while and the big case.

 

The desired result would be that the constants continue to rewrite, and the string control continues to rewrite.

 

Edit:  the desired result actually works, it's when I hit Program - the cluster that is passed into the programming case no longer has the values from the control or the diagram constants.

0 Kudos
Message 4 of 7
(3,888 Views)
Solution
Accepted by topic author EnterUserName

Your shift register is wired across behind the case structure and never receives any new data. All the various cases do is send the new data to a tunnel that is not connected on the outside.

 

If I move the tunnel down, here's what it looks like.

 

nocase.png

 

Delete the wire going into the shift register on the right and then wire from the tunnel to the shift register.

Message 5 of 7
(3,853 Views)

And I thought I had even checked that. Smiley Embarassed

Thanks altenbach!

0 Kudos
Message 6 of 7
(3,805 Views)

Also make it a habit to uncheck the "Use Default Values if Unwired" on your case structure output tunnels.  Even better, select the Linked Input Tunnel --> Create and Wire Unwired Cases.  This will eliminate many a heartache caused by wondering why you have default values on your shift register caused by an unwired output tunnel having default values.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 7
(3,779 Views)