EasyManua.ls Logo

Siemens SIMATIC S7 - Axisx_Ctrl Subroutine

Siemens SIMATIC S7
866 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Open loop motion control
12.6 Subroutines created by the Motion wizard for the Axis of Motion
S7-200 SMART
622 System Manual, V2.3, 07/2017, A5E03822230-AF
12.6.2
AXISx_CTRL subroutine
Table 12- 6 AXISx_CTRL
LAD / FBD
STL
Description
CALL AXISx_CTRL,
MOD_EN, Done, Error,
C_Pos, C_Speed,
C_Dir
The AXISx_CTRL subroutine (Control) enables and initializes the Axis
of Motion by automatically commanding the Axis of Motion to load the
configuration/profile table each time the CPU changes to RUN mode.
Use this subroutine only once in your project per motion axis, and en-
sure that your program calls this subroutine every scan. Use SM0.0
(Always On) as the input for the EN parameter.
Table 12- 7 Parameters for the AXISx_CTRL subroutine
Inputs/Outputs
Data type
Operands
MOD_EN
BOOL
I, Q, V, M, SM, S, T, C, L, Power Flow
Done, C_Dir
BOOL
I, Q, V, M, SM, S, T, C, L
Error
BYTE
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *AC, *LD
C_Pos, C_Speed
DINT, REAL
ID, QD, VD, MD, SMD, SD, LD, AC, *VD, *AC, *LD
The MOD_EN parameter must be on to enable the other motion subroutines to send
commands to the Axis of Motion. If the MOD_EN parameter turns off, then the Axis of Motion
aborts any command that is in progress and performs a decelerated stop.
The output parameters of the AXISx_CTRL subroutine provide the current status of the Axis
of Motion.
The Done parameter turns on when the Axis of Motion completes any subroutine.
The Error parameter (Page 659) contains the result of this subroutine.
The C_Pos parameter is 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).
The C_Speed parameter provides the current speed of the Axis of Motion. If you configured
the measurement system for the Axis of Motion for pulses, C_Speed is a DINT value
containing the number of pulses/second. If you configured the measurement system for
engineering units, C_Speed is a REAL value containing the selected engineering
units/second (REAL).

Table of Contents

Other manuals for Siemens SIMATIC S7

Related product manuals