Sie sind auf Seite 1von 36

Application Description Ÿ 09/2015

Sample Blocks for WinCC V7


and STEP 7 (TIA Portal)
(for S7-1200 and S7-1500 in SCL)

https://support.industry.siemens.com/cs/ww/de/view/31624179
Warranty and Liability

Warranty and Liability


Note The Application Examples are not binding and do not claim to be complete with
regard to configuration, equipment or any contingencies. The Application
Examples do not represent customer-specific solutions. They are only intended
to provide support for typical applications. You are responsible for the correct
operation of the described products. These Application Examples do not relieve
you of the responsibility of safely and professionally using, installing, operating
and servicing equipment. When using these Application Examples, you
recognize that we cannot be made liable for any damage/claims beyond the
liability clause described. We reserve the right to make changes to these
application examples at any time and without prior notice. If there are any
deviations between the recommendations provided in this Application Example
and other Siemens publications – e.g. catalogs – the contents of the other
documents have priority.

We do not accept any liability for the information contained in this document.
Any claims against us – based on whatever legal reason – resulting from the use of
the examples, information, programs, engineering and performance data etc.,
described in this application example will be excluded. Such an exclusion will not
apply in the case of mandatory liability, e.g. under the German Product Liability Act
(“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life, body
ã Siemens AG Copyright-2015 All rights reserved

or health, guarantee for the quality of a product, fraudulent concealment of a


deficiency or breach of a condition which goes to the root of the contract
(“wesentliche Vertragspflichten”). The compensation for damages due to a breach
of a fundamental contractual obligation is, however, limited to the foreseeable
damage, typical for the type of contract, except in the event of intent or gross
negligence or injury to life, body or health. The above provisions do not imply a
change of the burden of proof to your detriment.
Any form of duplication or distribution of these Application Examples or excerpts
hereof is prohibited without the expressed consent of Siemens Industry Sector.

Security Siemens provides products and solutions with industrial security functions that
informa- support the secure operation of plants, solutions, machines, equipment and/or
tion networks. They are important components in a holistic industrial security
concept. With this in mind, Siemens’ products and solutions undergo continuous
development. Siemens recommends strongly that you regularly check for
product updates.
For the secure operation of Siemens products and solutions, it is necessary to
take suitable preventive action (e.g. cell protection concept) and integrate each
component into a holistic, state-of-the-art industrial security concept. Third-party
products that may be in use should also be considered. For more information
about industrial security, visit http://www.siemens.com/industrialsecurity.
To stay informed about product updates as they occur, sign up for a product-
specific newsletter. For more information, visit
http://support.automation.siemens.com.

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 2
Table of Contents

Table of Contents
Warranty and Liability .............................................................................................. 2
1 Task................................................................................................................. 4
2 Structure of the Automation Solution............................................................ 5
2.1 Overview ........................................................................................... 5
2.2 Required components........................................................................ 6
3 Functional Mechanism of this Faceplate....................................................... 7
3.1 Interfaces of the faceplate.................................................................. 7
3.2 Alarms and messages ....................................................................... 8
3.3 Control and status signals .................................................................. 9
3.3.1 Processing of switching commands in the controller........................... 9
3.3.2 Analyzing process states and displaying them in the WinCC
process picture ................................................................................ 10
3.3.3 Switching over inputs ....................................................................... 11
3.3.4 Defining the range of values ............................................................ 12
3.3.5 Limit monitoring ............................................................................... 13
3.3.6 Enabling/disabling the simulation ..................................................... 15
3.3.7 Resetting error................................................................................. 17
3.4 Block icon and faceplate .................................................................. 19
3.4.1 Block icon ........................................................................................ 20
ã Siemens AG Copyright-2015 All rights reserved

3.4.2 Faceplate – Default view.................................................................. 21


3.4.3 Faceplate – Alarms and messages view .......................................... 22
3.4.4 Faceplate – Trend view.................................................................... 23
3.4.5 Faceplate – Limit value view ............................................................ 24
4 Commissioning ............................................................................................ 25
4.1 Configuring the STEP 7 block .......................................................... 25
4.2 Configuring the WinCC faceplate ..................................................... 26
5 Block Connectors ......................................................................................... 33
5.1 Input parameters ............................................................................. 33
5.2 Output parameters........................................................................... 34
6 Links & Literature ......................................................................................... 35
6.1 Bibliographic references .................................................................. 35
6.2 Internet link specifications ................................................................ 35
6.3 Other faceplates .............................................................................. 36
7 History .......................................................................................................... 36

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 3
1 Task

1 Task
Technological task description/overview
This application describes the configuration of technology block DEMO_ANALOG
(FB640) and the corresponding block icon (faceplate type) with faceplate. It serves
for displaying an analog signal. It can be used to display signals of analog entry
cards.
The signal to be monitored can:
· be of type “WORD” or “REAL”,
· be monitored for limit values,
· trigger alarms or messages if any upper or lower limits are violated,
· be simulated.

Note Before using the block in your own projects, check the proper functioning of the
block and adjust it to your individual requirements where necessary. The block
described in this application is only intended as a template for creating your own
blocks.
ã Siemens AG Copyright-2015 All rights reserved

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 4
2 Structure of the Automation Solution
2.1 Overview

2 Structure of the Automation Solution


2.1 Overview
The following figures show the block, the block icon and the faceplate for
controlling, operating and monitoring analog signals.
Table 2-1
ã Siemens AG Copyright-2015 All rights reserved

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 5
2 Structure of the Automation Solution
2.2 Required components

2.2 Required components


Hardware
Table 2-2
Component No. Note
Development system 1 PC for the configuration of the control functions and of
WinCC. The usual hardware requirements for STEP 7
and WinCC apply.
S7-1500 CPU 1 Alternatively, the controller can also be simulated with
PLCSIM.

Software
Table 2-3
Component Note
STEP 7 V13 SP1 Professional S7-PLCSIM and S7-SCL are included in the scope of
delivery.
· S7-PLCSIM can be used for simulation.
ã Siemens AG Copyright-2015 All rights reserved

· S7-SCL is used for the creation of control blocks.


WinCC V7.3 SE

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 6
3 Functional Mechanism of this Faceplate
3.1 Interfaces of the faceplate

3 Functional Mechanism of this Faceplate


3.1 Interfaces of the faceplate
Communication with the analog block (DB 640) is realized with the “Analog”
structure tag and the following structure type elements.

Table 3-1
Name Data type Tag type Address
Instance Text tag 16-bit character set External DB640,DD50
QdwState Unsigned 32-bit value External DB640,DD308
QwAlarm Unsigned 32-bit value External DB640,DBW354
OPdwCmd Unsigned 32-bit value External DB640,DD358
OP_LIM_ULA Floating-point number 32bit IEEE External DB640,DD364
OP_LIM_ULW Floating-point number 32bit IEEE External DB640,DD368
OP_LIM_LLW Floating-point number 32bit IEEE External DB640,DD372
OP_LIM_LLA Floating-point number 32bit IEEE External DB640,DD276
OP_SIM_VALUE Floating-point number 32bit IEEE External DB640,DD380
ã Siemens AG Copyright-2015 All rights reserved

OP_LIM_HYS_Perc Floating-point number 32bit IEEE External DB640,DD384


OP_LIM_HYS_Abs Floating-point number 32bit IEEE External DB640,DD388
OP_HI_LIM Floating-point number 32bit IEEE External DB640,DD392
OP_LO_LIM Floating-point number 32bit IEEE External DB640,DD396
UNIT Text tag 16-bit character set Internal -

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 7
3 Functional Mechanism of this Faceplate
3.2 Alarms and messages

3.2 Alarms and messages


This application uses the bit message procedure to display messages in WinCC.
The messages must be configured as bit messages in the message editor of
WinCC.
In the example configuration, all bit messages were created for the used faceplate
instances, as well as their trigger tags.

Message tag

The following table shows the setup of the tags.


For the first instance of the “Analog_001” faceplate window, “Analog_001” was
assigned in the location of the failure (Message text 2).
Table 3-2
Bit Signal Message text
0 QALARM_LL Alarm lower limit undercut
1 QALARM_UL Alarm upper limit exceeded
2
ã Siemens AG Copyright-2015 All rights reserved

3
4 QLOCK Interlock, value locked
5
6 QERR_EXT External error
7 QERR Group error
8 QWARN_LL Warning lower limit undercut
9 QWARN_UL Warning upper limit undercut
10
11
12 LOCK Interlock pending
13
14
15 QSIM Simulation ACTIVE

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 8
3 Functional Mechanism of this Faceplate
3.3 Control and status signals

3.3 Control and status signals


3.3.1 Processing of switching commands in the controller

The WinCC “OPdwCmd” control tag of a block is used to transmit commands from
WinCC to the PLC. The PLC block analyses the control command, executes the
desired action and then initiates a reset of all pending control commands. For this
purpose, the value of the control parameter is set to “0”.
Figure 3-1
“Analog” (FB 640)
EN ENO
LOCK QdwState
ERR_EXTERN QOUT
LIOP_SEL QHI_LIM
L_SIM QLO_LIM
L_RESET QLIM_ULA_Enable
IN_MODE QLIM_ULA
BIPOLAR QLIM_ULW_Enable
IN_INT QLIM_ULW
IN QLIM_LLW_Enable
IN_SIM QLIM_LLW
ã Siemens AG Copyright-2015 All rights reserved

HI_LIM QLIM_LLA_Enable
LO_LIM QLIM_LLA
LIM_ULA_Enable QLIM_HYS
LIM_ULA QALARM_UL
LIM_ULW_Enable QWARN_UL
LIM_ULW QWARN_LL
LIM_LLW_Enable QALARM_LL
LIM_LLW QSIM
LIM_LLA_Enable QLOCK
LIM_LLA QERR
LIM_HYS_Set QERR_EXT
LIM_HYS QERR_OVERRUN
INSTANCE QERR_HIGHRANG
RESTART QERR_LOWRANG
VISIBILITY QERR_WIRE
OPdwCmd QwAlarm

The bits of the “OPdwCmd” tag are assigned as follows:


Figure 3-2

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 9
3 Functional Mechanism of this Faceplate
3.3 Control and status signals

3.3.2 Analyzing process states and displaying them in the WinCC process
picture

The technology block of this application uses the “QdwState” (DWORD) output to
show the different states in the WinCC process display.
Figure 3-3
“Analog” (FB 640)
EN ENO
LOCK QdwState
ERR_EXTERN QOUT
LIOP_SEL QHI_LIM
L_SIM QLO_LIM
L_RESET QLIM_ULA_Enable
IN_MODE QLIM_ULA
BIPOLAR QLIM_ULW_Enable
IN_INT QLIM_ULW
IN QLIM_LLW_Enable
IN_SIM QLIM_LLW
HI_LIM QLIM_LLA_Enable
LO_LIM QLIM_LLA
LIM_ULA_Enable QLIM_HYS
ã Siemens AG Copyright-2015 All rights reserved

LIM_ULA QALARM_UL
LIM_ULW_Enable QWARN_UL
LIM_ULW QWARN_LL
LIM_LLW_Enable QALARM_LL
LIM_LLW QSIM
LIM_LLA_Enable QLOCK
LIM_LLA QERR
LIM_HYS_Set QERR_EXT
LIM_HYS QERR_OVERRUN
INSTANCE QERR_HIGHRANG
RESTART QERR_LOWRANG
VISIBILITY QERR_WIRE
OPdwCmd QwAlarm

The bits of the “QdwState” tag are assigned as follows:


Figure 3-4

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 10
3 Functional Mechanism of this Faceplate
3.3 Control and status signals

3.3.3 Switching over inputs

To switch over the inputs, the following signals are used:

Table 3-3
“Analog” (FB 640)
EN QdwState
LOCK QOUT
ERR_EXTERN QHI_LIM
LIOP_SEL QLO_LIM
L_SIM QLIM_ULA_Enable
L_RESET QLIM_ULA
IN_MODE QLIM_ULW_Enable
BIPOLAR QLIM_ULW
IN_INT QLIM_LLW_Enable
IN QLIM_LLW
IN_SIM QLIM_LLA_Enable
HI_LIM QLIM_LLA
LO_LIM QLIM_HYS
LIM_ULA_Enable QALARM_UL
LIM_ULA QWARN_UL
ã Siemens AG Copyright-2015 All rights reserved

LIM_ULW_Enable QWARN_LL
LIM_ULW QALARM_LL
LIM_LLW_Enable QSIM
LIM_LLW QLOCK
LIM_LLA_Enable QERR
LIM_LLA QERR_EXT
LIM_HYS_Set QERR_OVERRUN
LIM_HYS QERR_HIGHRANG
INSTANCE QERR_LOWRANG
RESTART QERR_WIRE
VISIBILITY QwAlarm
OPdwCmd ENO

· “IN_MODE”
The “IN_MODE” input defines whether the “IN_INT” input or the “IN” input is
active.
“IN_MODE” = 0 è input “IN_INT” active
“IN_MODE” = 1 è “IN_INT” input active

· “BIPOLAR”
The “BIPOLAR” input defines whether the scaling of the “IN_INT” input signal
is unipolar or bipolar.
“BIPOLAR” = 0 è nominal range from 0 to +27648
“BIPOLAR” = 1 è nominal range from -27648 to +27648

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 11
3 Functional Mechanism of this Faceplate
3.3 Control and status signals

· “IN_INT”
The input is processed for the analog value display of an analog input module
in the 4-20 mA measuring range. The nominal range is defined from 0 to
+27648 (unipolar) or from -27648 to +27648 (bipolar).
For information on the analog value display of analog modules, please refer to
the following document:
http://support.automation.siemens.com/WW/view/en/8859629

· “IN”
The value of the “IN” input is processed directly and passed on to “QOUT”
within the specified limits.

3.3.4 Defining the range of values

The range of values is defined by the “HI_LIM” and “LO_LIM” inputs. When
monitoring the process value of an analog input module, the nominal range is
scaled to this range depending on the “BIPOLAR” parameter.

Table 3-4
ã Siemens AG Copyright-2015 All rights reserved

“Analog” (FB 640)


EN QdwState
LOCK QOUT
ERR_EXTERN QHI_LIM
LIOP_SEL QLO_LIM
L_SIM QLIM_ULA_Enable
L_RESET QLIM_ULA
IN_MODE QLIM_ULW_Enable
BIPOLAR QLIM_ULW
IN_INT QLIM_LLW_Enable
IN QLIM_LLW
IN_SIM QLIM_LLA_Enable
HI_LIM QLIM_LLA
LO_LIM QLIM_HYS
LIM_ULA_Enable QALARM_UL
LIM_ULA QWARN_UL
LIM_ULW_Enable QWARN_LL
LIM_ULW QALARM_LL
LIM_LLW_Enable QSIM
LIM_LLW QLOCK
LIM_LLA_Enable QERR
LIM_LLA QERR_EXT
LIM_HYS_Set QERR_OVERRUN
LIM_HYS QERR_HIGHRANG
INSTANCE QERR_LOWRANG
RESTART QERR_WIRE
VISIBILITY QwAlarm
OPdwCmd ENO

“HI_LIM” è upper range of values


“LO_LIM” è lower range of values

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 12
3 Functional Mechanism of this Faceplate
3.3 Control and status signals

3.3.5 Limit monitoring

The limit monitoring is used to trigger a warning or an alarm if the signal to be


monitored exceeds or falls below one or several limits.

Table 3-5
“Analog” (FB 640)
EN QdwState
LOCK QOUT
ERR_EXTERN QHI_LIM
LIOP_SEL QLO_LIM
L_SIM QLIM_ULA_Enable
L_RESET QLIM_ULA
IN_MODE QLIM_ULW_Enable
BIPOLAR QLIM_ULW
IN_INT QLIM_LLW_Enable
IN QLIM_LLW
IN_SIM QLIM_LLA_Enable
HI_LIM QLIM_LLA
LO_LIM QLIM_HYS
LIM_ULA_Enable QALARM_UL
ã Siemens AG Copyright-2015 All rights reserved

LIM_ULA QWARN_UL
LIM_ULW_Enable QWARN_LL
LIM_ULW QALARM_LL
LIM_LLW_Enable QSIM
LIM_LLW QLOCK
LIM_LLA_Enable QERR
LIM_LLA QERR_EXT
LIM_HYS_Set QERR_OVERRUN
LIM_HYS QERR_HIGHRANG
INSTANCE QERR_LOWRANG
RESTART QERR_WIRE
VISIBILITY QwAlarm
OPdwCmd ENO

· “LIM_ULA_Enable”
Enables the monitoring of the “LIM_ULA” limit for exceeding the limit to trigger
an alarm. The enable of the limit monitoring is indicated at the
“QLIM_ULA_Enable” output, the triggering of the alarm is displayed at the
“QALARM_UL” output. The “LIM_ULA” limit is mirrored to the “QLIM_ULA”
output irrespective of “LIM_ULA_Enable”.
“LIM_ULA_Enable” = 0 è limit monitoring inactive
“LIM_ULA_Enable” = 1 è limit monitoring active

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 13
3 Functional Mechanism of this Faceplate
3.3 Control and status signals

· “LIM_ULW_Enable”
Enables the monitoring of the “LIM_ULW” limit for exceeding the limit to trigger
a warning. The enable of the limit monitoring is indicated at the
“QLIM_ULW_Enable” output, the triggering of the warning is displayed at the
“QWARN_UL” output. The “LIM_ULW” limit is mirrored to the “QLIM_ULW”
output irrespective of “LIM_ULW_Enable”.
“LIM_ULW_Enable” = 0 è limit monitoring inactive
“LIM_ULW_Enable” = 1 è limit monitoring active
· “LIM_LLW_Enable”
Enables the monitoring of the “LIM_LLW” limit for falling below the limit to
trigger a warning. The enable of the limit monitoring is indicated at the
“QLIM_LLW_Enable” output, the triggering of the warning is displayed at the
“QWARN_LL” output. The “LIM_LLW” limit is mirrored to the “QLIM_LLW”
output irrespective of “LIM_LLW_Enable”.
“LIM_LLW_Enable” = 0 è limit monitoring inactive
“LIM_LLW_Enable” = 1 è limit monitoring active
· “LIM_LLA_Enable”
Enables the monitoring of the “LIM_LLA” limit for falling below the limit to
trigger an alarm. The enable of the limit monitoring is indicated at the
“QLIM_LLA_Enable” output, the triggering of the alarm is displayed at the
ã Siemens AG Copyright-2015 All rights reserved

“QALARM_LL” output. The “LIM_LLA” limit is mirrored to the “QLIM_LLA”


output irrespective of “LIM_LLA_Enable”.
“LIM_LLA_Enable” = 0 è limit monitoring inactive
“LIM_LLA_Enable” = 1 è limit monitoring active
· “LIM_HYS” and “LIM_HYS_Set”
The “LIM_HYS” value supplies the limit for deactivating a limit monitoring
message with a hysteresis. Depending on the “LIM_HYS_Set” parameter, the
value can be specified as an absolute value or as a percentage value.
“LIM_HYS_Set” = 0 è “LIM_HYS” interpreted as a percentage value
“LIM_HYS_Set” = 1è “LIM_HYS” interpreted as an absolute value
“LIM_HYS” interpreted as a percentage value depends on the range of values
defined by the “HI_LIM” and “LO_LIM” parameters and is converted
accordingly.
The value of the hysteresis is mirrored to the “QLIM_HYS” output and
influences the deactivation of the triggered limit monitoring messages:
– Messages relating to an exceeded limit: these messages are deactivated
only after the limit minus the hysteresis has been reached.
– Messages indicating that the value has fallen below a limit: these
messages are deactivated only after the limit plus the hysteresis has been
reached.

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 14
3 Functional Mechanism of this Faceplate
3.3 Control and status signals

3.3.6 Enabling/disabling the simulation

The “Simulation ON” mode enables the simulation of the analog signal. This
function is important, for example, if automatic functions shall be tested already
during the configuration phase, although a process interface does not yet exist.
Without simulating the feedbacks, many automatic functions (e.g., step sequences)
cannot be successfully executed since the feedbacks are frequently requested in
step enabling conditions or cause errors.

Table 3-6
“Analog” (FB 640)
EN QdwState
LOCK QOUT
ERR_EXTERN QHI_LIM
LIOP_SEL QLO_LIM
L_SIM QLIM_ULA_Enable
L_RESET QLIM_ULA
IN_MODE QLIM_ULW_Enable
BIPOLAR QLIM_ULW
IN_INT QLIM_LLW_Enable
IN QLIM_LLW
ã Siemens AG Copyright-2015 All rights reserved

IN_SIM QLIM_LLA_Enable
HI_LIM QLIM_LLA
LO_LIM QLIM_HYS
LIM_ULA_Enable QALARM_UL
LIM_ULA QWARN_UL
LIM_ULW_Enable QWARN_LL
LIM_ULW QALARM_LL
LIM_LLW_Enable QSIM
LIM_LLW QLOCK
LIM_LLA_Enable QERR
LIM_LLA QERR_EXT
LIM_HYS_Set QERR_OVERRUN
LIM_HYS QERR_HIGHRANG
INSTANCE QERR_LOWRANG
RESTART QERR_WIRE
VISIBILITY QwAlarm
OPdwCmd ENO

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 15
3 Functional Mechanism of this Faceplate
3.3 Control and status signals

· “IN_SIM”
When the simulation is enabled, the “IN_SIM” input is active, otherwise
“IN_INT” or “IN” input is enabled, depending on the set mode (“IN_MODE”).
· “LIOP_SEL”
If the “LIOP_SEL” input is set, the simulation is switched on/off via the control
input “L_SIM”.
If the “LIOP_SEL” input is not set, the simulation is turned on or off by the
operator (“OPdwCmd” [bit 20 and 21]).
· “L_SIM”
“LIOP_SEL” = 1 AND “L_SIM” = 0 è Simulation OFF
“LIOP_SEL” = 1 AND “L_SIM” = 1 è Simulation ON
· “OPdwCmd”
The operator commands of the control word “OPdwCmd” are effective only, if
the “LIOP_SEL” input is not set.
“LIOP_SEL” = 0 AND “OPdwCmd [bit 20]” = 1 è Simulation OFF
“LIOP_SEL” = 0 AND “OPdwCmd [bit 21]” = 1 è Simulation ON
· “QSIM”
Operating mode “Simulation” is indicated at the “QSIM” block output.
ã Siemens AG Copyright-2015 All rights reserved

“QSIM” = 0 è Simulation OFF


“QSIM” = 1 è Simulation ON
· “QdwState”
The current “Simulation” mode is indicated in the status word by means of
bit 18.
“QdwState [bit 18]” = 0 è Simulation OFF
“QdwState [bit 18]” = 1 è Simulation ON

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 16
3 Functional Mechanism of this Faceplate
3.3 Control and status signals

3.3.7 Resetting error

The following situations cause the block to go to the “Error” state and the “QOUT”
output to take on the value of the “LO_LIM” lower limit:
· Interlock (“LOCK” = 1)
· External error (“ERR_EXT” = 1)
· Wire break (“QERR_WIRE” = 1)

The following situation causes the block to go to the “Error” state and the “QOUT”
output to take on the value of the “HI_LIM” upper limit:
· Overrun (“QERR_OVERRUN” = 1)

If there is an error at the block (QERR = 1), it can be reset using the “L_RESET”
input or by the “OPdwCmd” operator. This error status can only be reset if there are
no other errors pending.

Table 3-7
“Analog” (FB 640)
ã Siemens AG Copyright-2015 All rights reserved

EN QdwState
LOCK QOUT
ERR_EXTERN QHI_LIM
LIOP_SEL QLO_LIM
L_SIM QLIM_ULA_Enable
L_RESET QLIM_ULA
IN_MODE QLIM_ULW_Enable
BIPOLAR QLIM_ULW
IN_INT QLIM_LLW_Enable
IN QLIM_LLW
IN_SIM QLIM_LLA_Enable
HI_LIM QLIM_LLA
LO_LIM QLIM_HYS
LIM_ULA_Enable QALARM_UL
LIM_ULA QWARN_UL
LIM_ULW_Enable QWARN_LL
LIM_ULW QALARM_LL
LIM_LLW_Enable QSIM
LIM_LLW QLOCK
LIM_LLA_Enable QERR
LIM_LLA QERR_EXT
LIM_HYS_Set QERR_OVERRUN
LIM_HYS QERR_HIGHRANG
INSTANCE QERR_LOWRANG
RESTART QERR_WIRE
VISIBILITY QwAlarm
OPdwCmd ENO

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 17
3 Functional Mechanism of this Faceplate
3.3 Control and status signals

· “L_RESET”
When setting the “LIOP_SEL” input parameter and a positive edge at the
“L_RESET” input, the “QERR” output is reset.
· “OPdwCmd”
By pressing the “RESET” button in the faceplate window, bit 24 is set in control
word “OPdwCmd”. The controller evaluates this bit and resets the “QERR”
output. The “LIOP_SEL” input parameter must not be set when doing this.
ã Siemens AG Copyright-2015 All rights reserved

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 18
3 Functional Mechanism of this Faceplate
3.4 Block icon and faceplate

3.4 Block icon and faceplate


This example uses WinCC faceplate types. These faceplates are available for
WinCC V7 or a later version and offer the advantage of central changeability.
Consequently, it is no longer necessary to edit all process pictures when the block
icon has been changed. If the faceplate types are not available, you can also
configure WinCC user objects.

Layout of the block icon and the associated faceplate


Table 3-8
Block icon Faceplate
ã Siemens AG Copyright-2015 All rights reserved

The technology faceplate provides the following functionality:


1. Displayed operating states
– Display of the analog value
– Value monitoring by means of a trend curve
– Simulation
2. Displayed errors:
– Interlock
– External error
– General error
– “wire break” (only “iMode=0”)
– “overrun” (only “iMode=0”)
– “low range” (only “iMode=0”)
– “high range” (only “iMode=0”)

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 19
3 Functional Mechanism of this Faceplate
3.4 Block icon and faceplate

3. Operation:
– Simulation On/Off
– Operating mode IO/real value
– Hysteresis absolute/percentage
– Setting of warning and alarm limits
– Input of an analog value (only simulation)

3.4.1 Block icon

The various states of the analog value are transferred to WinCC via the “QdwState”
parameter – [bit 8.9, 18, 24 and 25]. The display of the block icon is defined in the
WinCC “DEMO_ANALOG_ICON_Define.pdl” picture file.

· “Normal state” display


· “Simulation” display
· “Warning” display
· “Alarm” display
ã Siemens AG Copyright-2015 All rights reserved

· “Error” display

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 20
3 Functional Mechanism of this Faceplate
3.4 Block icon and faceplate

3.4.2 Faceplate – Default view

Figure 3-5
ã Siemens AG Copyright-2015 All rights reserved

Click the following icon to open the default view:

In this view, you can monitor the current value and the limit values, as well as the
error states of the analog signal, and set the value for the simulation.

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 21
3 Functional Mechanism of this Faceplate
3.4 Block icon and faceplate

3.4.3 Faceplate – Alarms and messages view

Figure 3-6
ã Siemens AG Copyright-2015 All rights reserved

Click the following button to open the alarms and messages view:

In this view you can perform the following actions:


· Display of block-related alarms and messages.
· Acknowledge alarms.

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 22
3 Functional Mechanism of this Faceplate
3.4 Block icon and faceplate

3.4.4 Faceplate – Trend view

Figure 3-7
ã Siemens AG Copyright-2015 All rights reserved

You can go to the trend view via the following button:

This view displays the progression of the analog value and its limit values.

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 23
3 Functional Mechanism of this Faceplate
3.4 Block icon and faceplate

3.4.5 Faceplate – Limit value view

Figure 3-8
ã Siemens AG Copyright-2015 All rights reserved

You can go to the limit value view via the following button:

Here, you can perform the following actions:


· Set the range of values
· Enables/disables limit values and the corresponding alarm messages
· Configure the limit value monitoring

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 24
4 Commissioning
4.1 Configuring the STEP 7 block

4 Commissioning
Here you will learn …
how to integrate the “DEMO_ANALOG” block into an empty or an existing project.
This example uses the unconnected STEP 7 block, the WinCC block icon
(faceplate type) and the WinCC faceplate, which is embedded in a static picture
window.
The “Example blocks for WinCC and STEP 7” document describes how to
configure a dynamic call of the WinCC faceplates.

4.1 Configuring the STEP 7 block


First you create a new STEP 7 project with “S7 15xx” controller and PC station
(WinCC application), or open an existing project.

Table 4-1
Action Description
1. Inserting blocks
– Open the supplied library “DEMO_BLOCKS.al13” with SIMATIC TIA
ã Siemens AG Copyright-2015 All rights reserved

Portal. Options - Global library - Open global library


– Copy the Analog and Analog_DB blocks into the directory of the
program blocks or into the project library.
2. Calling the block
Call the “Analog” (FB640) block in your OB1.
3. Compiling and loading the program
Compile the program and load it into the controller.

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 25
4 Commissioning
4.2 Configuring the WinCC faceplate

4.2 Configuring the WinCC faceplate


Table 4-2
Action Description
4. Copying files

First copy all files from the delivered “WINCC_GRAPHICS/DEMO_ANALOG”


directory into directory: “GraCS” and all files from the “WINCC_SCRIPTS”
directory to the “library” directory of the WinCC project.
5. Creating a connection

After you have created a new project, you create a new


SIMATIC S7-1200, S7-1500 channel in the tag management.
ã Siemens AG Copyright-2015 All rights reserved

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 26
4 Commissioning
4.2 Configuring the WinCC faceplate

Action Description
6. Importing a structure tag

Open the VARIABLE EXPORT / IMPORT tool at


Start>All Programs>Siemens Automation>SIMATIC>WinCC>Tools
ã Siemens AG Copyright-2015 All rights reserved

Open the file of the Digital structure tag from the supplied directory
“WINCC_Structuretags/DEMO_ANALOG”

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 27
4 Commissioning
4.2 Configuring the WinCC faceplate

Action Description
Confirm the query text with OK to complete the import.

7. Configuring the start-up parameters


Open the “WinCC Project” from the “SIMATIC Manager”. Open the
Properties of the WinCC station and select the “Startup” tab.

Enable the following “Runtimes”:

· Global Script Runtime


· Alarm Logging Runtime
· Tag Logging Runtime
ã Siemens AG Copyright-2015 All rights reserved

· Graphics Runtime
8. Registering the scripts
Before you can use the provided scripts, they need to be registered first.

· Open the Global Script C Editor


· Click on the “Generate headers” button

The previously copied scripts are now available for your project.
9. Creating a start-up screen
· Create an empty WinCC picture, name it “Start.pdl” and define this
picture as start-up screen.
· Open the “Start.pdl” picture in the Graphics Designer.
10. Inserting objects
· Create an object of the “Faceplate instance” type. Select the
“DEMO_ANALOG_ICON.FPT” file.
· Create an object of the “Picture window” type.

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 28
4 Commissioning
4.2 Configuring the WinCC faceplate

Action Description
11. Configuring the properties of the faceplate instance object
Define the following parameters in the Properties dialog box of the faceplate
instance object:
· Others > Scaling mode = “1:1”

Define the following tag assignments in the Properties dialog box of the
faceplate instance object:
·
User-defined2 > QdwState = “<tag prefix > QdwState” 1)
· User-defined2 > QOUT = “<tag prefix>QOUT” 1)
· User-defined2 > szUnit = “<tag prefix>QOUT” 1)

Configure the following direct connection for “mouse click”:


· Source: Constant = “1”
· Objective: Object in picture = “Picture window1 > Display”
Figure 4-1
ã Siemens AG Copyright-2015 All rights reserved

1)
The tag prefix consists of program name, CFC chart and block name,
followed by a dot.

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 29
4 Commissioning
4.2 Configuring the WinCC faceplate

Action Description
12. Configuring the properties of the picture window object
Define the following parameters in the Properties dialog box of the picture
window object:
· Others > Picture name = “DEMO_ANALOG_MAIN.pdl”
· Others > Tag prefix = “<tag prefix>” 1)
· Others > Display = “No”
· Others > Moveable = “Yes”
· Others > Frame = “Yes”
· Others > Title = “Yes”
· Others > Adjust window = “Yes”

1)
Same tag prefix as in step 13. When calling up the message window, this
prefix is also entered into the “MsgFilterSQL” property of the alarm control via
script. This ensures that only messages of the relevant block will be
displayed.
ã Siemens AG Copyright-2015 All rights reserved

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 30
4 Commissioning
4.2 Configuring the WinCC faceplate

Action Description
13. Configure messages
Create the following messages using the Alarm Logging Editor.

Message 1:
· Class: failure
· Type: alarm
· Message tag: <tag prefix>.QwAlarm
· Message bit: 0
· Message text: Alarm lower limit undercut

Message 2:
· Class: failure
· Type: alarm
· Message tag: <tag prefix>.QwAlarm
· Message bit: 1
· Message text Alarm upper limit exceeded

Message 3:
· Class: failure
ã Siemens AG Copyright-2015 All rights reserved

· Type: alarm
· Message tag: <tag prefix>.QwAlarm
· Message bit: 4
· Message text: Interlock, value locked

Message 4:
· Class: failure
· Type: alarm
· Message tag: <tag prefix>.QwAlarm
· Message bit: 6
· Message text: External error

Message 5:
· Class: failure
· Type: alarm
· Message tag: <tag prefix>.QwAlarm
· Message bit: 7
· Message text: Group error

Message 6:
· Class: failure
· Type: warning
· Message tag: <tag prefix>.QwAlarm
· Message bit: 8
· Message text: Warning lower limit undercut

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 31
4 Commissioning
4.2 Configuring the WinCC faceplate

Action Description

Message 7:
· Class: failure
· Type: warning
· Message tag: <tag prefix>.QwAlarm
· Message bit: 9
· Message text: Warning upper limit undercut

Message 9:
· Class: failure
· Type: Warning
· Message tag: <tag prefix>.QwAlarm
· Message bit: 12
· Message text: Interlock pending

Message 10:
· Class: failure
· Type: Warning
· Message tag:
ã Siemens AG Copyright-2015 All rights reserved

<tag prefix>.QwAlarm
· Message bit: 15
· Message text: Simulation active

Note: Create the messages for each “ANALOG” block in your S7 program.

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 32
5 Block Connectors
5.1 Input parameters

5 Block Connectors
5.1 Input parameters
Table 5-1
Parameter Data type Default Description
setting
EN BOOL FALSE Release
LOCK BOOL FALSE 1 = interlock pending
ERR_EXTERN BOOL FALSE 1 = external error
LIOP_SEL BOOL FALSE 0= operator, 1= interconnection
L_SIM BOOL FALSE 0 = process, 1 = simulation
L_RESET BOOL FALSE Error reset (positive edge)
IN_MODE BOOL FALSE 0= S7 periphery, 1= real value
BIPOLAR BOOL FALSE 1= scaling bipolar
IN_INT INT 0 Periphery value
IN REAL 55.0 Real value
IN_SIM REAL 55.0 Simulation value (real value)
ã Siemens AG Copyright-2015 All rights reserved

HI_LIM REAL 100.0 High scaling limit


LO_LIM REAL 0.0 Low scaling limit
LIM_ULA_Enable BOOL FALSE 1= upper alarm limit active
LIM_ULA REAL 90.0 Upper alarm limit
LIM_ULW_Enable BOOL FALSE 1= upper warning limit active
LIM_ULW REAL 80.0 Upper warning limit
LIM_LLW_Enable BOOL FALSE 1= lower warning limit active
LIM_LLW REAL 20.0 Lower warning limit
LIM_LLA_Enable BOOL FALSE 1= lower alarm limit active
LIM_LLA REAL 10.0 Lower alarm limit
LIM_HYS_Set BOOL FALSE 0= percentage, 1= absolute
LIM_HYS REAL 0.0 Hysteresis (message limits)
INSTANCE STRING Analog_001 Filter attribute for messages,
labeling of title bar
RESTART BOOL FALSE Initializing at restart
OPdwCmd DWORD 0 Control tag (HMI)

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 33
5 Block Connectors
5.2 Output parameters

5.2 Output parameters


Table 5-2
Parameter Data type Default setting Description
QdwState DWORD DW#16#0 Status tag (HMI)
QOUT REAL 0.0 Analog value
QHI_LIM REAL 100.0 High scaling limit
QLO_LIM REAL 0.0 Low scaling limit
QLIM_ULA_Enable BOOL FALSE 1= upper alarm limit active
QLIM_ULA REAL 90.0 Upper alarm limit
QLIM_ULW_Enable BOOL FALSE 1= upper warning limit active
QLIM_ULW REAL 80.0 Upper warning limit
QLIM_LLW_Enable BOOL FALSE 1= lower warning limit active
QLIM_LLW REAL 20.0 Lower warning limit
QLIM_LLA_Enable BOOL FALSE 1= lower alarm limit active
QLIM_LLA REAL 10.0 Lower alarm limit
QLIM_HYS REAL 0.0 Hysteresis (message limits)
ã Siemens AG Copyright-2015 All rights reserved

QALARM_UL BOOL FALSE 1= alarm for upper limit


pending
QWARN_UL BOOL FALSE 1= warning for upper limit
pending
QWARN_LL BOOL FALSE 1= warning for lower limit
pending
QALARM_LL BOOL FALSE 1= alarm for lower limit
pending
QSIM BOOL FALSE 0 = process, 1 = simulation
QLOCK BOOL FALSE 1= interlock error
QERR BOOL FALSE 1 = error
QERR_EXT BOOL FALSE 1 = external error
QERR_OVERRUN BOOL FALSE 1= overrun error
QERR_HIGHRANGE BOOL FALSE 1= high range error
QERR_LOWRANGE BOOL FALSE 1= low range error
QERR_WIRE BOOL FALSE 1= wire break (underrun)
QwAlarm WORD W#16#0 Alarm tag
ENO BOOL FALSE Release

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 34
6 Links & Literature

6 Links & Literature


6.1 Bibliographic references
This list is not complete and only represents a selection of relevant literature.
Table 6-1
Topic Title
/1/ STEP 7 Automating with SIMATIC S7-1500
SIMATIC S7-1500 Author: Hans Berger
Publicis Publishing
ISBN: 978-3-89578-403-3

6.2 Internet link specifications


This list is by no means complete and only presents a selection of suitable
information.
Table 6-2
Topic Title
ã Siemens AG Copyright-2015 All rights reserved

\1\ Link to this document http://support.automation.siemens.com/WW/view/en/31624179


\2\ Siemens Industry http://support.automation.siemens.com
Online Support
\3\ Link to this document Information on the value display of analog modules.
http://support.automation.siemens.com/WW/view/en/8859629
\4\ SENTRON PAC http://support.automation.siemens.com/WW/view/en/67318600
faceplates for WinCC
Runtime Professional
\5\ SITOP UPS 1600: http://support.automation.siemens.com/WW/view/en/85668144
Faceplates and
STEP 7
communication blocks
\6\ Measuring and http://support.automation.siemens.com/WW/view/en/86299299
Visualizing Energy
Data
\7\ Configuration http://support.automation.siemens.com/WW/view/en/68014632
instruction for creating
faceplates for Comfort
Panels and WinCC
Runtime Advanced

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 35
7 History

6.3 Other faceplates


This list is by no means complete and only presents a selection of suitable
information.
Table 6-3
Topic Title
\1\ Sample Blocks for http://support.automation.siemens.com/WW/view/en/66839614
WinCC (TIA Portal)
and STEP 7 (TIA
Portal)
\2\ Faceplates for WinCC http://support.automation.siemens.com/WW/view/en/68679830
V7 and STEP 7 V5
\3\ Faceplates for WinCC http://support.automation.siemens.com/WW/view/en/36435784
flexible and STEP 7
V5

7 History
ã Siemens AG Copyright-2015 All rights reserved

Table 7-1
Version Date Modifications
V1.0 06/2014 First version
V1.1 09/2015 Update to WinCC V7.3 SE / STEP 7 (TIA Portal) V13 SP1

Analogue block WinCC V7, S7 (TIA Portal), S7-1500


Entry ID: 31624179, V1.1, 09/2015 36

Das könnte Ihnen auch gefallen