September 4, 2026

#319 - Schneider How to retain values in M580

- Assign the variable to a memory address (%MW).

- Tick "Save" in data properties for this variable.

- Ensure in the CPU configuration that "Initialize %MW1 on cold start" is unticked and that "Automatic start in Run" is ticked.

- Write some logic to get the current value periodically (e.g., every minute), using the system bit %S94:

GET_CURR_VALS_TP (IN := %S7, PT := t#2s, Q => GET_CURR_VALS);
GET_CURR_VALS_RE := RE (IN := GET_CURR_VALS); 
%S94 := GET_CURR_VALS_RE;

- Note that a "*" will be displayed at the bottom of the screen and some new messages will appear when connecting, going online, uploading, etc:

No comments:

Post a Comment