CODESYS - the IEC 61131-3 automation software
https://forum.codesys.com/

how to save currentlanguage?
https://forum.codesys.com/viewtopic.php?f=11&t=5129
Page 1 of 1

Author:  stablex [ Fri Dec 14, 2012 10:21 am ]
Post subject:  how to save currentlanguage?

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

Author:  TimvH [ Sat Dec 15, 2012 9:22 am ]
Post subject:  Re: how to save currentlanguage?

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

Code:
// 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

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/