From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

state Machines

I am building a state machine that has a number of similar codes so I want to duplicate one case and make minor changes to it.  It is a setup sequence that varies slightly between automated tests that I am running.  I tried to simply duplicate the case and rearrange the sequence so that they would be in the correct order and then update the type def properties and the menu cluster.  How do I update the case structure to include the new names from the type def? My partially complete code is attached.

 

 

 

 

0 Kudos
Message 1 of 3
(2,211 Views)

1. choose "add case for every value"  from the context menu of the case structure

2. "swap Diagram with case..." from the context menu and exchange the copied code with the empty case from step one

 

But currently step 2 is not available in you VI. I can't find the reason right now. So you have to edit the cases by hand.

 

 

0 Kudos
Message 2 of 3
(2,199 Views)
You're doing it in the wrong order. You have to update the type def first, and then you create/duplicate the additional case(s). Also, the order of the cases in the case structure is irrelevant. If you have the Control Editor window open when you update the type def you have to select File -> Apply Changes or simply save and close the control.
0 Kudos
Message 3 of 3
(2,195 Views)