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

how to save currentlanguage?

stablex
2012-12-14
2012-12-15
  • stablex - 2012-12-14

    everytime after reboot hmi, hmi will change back to default language.

     
  • TimvH

    TimvH - 2012-12-15

    I'm not sure, but maybe it works by writing the current language string variable to a variable which is Retain (Persistant):

    // When the HMI is restarted call the following code:
    IF NOT(xInitDone) THEN
            IF sRetainLanguage <> '' THEN
                      VisuElems.CURRENTLANGUAGE := sRetainLanguage;
            END_IF;
            xInitDone := TRUE;
    END_IF;
    // After this write the current language to the retain variable
    sRetainLanguage := VisuElems.CURRENTLANGUAGE;
    

    Please let us know if this works

     

Log in to post a comment.