Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 441 of 909
ERRC
Error Code, Command
APPLICATION: System
DESCRIPTION: Get code for most recent command error
EXECUTION: Immediate
CONDITIONAL TO: N/A
LIMITATIONS: N/A
READ/REPORT: RERRC
WRITE: Read only
LANGUAGE ACCESS: Formulas and conditional testing
UNITS: N/A
RANGE OF VALUES: Output: 0-65535
TYPICAL VALUES: 0-33
DEFAULT VALUE: 0
FIRMWARE VERSION: 5.x and later
COMBITRONIC: N/A
DETAILED DESCRIPTION:
The ERRC command reports the most recent command error. Command errors originate from
SmartMotor commands through a user program, serial port or command encapsulation such
as CANopen object 2500h. The command error bit status word 2, bit 14 will be indicated when
a new error has occurred. The ERRC command can be used to determine which error has
occurred. Refer to the following table.
Code Description Notes
0 NO_ERROR
1 BAD_LENGTH A command is too long, or contains too many parameters if a variable
list of parameters is allowed.
2 BAD_ARGUMENT One or more of the values given to a command was out of range, so the
command was aborted.
3 BAD_PACKET Command was not recognized. Check the command name and syntax.
4 BAD_OPERATION General error, command not allowed in the current state of the motor.
5 MISSING_ARGUMENT Incomplete formula
6 Reserved Reserved (no longer used)
7 ERROR_PARENTHESIS Reserved (no longer used)
8 Reserved Reserved (no longer used)
9 LENGTH_VIOLATION Embedded address in a user program was not found within the 64-
character buffer for IF, SWITCH, GOTO, etc.
10 BAD_ARRAY_ADDR Array index outside the defined range.
11 DIVIDE_BY_ZERO Attempt to divide by 0.
12 STACK_OVERFLOW No room on stack for another 10 GOSUB and INTERRUPTS use the
same stack.
13 STACK_UNDERFLOW RETURN or RETURNI with no place to return.
Part 2: Commands: ERRC