Chapter 3 Motion Control Instructions Programming Example 4 The example below shows how to write a motion control program in Structured Text.
3_ MC_Power( Axis := 1 , Enable := M1 , EnablePositive := SM400 , EnableNegative := SM400 , Mode := 0 , (* Aborting *) Status => M10 , Busy => M11 , Active => M12 , Error => M13 , ErrorID => D0 ); MC_MoveVelocity( Axis := 1 , Execute := M2 , ContinuousUpdate := SM400, Velocity := 300 , Acceleration := 100.0 , Deceleration := 100.0 , 3-21 Velocity 300 Time MC Power _ M1(Enable) M10(Status) M11(Busy) M12(Active) MC MoveVelocity _ M2(Execute) M20(InVelocity) M21(Busy) M22(Active) M23(CommandAborted) MC Stop _ M3(Execute) M30(Done) M32(Active) MC MoveVelocity _ M2(Execute) M20(InVelocity) M21(Busy) M22(Active) M23(CommandAborted) MC Stop _ M3(Execute) M30(Done) M32(Active) MC Stop _ M3(Execute) M30(Done) M32(Active)