Open loop motion control
12.6 Subroutines created by the Motion wizard for the Axis of Motion
S7-200 SMART
512 System Manual, 09/2015, A5E03822230-AC
Table 12- 12 AXISx_RUN
START, Profile,
Abort, Done, Error,
C_Profile, C_Step,
C_Pos, C_Speed
The AXISx_RUN subroutine (Run Profile) commands the Axis of Motion
to execute the motion operation in a specific profile stored in the con-
figuration/profile table.
Table 12- 13 Parameters for the AXISx_RUN subroutine
START BOOL I, Q, V, M, SM, S, T, C, L, Power Flow
Profile BYTE IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *AC, *LD, Con-
I, Q, V, M, SM, S, T, C, L
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *AC, *LD
ID, QD, VD, MD, SMD, SD, LD, AC, *VD, *AC, *LD
Turn on the EN bit to enable the subroutine. Ensure that the EN bit stays on until the Done
bit signals that the execution of the subroutine has completed.
Turn on the START parameter to send a RUN command to the Axis of Motion. For each
scan when the START parameter is on and the Axis of Motion is not currently busy, the
subroutine sends a RUN command to the Axis of Motion. To ensure that only one command
is sent, use an edge detection element to pulse the START parameter on.
The Profile parameter contains the number or the symbolic name for the motion profile. The
"Profile" input must be between 0 - 31. If not, the subroutine will return an error.
Turn on the Abort parameter to command the Axis of Motion to stop the current profile and
decelerate until the motor comes to a stop.
The Done parameter turns on when the Axis of Motion completes this subroutine.
The Error parameter (Page 545) contains the result of this subroutine.
The C_Profile parameter contains the profile currently being executed by the Axis of Motion.
The C_Step parameter contains the step of the profile currently being executed.
The C_Pos parameter contains the current position of the Axis of Motion. Based upon the
units of measurement, the value is either a number of pulses (DINT) or the number of
engineering units (REAL).