09-04-2020 06:16 AM - edited 09-04-2020 06:20 AM
Hello everybody,
I am using a state machine design and want to pass the data from one state to another one. For that I am using a shift register. But at that point I face a problem: The data is transformed from 'right side of the shift register' to the 'left side of the shift register' succesfully but when it enters the desired case structure its value changes to zero.
In more detail: I want that the max. and min. delay values calculated in the 'Set Initial Delay' case to be handed out to the 'Set Delay Value' case for further operation. When the data leaves the left shift register it still has its own desired value but as it enters the case structure ('Set Delay Value' case) it gets deleted and a zero is given to the case. What am I doing wrong in this and how can I fix it?
LabView Version:17.0.1f3 (64-Bit)
Any help is highly appreciated.
Best regards,
Ecafer
P.S: In the attachment there is also two pics of the relevant cases to the data transfer.
P.S: This didn't quite help to solve my problem.
Solved! Go to Solution.
09-04-2020 06:38 AM
You problem is your case structure has the output tunnels set to "Use Default If Unwired". So your flow goes Set Initial Delay->Wait For Event->Set Delay Value. You did not wire the value through the Wait For Event state, so the output tunnel will output 0, which then gets stored in the shift register. Luckily, the fix is fairly simple. First, turn off the User Default If Unwired for all of your output tunnels associated with your shift registers. This is actually recommended for all case structure tunnels with some exceptions such as the loop stop condition. Second, you can right-click on a tunnel and choose to "link tunnels". One of the options is to link and wire unwired cases. This will create a "link" between an input and an output tunnel so that when you create a new state, your values will automatically wired through. Granted, you will definitely need to do some clean up after you do this.
09-04-2020 07:07 AM
Thanks for the quick and understandable reply. It worked.