Symbol Configuration / Datasource enum type on HMI

jeffgamsby
2018-07-28
2019-09-18
  • jeffgamsby

    jeffgamsby - 2018-07-28

    I have a DUT which is an Enum that is configured as a exported variable in my symbol configuration and is shown as the enum type, but on the HMI the datasource shows it as an int. How am I able to get the enum value on the HMI via the datasource instead of the int value? This is Codesys v3

    Thanks

     
  • jeffgamsby

    jeffgamsby - 2018-07-30

    So I ended up creating a textlist to map the enum int to value and using a text field to display the state. Surely there is a better way where you don't have to duplicate effort at the HMI for this?

     
  • S1ack

    S1ack - 2019-09-16

    jeffgamsby hat geschrieben:
    So I ended up creating a textlist to map the enum int to value and using a text field to display the state. Surely there is a better way where you don't have to duplicate effort at the HMI for this?

    I have this same question too.

    What is the point of creating an enum with the option of text list support. If you cannot access the text list on a visualization via the dynamic text configuration options.

    As an example...
    When you create an enum with textlist support. The icon looks like a DUT and a textlist icon combined...

    When you go to use the text list on a webvisu, the enum(with textlist support) is not available as a textlist....

    IMG: Bild

    IMG: Bild

     
  • m.prestel

    m.prestel - 2019-09-18

    jeffgamsby hat geschrieben:
    I have a DUT which is an Enum that is configured as a exported variable in my symbol configuration and is shown as the enum type, but on the HMI the datasource shows it as an int. How am I able to get the enum value on the HMI via the datasource instead of the int value? This is Codesys v3
    Thanks

    Hello jeffgamsby,
    No this is currently not possible since the information is lost in the symbol configuration. Also there is currently no way that the textlist gets transfered from the plc to the HMI. I added an improvement for this.

    Zitat:
    What is the point of creating an enum with the option of text list support

    The point is that you do not need to use a textlist. You can simple use the variable in the text variables field.

    Best regards,
    Marcel

    IMG: EnumVsEnumTextlist.PNG

    IMG: EnumTextlistProperties.PNG

     

Log in to post a comment.