You are on page 1of 30

Moving PTO

positioning axes of an
S7-1200 as IO device
centrally from an
IO controller
Siemens
SIMATIC S7-1200 / S7-1500 Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/109768880 Support
Legal information

Legal information
Use of application examples
Application examples illustrate the solution of automation tasks through an interaction of several
components in the form of text, graphics and/or software modules. The application examples are
a free service by Siemens AG and/or a subsidiary of Siemens AG ("Siemens"). They are
non-binding and make no claim to completeness or functionality regarding configuration and
equipment. The application examples merely offer help with typical tasks; they do not constitute
customer-specific solutions. You yourself are responsible for the proper and safe operation of the
products in accordance with applicable regulations and must also check the function of the
respective application example and customize it for your system.
Siemens grants you the non-exclusive, non-sublicensable and non-transferable right to have the
application examples used by technically trained personnel. Any change to the application
examples is your responsibility. Sharing the application examples with third parties or copying the
application examples or excerpts thereof is permitted only in combination with your own products.
The application examples are not required to undergo the customary tests and quality inspections
of a chargeable product; they may have functional and performance defects as well as errors. It is
your responsibility to use them in such a manner that any malfunctions that may occur do not
result in property damage or injury to persons.

Disclaimer of liability
Siemens shall not assume any liability, for any legal reason whatsoever, including, without
limitation, liability for the usability, availability, completeness and freedom from defects of the
application examples as well as for related information, configuration and performance data and
any damage caused thereby. This shall not apply in cases of mandatory liability, for example
under the German Product Liability Act, or in cases of intent, gross negligence, or culpable loss of
life, bodily injury or damage to health, non-compliance with a guarantee, fraudulent
non-disclosure of a defect, or culpable breach of material contractual obligations. Claims for
damages arising from a breach of material contractual obligations shall however be limited to the
© Siemens 2019 All rights reserved

foreseeable damage typical of the type of agreement, unless liability arises from intent or gross
negligence or is based on loss of life, bodily injury or damage to health. The foregoing provisions
do not imply any change in the burden of proof to your detriment. You shall indemnify Siemens
against existing or future claims of third parties in this connection except where Siemens is
mandatorily liable.
By using the application examples you acknowledge that Siemens cannot be held liable for any
damage beyond the liability provisions described.

Other information
Siemens reserves the right to make changes to the application examples at any time without
notice. In case of discrepancies between the suggestions in the application examples and other
Siemens publications such as catalogs, the content of the other documentation shall have
precedence.
The Siemens terms of use (https://support.industry.siemens.com) shall also apply.

Security information
Siemens provides products and solutions with Industrial Security functions that support the secure
operation of plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is necessary
to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept.
Siemens’ products and solutions constitute one element of such a concept.
Customers are responsible for preventing unauthorized access to their plants, systems, machines
and networks. Such systems, machines and components should only be connected to an
enterprise network or the Internet if and to the extent such a connection is necessary and only
when appropriate security measures (e.g. firewalls and/or network segmentation) are in place.
For additional information on industrial security measures that may be implemented, please visit
https://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them more secure.
Siemens strongly recommends that product updates are applied as soon as they are available
and that the latest product versions are used. Use of product versions that are no longer
supported, and failure to apply the latest updates may increase customer’s exposure to cyber
threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed
at: https://www.siemens.com/industrialsecurity.

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 2
Table of contents

Table of contents
Legal information ......................................................................................................... 2
1 Introduction ........................................................................................................ 4
1.1 Overview............................................................................................... 4
1.2 Mode of operation ................................................................................ 4
1.3 Components used ................................................................................ 5
2 Engineering ........................................................................................................ 6
2.1 Hardware setup .................................................................................... 6
2.2 Description of interface......................................................................... 7
2.2.1 FB "LPTO_Control" .............................................................................. 7
2.2.2 FB "LPTO_DeviceStates"..................................................................... 9
2.2.3 FC "LPTO_Copy" ................................................................................. 9
2.3 Project integration .............................................................................. 11
2.3.1 Hardware configuration ...................................................................... 11
2.3.2 Library elements for the IO controller ................................................. 12
2.3.3 IO addressing ..................................................................................... 13
2.3.4 Project planning of the IO controller ................................................... 14
2.3.5 Configuring the positioning axes ........................................................ 17
2.3.6 Setting parameters ............................................................................. 23
2.3.7 Programming motion control instructions ........................................... 24
2.3.8 Commissioning ................................................................................... 26
2.4 Operation ............................................................................................ 28
© Siemens AG 2019 All rights reserved

3 Appendix .......................................................................................................... 29
3.1 Service and support ........................................................................... 29
3.2 Links and literature ............................................................................. 30
3.3 Change documentation ...................................................................... 30

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 3
1 Introduction

1 Introduction
1.1 Overview
The "LPTO" library enables you to control up to 4 positioning axes of a S7-1200 as
an IO device centrally from an IO controller (S7-1200 or S7-1500). By means of a
pre-configured device CPU, you can rapidly put the remote axes into operation. In
the device CPU, 4 "TO_PositioningAxis" technology objects are configured, which
use the S7-1200’s 4 pulse generators to control 4 servo motors via a train of
pulses, PTO (PulseTrainOut). Using the I-device communication, you can move
and monitor the remote axes from the controller. This means that you can, for
example, use 8 pulse generators (4 local and 4 remote) with an S7-1200 as an
IO controller to centrally actuate 8 servo drives.

1.2 Mode of operation


Figure 1-1

IO controller IO device
I-device
communication:
© Siemens AG 2019 All rights reserved

control
PROFINET / IE

feedback

PTO

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 4
1 Introduction

1.3 Components used


This application example has been created with the following hardware and
software components:
Table 1-1
Component Number Article number Note
CPU 1214C DC/DC/DC 2 6ES7214-1AG40-0XB0 Firmware V4.3 (\7\)
COMPACT SWITCH 1 6GK7277-1AA10-0AA0
MODULE CSM 1277
Servo drive with pulse 4 e.g. SINAMICS V90 Optional: Library and
train control (PTO) PTI version (\8\) example projects can
also be tested without
drives
STEP 7 Basic V15.1 1 6ES7822-0A.05-.. • with Update 3 (\5\)
with HSP0276 for
S7-1200 V4.3 (\6\)

This application example consists of the following components:


Table 1-2
Component File name: Note
© Siemens AG 2019 All rights reserved

Documentation 109768880_S7- this document


1200_LPTO_DOC_V1.0_en.pdf
block library 109768880_S7- This zipped file
1200_LPTO_TiaV15.1_LIB_V1.0.zip contains the STEP 7
block library.
Example project 109768880_S7- This zipped file
1200_LPTO_TiaV15.1_PROJ_V1.0.zip contains the STEP 7
example project.

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 5
2 Engineering

2 Engineering
2.1 Hardware setup
The following figure shows the hardware structure of the application example.
Figure 2-1
Controller Device
L+ M S7-1200 L+ M L+ M S7-1200

CSM1277

P1 P1 P3 P1
P2
PTO
PROFINET IE

PG / PC
© Siemens AG 2019 All rights reserved

The periphery of the device CPU 1214C for connecting the PTO servo drives is
pre-defined as follows:
Table 2-1
Signal Axis 1 Axis 2 Axis 3 Axis 4
Pulse output Q0.0 Q0.1 Q0.2 Q0.3
Direction output Q0.4 Q0.5 Q0.6 Q0.7
Input low limit switch * I0.0 I0.3 I0.6 I1.1
Input homing switch I0.1 I0.4 I0.7 I1.2
Input high limit switch * I0.2 I0.5 I1.0 I1.3
* The hardware limit switches are pre-configured as normally open for simple
testing. In a real-life design, you should re-configure these as normally closed for
detection of an open circuit!
In the pre-configuration there is neither an output for drive enabling, nor an input
for the drive’s ready-state feedback.
Enabling is controlled by software through the technology object ("MC_Power"
instruction). Thus, you must hold the enable input of your servo drive as continually
triggered.
You can find additional wiring information in your servo drive’s description.

NOTE Only the DC/DC/DC variants of the CPU S7-1200 have integrated outputs for
direct control of drives (via PTO). With the signal interconnection from Table 2-1
the device CPU must be at least a CPU 1214C DC/DC/DC.

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 6
2 Engineering

2.2 Description of interface


2.2.1 FB "LPTO_Control"

The FB "LPTO_Control" controls the "axis" device axis using the control data,
"control", which is received from the controller, and defines the feedback data
"feedback" of the axis for sending back to the controller. It is called in the cyclic OB
"Main" of the device CPU for each positioning axis. Configuration of the FB
"LPTO_Control" is part of the master copy "LPTO_DevicePlc" of the "LPTO"
library.

Figure 2-2: FB "LPTO_Control"


LPTO_Control
axis
TO_PositioningAxis TO_PositioningAxis
control
"LPTO_typeControl" "LPTO_typeControl"
feedback
"LPTO_typeFeedback" "LPTO_typeFeedback"

Table 2-2: Parameters of the FB "LPTO_Control"


Name P type Data type Comment
axis IN_OUT TO_PositioningAxis Axis technology object
© Siemens AG 2019 All rights reserved

control IN_OUT "LPTO_typeControl" Control data


feedback IN_OUT "LPTO_typeFeedback" Feedback from axis

Table 2-3: Parameters of the PLC data type "LPTO_typeControl"


Name Data Comment
type
enable Bool Axis enable (Instruction "MC_Power")
acknowledge Bool Acknowledge error at positive edge (Instruction "MC_Reset")
homeExecute Bool Referencing at positive edge (dependent on "homeMode" and
"homePosition") -> Instruction "MC_Home"
hold Bool Hold axis at positive edge (Instruction "MC_Reset")
moveAbsolute Bool Position to the absolute position "position" with the target velocity "velocity"
at positive edge (Instruction "MC_MoveAbsolute")
moveRelative Bool Relative positioning by "distance" with the target velocity "velocity" at
positive edge (Instruction "MC_MoveAbsolute")
moveVelocity Bool With the target velocity "velocity" at positive edge (Instruction
"MC_MoveAbsolute")
jogForward Bool Move axis forward in jog mode with target velocity "velocity" (Instruction
"MC_MoveJog")
jogBackward Bool Move axis backward in jog mode with target velocity "velocity" (Instruction
"MC_MoveJog")
homeMode Int Homing mode for "homeExecute"
0 = Direct homing absolute
1 = Direct homing relative
2 = Passive homing
3 = Active homing

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 7
2 Engineering

Name Data Comment


type
homePosition Real • "homeMode" = 0, 2 and 3:
Absolute position of axis after completion of "homeExecute"
• "homeMode" = 1: Correction value for the current axis position
position Real Absolute target position for "moveAbsolute"
distance Real Travel distance for the relative positioning operation ("moveRelative")
velocity Real Velocity specification for axis motion
Limit values:
• for "moveAbsolute", "moveRelative", "jogForward" and "jogBackward":
Start/stop velocity ≤ velocity ≤ maximum velocity
• for "moveVelocity":
Start/stop velocity ≤ |velocity| ≤ maximum velocity
see Table 2-13, No. 6

Table 2-4: Parameters of the PLC data type "LPTO_typeFeedback"


Name Data type Comment
actualPosition Real Actual position of axis
actualVelocity Real Actual velocity of the axis
ready Bool TRUE = the axis is enabled
home Bool The axis is homed and is capable of executing absolute positioning
© Siemens AG 2019 All rights reserved

tasks ("moveAbsolute").
constantVelocity Bool TRUE = The axis travels at constant velocity.
(corresponds to the output "InVelocity" of the instruction
"MC_MoveVelocity" or "MC_MoveJog")
done Array[2..6] TRUE = The instruction was successfully executed.
of Bool ➔ see Table 2-5
busy Array[1..8] TRUE = The instruction is being executed.
of Bool ➔ see Table 2-5
aborted Array[3..8] TRUE = The instruction was aborted.
of Bool ➔ see Table 2-5
error Array[1..8] TRUE = An error occurred while the instruction was being processed
of Bool (see Table 2-5). The cause of the error can be found in parameters
"errorId" and "errorInfo".
statusId UInt Errors "error" occurred during instruction: 1=MC_Power, 2=MC_Reset,
3=MC_Home, 4=MC_Halt, 5=MC_MoveAbsolute,
6=MC_MoveRelative, 7=MC_MoveVelocity, 8=MC_MoveJog
errorId Word Error ID for parameter "error" of instruction "statusId"
errorInfo Word Error info ID for parameter "errorId"

NOTE You can find a List of ErrorIDs and ErrorInfos (technology objects as of V6) in the
Function Manual "SIMATIC STEP 7 S7-1200 Motion Control V6.0 in TIA Portal
V15" (\3\).

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 8
2 Engineering

Table 2-5
Arrayelement Instruction done busy aborted error
1 MC_Power x x
2 MC_Reset x x x
3 MC_Home x x x x
4 MC_Halt x x x x
5 MC_MoveAbsolute x x x x
6 MC_MoveRelative x x x x
7 MC_MoveVelocity x x x
8 MC_MoveJog x x x

2.2.2 FB "LPTO_DeviceStates"

The FB "LPTO_DeviceStates" checks via the "DeviceStates" instruction (MODE =


4: IO devices present) whether the device CPU is reachable. It is called in the
cyclic OB "Main" of the controller CPU.

Figure 2-3: FB "LPTO_DeviceStates"


LPTO_DeviceStates
© Siemens AG 2019 All rights reserved

HW_IOSYSTEM laddr connected Bool

Uint deviceNumber status Int

Table 2-6: Parameters of FB "LPTO_DeviceStates"


Name P type Data type Comment
laddr IN HW_IOSYSTEM Hardware designation of the PROFINET IO System
deviceNumber IN Uint Device number of the IO device
connected OUT Bool TRUE = IO device is connected (exists)
status OUT Int Status "RET_VAL" of the instruction "DeviceStates"

2.2.3 FC "LPTO_Copy"

The FC "LPTO_Copy" is for copying the data of the remote axis:


Table 2-7
DB "LPTO_Data" Direction I-device addresses
Control data controlIn -> controlOut
Feedback data feedbackOut <- feedbackIn
If the connection to the device CPU is interrupted ("connected" = FALSE), the axis
enable ("enable") in the "controlIn" parameter is reset in order to prevent
uncontrolled movement of the remote axis when the connection is re-established. It
is called in the cyclic OB "Main" of the controller CPU for each axis that is used.

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 9
2 Engineering

Figure 2-4: LPTO_Copy


LPTO_Copy

Bool connected feedbackOut "LPTO_typeFeedback"

"LPTO_typeFeedback" feedbackIn controlOut "LPTO_typeControl"


controlIn
"LPTO_typeControl" "LPTO_typeControl"

Table 2-8: Parameters of the FC "LPTO_Copy"


Name P type Data type Comment
connected IN Bool TRUE = IO device is connected (exists)
feedbackIn IN "LPTO_typeFeedback" Feedback data of the axis in the I-device addresses
feedbackOut OUT "LPTO_typeFeedback" Feedback data of the axis in DB "LPTO_Data"
controlOut OUT "LPTO_typeControl" Control data of the axis in the I-device addresses
controlIn IN_OUT "LPTO_typeControl" Control data of the axis in DB "LPTO_Data"
© Siemens AG 2019 All rights reserved

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 10
2 Engineering

2.3 Project integration


2.3.1 Hardware configuration

Table 2-9
No. Instruction
1. Open an existing TIA Portal project with an S7-1200 in network view.

2. Open the "LPTO" library and integrate the CPU "LPTO_DevicePlc" into your
existing TIA Portal project by dragging and dropping from the master copies
© Siemens AG 2019 All rights reserved

("Device" folder).

The CPU "LPTO_DevicePlc" contains all necessary elements to carry out the
functions.

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 11
2 Engineering

No. Instruction
3. Assign the existing S7-1200 to the CPU "LPTO_DevicePlc" as a controller.

2.3.2 Library elements for the IO controller

Table 2-10
No. Instruction
1. By dragging and dropping from the library "LPTO" under "Types", copy the blocks
from the "Controller" folder into the program blocks of the controller CPU. Likewise
copy the data block "LPTO_Data" from the master copies ("Controller" folder) into
the program blocks and the
© Siemens AG 2019 All rights reserved

tag table "LPTO_TagTable" into the PLC tags of the controller CPU.

The PLC data types "LPTO_typeControl" and "LPTO_typeFeedback" are


automatically copied along with, because they are part of the library type
"LPTO_Copy".

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 12
2 Engineering

2.3.3 IO addressing

Table 2-11
No. Instruction
1. Open the tag table "LPTO_Tag_Table".
2. No addresses have been assigned to the tags yet.
Through the assignment of the IO controller, the transfer address area of the
I-device communication of the CPU "LPTO_DevicePlc" is created in the controller CPU.
© Siemens AG 2019 All rights reserved

3. Enter the start address of the corresponding transfer area as the address of the
respective tags from the tag table.
To do this, detach ("float") the tag table using the icon to avoid losing the focus on
the address overview in the inspector window.

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 13
2 Engineering

2.3.4 Project planning of the IO controller

Insofar as the move orders are transmitted via the I-device communication, the
controller CPU controls the positioning axes of the device CPU. Once the
connection between controller and device is interrupted, the axes stop because the
enable bit (Enable) is no longer transmitted. So that the axes cannot run away in
uncontrolled fashion once the connection is re-established, the enable bit must
also be reset on the controller side when the connection is interrupted.
Table 2-12
No. Instruction
1. Open the cyclic OB "Main" of the controller CPU.
2. Copy the FB "LPTO_DeviceStates" into Network 2 of the OB "Main".
© Siemens AG 2019 All rights reserved

3. Open the network view and highlight the PROFINET connection.


The hardware designation "laddr" can be found in the inspection window under
"General" or as symbolic constants under "PLC tags > Show all tags > System
constants".

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 14
2 Engineering

No. Instruction
4. Highlight the PROFINET interface of the CPU "LPTO_DevicePlc" in the network
view.
Find the device number "deviceNumber" in the inspection window under "General >
Operating mode".
© Siemens AG 2019 All rights reserved

5. Enter the values you have found at the input parameters of the FB
"LPTO_DeviceStates".

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 15
2 Engineering

No. Instruction
6. Copy the FC "LPTO_Copy" into Network 3 of the OB "Main".

7. Enter the periphery addresses and the data of the DB "LPTO_Data" for axis 1 at the
interfaces of the FC "LPTO_Copy" (see tag table "LPTO_TagTable").
© Siemens AG 2019 All rights reserved

8. Repeat steps 6 and 7 for the necessary device axes (2 to a maximum of 4).

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 16
2 Engineering

2.3.5 Configuring the positioning axes

A device axis is configured in exactly the same way as a local positioning axis.
Table 2-13
No. Instruction
1. Open the configuration of the technology object "Pulse1" of the Device CPU
"LPTO_DevicePlc".
© Siemens AG 2019 All rights reserved

2. Basic parameters – General:


Here you can change the units for the positioning axis (default: mm).

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 17
2 Engineering

No. Instruction
3. Basic parameters – Drive:
Here you can change the signal type, deactivate the direction output, and define
enabling and feedback for the drive.
© Siemens AG 2019 All rights reserved

4. Extended parameters – Mechanics:


Indicate the pulses and load movement per motor revolution here.
You can modify the permitted direction of rotation and invert the direction.

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 18
2 Engineering

No. Instruction
5. Extended parameters – Position limits:
Enter the select level for the hardware limit switch here.
Indicate the positions for detection of the software limit switch.
You can also disable the hardware and software limit switches.

The hardware limit switches are pre-configured as normally open for simple testing.
In a real-life design, you should re-configure these as normally closed for detection
© Siemens AG 2019 All rights reserved

of an open circuit (Select level: Low level)!

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 19
2 Engineering

No. Instruction
6. Dynamics – General:
Enter the velocity limits as well as acceleration and deceleration here. Enter the jerk
and smoothing time for jerk limiting. You can also disable the jerk limit.
© Siemens AG 2019 All rights reserved

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 20
2 Engineering

No. Instruction
7. Dynamics – Emergency stop:
Indicate the emergency deceleration and emergency stop ramp-down time here.
© Siemens AG 2019 All rights reserved

8. Homing – Active:
Indicate here the select level, the approach/homing direction and the side of homing
switch here. Indicate the approach velocity and homing velocity. You can deactivate
the auto reverse at HW limit switch, and indicate a home position offset.

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 21
2 Engineering

No. Instruction
9. Homing – Passive:
Indicate the select level and the side of homing switch here.
© Siemens AG 2019 All rights reserved

10. Repeat the configuration (steps 2 through 9) for the technology objects "Pulse2" to
"Pulse4" of the device CPU "LPTO_DevicePlc".

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 22
2 Engineering

2.3.6 Setting parameters

In order to keep the data exchange between controller and device to a minimum,
only the most common parameters for controlling the remote positioning axes are
transmitted.
However, as with local axes, you can also specify parameters in the instance data
block of the position instruction on the device side.
For example, if you want to modify stopping behavior in the event of a lock (enable
"enable" rescinded) of the remote axis 1, proceed as follows:

Table 2-14
No. Instruction
1. Open the instance DB "LPTO_InstControl1" of the FB "LPTO_Control" to control
axis 1 on the device CPU "LPTO_DevicePlc".
© Siemens AG 2019 All rights reserved

Adjust the start value of the input parameter "StopMode" of the instance "instPower"
(FB "MC_Power") accordingly (here: 2 = Emergency stop with jerk control ->
condition: Enable jerk limit -> see Table 2-13, No. 6).

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 23
2 Engineering

2.3.7 Programming motion control instructions

Through the FC "LPTO_Copy", the control orders "control" and the feedback
"feedback" of the remote axes are copied in the DB "LPTO_Data". Access these
data to program the movement of the remote axes. Programming must occur
before the FC "LPTO_Copy" is called.
Using the example of a step sequence in which the remote axis 1 is enabled,
homed directly to the absolute position 0 and then moved to the absolute position
100, the SCL programming is described in Network 1 of the OB "Main".

Table 2-15
No. Instruction
1. Open the cyclic OB "Main" of the controller CPU.
Highlight Network 1 and select "Insert SCL network" by right-clicking.
© Siemens AG 2019 All rights reserved

Then delete the extra LAD/FBD Network 1.

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 24
2 Engineering

No. Instruction
2. Enter the necessary parameter specifications in Network 1 as a SCL step sequence.
In the example project the SCL program code is already present.
© Siemens AG 2019 All rights reserved

In the next step, reset the edge-triggered instructions "acknowledge",


"homeExecute", "halt", "moveAbsolute", "moveRelative" and "moveVelocity". Thus,
the error information "statusId", "errorId" and "errorInfo" always refer
unambiguously to the last instruction initiated (see Table 2-4).

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 25
2 Engineering

2.3.8 Commissioning

Table 2-16
No. Instruction
1. First download the PLC project folder "LPTO_DevicePlc" into the device CPU and
start it.
© Siemens AG 2019 All rights reserved

2. The device CPU "LPTO_DevicePlc" has the attribute "IP address is set directly at
the device".
Set the IP address by selecting the network card you use in "Online access".
Then connect online via "Update accessible devices" with the device CPU
"LPTO_DevicePlc" and assign it a free IP address in the subnet of the controller
CPU.

3. Then download the PLC project folder "Controller" into the controller CPU and start
it.

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 26
2 Engineering

No. Instruction
4. You can use the axis control panel of the technology objects in exactly the same way
as with a local axis:
To do this, open the commissioning screen "commissioning" of the technology object
of the axis to be moved, activate master control and enable the axis.
© Siemens AG 2019 All rights reserved

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 27
2 Engineering

2.4 Operation
Because the position of the axis is computed internally using the technology object,
you can even test the example project without servo drives connected.

NOTICE If you test the example project with servo drives connected, you must
adjust the configuration of the technology objects to the drives/motors
being used (Chapter 2.3.5) in order to prevent damage.

Table 2-17
No. Instruction
1. Open the data block "LPTO_Data" on the controller CPU and press the "Monitor all"
button.
Here you can start the programmed step sequence (Chapter 2.3.7) with "start" or
select the movement orders individually and monitor the feedback from the device
axes.
© Siemens AG 2019 All rights reserved

The homing modes "homeMode" 2 (passive homing) and 3 (active homing) can
only be tested with a wired HW limit switches (Table 2-1).

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 28
3 Appendix

3 Appendix
3.1 Service and support
Industry Online Support
Do you have any questions or need assistance?
Siemens Industry Online Support offers round the clock access to our entire
service and support know-how and portfolio.
The Industry Online Support is the central address for information about our
products, solutions and services.
Product information, manuals, downloads, FAQs, application examples and videos
– all information is accessible with just a few mouse clicks:
support.industry.siemens.com

Technical Support
The Technical Support of Siemens Industry provides you fast and competent
support regarding all technical queries with numerous tailor-made offers
– ranging from basic support to individual support contracts. Please send queries
to Technical Support via Web form:
www.siemens.com/industry/supportrequest
© Siemens AG 2019 All rights reserved

SITRAIN – Training for Industry


We support you with our globally available training courses for industry with
practical experience, innovative learning methods and a concept that’s tailored to
the customer’s specific needs.
For more information on our offered trainings and courses, as well as their
locations and dates, refer to our web page:
www.siemens.com/sitrain

Service offer
Our range of services includes the following:
• Plant data services
• Spare parts services
• Repair services
• On-site and maintenance services
• Retrofitting and modernization services
• Service programs and contracts
You can find detailed information on our range of services in the service catalog
web page:
support.industry.siemens.com/cs/sc

Industry Online Support app


You will receive optimum support wherever you are with the "Siemens Industry
Online Support" app. The app is available for iOS and Android:
support.industry.siemens.com/cs/ww/en/sc/2067

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 29
3 Appendix

3.2 Links and literature


Table 3-1
No. Topic
\1\ Siemens Industry Online Support
https://support.industry.siemens.com
\2\ Link to this entry page of this application example
https://support.industry.siemens.com/cs/ww/en/view/109768880
\3\ Function Manual "SIMATIC STEP 7 S7-1200 Motion Control V6.0 in TIA Portal V15"
https://support.industry.siemens.com/cs/ww/en/view/109754206
\4\ Application example "SINAMICS V: Controlled Positioning of a V90 with S7‑1200
via the Pulse/Direction Interface, with HMI (Set 7)"
https://support.industry.siemens.com/cs/ww/en/view/77467940
\5\ Download "Updates for STEP 7 V15.1 and WinCC V15.1"
https://support.industry.siemens.com/cs/ww/en/view/109763890
\6\ Download "Support Packages for the hardware catalog in the TIA Portal (HSP)"
https://support.industry.siemens.com/cs/ww/en/view/72341852
\7\ FAQ "Where do you find the latest operating system updates (firmware) for
SIMATIC S7-1200 controllers?”
https://support.industry.siemens.com/cs/ww/en/view/77430184
© Siemens AG 2019 All rights reserved

\8\ SIEMENS Industry Mall: SINAMICS V90 basic servo drive system
https://mall.industry.siemens.com/mall/en/WW/Catalog/Products/10354485?tree=C
atalogTree

3.3 Change documentation


Table 3-2
Version Date Modifications
V1.0 10/2019 First version

Moving PTO positioning axes of an S7-1200 as IO device


Entry-ID: 109768880, V1.0, 10/2019 30

You might also like