Delta Electronics AH — MC_SetPosition

Chapter 3 Motion Control Instructions Motion diagram: 3_ - MC_MoveRelative instruction executes when M2( Execute ) changes to True. MC_SetPosition instruction executes after a few seconds. - The set position specified in Position is 4,000 with M4( Relative )=True, meaning 4,000 is added to current command position 6,000 when MC_SetPosition executes. The command position becomes 10,000 after MC_SetPosition instruction executes. The defined moving distance at the beginning of MC_MoveRelative is 10,000, so MC_MoveRelative keeps going for the remaining 4,000 then reaches 14,000 (14000=6000+4000+(10000-6000)).

- The motion of the physical device corresponding to MC_MoveRelative is not affected after MC_SetPosition changed the command position because the moving distance for the commanded motion remains 10,000, which is the same as the value set in Distance of MC_MoveRelative. 3-111 Velocity 300 Time Position 14000 10000 6000 Time MC MoveRelative _ M2(Execute) M20(Done) M21(Busy) M22(Active) M23(CommandAborted) M24(Error) MC SetPosition _ M3(Execute) M4(Relative) M30(Done) M31(Busy) M32(Error) MC SetPosition _ M3(Execute) M4(Relative) M30(Done) M31(Busy) M32(Error)