how to save currentlanguage?

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

    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.