0% found this document useful (0 votes)
96 views10 pages

S7-1500 Motion Control Programming Guide

The document provides instructions for creating and configuring a technology object called 'RotatingTable' in the SIMATIC TIA Portal, specifically for motion control applications. It also details the programming of a function block 'AxisControl' to manage the stepper motor's operation based on control data. Additionally, it introduces the concept of PID controllers, their implementation in S7-1200, and the steps for creating and configuring a PID controller technology object.

Uploaded by

adamraz
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views10 pages

S7-1500 Motion Control Programming Guide

The document provides instructions for creating and configuring a technology object called 'RotatingTable' in the SIMATIC TIA Portal, specifically for motion control applications. It also details the programming of a function block 'AxisControl' to manage the stepper motor's operation based on control data. Additionally, it introduces the concept of PID controllers, their implementation in S7-1200, and the steps for creating and configuring a PID controller technology object.

Uploaded by

adamraz
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SIMATIC TIA Portal S7-1500 Programming 3

[Link]. Exercise 2: Creating and Configuring the Technology Object "Motion Control"

Task
You are to create the new technology object "RotatingTable" of the type "TO_PositioningAxis"
and configure it.

What to Do
1. Create a new technology object in PLC_2:
 PLC_2  Technology objects  Add new object  Motion Control 
 TO_PositioningAxis
 Name: "RotatingTable"
2. Implement the settings shown in the following:

Continued on the next page

TIA-PRO3 - Technology Objects 8-31


Training Document V15.01.00
SIMATIC TIA Portal S7-1500 Programming 3

TIA-PRO3 - Technology Objects


8-32 Training Document V15.01.00
SIMATIC TIA Portal S7-1500 Programming 3

TIA-PRO3 - Technology Objects 8-33


Training Document V15.01.00
SIMATIC TIA Portal S7-1500 Programming 3

3. Save your project.


TIA-PRO3 - Technology Objects
8-34 Training Document V15.01.00
SIMATIC TIA Portal S7-1500 Programming 3

[Link]. Exercise 3: Programming FB "AxisControl"

Pickup
(0.0 degrees)

Station 1 Station 1
(270.0 degrees) (90.0 degrees)

Station 2
(180.0 degrees)

Task
The data, according to which the stepper motor is to be controlled, is currently stored in the data
block "ControlDataReceive". This data is to be passed via an INOUT parameter #controlData of
FB "AxisControl" that is now to be created so as to be able to control the stepper motor as
follows:
When "ControlDataReceive".operation is switched on, the axis "RotatingControl" is enabled with
the instruction "MC_Power", a homing is carried out with the instruction "MC_Home" and the
stepper motor is moved into its reference position.
Then – whenever the variable "ControlDataReceive".transportLeft or
"ControlDataReceive".transportRight has Status 'TRUE' – the stepper motor is moved to the
positions as they are stored in the variable "ControlDataReceive".position analog to the traversing
movements of the conveyor model. For this, you are to use the instruction "MC_MoveAbsolute".
In Manual mode – whenever the transport belt moves – the axis is also to be enabled and turn in
the corresponding direction. For this, you are to use the function "MC_MoveJog".
You are also to pass the technology object with the help of the INOUT parameter #RotatingTable.

What to Do
1. Create a new function block "AxisControl".
2. Parameterize the INOUT parameters #controlData [typeControlData] and #RotatingTable
[TO_PositioningAxis] (date type of the technology object).
3. Program the new FB "AxisControl" with the required functions:
NW1: Enable axis in Manual and Automatic mode with "MC_Power"
NW2: Home axis in Automatic mode when enabled with "MC_Home"
NW3: Position axis in Automatic mode with "MC_MoveAbsolute"
NW4: Turn axis to the right or the left in Manual mode with "MC_MoveJog"
4. Call FB "AxisControl" in the new to be created OB "MainAxis" and pass the control data and
the technology object.
5. Compile, save, download and test the modifications.

TIA-PRO3 - Technology Objects 8-35


Training Document V15.01.00
SIMATIC TIA Portal S7-1500 Programming 3

8.4. Introduction to PID Controller

Setpoint
e.g. Voltage
Manipulated variable
Digital output
Actual value
Voltage

Fed-back actual value

Setpoint

PID Controller
PID stands for "Proportional Integral Differential". A PID controller has a proportional component,
an integrating component and a differentiating component. For each of the three components, a
specific equation is in force:
• The equation of the proportional component results in a value that is proportional to the
control deviation
• The result of the integral equation increases with the duration of the control deviation
• The speed of the control deviation influences the differential component; the steeper the
increase or fall of the change, the greater the D-component is
The three equations are then combined and result in the output value (Output).
PID controllers are used in industry, for example, to control the temperature of welding systems
when it is important to retain a constant temperature value in spite of possible disturbances.
Put very simply, a PID controller serves to align a changing, measured actual value with a
setpoint value as quickly as possible and as exactly as possible.
This is done by readjusting the output variable whereby the overshoots and undershoots keep
getting smaller until the actual value equals the setpoint value as exactly as possible.
For this, there is a wizard in STEP7 which enables you to configure the necessary settings of a
controlled system quickly and easily as well as without extensive prior knowledge.

TIA-PRO3 - Technology Objects


8-36 Training Document V15.01.00
SIMATIC TIA Portal S7-1500 Programming 3

8.4.1. Implementation of a PID Controller

Implementation in S7-1200
Controlled
Actuator (Disturbance)
Controller system
z

w e + y
PID PWM RC
Setpoint Actual
Controller element
value
- Measuring element
Analog
input

Value of man. var. to analog module

Value of man. var. to pulse


output

Actual value from analog


module

PID Controller in the S7-1200


Based on the example of a complete control system, the picture above shows the PID controller
implemented in the SIMATIC 1200 station in symbolic representation and the block that results
from it.
In the S7-1200, the actual controller of a PID control system is implemented. For this, TIA Portal
provides a prefabricated block "PID_Compact" which can be inserted in the user program and
then assigned.
At the same time, a technology object "PID" is available with which the controller can be
configured in the user program and then commissioned.

The switch output for the pulse width modulation is controlled by the instruction
PID_Compact. The pulse generators integrated in the CPU are not used.

Closed-loop Control
• Blocks:
In the simplest case, a PID control system consists of a PID controller, an actuator as well as
the system to be controlled. The output signal of the controlled system is fed back via a
measuring element on the PID controller.
• Signals/Values:
In the simplest case, distinction is made in a PID control system between the setpoint value
(w), the input value (e), the correcting variable that results from it. Together with an
influencing disturbance (z), the actual value (y) results from this in the closed-loop control,
which is once again fed back to the PID controller via the measuring element.

TIA-PRO3 - Technology Objects 8-37


Training Document V15.01.00
SIMATIC TIA Portal S7-1500 Programming 3

8.4.2. Creating the Technology Object "PID" (Control)

Creating a PID Controller


When creating a new technology object for the PID controller, you select "PID" and the relevant
object for the control to be carried out:
• PID_Compact -> universal PID controller
• PID_3Step -> PID controller for valves or actuators
• PID_Temp -> PID controller for temperature processes

After a PID controller has been created, the view is transferred to the wizard. It uses the following
identifiers:

The settings were successfully configured


The settings are only occupied with default values,
functioning is not hindered by this
The settings are still faulty

As well, a function block for the PID controller is automatically created which contains all input
values and output values in its interface.

TIA-PRO3 - Technology Objects


8-38 Training Document V15.01.00
SIMATIC TIA Portal S7-1500 Programming 3

[Link]. Configuring the PID Controller (1): Basic Settings

Choice of Controller type


e.g.: Brightness, Pressure,
Viscosity, etc.

Basic Settings
The configuration of the basic settings of the PID controller offers the following options:
• Type of Controller
The preselection "Controller type" sets the desired unit for the controller.
If the checkbox "Invert the control logic" is activated (checked), it causes an increase of the
manipulated value when a decrease of the actual value occurs (for example, falling water
level through an increase of the valve position of the outlet valve or decreasing temperature
through an increase of the cooling capacity).
• Setpoint:
Choose whether the value at the function block or the value of the instance DB is to be used
(insofar as it exists and is only available in the Inspector window of the program editor).
• Input:
Choose whether the input parameter "Input" or "Input_PER" is to be used.
"Input" is used when an actual value from the user program is to be used.
"Input_PER" is used when the actual value of an analog input is to be used.
• Output
Select the manipulated value output of the instruction "PID_Compact". The following
possibilities are available:
Output: uses a variable of the user program as the manipulated value output. (Real
format)
Output_PER: uses an analog output as the manipulated value output (analog output
value).
Output_PWM: uses a digital switch output and controls it via a pulse width modulation.
(The manipulated value is formed via variable switch-on and switch-off
times.)

TIA-PRO3 - Technology Objects 8-39


Training Document V15.01.00
SIMATIC TIA Portal S7-1500 Programming 3

[Link]. Configuring the PID Controller (2): Process Value Settings

Process Value Limits (Process Value High/Low Limit)


They define the absolute upper and lower limit of the process value. During operation, as soon as
these limits are exceeded or fall below, the controller switches off and the value of the
manipulated variable is set to 0%.

Process Value Scaling


Through scaling, the process values (actual values) are defined by a lower and an upper value
pair. Each value pair consists of the value of the analog input and the physical value of the
respective scaling point. Depending on the configuration of the basic setting, a process value of
the user program can also be used instead of the analog value of the analog input.

TIA-PRO3 - Technology Objects


8-40 Training Document V15.01.00

You might also like