LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Venkat Raghavan

Case Statement "Retain Current Value"

Status: Declined

Any idea that has received less than 4 kudos within 4 years after posting will be automatically declined.

When you pass a wire from within a case structure to outside a case structure, you have an option of "Use default if unwired".

 

If we had additionally an option for "Retain Current Value", this would simplify and prevent needless wiring, especially if we are using the state machine pattern. See images below for use case.

 

Case 1.png

case 2.png

4 Comments
crelf
Trusted Enthusiast
For this to work, you'd need to assign input and output tunnel pairs in the case structure (should be pretty straight forward - something similar is already done with the auto wiring functionality that came with 8.6).  That said, you're violating (or, at least obfuscating) dataflow.




Copyright © 2004-2024 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 4.0 License.
Venkat Raghavan
Member

Ah, I still have not looked at Labview 8.6. The tunnel linking feature is probably a good compromise as to what I was looking for, without obfuscating dataflow. 

 

Thanks.  

AristosQueue (NI)
NI Employee (retired)
R&D contemplated this idea during development of LV 8.6. The linked tunnels that user crelf mentioned are indeed what we decided was a better solution to the problem.
Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 4 kudos within 4 years after posting will be automatically declined.