Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: JSAUNIER@YAHOO.COM on January 29, 2023, 07:05:59 PM
-
General Variables #101-199 should be cleared (Set to Null) when the controller is restarted; Correct? I have several programs that use the same variables but they do not seem to be clearing after a reboot. Is there a way to force them to reset without a reboot? Alternatively(Preferred) is there a line of code or command that I can add to my programs at the beginning to ensure they are cleared before the program runs and new variable values are defined/declared?
-
General Variables #101-199 should be cleared (Set to Null) when the controller is restarted; Correct? I have several programs that use the same variables but they do not seem to be clearing after a reboot. Is there a way to force them to reset without a reboot? Alternatively(Preferred) is there a line of code or command that I can add to my programs at the beginning to ensure they are cleared before the program runs and new variable values are defined/declared?
-
You can write a Macro to set the values. Save the code as e.g. M1000.m1s in the macro folder for the profile you are using then just add a M1000 to the start of your programs.
Dim a As Integer
For a = 101 To 199
SetVar(a,0)
Next
End