AX-Series Motion Controller Instructions Manual Chapter 2
113
Done
When the value is written successfully.
When Execute turns from True to False.
Busy
When Execute is triggered to be True.
When the value is being written to the parameter.
When Error turns to True.
When an error occurs in the execution conditions or
input values for the instruction.
When Execute turns from True to False.
(Error Code is cleared)
Timing Diagram
Inputs/Outputs
Name Function Data Type
Setting Value (Default
Timing to Take Effect
Axis
Specify the
AXIS_REF_SM3* AXIS_REF_SM3
When Execute turns to True and Busy is
*Note: AXIS_REF_SM3(FB): Every function block contains this variable, which works as the starting program for function blocks.
Function
How to use MC_ReadParameter to read the parameter values of the desired object with its parameter number in
EtherCAT Object Dictionary:
Use SHL instruction to move the data length of the desired object to the left for 24 bits.
Use SHL instruction to move the index of the desired object to the left for 8 bits.
The input ParameterNumber must contains the data length of the index and the subindex. Refer to the following
formula:
ParameterNumber: = - DWORD_TO_DINT(SHL(TO_DWORD (data length of object dictionary), 24) +
SHL(TO_DWORD(index of object dictionary), 8) + object sub-index);
To write the value to the parameter, you’ll need to input the parameter number of AXIS_REF_SM3(FB) to
ParameterNumber.
Write parameter values to the input fSetPosition by using MC_WriteParameter while the axis is moving. The value of
fSetPosition is changed for only one task cycle time in EtherCAT, then fSetPosition resumes its original planned
motion curve to move.
Troubleshooting
If an error occurs during the execution of the instruction, Error will change to True. You can refer to ErrorID (Error
Code) to address the problem.