LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulation is not running

Solved!
Go to solution

By the way, you VI does not reflect exactly the example given here: https://www.ni.com/en/support/documentation/supplemental/16/simple-state-machine-template-documentat...

You could change the number representations in your Typedef enum into some text, as shown in the above example. Then it is easier for you to visualize how the code works (Start, 5 cents, 10 cents, Dispense). If you programmed your VI in the proper way, and you have a single Typedef enum in all places where needed, you just need to right click the typedef, and edit it, then save it. This change will be done immediately at ALL places in your VI! Do you see the power of a typedef? Now imagine a VI with an enum which is used at 100 places in the code...Not using a typdef, you would need to change MANUALLY all 100 instances 🙂

Message 11 of 15
(2,257 Views)

Thank you for the help. I made a mistake in case assignment instead of writing the string format "1","2","3" I wrote it as numeric constant 1,2,3.

0 Kudos
Message 12 of 15
(2,255 Views)

Let LabVIEW make the case assignment for you, thus avoiding possible typing mistakes (connect the typedef enum to a Case structure, then right click the Case):

 

addcaseforevery.png

 

 

Message 13 of 15
(2,247 Views)

Oh thank you for letting me know this. 

0 Kudos
Message 14 of 15
(2,243 Views)
Welcome and enjoy learning LabVIEW!
0 Kudos
Message 15 of 15
(2,238 Views)