I was wondering whether there is a way of executing code on when a specific visu has been opened.
E.g., I want to pass a visu a DATE_AND_TIME, but I need to use DTSplit on it so I can populate various elements with the year, month, day, etc.
Note - I'm using CODESYS 188.8.131.52, which has a bug where I cannot initialise visu variables properly, and I cannot upgrade to SP9 at this moment in time.
I use 184.108.40.206 also but I'm not aware of the bug you are talking about so not sure if this will help.
If you open up your Visualization Manager and check the box that says "Use CurrentVisu Variable" you can setup a trigger to run like:
//sudo code not checked
fb_PageCheckTrigger : R_TRIG;
sPage : STRING := 'Home';
fb_PageCheckTrigger(CLK:= VisuElemes.CURRENTVISU = sPage);
IF fb_PageCheckTrigger.Q THEN
//Code to execute when page is open
Log in to post a comment.