P
ar
t
2: C
omman
d
s
Moog Animatics SmartMotor™ Developer's Guide, Rev. L
Page 431 of 909
END
End Program Code Execution
APPLICATION:
Program execution and flow control
DESCRIPTION:
Terminates execution of the user program
EXECUTION:
Immediate
CONDITIONAL TO:
Valid whether issued by host or user program
LIMITATIONS:
N/A
READ/REPORT:
N/A
WRITE:
N/A
LANGUAGE ACCESS:
N/A
UNITS:
N/A
RANGE OF VALUES:
N/A
TYPICAL VALUES:
N/A
DEFAULT VALUE:
N/A
FIRMWARE VERSION:
5.x and later
COMBITRONIC:
END:3
where ":3" is the motor address — use the actual address or a
variable
DETAILED DESCRIPTION:
The END command terminates execution of a user program if there is one running. END may
be issued through serial communications channels or from within the user program. Each
program must have a minimum of at least one END statement.
NOTE:
The SMI program will not compile a source file without at least one END
present.
END only terminates the user program and internally resets the program pointer to the
beginning of the program; no other state, variable, mode or trajectory is affected.
User program interrupts will stop functioning when the END is encountered in a program or
issued from the serial communication channel.
The SMI program provides several toolbar buttons that send an END command. This is
especially useful when something prevents you from entering the END command at the
terminal screen. For more details, see the SMI software's online help file, which can be
accessed from the Help menu or by pressing the F1 key.
EXAMPLE:
IF
Be
END ENDIF
'Terminate user program
'on position error
Part 2: Commands: END