Could I change the Visualization page showed by changing a variable?

adrianba
2022-03-21
2022-04-04
  • adrianba - 2022-03-21

    Hi guys,

    I have a User Interface programmed in Codesys v3.5 Patch17. The last page of the User Interface should stay on the screen until the value of a variable changes. That variable could be an integer or a bool variable, I don't mind. How could I program this in Codesys?

    Thanks in advance!

     
  • erik.gerrits - 2022-03-22

    If the check mark is selected in the VisualizationManager for "Use CurrentVisu variable". Then you can just write directly to the VisuElems.CurrentVisu variable to change the visualization.

    Example:

    IF xGotoPage1 THEN
    VisuElems.CurrentVisu := 'Page1';
    END_IF

     
    πŸ‘
    1
  • ludecus

    ludecus - 2022-03-24

    A lovely visualization element for the page handling is the basic element FRAME of the toolbox.
    After you insert all your pages and linked the switch frame variable (int start by zero), you could easily handle the page you want to show with IEC code.

     
    πŸ‘
    1

    Last edit: ludecus 2022-03-24
  • adrianba - 2022-04-04

    Thank you both so much, you solved my problem!

     

Log in to post a comment.