Chapter 12 Troubleshooting
1
Output Update Timing Chart
Case 1: When Enable changes from FALSE to TRUE, Valid and Busy change to TRUE
simultaneously. When Enable changes to FALSE, Valid and Busy change to FALSE.
Case 2: As an error occurs, Error changes to TRUE and ErrorID shows the corresponding error
code. Meanwhile, Busy and Valid change to FALSE. When Enable changes from TRUE to
FALSE, Error changes to FALSE and the value of ErrorID is cleared.
Function
MC_ReadActualPosition is used to read the actual position of an axis including the real axis, virtual axis
and encoder axis.
Actual Position
The unit of the actual position read by MC_ReadActualPosition is Unit and the unit of the feedback
position that the servo drive gives to the controller is Pulse. Thus the actual position is acquired
through conversion of the number of position feedback pulses of the servo drive. The servo gear
ratio, mechanical gear ratio and units per output rotation among axis parameters are needed in the
conversion.
The conversion formula is shown as below.
If the axis is a linear axis, its output Position equals ActualPosition above when the instruction is
executed.
If the axis is a rotary axis, its output Position equals ActualPosition % modulo when the instruction is
executed. (Position is the remainder got through dividing ActualPosition by the set modulo among
the axes parameters) . So the value of Position varies between 0 and modulo.
Timing for Updating Actual Position
The timing for updating actual position is related to the cycle time of communication between the
controller and servo drive because the actual position comes from the number of feedback position
pulses that the servo drive gives. In one communication cycle, the servo sends the number of
feedback position pulses to the controller only once. And thus the read actual position remains
unchanged within one communication cycle.
For the reasons mentioned above, please use the position capturing function to acquire the more
highly real-time position since the instruction reads the less highly real-time actual position of the
axis than the position capturing function does.
Enable
Valid
Busy
Error
Error ID
Case1 Case2
ActualPosition =
Uni ts pe r output rot ation
*
( / t he numbe r of pulses rotation)
*mechanical gear ratio
The number of ser vo p osition
feeddback pulses
11-97