Terry, as I said the macro will not bother the outputs just because the macro ends.
I think what probably happens is that you somehow checking that the stop occured, otherwise if not and the macro is in an endless loop then it would not stop.
And so there must be some code after the loop which changes the states of the outputs.
For example:
- Code: Select all
while(!exec.Ismacrostopped())
{
//Do something
}
//Change outputs states
So, with the example code the while loop runs until you pressing ESC or pressing stop or reset button etc., then the while loop's condition becomes false and so the macro skips the loop and continues to run further until the end of the macro file and if there is a conditionless outputs change code after the loop then that will execute before the macro finishes.
The example code could be fixed to not change the outputs like this:
- Code: Select all
while(!exec.Ismacrostopped())
{
//Do something
}
if(!exec.Ismacrostopped())
{
//Change outputs states
}
So, then when the loop is skipped because an ESC or stop or reset is pressed and the code execution will go after the loop then there is a condition check to see if the macro was stopped or not and the outputs states change code is only executed if the macro was not stopped, otherwise that code will be also skipped and the macro will end without executing that code.
Ofcourse this is just a simple pseudo code like example...