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

detect change of value in a variable

jbarrio
2018-10-18
2018-10-22
  • jbarrio - 2018-10-18

    hello:

    There is some way to declare variables to detect if a change has occurred in them and to undertake an action, method or execute ST command.

    Best Regards

     
  • Anonymous - 2018-10-18

    Originally created by: ph0010421

    IF myVar <> oldMyVar THEN
    oldMyVar := myVar;
    //do something
    END_IF;

    or

    xExecute := (myVar <> oldMyVar);
    oldMyVar := myVar;

     
    πŸ‘
    1
  • jbarrio - 2018-10-22

    hello:

    Very thanks, but my question was oriented to whether there is a property that you can give to some points to know that they have modified their value, or to launch an action when one is modified.

    Best Regards,

     

Log in to post a comment.