Chapter 3 Motion Control Instructions Function - MC_SetPosition changes the current position of the servo axis to the specified target position. - MC_SetPosition changes the current position by shifting the coordinate system of an axis. The changing of the coordinate system is made by modifying both the current position of the instruction (command position) and the actual position from the feedback signals with the same value, which is set by Position. - The following error between command position and actual position remains the same value, and can be explained by the following equation.
Actual position after change = Command position − Following error before change - The instruction can also be used during motion without changing the target distance which is defined and fixed at the beginning of the motion instruction. For example, if the motion started at 0 and MC_SetPosition executes during the motion, the execution effects for both MC_MoveRelative with Distance =10000 and MC_MoveAbsolute with Position =10000 will be the same. - When the Count Mode is set to rotary mode (modulo axis), you can specify the set position ( Position ) to a value outside the range of the modulo. 3_ Note : 1.
Avoid using the MC_SetPosition instruction for a master axis that is in synchronization with instructions such as MC_GearIn, and MC_CAM; this act will cause the slave axis to jump from position to position in inconsistent velocity. 2. If another MC_SetPosition instruction is executed while the current MC_SetPosition is busy, the last instruction will take the priority. In this case, Done of the current MC_SetPosition instruction shifts to True, however the position change of the current instruction is not completed.
Troubleshooting - If an error occurs during the execution of the instruction or when the axis is in the state of “Errorstop”, Error will change to True and the axis will stop moving. You can refer to ErrorID (Error Code) to address the problem. - Information regarding error codes and indicators are attached as Appendices for a quick reference. The detailed troubleshooting procedures are explained in AH Motion Controller – Operation Manual. 3-109