LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case structure states changed to numbers!

anyone know why this might have happened and more importantly how i revert back! my different states were all called things like "save" "aquire" etc etc, and now they just say 0,1,2,3 etc.  i dont know what i did that might have cused this. any ideas?
0 Kudos
Message 1 of 6
(2,451 Views)
its ok, all sorted
0 Kudos
Message 2 of 6
(2,446 Views)

Can you describe the nature of the problem, and how it was fixed, for the benefit of future forum searchers who may have a similar problem?

-D

0 Kudos
Message 3 of 6
(2,441 Views)
sure, basically i have a state diagram on the go. i had joined two "selects" together with an OR gate, instead of just uing two "selects". By using the OR gate, it wired ok, however, it immediatley change my case structure to numbers in stead of their name. removing the OR changed it back.

hope you understand 😕

if not, i'll try explein somemore.
0 Kudos
Message 4 of 6
(2,436 Views)

For these sityations I like to use a typedef enum linked to the case structure, here you can easily maintain the states.  The case will polymorph to the input type so an enum will appear like the eamed enumarations, an int will be just the number and a string will allow for any arbitrary string to define a state case.  The nice thing about typedef enums is that you can change the enum string ant the code is automatically updated, as well as having the option to select add a case for each value of the enum.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 5 of 6
(2,433 Views)
yup, thats exactly what i had done. it just didnt like it when you tie two "select vi" which have a false and true atacthed to them, whcich are the enum things, then tieing them togethe rwith logic.
0 Kudos
Message 6 of 6
(2,426 Views)