LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case structure and state machine

This may be an easy answer, but I can't find it.
 
I am using the state machine editor to create a state machine program. After I have completed the state diagram, I go to the state machine program block diagram and look at the order of case events and I find that the order of events does not match the state diagram that was used to create the state machine program. When I click on the border of the case structure the reorder command is greyed out-unavailable. However, when I place a case structure outside of the state machine this reorder function is then available.
 
Is this problem a function of the statemachine editor? or the state machine program-the fact that the case structure is within the while loop?
 
The actual flow of the program matches the state diagram, it just the listed order on the pull down is not correct from top to bottom, and I can't reorder the list.
 
Thanks for your help.
 
SAddyMB
 
 
0 Kudos
Message 1 of 5
(3,125 Views)
The order in the drop down list is determined by the order in which the states were created in the state diagram editor.  You can't reorder it because of the way the block diagram is locked the state diagram.
Message 2 of 5
(3,116 Views)
Furthering what centerbolt said, if the program flows properly, why does it matter in what order the states appear in the structure?
0 Kudos
Message 3 of 5
(3,114 Views)

SAddyMB,

You may not be aware of one of the features of the State Diagram Editor.  If you highlight a state in the editor by clicking on it, the block diagram editor will automatically change to the case that handles that state.  This can be very usefully when stepping through a state machine.

Message 4 of 5
(3,109 Views)
I have not used a state machine editor. I'm going to ask the obvious, did you try replacing your state case structure with a new one. The arrangement of the old will persist.
 
If you don't want to lose functionality in the states when removing the case structure, maybe try replace with stack sequence first. Then replace stacked sequence back to case structure. Now connect your case input.
Message 5 of 5
(3,086 Views)