The on command is special in that it continually monitors the incoming data even when other script commands are executing. This on monitoring occurs for each script command in the block with the same label. Once your script begins executing a statement in a block with a different label , monitoring ends for all on commands in the previous block. The on command does not stop PC Access from executing the script.
Processing continues with the next statement.
If you want PC Access to stop executing a script temporarily and wait for one of the on commands in a block to trigger, place the idle command in the block after all of the on commands. The sub-command can be any valid script command except for another on command, a wait, command, or a match command. When the sub-command executes, it takes priority over any other script command currently executing, including a wait command. If not, help us improve it .