Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Change two vizualization by bool variable

andrzey13
2014-04-15
2014-04-15
  • andrzey13

    andrzey13 - 2014-04-15

    Welcome,

    I work on CoDeSys 3.5 SP3 Patch5.
    I have got two visualizations (not two bitmaps into one vizualization) and one variable of BOOL type.
    I want to change these two visualizations by the state of my variable.
    Varaible = FALSE --> visu1
    Variable = TRUE --> visu2.

    Any sugestions, please?

     
  • timvh

    timvh - 2014-04-15

    In the visualisation manager enable the option "Use CurrentVisu Variable".

    Now in your code you can write to this variable, depending on the state of your bit. The string value is the name of your visualisation.

    IF xBit1 THEN
    Β  Β VisuElems.CurrentVisu := 'Visu1';
    ELSE
    Β  Β VisuElems.CurrentVisu := 'Visu2';
    END_IF
    
     
  • andrzey13

    andrzey13 - 2014-04-15

    Fast and perfect advice.

    Thanks.

     

Log in to post a comment.