Axisx_Ctrl Subroutine - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Open loop motion control
12.6 Subroutines created by the Motion wizard for the Axis of Motion
12.6.2

AXISx_CTRL subroutine

Table 12- 6
AXISx_CTRL
LAD / FBD
STL
CALL AXISx_CTRL,
MOD_EN, Done, Error,
C_Pos, C_Speed,
C_Dir
Table 12- 7
Inputs/Outputs
MOD_EN
Done, C_Dir
Error
C_Pos, C_Speed
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).
622
Description
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.
Parameters for the AXISx_CTRL subroutine
Data type
Operands
BOOL
I, Q, V, M, SM, S, T, C, L, Power Flow
BOOL
I, Q, V, M, SM, S, T, C, L
BYTE
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *AC, *LD
DINT, REAL
ID, QD, VD, MD, SMD, SD, LD, AC, *VD, *AC, *LD
System Manual, V2.3, 07/2017, A5E03822230-AF
S7-200 SMART

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents