Enum as Dropdown in HMI

Hi, i’ve defined some enumerations as datatypes in the programming and want to choose one of them in the HMI as drop down menue (or list). So far I have no solution to implement such a behaviour. Any help? Thanks!



Hi beecksche, thanks for your question and this is indeed a good approach. I’ve ust played also a bit around, but so far I’ve also did not find a way to use Enums in the frontend. Now I’ve passed this to our HMI specialists and will come back to you as soon as possible. BR, Frank

Hi beecksche, I’ve spoke with the Product Manager and Textfields as well as Dropdown menus are planned for this year. We also like the idea to combine both with Enums and will now check how we can bring those together. Have a great start into the new week, Frank

Hi Frank, thanks, sounds great. I look forward to hearing from you again.

Hello,

How do I use Drop List correctly? I couldn’t get any information.

Hello,</p>How do I use Drop List correctly? I couldn’t get any information.</p>

Never mind… I found https://engineer.plcnext.help/2022.6_en/_index.htm?iframe=https://engineer.plcnext.help/2022.6_en/HMI_Objects_Droplist.htm?zoom_highlight=drop+list

Hi all,

My collegue is trying to use a ENUM (just few elements, declared as int: 0,1,2,3,4,5) to change the colour of a button. He is using the ‘fill’ dynamic. It’s throwing an error if he adds the enum as variable.
Is this possible? It’s no problem to write the enum variable to a different value from the HMI on a click, so why is the fill dynamic not recognizing the INT enum?
Arne

Hello, Arne.

Try the next hack, in yor fill dynamic dialog use “(your enum INT TYPE) / 1” or “(your enum INT TYPE) OR 0”.
It will provide some under-hood type conversion, and will work fine.