LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

State Machines

Solved!
Go to solution

I am new to Labview programming and am working on some NI exercises this one is in state machines. For the Enum to switch states all you have to do is pull down the arrow to switch but what if it doesn't allow you to switch how do you go from the First to Second?

0 Kudos
Message 1 of 18
(3,518 Views)

I don't understand your question.  What is not allowing you to switch the enum?

 

Post a VI that shows your problem.

0 Kudos
Message 2 of 18
(3,516 Views)

I don't really understand your issue.

My guess is that you haven't created entries into the enum yet, so the dropdown is empty.

To edit the items in the enum, right click on it and take a look into the context menu 😉 

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 18
(3,515 Views)

Yes I've already set my first and second state in the edit items but when I go to the block diagram it wont allow me to pull down the arrow and switch states. Do i have to intialize the states somehow? The VI is on this website under State Machine exercises. Thanks for your help everyone.

0 Kudos
Message 4 of 18
(3,511 Views)

Attach your VI.  I'm not going to go searching on the website for an exercise example.

0 Kudos
Message 5 of 18
(3,508 Views)

This is what I have but can't switch from First state so I deleted the other stuff and started back from here where my problem lies.

0 Kudos
Message 6 of 18
(3,506 Views)

I see two enum constants in your diagram.  They both have a "first state" and "second state".  I am able to change either one just by clicking on it.

 

So I don't understand where you are having a problem.

0 Kudos
Message 7 of 18
(3,502 Views)

Also, make sure that you make a typedef for your ENUM and only use constants created from the typedef. This will make sure that all of your constants are updated when you make changes to the ENUM definition.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 8 of 18
(3,495 Views)

Please bear with me I'm sure this is simple for you but when I go into the block diagram it doesn't allow me to switch from first to second I can switch it no problem in the edit items part but how do I set it so I can pull down the arrow and change it in the block diagram?

0 Kudos
Message 9 of 18
(3,494 Views)

Still don't know where you are having a problem.

 

When you click on the enum constant, (does your cursor become a hand with a pointing finger?), it pops up a list of the different values that make up the enum.  Then you pick the one you want.

0 Kudos
Message 10 of 18
(3,487 Views)