
The STOP command can be used to halt a running BASIC script. But this only works if the script does not control the current I/O interface's input.
STOP can be called without or with a single argument. If there's no argument, STOP sends a signal to the scripting engine subsystem and returns immediately. As soon as possible, the scripting engine then terminates the running BASIC program. If an argument is given, it must be the keyword WAIT. STOP WAIT waits up to ten seconds until the script really terminated.
ERR_OK (0) if the command was accepted.
ERR_ARGUMENT (4) if the optional argument was not the keyword "WAIT".
ERR_NOT_RUNNING (37) if STOP was invoked while there was no BASIC program running.
ERR_ALREADY_RUNNING (36) if STOP WAIT was invoked but the program didn't terminate within ten seconds.
STOP WAIT
Try to stop a running BASIC script and wait until that script terminates
If the I/O interface is not available or controlled by a running script, it is possible to stop the script by using the command page http://moduleaddress/cmd of the web interface.