|Language:||English • 中文（简体）|
This command sets a Default Motion Element (axis or group). Thereafter, the motion element is operated on without having to explicitly indicate the motion element name.
There are 4 ways to use the With statement:
- With - Config.prg - The element who set as Default Motion Element (DME) at the Config.prg file, function as DME for whole system. Therefore the only way to change/stop the DME is to "kill" the Config.prg task, and manually change the defaults.
In case of using Local With statement - The DME will be the one declared on the local statement, and change back to the "Config.prg With" after the task finished.
- Local With - Set up a DME for local task. Unlike the "Config With" - using a local With statement require to use With <element>..........End With method.
This way of use replace the current DME (that declare on the Config.prg or in the Terminal) with a new one, until the task complete.
- Terminal With - This way of use designated for run-time changes. After declaring a DME on the terminal, the chosen element will function as DME as long as the user didn't send an "End With" command via terminal. A With command used inside the terminal scope does not affect any programs or vice-versa.
- WithGlobal - The DME which create with the "WithGlobal" command replaced the With - Config.prg without shut down the system, or create a new DME in case that there is no such a thing. For more information - WITHGLOBAL
With <element name>
Configuration, Task or Terminal
- With commands cannot be nested.
- A subroutine called from within a WITH block does not inherit the default motion element, so the element is not defined within the subroutine, and an error is flagged (Local With).
- A GOTO command is not allowed inside a WITH block; an error is flagged (Local With).
Move A1 100
Can be simplified using: