This command sets a Default Motion Element (axis or group) that replace previous WITH statement, sets on the CONFIG.PRG file, or didn't exist at all.
Like the "WITH" statement, the motion element will operated without having to explicitly indicate the motion element name.
The default motion element exists only after a WithGlobal statement, which can be terminated in three ways:
- New WithGlobal statement, declared in every scope.
- "reset all" command applied within the Terminal.
- Local With that valid only as the local task runs.
|Unlike using local/Terminal WITH statement - which require With..... → End With methods, when using the "WithGlobal" statement, there's NO need to declare "End WithGlobal".|
WithGlobal <element name>
Configuration, Task or Terminal
- In the Terminal scope, the specified motion element becomes the default motion element for the system, that replace ALL previous WITH - CONFIG/WITHGLOBAL statement, from all scopes.
- The way to "kill" a WithGlobal statement that was declared, is to use reset all command, and change the Config.prg file as you wish – or to issue another WithGlobal command..
- WithGlobal commands can't be nested, As there is noEnd WinthGlobal statement.
Move A1 100
Move A2 100
Can be simplified using:
Withglobal A2 'replace the previous "WithGlobal" statement