Beruflich Dokumente
Kultur Dokumente
https://support.industry.siemens.com/cs/ww/de/view/31624179
Warranty and Liability
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
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.
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
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
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
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
Message tag
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
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
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
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
· “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.
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
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
· “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
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
· “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
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
· “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
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)
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.
· “Error” display
Figure 3-5
ã Siemens AG Copyright-2015 All rights reserved
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.
Figure 3-6
ã Siemens AG Copyright-2015 All rights reserved
Click the following button to open the alarms and messages view:
Figure 3-7
ã Siemens AG Copyright-2015 All rights reserved
This view displays the progression of the analog value and its limit values.
Figure 3-8
ã Siemens AG Copyright-2015 All rights reserved
You can go to the limit value view via the following button:
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.
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
Action Description
6. Importing a structure tag
Open the file of the Digital structure tag from the supplied directory
“WINCC_Structuretags/DEMO_ANALOG”
Action Description
Confirm the query text with OK to complete the import.
· Graphics Runtime
8. Registering the scripts
Before you can use the provided scripts, they need to be registered first.
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.
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)
1)
The tag prefix consists of program name, CFC chart and block name,
followed by a dot.
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
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
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.
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
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