Menu

Indicator to change color on value from modbus tcp

Help
2017-03-08
2017-03-08
  • Robin Holum

    Robin Holum - 2017-03-08

    Hi,

    Can anyone show me an example on how to add an indicator to the form, and how to change its color depending on the value, either analog value from holding register or bit from a coil.

    What control should i use and how should i use it?

    Best regards

     
  • Fabio Luis Girardi

    Use a THMIText togheter with a THMILabel

    The THMIText will change de background color, the THMILabel will display the value.

     
  • Fabio Luis Girardi

    You can use THMIColorPropertyConnector too.

     
  • Robin Holum

    Robin Holum - 2017-03-08

    Thank you fabio :)

    I got the THMILabel working. But i am not quite sure on how to change the color of THMIText if value is equal to for example 10. Do i need to code it or only change a parameter?

     
  • Fabio Luis Girardi

    Only change parameters.

     
  • Robin Holum

    Robin Holum - 2017-03-08

    Im sorry for asking dumb this dumb question but which parameters do i need to change to get the background color to change if value = 10?

     
  • Fabio Luis Girardi

    On THMIText you will have a property called Zones. It's a collection of TTextZone. Each zone has a condtion that will say if it will displayed or not. You can have a defatult zone when no other zone has been selected to the current tag value.

    You can insert how many text zones as you want.

     
  • Robin Holum

    Robin Holum - 2017-03-08

    Thank you Fabio!!! Exactly what i was looking for

    Just need to know where and what the parameters are doing.
    It can probably be found in the class?

    Best regards

     
  • Robin Holum

    Robin Holum - 2017-03-08

    Lets say i would like to tie a tag up to a TDTAnalogueGauge, how can i acheive that?

    Also, i am very interested in creating a alarming function. Any input on this is highly appreciated.

    Best regards

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.