01-27-2010 08:21 AM
Solved! Go to Solution.
01-27-2010 09:50 AM
The Scan from String primative will do the job in LV7.0. Its a darn good idea to create a type-def control of the enum you use! If the constant and the indicator are instances of your type def, when you modify the control (add, delete, rename, swap values) you can hit the apply changes button and PRESTO all your controls, constants and indicators that use the type def are updated with the new info.
01-27-2010 10:22 AM
Update to original post:
Attached is the string to enum conversion vi. I hope that this can be redone in a way that it automatically updates when the enum is updated>
01-27-2010 10:56 AM
Saved from 7.1 to 7.0
I attached the new vi and typedef. I did not add all the items in the enum you will need to edit thetype def, add your remaining states, save it and select File>Apply changes to update the constant and the indicator in the vi
Enjoy
01-28-2010 05:50 AM
05-12-2020 12:45 PM - edited 05-12-2020 01:09 PM
I tried this and it does not work for me. See the output error. Any suggestions
05-12-2020 12:46 PM
I tried this and it does not work. Any suggestion.
05-12-2020 01:00 PM
In your first message, the input string is empty. So unless you have an enum value that is an empty string, you'll get the default value for the enum.
In your second message, the enum appears to be empty. So there is probably nothing there to decode and thus doesn't have a value called "Hello" in it.
But that is hard to tell since you only attached pictures and not an actual VI.
05-12-2020 01:11 PM
Thanks for your replay. I uploaded the wrong screen shot. I updated the post. Also added the code. This is the same code someone else added on this topic saying it works.
05-12-2020 01:49 PM
All I see is that your first message seemed to disappear. The second message is still there, and looks the same.
I don't see any code added.