Guidelines For Using The Motion Subroutines; Axisx_Ctrl Subroutine - Siemens Simatic S7 Series System Manual

Hide thumbs Also See for Simatic S7 Series:
Table of Contents

Advertisement

12.6.1

Guidelines for using the Motion subroutines

You must ensure that only one motion subroutine is active at a time.
You can execute the AXISx_RUN and AXISx_GOTO from an interrupt routine as long as the
interrupt is called cyclically. However, it is very important that you do not attempt to start a
motion subroutine in an interrupt routine if the Axis of Motion is busy processing another
command. If you start a subroutine in an interrupt routine, then you can use the outputs of
the AXISx_CTRL subroutine to monitor when the Axis of Motion has completed the
movement.
The Motion wizard automatically configures the values for the speed parameters (Speed and
C_Speed) and the position parameters (Pos or C_Pos) according to the measurement
system that you selected. For pulses, these parameters are DINT values. For engineering
units, the parameters are REAL values for the type of unit that you selected. For example:
selecting centimeters (cm) stores the position parameters as REAL values in centimeters
and stores the speed parameters as REAL values in centimeters per second (cm/sec).
Some "generate" guidelines when using motion subroutines are as follows:
● Insert the AXISx_CTRL subroutine in your program, and use the SM0.0 contact to
execute it every scan.
● To specify motion to an absolute position, you must first use either an AXISx_RSEEK or
an AXISx_LDPOS subroutine to establish the zero position.
● To move to a specific location, based upon inputs from your program, use the
AXISx_GOTO subroutine.
● To run the motion profiles you configured with the Motion wizard, use the AXISx_RUN
subroutine.
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
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
12.6 Subroutines created by the Motion wizard for the Axis of Motion
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.
Open loop motion control
507

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart series

Table of Contents