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

Variables defined in the Visualization interface editor prevent instantiation

  • Anonymous - 2018-02-16

    Originally created by: k72roach

    I'm an absolute beginner with CoDeSys Visualization, and am trying to teach myself to build WebVisu applications. I am running CoDeSys v3.5 SP12, and the target system is a Raspberry Pi running firmware I'll be doing real projects with IndraWorks and Indramat XM22 controllers, but the Pi gives me a cheap way to practice and learn.

    I found that when I defined any variables in the VAR_IN_OUT section of the Interface Editor for the Visualization, the whole visualization became unavailable to the Visualization Manager.

    When I tried to Build the project, the error message was "The configured start visualization <test_visu> is not instantiated. Does it contain an interface or is the instantiation missing within the visualization manager ?"</test_visu>

    Once I delete any variables in the VAR_IN_OUT section for the Visualization, and tie all my objects to ordinary Global or Program scope variable in the PLC application, the Visualization appears in the list of Visualizations under the Visualization Manager, and the project Builds and loads and runs correctly. I suppose that's what the error message meant when it said "is the instantiation missing within the visualization manager".

    Am I misunderstanding the purpose of the VAR_IN_OUT section of the Visualization Editor ? Isn't that where I can put variables that are dedicated only to the Visualization ?

    Does creating Variables in the VAR_IN_OUT section constitute "containing an interface" and make the Visualization ineligible to run ? If so, why do I have a VAR_IN_OUT section there at all ?

  • Thom

    Thom - 2018-03-06

    I have the same problem! Worse, when I generate an error of this type, my visualisation never reappeared on the visualisation manager. I need to create a new visualisation and paste all my items into.
    So, a solution is to use VAR_GLOBAL. This variables are available into and outside your visualisation.

  • Comingback4u

    Comingback4u - 2018-03-06

    My understanding is that when you add variables inside the VAR_IN_OUT is that it then becomes a dialog. If you want variables to use inside the visualization without it becoming a dialog you need to add a VAR section so it would look like:

    Β  Β 
    Β  Β xDoSomethingΒ  Β Β  Β :Β  Β BOOL;
    • khoatran

      khoatran - 2021-03-03

      It was a very good answer. Thank, man

  • Anonymous - 2018-03-08

    Originally created by: k72roach

    when you add variables inside the VAR_IN_OUT is that it then becomes a dialog.

    That information helps me understand the error message; when it says "does it contain an interface" it's referring to the VAR_IN_OUT section as an "interface". The fact that this is used for dialogs instead of ordinary windows helps me understand it.

    I verified by experimentation that adding an ordinary VAR ... END_VAR section allows me to create and use Visualization-specific variables.

    Thank you for taking the time to answer my beginner question.


Log in to post a comment.