Error Processing
You execute motion control instructions to implement motion control with the MC Function Module.
When motion control instructions are executed, input parameters and instruction processing are
checked for errors.
If an error occurs in an instruction, the Error
output variable from the instruction changes to TRUE and
an error code is output to ErrorID output variable.
There are two ways that you can use to program processing of errors for motion control instructions.
Error Processing for Individual Instructions
You can use the Error and ErrorID output variables from the instruction to process errors that occur
for each instruction.
The following example shows how to determine if an Illegal Axis Specification occurs for the in-
struction with the instance name PWR1.
The instructions are programmed so that error processing is executed if NoAxisErr changes to
TRUE.
Turning ON the Servo
Enable Status
ErrorID
PWR1
E
rror
MC_Power
Axis Axis
Busy
MC_Axis000
Pwr1_En
Pwr1_Status
Pwr1_Bsy
Pwr1_Err
Pwr1_ErrID
Checking to See If the Specified Axis Exists
Pwr1_Err
In1
EQ
In2
EQ
In3
In4
In5
NoAxisErr
Pwr1_ErrID
WORD#16#5460
Error Processing for Different Types of Errors
You can use the error status that is provided by the system-defined variables for motion control to
process each type of error separately
.
The following example shows how to determine if a Slave Communications Error occurs for the ax-
is that is called MC_Axis000. The instructions are programmed so that error processing is executed
if ConnectErr changes to TRUE.
1 Introduction to Motion Control Instructions
1-4
NY-series Motion Control Instructions Reference Manual (W561)