Contents
Notes 1
Signal blocks and diagnostic
drivers 2
PROFIBUS PA - Blocks 3
Appendix
Appendix A
Index
SIMATIC
Process Control System PCS 7
Driver Blocks
Reference Manual
Edition 10/2001
A5E00127662-01
04.10.200109.10.200109.10.2001
Copyright © Siemens AG 2001 All ri ghts reserved
The reproduction, transmission or use of this document or its contents
is not permitted without express written authorit y. Offende rs will be
liable for damages. All rights, including rights created by patent grant
or registration of a utility model or design, are reserved.
Siemens AG
Bereich Automatisierungs- und Antriebstechnik
Geschae fts gebi et Ind ustrie-A utom a tisier u ngssysteme
Postfach 48 48, D- 90 327 Nuern be rg
Disclaimer of Liabili ty
We have checked the contents of this manual for agreement with the
hardware and software described. Since deviations cannot be
precluded entirely, we cannot guarantee full agreement. However, the
data in this manual are reviewed regularly and any necessary
corrections included in subsequent editions. Suggestions for
improvement are wel com e d.
©Siemens AG 2001
Technical data subject to change.
Siemens Aktiengesellschaft A5E00127662
Safety Guidelines
This manual contai ns notices whic h you shoul d observe t o ensure your own personal safety, as well as to
protect the product and c onnect ed equipment. These notices are highlighted in the manual by a warning
triangle and are marked as fol l ows according to the level of danger:
!Danger
indicates that death, severe personal injury or substantial property damage will result if proper
precautions are not taken.
!Warning
indicates that death, severe personal injury or substantial propert y dam age can result i f proper
precautions are not taken.
!Caution
indicat es that minor personal i nj ury or propert y damage can result if proper precautions are not taken.
Note
draws your attention to part icul arl y important information on the product, handli ng the product , or to a
particular part of the documentati on.
Qualified Personnel
Only qualified personnel should be allowed to install and work on this equipment. Qualif i ed persons are
defined as persons who are authorized to commission, to ground, and to tag circuits, equi pm ent, and
syst ems in accordance with established safety practices and standards.
Correct Usage
Note the following:
!Warning
This device and its components may only be used for the applications described in the catalog or the
technical descri ptions, and only in connecti o n with devic es or com ponents from other manufacturers
which have been approved or recommended by Siem ens.
This product can only f unction correctly and safely if it is trans ported, stored, set up, and installed
correct l y, and operated and maintained as recomm ended.
Trademarks
SIMATIC®, SI MATIC HMI® and SIMATIC NET® are registered trademarks of SIEMENS AG.
Some of other desi gnations used in these documents are also registered trademarks ; t h e owner's right s m ay
be violated if they are us ed by thi rd parties for thei r own purposes.
04.10.200109.10.200109.10.2001
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 iii
Contents
1Notes
1.1 Notes on Using Driver Blocks...........................................................................1-1
1.2 General information on the block description....................................................1-2
2 Signal blocks and diagnostic drivers
2.1 OB_BEGIN: CPU diagnostics and AS connection diagnostics.........................2-1
2.1.1 Connections of OB_BEGIN...............................................................................2-5
2.1.2 Assignment of the control system messages of the OB_BEGIN......................2-6
2.2 OB_END: Reset stack pointer of the OB_BEGIN...........................................2-10
2.2.1 Connections of OB_END ................................................................................2-11
2.3 OB_DIAG: OB diagnostics to avoid CPU stop................................................2-12
2.3.1 Connections of OB_DIAG...............................................................................2-14
2.4 SUBNET: Runtime group control for driver blocks .........................................2-16
2.4.1 SUBNET: DP Master system monitoring........................................................2-16
2.4.2 Connections of SUBNET.................................................................................2-19
2.4.3 Message texts and auxiliary process values of SUBNET...............................2-20
2.5 RACK: Signal rack failure................................................................................2-20
2.5.1 RACK: Rack monitoring..................................................................................2-20
2.5.2 Connections of RACK.....................................................................................2-24
2.5.3 Message texts and auxiliary process values of RACK ...................................2-24
2.6 PO_UPDAT: Update process image...............................................................2-25
2.7 IM_DRV: Transferring time-stamped process signal changes .......................2-26
2.7.1 Connections of IM_DRV..................................................................................2-31
2.7.2 Message texts and auxiliary process values of the IM_DRV..........................2-31
2.7.3 Interface IM .....................................................................................................2-33
2.8 MOD_1: Diagnostic driver for S7-300/400 SM modules which cannot be
diagnosed with 16 channels............................................................................2-36
2.8.1 MOD_1: Monitoring of S7-300/400 SM modules which cannot
be diagnosed with 16 channels maximum......................................................2-36
2.8.2 Connections of MOD_1 / MOD_2 ...................................................................2-39
2.8.3 Message texts and auxiliary process values of MOD_1 / MOD_2..................2-40
2.9 MOD_2: Diagnostic driver for S7-300/400 SM modules which cannot
be diagnosed with 32 channels.......................................................................2-41
2.9.1 MOD_2: Monitoring of S7-300/400 SM modules which cannot
be diagnosed with 32 channels.......................................................................2-41
2.10 MOD_D1: Diagnostic driver for S7-300/400 SM modules which can be
diagnosed with 16 channels............................................................................2-45
2.10.1 MOD_D1: Monitoring of S7-300/400 SM modules which can be
diagnosed with 16 channels maximum...........................................................2-45
2.10.2 Connections of MOD_D1 / MOD_D2..............................................................2-51
2.10.3 Message texts and auxiliary process values of MOD_D1 ..............................2-52
04.10.200104.10.200104.10.200109.10.200109.10.2001
Contents
Process Cont rol System PCS 7, Driver Block s
iv A5E00127662-01
2.11 MOD_D2: Diagnostic driver for S7-300/400 SM modules which can be
diagnosed with 32 channels............................................................................2-53
2.11.1 MOD_D2: Monitoring of S7-300/400 SM modules which can be
diagnosed with 32 channels............................................................................2-53
2.11.2 Message texts and auxiliary process values of MOD_D2...............................2-59
2.12 CH_AI: Analog value input..............................................................................2-61
2.12.1 Connections of CH_AI.....................................................................................2-64
2.13 CH_AO: Analog va lue out put..........................................................................2-66
2.13.1 Connections of CH_AO...................................................................................2-69
2.14 CH_DI: Digital va lue in put...............................................................................2-70
2.14.1 Connections of CH_DI ....................................................................................2-72
2.15 CH_DO: Digital value output...........................................................................2-73
2.15.1 Connections of CH_DO...................................................................................2-75
2.16 CH_U_AI: Analo g val ue in put (Uni versal).......................................................2-76
2.16.1 Connections of CH_U_AI................................................................................2-80
2.17 CH_U_AO: Analog value output (Universal)...................................................2-82
2.17.1 Connections of CH_U_AO..............................................................................2-85
2.18 CH_U_DI: Digital value input (Universal)........................................................2-86
2.18.1 Connections of CH_U_DI................................................................................2-89
2.19 CH_U_DO Digital va lue output (Uni vers a l).....................................................2-90
2.19.1 Connections of CH_U_DO..............................................................................2-93
3 PROFIBUS PA blocks
3.1 PA_AI: Analog value input PROFIBUS PA.......................................................3-1
3.1.1 PA_AI: Analog Input PROFIBUS PA.................................................................3-1
3.1.2 Connections of PA_AI.......................................................................................3-4
3.1.3 Message texts and auxiliary process values of PA_AI .....................................3-6
3.2 PA_AO: Analo g val ue outpu t PROF IB US PA...................................................3-6
3.2.1 PA_AO: Analo g Out put PROFIB US P A............................................................3-6
3.2.2 Connections of PA_AO.....................................................................................3-9
3.2.3 Message texts and auxiliary process values of PA_AO..................................3-12
3.3 PA_DI: Digital val ue in put PROF IB US PA......................................................3-13
3.3.1 PA_DI: Discrete Input PROFIBUS PA ............................................................3-13
3.3.2 Connections of PA_DI.....................................................................................3-15
3.3.3 Message texts and auxiliary process values of PA_DI...................................3-17
3.4 PA_DO: Digital value output PROFIBUS PA..................................................3-17
3.4.1 PA_DO: Discrete Output PROFIBUS PA........................................................3-17
3.4.2 Connections of PA_DO...................................................................................3-20
3.4.3 Message texts and auxiliary process values of PA_DO .................................3-22
3.5 PADP_L0x: Monitoring of DP/PA slaves.........................................................3-23
3.5.1 PADP_L00: Monitoring of DP/PA slaves with up to 7 slots ............................3-23
3.5.2 Message texts and auxiliary process values of PADP_L00............................3-27
3.5.3 PADP_L01: Monitoring of DP/PA slaves with up to 16 slots ..........................3-27
3.5.4 Message texts and auxiliary process values of PADP_L01............................3-31
3.5.5 PADP_L02: Monitoring of DP/PA slaves with up to 32 slots ..........................3-32
3.5.6 Message texts and auxiliary process values of PADP_L02............................3-36
3.5.7 Connections of PADP_L0x..............................................................................3-38
3.6 DPAY_V0: Monitoring of DP/PA-Link and Y-Link as V0 slave .......................3-38
3.6.1 DPAY_V0: Monitoring of DP/PA-Link and Y-Link as V0 slave .......................3-38
3.6.2 Connections of DPAY_V0...............................................................................3-43
3.6.3 Message texts and auxiliary process values of DPAY_V0 .............................3-44
3.7 PA_TOT : Totalizer PRO FIBU S P A.................................................................3-45
3.7.1 Connections of PA_TOT.................................................................................3-48
3.7.2 Message texts and auxiliary process values of PA_TOT ...............................3-50
04.10.200104.10.200104.10.200109.10.200109.10.2001
Contents
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 v
A Appendix
A.1 Addressing ....................................................................................................... A-1
A.2 Error information of the MSG_STAT output parameter ................................... A-2
A.3 MODE settings for Signal Modules.................................................................. A-2
A.4 MODE settings for PA Devices........................................................................ A-7
A.5 Text Library for Signal Modules ....................................................................... A-8
A.6 Text Libraries for DP-/PA-Slaves after a PA-/Y-LINK DP V0........................... A-9
A.7 Technical data................................................................................................ A-10
Index
04.10.200104.10.200104.10.200109.10.200109.10.2001
Contents
Process Cont rol System PCS 7, Driver Block s
vi A5E00127662-01
04.10.200104.10.200104.10.200109.10.200109.10.2001
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 1-1
1 Notes
1.1 Notes on Using Driver Blocks
General
The OBs in which the blocks are installed are given in the description of the
driver blocks. Please note that not all OBs listed here are generated in all
CPUs. Relevant information can be found in the Online Help of the respective
OBs.
In the event that the driver blocks of PCS 7 Driver Blocks V52 are used by the
driver generator, a firmware version V3.0 or faster is required in the target
system.
Signal Processing Blocks
Three types of channel blocks for signal processing are available in this library of
the driver blocks:
1. Standard Channel Blocks:
CH_AI, CH_AO, CH_DI, CH_DO.
They are used exclusively for signal processing of S7-300/400 SM modules.
Please use these standard blocks if you want to achieve memory and run-time
optimization and do not need to process any PA devices.
2. Universal Channel Blocks:
CH_U_AI, CH_U_AO, CH_U_DI, CH_U_DO.
These blocks are used for signal processing of S7-300/400 SM modules or a
PA field device. The advantage of these blocks is that you can create CFC
charts regardless of the hardware peripherals to be used later. As a
disadvantage, the universal blocks require more memory and run-time.
3. PA Channel Blocks:
PA_AI, PA_AO, PA_DI, PA_DO, PA_TOT
These blocks are designed especially for use with PA field devices. They are
used mainly where the special features of these devices should be used. In
contrary to the CH blocks, the PA channel blocks process not only the signal
itself, but also all variables according to the desired configuration of the
hardware of the device.
09.10.2001
Notes
Process Cont rol System PCS 7, Driver Block s
1-2 A5E00127662-01
1.2 General information on the block description
The block descriptions always have the same structure. The number of sections
may vary depending on the block functions. The most common sections have the
following meanings:
Heading of the block description
Example: RACK: Rack Monitoring
The header begins with the type name of the block (RACK). This name is entered
in the symbol name and has to be unique within your project.
The type name also includes information on the task/function of the block (Rack
Monitoring).
Object name (Type + Number)
FB x
The object name for the block type is made up of the realization type
Function block = FB, Function = FC and the Block number = x.
Command button for the displaying the block connections
Example:
You can jump directly to the list of block connections of the designated block by
clicking on the "Block Connections" command button. The preceding block symbol
is used as an eye-catcher in order to find the command button rapidly.
Note: The button is not visable in the paper printout.
Area of Application
You can see here which tasks the block should accept and other information about
its use in CFC if necessary.
Callin g OBs
Here you will find information relating to the organization blocks (OBs), in which the
described block must be installed. When using the CFC installation is carried out in
the cyclic OB (watchdog interrupt) and automatically into the OBs which are listed
in the task list of the block (for example in OB100 for restarting).
CFC creates the required OBs while compiling. If you use the blocks without CFC,
you have to program these OBs and call the instance of the block in them.
09.10.2001
Notes
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 1-3
Use in CFC
If it is not already mentioned under "Area of Application", you can find the
information here accepted by the driver generator. (the driver generator is called in
SIMATIC manager by the selected chart folder and with the menu command
Options > Charts > Generate Module Drivers... or as an option in the dial og box
of the CFC "Compile Charts as Program").
Function and Operating principle
This briefly describes the function of the block.
Detailed information is displayed on complex blocks e.g. on the function of
individual inputs, operating modes, time sequences etc..
Error handling
You will find the error display in the CFC chart at the Boolean block output ENO.
The value corresponds to the BIE (Binary result in STEP 7-STL after ending the
block) or the OK bit (in SCL notation) and means:
ENO=BIE=OK=1 (TRUE) ->The result of the block is OK.
ENO=BIE=OK=0 (FALSE) ->The result or the conditions for its calculation (e.g.
input values, operating modes, etc.) are not valid.
In addition, for FBs, you will find the inverted BIE in output QERR of the instance
DB:
QERR=NOT ENO
The error display arises by two independent routes:
The operating system recognizes a processing error (for example: value overflow,
called system functions supply an error code with binary input bit=0).
This is a system utility and is not mentioned specifically in the individual block
description.
The block algorithm checks values and operating modes for their functional legality.
These error cases are documented in the description of the block.
The evaluation of the error indication can be used, for example, to generate
messages (refer to the section on alarm blocks) or to utilize substitute values for
invalid results.
Start-up characteristics
A difference is made between:
Initial start
The block is called for the first time from the OB, in which it is installed. As a
rule this is the OB in which normal, process-specific processing occurs (for
example: the watchdog interrupt OB).
The block enters the status corresponding to the input parameters. These can
be initial values (also refer to the Connections) or values which you have
already been configured, for example in CFC. The initial-start behavior is not
described separately unless the block deviates from this rule.
09.10.2001
Notes
Process Cont rol System PCS 7, Driver Block s
1-4 A5E00127662-01
Start-up
The block is executed once during a CPU start-up. This is achieved by calling
the block from the start-up OB (where it is additionally installed either
automatically via ES or manually by you via STEP 7). In this case the start-up
characteristics are described.
Time response
The block with these characteristics must be installed into a watchdog interrupt OB.
Reference is then made to the time characteristic when instructed by the block.
Message characteristics
The block with these characteristics signals various events to the higher-ranking
OS. If they exist, the parameters required to generate messages are documented.
Blocks not having message characteristics can be complemented by additional
alarm blocks. A reference to the message characteristics in contained in the
description of the individual blocks with signaling capabilities.
Connections of ...
The connections provide the data interface of the block. In addition you can
transfer data to the block and fetch results from the block.
Connection
(parameter) Meaning Data type Default I/O OC&M
SUBN1ERR 1=Erro r in DP master system BOOL 0 O +
.....
The "Connections" table lists all the input and outputs of the block type, which the
user can access with the configuration tools. They are alphabetically. Elements
which can only be accessed from the algorithm of the block are not listed (so-called
internal variables).
The columns have the following meaning:
Connection = Name of parameter, derived from the English designation.
Wherever laid down by SIMATIC conventions, the same name rules have been
used.
The state of delivery of the block display in CFC is identified as follows: Connection
name bold = Connection displayed, normal = Not displayed.
Meaning = Function (possibly short description)
Data type = S7 data type of the param eter (BOO L, REAL, etc.).
Initial (Default) = The value of the parameter before the block is executed for the
first time (unless changed by configuration).
I/O = Type of access of the block algorithm to the parameter. Differentiates
between inputs, non-interacting inputs and outputs (see table)
09.10.2001
Notes
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 1-5
Abbre-
viation I/O
I Input. Initialize block with parameters (representation in CFC: left-hand block side).
O Output. Output value (representation in CFC: right-hand block side).
IO Input/output. Non-interacting input which is written and which can be written back
from the block (representation in CFC: left-hand block side).
OC&M= Parameters marked with "+" can be operator controlled and monitored via
the corresponding OS block.
Operator control and monitoring
The blocks from this library do not have preconfigured faceplates which control and
monitor the OS. If individual faceplates are used for specific diagnostic blocks, the
predetermined variables are transferred from the instance block to the OS. This
has to be set for the driver generator in the dialog box "Settings – Generate Module
Drivers" where the option "Operate C and M capability for diagnostic blocks" can
be set. Default: Option is not set.
09.10.2001
Notes
Process Cont rol System PCS 7, Driver Block s
1-6 A5E00127662-01
09.10.2001
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-1
2 Signal blocks and diagnostic drivers
2.1 OB_BEGIN: CPU diagnostics and AS connection
diagnostics
Object name (Type + Number)
FB 100
Area of Application
The block is used for CPU diagnostics and connection diagnostics of the
automation systems (AS). Installing the block in CFC creates all the acyclic priority
classes (OBs) in which the blocks of the Driver Blocks library run.
If the CFC function "Generate Module Driver" is used, the OB_BEGIN is installed
automatically.
Callin g OBs :
OB1 Cyclic processing
OB32 Watchdog interrupt (connection diagnostics with SFC 87) *)
OB70 I/O redundancy error
OB72 CPU redundancy error
OB80 Timeout
OB81 Power failure fault
OB82 Diagnostic interrupt
OB83 Withdrawn/plugged alarm
OB84 CPU hardware error
OB85 Program execution error
OB86 Rack failure
OB100 Restart:
OB121 Programming error
OB12 2 I/O access error
*) If you do not position the OB_BEGIN with the function "Create Module Driver" in the
CFC chart, but insert it manually into a CFC chart, it is installed in the OB specified by
"Predecessor for Installation". This may not be the OB32.
Please note that only one watchdog interrupt OB is allowed.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-2 A5E00127662-01
Function and Operating principle
The block is used to signal and display CPU events and states. It reads the starting
information of the priority classes (OBs), the diagnostic data of the I/O devices and
enables the respective blocks on the basis of the start events.
From the starting information of the SFC6 (RD_SINFO) or SFB 54 (RALRM) the
OB_BEGIN determines the current OB in which it is running.
In as far as it does not exist, it converts the logical basic address from the starting
information into the geographic address. It is contained in the respective OBs of the
output structure CPU_DIAG, which the downstream blocks can access. On the
basis of the geographic address it enables the respective SUBNET blocks for
further evaluation of the starting information.
With the SFB 54 the diagnostic data are saved synchronously with the starting
information in the CPU_DIAG.OB82 structure in a diagnostic case (OB82).
Diagnostic (alarm) information longer than 59 bytes have to call the respective
driver blocks themselves.
The OB_BEGIN generates messages which are emitted with ALARM_8P to
WinCC (see message characteristics). The SFC 87 C_DIAG is called in a
watchdog interrupt OB (OB32) after 10 cycles have expired for connection
diagnosis. Up to 64 connections are monitored.
In the case of H systems the current state of the two H-CPUs is determined in the
same watchdog interrupt OB by reading the system state list 71 (SSL71). For a
detailed description of the meaning of the SSL71 please refer to the reference
manual "System Software for S7-300/400 System and Standard Functions".
Note
The messages "Failure or redundancy loss connection ID" are generated at every
CPU of the two connected AS. Exception at the failure of the CPU (or both
H-CPUs) of an AS.
Error handling
The block evaluates the error information of ALARM_8P and writes it to the
corres pondi ng out put parameters .
See Error information of the MSG_STAT output parameter.
The block may only be installed in a watchdog interrupt OB. Otherwise QERR =
TRUE is set and operation is continued with the watchdog interrupt OB which first
called the block after the restart/initial start.
If the block installation sequence OB_BEGIN, xx blocks, ..., OB_END is not
observed, the message "Incorrect installation OB_END, no OB8x processing" is
output and QERR = TRUE is set. In this case no evaluation is carried out in the
acyclic OBs. The downstream blocks are not enabled.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-3
Start-up characteristics
The OB_BEGIN initializes the messages of ALARM_8P. In the case of H systems
(CPU_DIAG.H_MODE = TRUE) the current state of the two H-CPUs is determined
by reading the SSL71 (see Function).
In as far as a CPU with SFC 87 exists, the connection diagnosis is initialized. The
system then waits for 120 cycles in the watchdog interrupt OB until the connection
diagnosis messages are generated.
Initi al- start behavior
The starting information is read with SFC 6.
Time response
The block is installed into the required OBs (refer to the Function section)
automatically during structuring by the ES, including into the watchdog interrupt
OB32. The latter OB installations can be changed as required.
Message characteristics
The ALARM_8P multiple-instances are only called when a message of the
OB_BEGIN is to be emitted. Effected acknowledgments of preceding messages
are not updated by the respective ALARM block until this moment. If the
connection to WinCC is interrupted, each ALARM_8P can save a maximum of two
message states of an Event-ID.
A programming error (OB121) is only generated by the CPU as a coming event.
In the OB1 the respective generated coming message "Programming error" is reset
as going. In order to avoid an overload of programming error messages these are
counted within an interval of 1 minute. If more than 5 programming errors are noted
within one minute, the subsequent ones are rejected. The maximum of 5
"Programming error" messages are then not generated until at least one minute
has passed.
Messages of the OB_DIAG block
The OB-DIAG blocks are connected to the system structure OB_LOCK. If the
OB82 is blocked by the OB_DIAG block, a message "OB82 failure SUBNET:xx
RACK:yy SLOT:zz" is generated. If the OB86 is blocked by the OB_DIAG block, a
message "OB86 failure SUBNET:xx RACK:yy SLOT:zz" is generated.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-4 A5E00127662-01
The block generates the following messages in the OBs listed below:
OB Starting event Message
OB1 Cyclic processing Going message:
- Timeout
- Program execution error
- Programming error
OB32 1 sec. watchdog interrupt or alternative
watchdog interrupt OB Failure connection ID: xx coming/going
Redundancy loss connection ID: xx coming/going
OB72 CPU redundancy loss CPU redundancy loss/return
OB80 Timeout Coming message at timeout:
- Cycle time exceeded
- OB request: OBxx still being processed
- OB request: Overflow PRIOxx
- Time interrupt xx expired
OB81 Power failure fault - Central controller battery failure
coming/going
- Central controller backup voltage failure
coming/going
- Central controller 24 V supply failure
coming/going
- Redundant central controller battery
failure coming/going
- Redundant central controller backup
voltage failure coming/going
- Redundant central controller 24 V supply
failure coming/going
OB84 CPU hardware error MPSS error coming/going
OB85 Program execution error Coming message at program execution error
- OBxx not loaded
- Access-error error xx: ...
OB100 Restart: Initializing ALARM_8P
OB121 Programming error Programming error coming
Operator control and monitoring
The block does not have a faceplate (display block).
Note:
In "Connection of OB_BEGIN" the variables are identified (with a "+" in the column
OCM ) which are transferred from this instance block to the OS when the option
"Operator C and M capability for diagnostic blocks" in the "Generate Module
Driver" settings is selected. Default: option is not set.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-5
2.1.1 Connections of OB_BEGIN
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data
type Initial I/O OC
&M Valid
values
CPU_DIAG System Structure CPU-Diagnosis STRUCT O
CPUERR_0 1=CPU Failure in Rack 0 BOOL 0 O +
CPUERR_1 1=CPU Failure in Rack 1 BOOL 0 O +
EN_SUBx Enable SUBNET x (xx=00 - 14) BOOL 0 O
EV_IDx EVENT IDx
Message Number ALARM_8P_x
(x = 1 - 19)
DWORD 0 I (is assigned by
ES)
MASTER_0 1=Master CPU i n Rack 0 BOOL 0 O +
MASTER_1 1=Master CPU i n Rack 1 BOOL 0 O +
MSGSTATx Message Status Output
STATUS output of the ALARM_8P_x
(x = 1 - 19)
WORD 0 O
OB_LOCK LOCKED OB STRUCT O
QERR 1=Error BOOL 1 O
QMSGERx Message Error
Error output of the ALARM_8P_x
(x = 1 - 19)
BOOL 0 O
SUB0IDxx SUBNET primary ID (xx = 00 - 14) BYTE 255 I
SUB1IDxx SUBNET secondary ID (xx=00 - 14) BYTE 255 I
SZL_71 System Structure SSL71 STRUCT O
The structure of the CPU_DIAG is implemented as OUT in the OB_BEGIN, and in
all other blocks with this connection as IN_OUT (column: I/O).
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-6 A5E00127662-01
2.1.2 Assignment of the control system messages of the OB_BEGIN
The control system messages are assigned as follows with ALARM_8P at EV_I D1
Message block
ALARM_8P Mess.
No. OB No. Default message text Message
class
EV_ID1 1 OB80 Cycle time exceeded: OB@1%d@ms OB@2%d@ S
2 OB86 OB86 Failure SUBNET:@7%d@ RACK:@8%d@ S
3 OB84 MPI error S
4 - Error installation OB_BEGIN/OB_END:
No OB@10%d@ Processing Stack @9%d@ -
5- Reserve -
6 OB122 Read error I/O device:
@4%2s@@5%d@ Addr: @6%d@ S
7 OB122 Write error I/O device:
@4%2s@@5%d@ Addr: @6%d@ S
8 OB72 CPU redundancy loss in Rack @3%d@ S
Messages 1, 6 and 8 are only coming events. They are reset as "going" during a
normal run (OB1) of the block.
Auxiliary process values of the EV_ID1
The control system messages are generated via ALARM_8P with EV_ID1 with six
auxiliary process values. The table shows the assignment of the auxiliary process
values to the block parameters.
Message block
ALARM_8P Auxiliary
process
value
Block parameter Data type
EV_ID1 1 OB80_Supplem ent ary _Info 1 WORD
2 OB80_1. Byte supplementary info 2_3 BYTE
3 Rack No. of the CPU BYTE
4 OB122_BLK_TYP WORD
5 OB122_BLK_NUM WORD
6 OB122_MEM_ADDR WORD
7 OB86 Subnet_ID BYTE
8 OB86 RACK_NO BYTE
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-7
The control system messages are assigned as follows with ALARM_8P at EV_I D2
Message block
ALARM_8P Mess.
No. OB
No. Default message text Message
class
EV_ID2 S
1 OB81 Battery failure CPU in Rack 0 S
2 OB81 Battery failure CPU in Rack 1 S
3 OB81 Backup voltage failure CPU in Rack 0 S
4 OB81 Backup voltage failure CPU in Rack 1 S
5 OB81 24V supply failure CPU in Rack 0 S
6 OB121 24V supply failure CPU in Rack 1 S
7 OB121 Programming error @1%d@: @2%2s@@5%d@
/@6%d@/@4%d@/@3%d@ S
8 OB82 OB82 Failure SUBNET:@7%d@ RACK:@8%d@
SLOT:@9%@ S
Message 7 is only a coming event. It is reset as "going" during a normal run (OB1)
of the block. It is to be interpreted as follows in accordance with the error code
number before the colon:
OB121_BLK_TYP/OB121_BLK_NUM/OB121_PRG_ADDR/OB121_FLT_REG/OB121_RES
ERVED_1.
For a description please refer to the reference manual "System Software for S7-
300/400 System and Standard Functions".
Example: 10.05.00 10:30:45 Programming error 35: FB44/1234/5/9
Auxiliary process values of the EV_ID2
The control system messages are generated via ALARM_8P with EV_ID2 with six
auxiliary process values. The table shows the assignment of the auxiliary process
values to the block parameters.
Message block
ALARM_8P Auxiliary
process
value
Block parameter Data type
EV_ID2 1 OB121_SW_FLT BYTE
2 OB121_BLK_TYP WORD
3 OB121_RESERVED_1 BYTE
4 OB121_FLT_REG WORD
5 OB121_BLK_NUM WORD
6 OB121_PRG_ADDR WORD
7 OB82 SUBNET_ID BYTE
8 OB82 RACK_NO BYTE
9 OB82 SLOT_NO BYTE
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-8 A5E00127662-01
The control system messages are assigned as follows with ALARM_8P at EV_I D3
Message block
ALARM_8P Mess.
No. OB No. Default message text Message
class
EV_ID3 1 OB80 OB request: OB@2%d@ still being processed S
2 OB80 OB request: Overflow PRIO@3%d@ S
3 OB80 Time interrupt OB@1%d@ expired S
4 OB85 OB @4%d@ not loaded S
5 OB85 Access-error error @4%d@:
@7%2s@@5%d@/@6%d@ S
6- Reserve -
7- Reserve -
8- Reserve -
Messages 1, 2, 3, 4 and 5 are only coming events. They are reset as "going"
during a normal run (OB1) of the block.
Auxiliary process values of EV_ID3
The control system messages are generated via ALARM_8P with EV_ID3 with six
auxiliary process values. The table shows the assignment of the auxiliary process
values to the block parameters.
Message block
ALARM_8P Auxiliary
process
value
Block parameter Data type
EV_ID3 1 OB80_Supplem ent ary _Info 1 WO R D
2 OB80_1. Byte supplementary info 2_3 BYTE
3 OB80_2. Byte supplementary info 2_3 BYTE
4 OB85_Supplem ent ary _Info 1 WO RD
5 OB85_HW_Supplementary_Info 2_3 WORD
6 OB85_LW_Supp lem entary _I nfo 2_3 WORD
7 OB85_DKZ2_3 WORD
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-9
The control system messages are assigned as follows with ALARM_8 at EV_ID4
to EV_ID19:
Message block
ALARM_8P Mess.
No. Default message text Message
class
EV_ID4 to EV_ID11 1 Failure connection ID: @1%d@ S
2 Failure connection ID: @2%d@ S
3 Failure connection ID: @3%d@ S
4 Failure connection ID: @4%d@ S
5 Failure connection ID: @5%d@ S
6 Failure connection ID: @6%d@ S
7 Failure connection ID: @7%d@ S
8 Failure connection ID: @8%d@ S
EV_ID12 to EV_ID191 Redundancy loss connection ID: @1%d@ S
2 Redundancy loss connection ID: @2%d@ S
3 Redundancy loss connection ID: @3%d@ S
4 Redundancy loss connection ID: @4%d@ S
5 Redundancy loss connection ID: @5%d@ S
6 Redundancy loss connection ID: @6%d@ S
7 Redundancy loss connection ID: @7%d@ S
8 Redundancy loss connection ID: @8%d@ S
Auxiliary process values from EV_ID4 to EV_ID19
The control system messages are generated via ALARM_8P with EV_ID4 to
EV_ID19 with eight auxiliary process values. The table shows the assignment of
the auxiliary process values to the block parameters.
Message block
ALARM_8P Auxiliary process value Block parameter Data type
EV_ID4... EV_ID19 1 Connection_ID 1+x WORD
2 Connection_ID 2+x WORD
3 Connection_ID 3+x WORD
4 Connection_ID 4+x WORD
5 Connection_ID 5+x WORD
6 Connection_ID 6+x WORD
7 Connection_ID 7+x WORD
8 Connection_ID 8+x WORD
x = 0 at EV_ID4, x = 8 at EV_ID5, x = 16 at EV_ID6 etc. to x = 56 at EV_ID12
x = 0 EV_ID13, x = 8 at EV_ID14, x = 16 at EV_ID15 etc. to x = 56 at EV_ID19
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-10 A5E00127662-01
2.2 OB_END: Reset stack pointer of the OB_BEGIN
Object name (Type + Number)
FC 280
Area of Application
The block is used to reset the stack pointer of the OB_BEGIN.
Callin g OBs
The OB_END has to be installed at the end of the OB in which an OB_BEGIN is
installed. An OB_END may not be installed in OBs in which no OB_BEGIN is
installed.
If the CFC function "Generate Module Driver" is used, the OB_END is installed
automatically in the OBs of the run sequence.
OB1 Cyclic processing
OB32 Watchdog interrupt (connection diagnostics) *)
OB70 I/O redundancy error
OB72 CPU redundancy error
OB80 Timeout
OB81 Power failure fault
OB82 Diagnostic interrupt
OB83 Withdrawn/plugged alarm
OB84 CPU hardware error
OB85 Program execution error
OB86 Rack failure
OB100 Restart:
OB121 Programming error
OB12 2 I/O access error
*) If you do not position the OB_END block with the function "Create Module Driver" in
the CFC chart, but insert it manually into a CFC chart, it is installed in the OB specified
by "Predecessor for Installation". This may not be the OB32.
Ensure that you use the watchdog interrupt OB of the OB_BEGIN.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-11
Function and Operating Principle
The block decrements the stack pointer (NUM_CNT) of the OB_BEGIN. In case of
an interruption it enters the last interrupted OB number from the CPU stack into the
structu r e CPU_DIAG.
Error handling
Does not exist
Start-up characteristics
Do not exist
Initi al- start behavior
Does not exist
Time response
Does not exist
Message characteristics
Do not exist
Operator control and monitoring
The block does not have a faceplate (display block).
2.2.1 Connections of OB_END
Connection
(parameter) Meaning Data type I/O
CPU_DIAG CPU diagnostics (Syste m Structure) STRUCT I/O
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-12 A5E00127662-01
2.3 OB_DIA G: OB diagnostics to avoid CPU stop
Object name (Type + Number)
FC 281
Area of Application
The block is used in order to avoid a CPU stop when there is a defective DP slave.
It recognizes a DP slave failure. If DP slaves are activated in the H system, it
indicates the preferred channel of the DP slave.
Callin g OBs
The block has to be installed in the following OBs in the run sequence (is carried
out automatically in CFC):
OB1 Cyclic program
OB70 I/O redundancy error
OB72 CPU redundancy error
OB82 Diagnostic interrupt
OB83 Withdrawn/plugged interrupt
OB85 Program execution error
OB86 Rack failure
OB100 Restart (warm start)
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The OB_DIAG block is installed after the SUBNET block.
Configuration of
- The inputs RACK_NO, DADDR, SUBN1_ID, SUBN2_ID and SUBN_TYP.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-13
Interconnection of
- The EN input with the output of an AND block. Its inputs are interconnected
to the output EN_SUBx (x = No. of the DP Master System) of the OB
BEGIN block and to the output EN_Rxxx (xxx = Rack/Station Number) of
the SUBNET block.
- The OUT structure CPU_DIAG of the OB_BEGIN and SUB_DIAG of the
SUBNET block with the INOUT structures of the same name of the
OB_D IAG block.
Function and Operating principle
The block counts the frequency of the calls of an acyclic OB of a block instance
before an OB1 can be executed.
OB_DIAG displays higher-level errors of the CPU, DP Master and DP Slave
(SUBN1ERR, SUBN2ERR). If DP slaves are activated, it determines the preferred
channel (SUBN1ACT, SUBN2ACT). The group error information RACK_ERR
displays the failure of the DP Master and the failure of the DP Slave. This means if
RACK_ERR = 1, the corresponding DP Slave has failed, if SUBN1ERR or
SUBN2ERR = FALS E.
The start and diagnostic information is read from the structure CPU_DIAG which is
interconnected to the structure CPU_DIAG of the block OB_BEGIN.
The block determines the currently active preferred channel (SUBN1ACT,
SUBN2ACT) in the case of redundant PROFIBUS DP interfaces by evaluating the
error events and, if required, the diagnostic address ADDR of the DP slave.
If the DP Slave is connected to a DP Master system which is operated in the DP
V1 Mode, V1-MODE = TRUE is set.
Overload behavior
The OB_DIAG counts the frequency of the calls of the acyclic OB82 and OB86
(exception DP Master system failure, see SUBNET block). If the counter
DIAG82_CNT > 5 or DIAG86_CNT > 5, EN_F = FALSE is set (disable function
block). The counters are reset in the OB1. In all the other OBs the output EN_F =
TRUE (enable function block) is set.
If there is a malfunction of the OB82 or of the OB86, the OB_BEGIN block then
signals this malfunction with geographic address of the DP Slave in the OB1 or
OB82 or OB86 respectively.
The event is not evaluated due to the disabling of the OB82 or OB86 respectively
at an overload. The outputs cannot correspond to the current state of the DP
Slave. After a waiting period of approx. 1 minute the state of the DP Slave is
checked and the variable EN_86DIAG is set to TRUE in case of the OB86 failure.
Updating of the state of the DP Slave can take several cycles.
If there is an OB82 failure, the variable EN_82DIAG is set to TRUE. The
interconnected DP Slave block can then fetch the current diagnostic data of the DP
Slave.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-14 A5E00127662-01
Redundancy
The block supports the redundancy of the DP Master systems at an H system (only
distributed I/O devices). To this purpose the inputs of the OB_DIAG block
SUBN1_ID (connection to CPU 0) and SUBN2_ID (connection to CPU 1) are to be
configured with the numbers of the redundant DP Master systems. If there is no
redundancy of the DP Master systems, the remaining input must have the value
16#FF (default) assigned.
Start-up characteristics
A check whether the DP Slave is available is carried out. In the case of H systems
the preferred channel of the DP Slave is determined.
Error handling
No plausibility checks are carried out with reference to the input parameters.
Time response
Does not exist.
Message characteristics
See OB_BEGIN block
Operator control and monitoring
The block has no faceplate.
2.3.1 Connections of OB_DIAG
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data type Initial I/O
ACC_ID 1=Accept MODE settings BOOL 0 I/O
CPU_DIAG System Structure: CPU d iagnostics STRUCT I/O
DADDR Diagnostic Address of DP-Slave INT 0 I/O
EN_82DIAG 1=Read Diagnosis (OB82) BOOL 0 O
EN_86DIAG 1=Read Diagnosis (OB86) BOOL 0 O
EN_F 1= Enable Function/Function Block BOOL 0 O
LOCK_82 1= Locked OB82 BOOL 0 I/O
LOCK_86 1= Locked OB86 BOOL 0 I/O
LOCK_82_TM Delay Time Locked OB82 DINT 0 I/O
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-15
Connection
(parameter) Meaning Data type Initial I/O
LOCK_86_TM Delay Time Locked OB86 DINT 0 I/O
MSTR1ERR Reserve BOOL 0 I/O
MSTR2ERR Reserve BOOL 0 I/O
OB82_CNT Counter OB82 INT 0 I/O
OB86_CNT Counter OB86 INT 0 I/O
OB_LOCK System Structure: Locked OB STRUCT I/O
PARA Reserved BOOL 0 I/O
QRACKF 1=Rack Error BOOL 0 O
RACKF Reserve BOOL 0 I/O
RACK_NO Rack Number BYTE 0 I/O
SL1ERR Reserve BOOL 0 I/O
SL2ERR Reserve BOOL 0 I/O
SUB_DIAG OB_Start Information STRUCT I/O
SUBN_TYP 1=External DP interface BOOL 0 I/O
SUBN1_ID ID of Primary DP master system BYTE 255 I/O
SUBN1ACT 1=Slave 1 Active BOOL 0 O
SUBN1ERR 1= Primar y DP master system failure BOOL 0 O
SUBN2_ID ID of Redundant DP master syst em BYT E 255 O
SUBN2ACT 1=Slave 2 Active BOOL 0 O
SUBN2ERR 1= Redundant DP maste r system failure BOOL 0 O
SSL75 Reserve BOOL 0 I/O
SSL92a Reserve BOOL 0 I/O
SSL92b Reserve BOOL 0 I/O
V1_MODE 1=DPV1-Mode BOOL 0 O
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-16 A5E00127662-01
2.4 SUBNET: Runtime gr oup contr ol for driver blocks
2.4.1 SUBNET: DP Master system monitoring
Object name (Type + Number)
FB 106
Area of Application
The block is used to reduce the acyclic OB processing times. Only the blocks
actually affected can be called in case of an acyclic event.
Callin g OBs
The block has to be installed in the following OBs in the run sequence (is carried
out automatically in CFC):
OB1 Cyclic program
OB70 I/O redundancy error
OB72 CPU redundancy error
OB81 Power failure fault
OB82 Diagnostic interrupt
OB83 Withdrawn/plugged interrupt
OB85 Program execution error
OB86 Rack failure
OB100 Restart (warm start)
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
Creating runtime groups with driver blocks organized by racks.
Configuration of
- The inputs SUBN1 _ID, SUB N2_ ID and SUB N+TYP.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-17
Interconnection of
- The outputs EN _Rxxx with the respective blocks (for example RACK).
- The INOUT structure CPU_DIAG with the OUT structure of the OB_BEGIN
block.
- The OUT structure SUB_DIAG with the INOUT structures of the respective
blocks (for example RACK).
Function and Operating principle
The SUBNET block monitors a DP Master system and enables the blocks (for
example RACK) for executing the connected DP Slaves (for example ET200M).
Corresponding messages are generated and the output variables SUBN1ERR and
SUBN2ERR set at a failure or redundancy loss of a DP master system. The output
structure SUB_DIAG contains the geographic address of the DP Master system
(and DP Master system 2 at H systems) as well as the group area information
SUBN0_ERR (for DP Master system 1) and SUBN1_ERR (for DP Master system
2). If SUBN0_ERR = 1 or SUBN1_ERR = 1, the corresponding DP Master system
is not available.
The SUBNET block is installed per connected DP Master system or once for the
centrally plugged I/O devices into the OBs listed above and is enabled by the
OB_BEGIN block. The start and diagnostic information is read from the I/O
structure CPU_DIAG. It has to be interconnected to the structure CPU_DIAG of the
OB_BEGIN block (is implemented automatically with the CFC function "Generate
Module Driver"). The SUBNET block has one enable output per connectable rack
or DP Master system (per expansion rack in the case of centralized I/O devices). It
uses the starting information of the calling OB to determine whether the signaled
result has occurred at its DP Master (or at the centrally plugged I/O devices) and
then sets the output for the respective rack or for the DP Master system (EN_Rx).
If redundant DP Master systems are used (only for H-CPUs), a rack (for example
ET200M) is connected to the two DP Masters and has the same station number at
both. The SUBNET block has two inputs (SUBNx_ID) and the type identifier
SUBN_TYP. If the DP Master is the integrated interface of the CPU module,
SUBN_TYP = FALSE is to be set. Otherwise SUBN_TYP = TRUE is to be set.
If a DP line fails, all EN_Rxxx are set to TRUE and the redundancy loss or failure is
signaled. The redundancy or DP Master return is signaled as soon as a failed DP
slave has established the connection again.
The state of the DP Master system, the set SUBNx_ID with type identifier, is saved
in the output structure SUB_DIAG.
If the event "Power failure fault" (OB81) occurs, the SUBNET block only enables
the RACK blocks if they are expansion racks. Expansion racks exist if
SUBNx_ID = 0.
If you want to change the inputs SUBN 1_I D (conn ec tion to CPU 0) and SUBN 2_I D
(connection to CPU 1) online without using the CFC function "Generate Module
Driver", you have to set the input ACC_ID = TRUE. This updates the output values.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-18 A5E00127662-01
Redundancy
The SUBNET block supports the redundancy of DP Master systems of the
CPU 417H in case of distributed I/O devices. To this purpose the inputs SUBN1_ID
(connection to CPU 0) and SUBN2_ID (connection to CPU 1) are to be configured
with the numbers of the redundant DP Master systems. If there is no redundancy,
the remaining input must have the value 16#FF (default) assigned.
Error handling
Error handling of the block is limited to the error information of ALARM_8P. Refer
to Error information of the MSG_STAT output parameter
Start-up/In it i al- start behavior
The SUBNET block initializes the messages of ALARM_8P.
The operating mode of the DP Master system is sampled and entered in the
structure SUB_DIAG.V1_MODE with SSL 0X90H (0 = compatibility mode, 1=
DPV1 mode). If the DPV1 mode is active, the structure CPU_DIAG.MODE_V1 is
also set to TRUE.
Overload behavior
The SUBNET block counts the OB86 calls (only failures). The counter is reset in
the OB1. If more than two OB86 failure events occur successively before the cycle
checkpoint (OB1) is reached, these are rejected and a message "Failure OB86 DP
Master system:x" is emitted. If an OB86 call is rejected, the DP Master system is
registered as having failed.
Time response
Does not exist.
Message characteristics
After being called by an OB86, OB70 and OB72 the block analyzes the state of the
DP master system assigned to it and generates the corresponding messages for
redundancy loss and DP Master s ystem failure b y em itting an AL ARM _8 P.
Messaging can be de-activated by using EN_MSG = FALSE.
The SUBNET block generally only signals events whose cause lies within the DP
Master system monitored by it.
Exception C PU failur e in the H system :
- Non-redundant DP Master system: Message "DP Master failure".
- Redundant DP Master system: Message "DP Master redundancy loss".
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-19
Operator Control and Monitoring
The block has no faceplate.
Note:
In "Connection of SUBNET" the variables are identified (with a "+" in the column
OCM ) which are transferred from this instance block to the OS when the option
"Operator C and M capability for diagnostic blocks" in the "Generate Module
Driver" settings is selected. Default: option is not set.
2.4.2 Connections of SUBNET
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data type Initial I/O OC&M
ACC_ID 1=Accept MODE settings BOOL 0 I/O
CPU_DIAG CPU diagnostics STRUCT I/O
EN_MSG 1=Enable message BOOL 1 I
EN_Rxxx 1=Enable Rack xxx BOOL 0 O
EV_ID Message ID DWORD 0 I
MSG_STAT Message Failure WORD 0 O
SUB_DIAG System Structure: CPU d iagnostics STRUCT O
SUBN_TYP 1=External DP-Interface BOOL 0 I/O
SUBN1_ID ID of Primary DP master system BYTE 25 5 I/O
SUBN1ERR 1= Error in primary DP Master system BOOL 0 O +
SUBN2_ID ID of Redundant DP master syst em BYTE 255 I/O
SUBN2ERR 1= Error in Redundant DP master system BOOL 0 O +
Note
The number of racks possible results from the address volume of PROFIBUS. All
available CPUs can thus be used. The entire address volume is used by the
CPU 417-4.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-20 A5E00127662-01
2.4.3 Message texts and auxiliary process values of SUBNET
Assignment of message text and message class
Message No. Default message text Message class
1 DP master @1%d@: Redundancy loss S
2 DP master @2%d@: Redundancy loss S
3 DP master @1%d@: Failure S
4 DP master @2%d@: Failure S
5 Multiple line failure @2%d@OB86 lock
Assignment of the auxiliary values
Value Block parameter
1 Primary DP Master system number (SUBN1_ID)
2 Redundant DP Master system numb er (SUBN2_ID)
2.5 RA CK: Signal rack failure
2.5.1 RACK: Rack monitoring
Object name (Type + Number)
FB 107
Area of Application
The block monitors the state of a rack, a DP/PA or Y-Link DP V1 and signals the
corres pondi ng err or events .
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-21
Callin g OBs
The block has to be installed in the following OBs in the run sequence (is carried
out automatically in CFC):
OB1 Cyclic program
OB70 I/O redundancy error
OB72 CPU redundancy error
OB81 Power failure fault
OB82 Diagnostic interrupt
OB83 Withdrawn/plugged interrupt
OB85 Program execution error
OB86 Rack failure
OB100 Restart (warm start)
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The RACK block is installed automatically in the run sequence after the
SUBNET block.
Configuration of
- The inputs RACK_NO, DADDR, SUBN1_ID, SUBN2_ID and SUBN_TYP.
Interconnection of
- The EN input with the output of an AND block. Its inputs are interconnected
to the output EN_SUBx of the OB BEGIN block and to the output EN_Rxxx
of the SUBNET block.
- The OUT structure CPU_DIAG of the OB_BEGIN and SUB_DIAG of the
SUBNET block with the INOUT structures of the same name of the RACK
block.
- OS operation: (LINK_MAN = 0): Low-speed and high-speed operation can
be switched on via the input SP1_ON and SP2_ON repectively and the
input MOT_OFF stops the operation. The enablings (S1_OP_EN,
S2_OP_EN or OFFOP_EN) have to be available.
Function and Operating principle
The RACK block generates a process control system fault message for the OSs in
case of redundancy losses and rack or stations failures. In addition it indicates
faults within the rack/the station (SUBN1ERR, SUBN2ERR) and the preferred
channel (SUBN1ACT, SUBN2ACT) when the DP slaves are activated at the
outputs. The output structure RAC_DIAG contains the geographic address of the
rack as well as the group error information RACK_ERR.
If RACK_ERR = 1, the corresponding rack is not available.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-22 A5E00127662-01
The block is installed into the OBs listed above for each connected station and
once for the centrally plugged I/O devices. The runtime groups, in which the RACK
block is installed is enabled by the SUBNET block. The start and diagnostic
information is read from the I/O structure CPU_DIAG. It has to be interconnected to
the structure CPU_DIAG of the OB_BEGIN block (is implemented automatically
with the CFC function "Generate Module Driver"). The RACK block has one enable
output per slot of the rack (station).
The RACK block generates the number of a corresponding message (see
Message Behavior) on the basis of the start information of the calling OBs if the
current block is affected.
The block determines the currently active preferred channel (SUBN1ACT,
SUBN2ACT) in the case of redundant PROFIBUS DP interfaces by evaluating the
error events and, if required, the diagnostic address ADDR of the DP slave.
If you want to change the inputs SUBN 1_I D (conn ec tion to CPU 0) and SUBN 2_I D
(connection to CPU 1) online without using the CFC function "Generate Module
Driver", you have to set the input ACC_ID = TRUE. This updates the output values.
Redundancy
The RACK block supports the redundancy of DP Master systems within the H
systems in case of distributed I/O devices. To this purpose the inputs of the RACK
block SUBN1_ID (connection to CPU 0) and SUBN2_ID (connection to CPU 1) are
to be configured with the numbers of the redundant DP Master systems. If there is
no redundancy, the remaining input must have the value 16#FF (default) assigned.
Error handling
Error handling of the block is limited to the error information of ALARM_8P.
Refer to Error information of the MSG_STAT output parameter
Start-up characteristics
The RACK block initializes the messages of ALARM_8P. A check whether the
station is available is carried out. In the case of H systems the preferred channel of
the station is determined.
The structure SUB_DIAG.V1_MODE (0 = compatibility mode, 1= DPV1 mode) is
transferred to the structure RAC_DIAG.V1_MODE.
Overload behavior
The RACK block counts the OB86 calls (exception DP Master system failure, see
SUBNET block). The counter is reset in the OB1. If more than two OB86 events
occur successively before the cycle checkpoint (OB1) is reached, these are
rejected and a message "Failure OB86 DP Master:x Rack:y" is emitted. If an OB86
call is rejected, the rack (station) is registered as having failed.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-23
Time response
See Message characteristics
Message characteristics
After being called by OB70, OB72, OB85 or OB86 the block analyzes the state of
the CPU, DP master and DP slaves assigned to it. If necessary, it generates the
corresponding messages for redundancy losses and rack (station) failures in the
rack by emitting an ALARM_8P. Messaging can be de-activated by using EN_MSG
= FALSE.
The block generally only signals events whose cause lies within the rack monitored
by it. Redundancy loss and station failures which are caused by the failure of a DP
masters or of a CPU, are initially neither signaled nor indicated at the outputs
SUBN1ERR and SUBN2ERR.
The DELAY input allows a signal delay, which can be configured, for an outgoing
higher-order error. If, for example, the RACK block recognizes an outgoing error in
a DP master connected to it, it initially assumes that there is a faulty assigned DP
slave in the rack monitored by it and sets the corresponding output SUBNxERR.
The error is not canceled until the DP slave returns (in this case: OB86, OB70).
The RACK blocks suppress the potential slave failure for DELAY seconds in order
not to trigger a wave of messages from the DP slaves which are not synchronized
yet after the master returns. An error message is not output to the OSs unless a
DP slave does not report its return before this period expires.
Note
You should not set the value of DELAY too high. Otherwise DP slaves which were
removed during the master failure or which are defective will be reported back to
the OSs after the master returns with a correspondingly high delay period.
The RACK block generates the following messages in the OBs listed below:
OB Starting event Message
OB1 Cyclic processing Repeat updating ALARM_8P outputs / messages, if necessary
OB70 Redundancy loss DP Slave redundancy loss/return
OB81 Power failure fault - Rack battery failure coming/going - Rack backup voltage failure
coming/going - Rack 24 V supply failure coming/going
OB85 I/O a ccess err or Rack failure going
OB86 Rack monitoring Rack failure coming/going
OB100 Restart: Initializing ALARM_8P
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-24 A5E00127662-01
2.5.2 Connections of RACK
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data type Initial I/O O&M
ACC_ID 1=Accept MODE settings BOOL 0 I/O
CPU_DIAG CPU diagnostics (Syste m Structure) STRUCT I/O
DADDR Diagnostic Address of DP-Slave INT 0 I
DELAY Alarm Delay (s) INT 15 I
EN_MSG 1 = Enable message BOOL 1 I
EN_Mxx 1=Enable module xx (xx = 00 – 30) BOOL 1 I
EV_ID Message number DWORD 0 I
MSG_STAT Message error information WORD 0 O
RAC_DIAG System Structure (reserve): STRUCT I
RACK_NO Rack Number BYTE 0 I
SUB_DIAG OB_Start Information STRUCT I/O
SUBN_TYP 1=External DP interface BOOL 0 I/O
SUBN1_ID ID of Primary DP master system BYTE 255 I /O
SUBN1ACT 1=Slave 1 Active BOOL 0 O +
SUBN1ERR 1=Error in Primary DP master system BOOL 0 O +
SUBN2_ID ID of Redundant DP master syst em BYTE 2 55 I/O
SUBN2ACT 1=Slave 2 Active BOOL 0 O +
SUBN2ERR 1=Error in Redundant DP master system BOOL 0 O +
2.5.3 Message texts and auxiliary process values of RACK
Assignment of message text and message class
Message No. Default message text Message class
1 Station @1%d@/ @3%d@: Redundancy loss S
2 Station @2%d@/ @3%d@: Redundancy loss S
3 Station @1%d@/ @3%d@: Failure S
4 Station @2%d@/ @3%d@: Failure S
5 Station @1%d@/ @3%d@: Backup battery failure S
6 Station @1%d@/ @3%d@: Backup voltage failure S
7 Station @1%d@/ @3%d@: 24 V supply failure S
8 Multiple line failure @1%d@/ @3%d@ OB86 Lock S
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-25
Assignment of the auxiliary values
Value Block parameter
1 Primary DP Master system number (SUBN1_ID)
2 Redundant DP Master system numb er (SUBN2_ID)
3 Rack or station number (RACK_NO)
Special case at OB81 (Power failure fault): If SUBN1_ID = 16#FF, auxiliary
process value 1 = SUBN2_ID is set.
2.6 PO_UPDAT: Update process image
Object name (Type + Number)
FC 279
Area of Application
The block ensures the functions "Hold last value" and "Apply substitution value" of
the output modules when a CPU is restarted (OB100).
Callin g OBs
The block must be installed at the end of the OB100. This is carried out for you by
the CFC function "Generate Module Driver".
Functional descripti on
When a CPU is restarted (OB100), the CH_AO, CH U AO, CH_DO and CH_U_DO
blocks write the start values to the process image. The PO_UPDAT block sends all
the (part) process images to the modules at the end of the OB100 in order for
these values to be active immediately when the CPOU passes to RUN. The output
PO_MAP indicates the part process images updated or used in the system (BIT0:
Process image 0, BIT15: Part process image 15).
Connections of PO_UPDAT
Connection
(Parameter) Meaning Data type Defalt. Type
PO_MAP (Part) Process images updated or used in system (BIT0:
OB1 process image, BIT1 - 15: part process image
1 - 15)
WORD 0 O
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-26 A5E00127662-01
2.7 IM_DRV: Transferring time-stamped process signal
changes
Object name (Type + Number)
FB 90
Callin g OBs
If you use CFC, the block is installed automatically in the run sequence.
OB1 Cyclic program
OB40 Process interrupt 0
OB100 Restart (warm start)
Alternatively to OB40 the block can also be installed in another process interrupt
(OB41 to OB47).
Area of Application
The block is used to transfer time-stamped process signal changes and non-signal-
specific events (special messages) to the OS.
Functional description and Operating principle
In an AS the block forms the interface between an IM151-2 or IM153-2 and the OS
(WinCC). It reads the messages from the message buffers (max. of 20 messages
each) of an IM and uses the pseudo message function ALARM_T to transfer these
to the OSs.
Process interrupt: The IM creates a process interrupt when there are new
messages. The status of the time stamp with the number of the record to be
fetched of the IM and the number of messages in the record are stored for
cyclic processing from the start information of the process interrupt OB (refer to
the process interrupt data). The information of up to 17 process interrupts can
be stored. If the maximum number is exceeded, the new information is lost.
Cyclic processing: If messages are ready to be fetched, the respective record
(message buffer) is read by the SFC 59/RD_REC (read record). If several
records are to be fetched, the record with the oldest messages (oldest process
interrupt) is fetched. A maximum of 20 messages of a record (current number
of messages is listed in the process interrupt data) are saved temporarily in the
instance of the block
As soon as a record has been read, new messages can be entered again from
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-27
the IM. If all the records are occupied, the IM enters the special message
"Buffer overflow coming" into the message buffer. The special message "Buffer
overflow going" is entered as the first message into the first free record.
Messages which occur between the occurrence of a buffer overflow and the
enabling of a record are lost.
The slot no./channel no. of the stored messages are compared with the input
parameters of the block for the slot no./channel no. (S_C H_xxx). If they agree,
the message is assigned to the corresponding event ID (EV_ID_xxx) and
signal number (1 to 8) of the pseudo ALARM_T (ALARM_8P) block. The time
stamp of the message (8 bytes) is entered in the ARRAY of byte (index
corresponding to the signal number of the pseudo ALARM_T). When all the
messages have been assigned, the pseudo ALARM_T blocks which are to
transfer the new messages to OSs are called up. The return signals of the
pseudo ALARM_T and of the process control system message block
ALARM_8P (STAT_xx, M_ACK_xx) are available at the block output. If
STAT_xx = 11 (previous job not yet completed) the pseudo ALARM_T or
ALARM_8P is called again in the next cycle. In all other cases messages can
be lost. If no agreement can be found with the input parameters at a message,
the output QBPARF is set TRUE for one cycle (see error handling). The event
is signaled (see Message characteristics).
Addressing/Configuration
Also refer to Addressing
The logical address of the IM determined with HW Config (corresponds to the
diagnostic address) is entered at the block input (LADDR) of the driver. Each
change to the LADDR block input leads to a single check corresponding to the
start-up characteristics of the block. Saved process interrupt data are deleted.
If you run the DP master system in the DPV1 mode, you have to enter the E
address of the IM at the block input (LADDR).
The RACK into which the IM is plugged is monitored by the RACK block. You have
to connect the input RAC_DIAG with the output RAC_DIAG of the corresponding
RACK block. The rack number is set at the RACK block.
Process signals which are to be provided with a time stamp and are detected via
an IM must be configured correspondingly in the HW Config.
Each signal which is provided with a time stamp from the IM has a unique
assignment through its slot in combination with the corresponding channel number.
There are 128 inputs of data type WORD for 128 signals. The slot number of the
respective digital input module is entered in the higher-value byte and the channel
number (signal of the digital input module) in the lower-value byte. The slot and
signal number of the process signals are entered in the block inputs (S_CH_xxx)
(hexadecimal format).
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-28 A5E00127662-01
Example:
You have set the digital signal 10 of a digital input module plugged into slot 5 of an
ET200M to 10 ms exact time stamp by means of HW Config. You have to enter
the number 16#050A at the first free input S_CH_xxx of the IM_DRV.
Error handling
I/O access error:
QPERAF The block could not access IM. A record could not be read.
If it is not stored in the IM, these messages are lost.
Block processing error:
QERR An error has occurred while the bl ock was being processed.
Module configuration error:
QPARF Incorrect module configuration (incorrect logical basic address entered).
Configuration error:
QBPARF The block was configured incorrectly. The slot/channel number of an IM message
does not agree with any slot/channel number of the block input parameters
(message is lost).
Rack error:
QRACKF Failure of the rack in which the IM is plugged or a failure of IM
Start-up characteristics of the IM
When the IM is started up/restarted process interrupts are emitted again for those
records which were occupied before restarting but had not been fetched.
The special message "Begin start-up data" is entered as the first message into the
first free record. Then all the digital signals to be monitored are checked for
changes after the restart and a message is triggered, if appropriate. The special
message "End start-up data" is generated finally.
Start-up characteristics of the driver block IM_DRV
Initialization of the ALARM_8P and the pseudo ALARM_T blocks with the data
stored before the STOP state of the CPU. At a start-up the signal state is initialized
to "Zero".
At a start-up/initial start the driver checks whether there is an IM under the logical
address LADDR. Otherwise the driver sets its output QPARF = TRUE and does not
carry out any further I/O accesses in the subsequent cycles. Not until the right
module has been plugged or until after new configuration does QPARF = FALSE
and is the I/O access enabled. Stored process interrupt data which were not
processed before the restart are deleted.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-29
Redundancy
In the case of H systems with two IM units redundancy exists with regard to the
time stamp if
The communication between the two IM units runs via the communication bus,
Updating of the active and passive IM has been completed free of errors
A redundancy loss (failure of an IM) is signaled outside the IM_DRV by means of
the SUBNET and RACK blocks.
The time stamp function is interrupted during a changeover between the active and
passive IM. The interruption period is displayed with the special message
"Changeover at redundancy beginning/end".
In a normal case the active informs the passive IM of the current I/O device state.
If this communication is faulty, the special message "Redundancy_Info_Loss
coming" is output. As soon as the I/O device state between the active and passive
IM has been compared, the special message "Redundancy_Info_Loss going" is
output.
Time response
Does not exist.
Message characteristics
The block uses one ALARM_8P and 17 pseudo ALARM_T blocks which are
installed as multiple instances. Transferring of the 8 time-stamp values per pseudo
ALARM_T call is carried out via an ARRAY [0..65] of BYTE. The ARRAY is
structured as follows:
BYTE 0 – 1: Format identifier of the following date/time stamp
BYTE 2 – 9: Date/time stamp for Signal_1
BYTE 10 – 17: Date/time stamp for Signal_2
.
..
.
BYTE 58 – 65: Date/time stamp for Signal_8
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-30 A5E00127662-01
The format identifier of the bytes 0 -1 specifies the bit coding of the time stamp
structure (8 bytes are assigned to one time stamp value):
Format identifier: 0 Date/time in SIMATIC S7 BCD format ( DATE_AND_TIME)
1 Date/time in ISP format
Year Month
Day hours
Minutes Seconds
1/10 s 1/100 s 1/1000 s Weekday
Time stamp in ISP format
Complete time by ISP method (time since 1.1.1900; 00:00 h). The 4 bytes for
seconds allows the time which has passed since 1.1.1900; 0:00 h to be expressed
in seconds.
BYTE 0 Seconds (4 Bytes)
3
4 Second fragments (4 Bytes)
7
The time stamps provided by IM were passed on unchanged by the driver in ISP
format.
In cyclic operation of the driver the pseudo ALARM_T blocks and the process
control system message block ALARM_8P are only called when the signal states
have changed. This reduces unnecessary runtimes.
Operator control and monitoring
The block does not have a faceplate (display block).
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-31
2.7.1 Connections of IM_DRV
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data type Initial I/O
EV_ID Message ID for ALARM_8P DWORD 0 I
EV_ID_xx Message ID for ALARM_T_xx (xx = 00 – 16) DWORD 0 I
LADDR Logical Address IM WORD 0 I
M_ACK_xx Message acknowledge (xx = 00 – 16) x WORD 0 I
Q_ERR_xx Message failure (xx = 00 – 16) BOOL 0 O
QBPARF 1: Param. failure block BOOL 0 O
QERR 1: Block processing error (inverted value of ENO) BOOL 1 O
QPARF 1: Param. failure module BOOL 0 O
QPERAF 1: I/O access failure BOOL 0 O
QRACKF 1:Rack Failure BOOL 0 O
RAC_DIAG Rack Status Info rmation STRUCT I/O
S_CH_xxx Slot-/ch anne l-No.(xxx = 000 – 127) WORD 0 I
STAT_xx STATUS Output (xx = 00 – 16) WORD 0 O
2.7.2 Message texts and auxiliary process values of the IM_DRV
Assignment of message texts and message classes to the signal and special
messages
An ALARM_8P block is used for the process control system messages in the
following table. The geographic address of the IM is entered in Auxiliary Process
Value 1 = Slot number of the message, Auxiliary Process Value 2 = Channel
number of the message and Auxiliary Process Value 3 = RET_VAL of the SFC 59
(RD_REC) at an I/O access error.
ALARM_8P_16
Message No. Output
parameter Default message text Message class
1 QBPARF Error S_CHxx: Slot=@1%d@ Channel=@2%d@ S
2 QPERAF I/O access error: Ret_Val@3%d@ S
3 QPARF Parameter assignment error S
The following special messages which can be contained in the message buffer are
generated with ALARM_8P_00 (multiple-instanced call of the pseudo ALARM_T)
The format identifier and the 8 time-stamp values are entered in the first auxiliary
value
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-32 A5E00127662-01
ALARM_8P_00
Message No. Default message text Message
class
1 Start-up data BEGINNING/END S
2 Time-of-day message failure COMING/GOING S
3Time difference between message and internal clock endangers
precision S
4 Time difference between message and internal clock > 1 second
POSITIVE/NEGATIVE S
5 STOP of the functionality time stamp COMING/GOING S
6 Message loss at IM (buffer overflow) COMING/GOING S
7 Changeover at redundancy BEGINNING/END S
8 Redundancy_Info_Loss COMING/GOING S
ALARM_8P_01 to ALARM_8P_16 (multiple-instanced call of the pseudo
ALARM_T) can generate the following signal messages. The format identifier and
the 8 time-stamp values are entered in the first auxiliary value
ALARM_8P_01 Message No. Default message text Message clas s
1 TEXT S_CH_000 S
2 TEXT S_CH_001 S
3 TEXT S_CH_002 S
4 TEXT S_CH_003 S
5 TEXT S_CH_004 S
6 TEXT S_CH_005 S
7 TEXT S_CH_006 S
8 TEXT S_CH_007 S
......
ALARM_8P_16 Message No. Default message text Message clas s
1 TEXT S_CH_120 S
2 TEXT S_CH_121 S
3 TEXT S_CH_122 S
4 TEXT S_CH_123 S
5 TEXT S_CH_124 S
6 TEXT S_CH_125 S
7 TEXT S_CH_126 S
8 TEXT S_CH_127 S
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-33
2.7.3 Interface IM
The IM 153-2 / IM151-2 triggers a process interrupt when it wants to send
messages to the AS. The user data of the IM are specified in the start information
of the process interrupt as follows.
Hardware Interrupt Data
Element Data type Meaning
0 BYTE Event class and identifiers: B#16#11 = Interrupt is active
1 BYTE B#16#41 = Interrupt via interrupt line
B#16#42 = Interrupt via interrupt line 2 (only for S7-400)
B#16#43 = Interrupt via interrupt line 3 (only for S7-400)
B#16#44 = Interrupt via interrupt line 4 (only for S7-400)
2 BYTE Configured priority class: Default values: 16 (OB 40) to 23 (OB 47)
3 BYTE OB No. (40 to 47)
4 BYTE Reserved
5 BYTE Input module: B#16#54
Output module: B#16#55
6 WORD Logical basic address of the module which triggers the interrupt
7 BYTE State of the time stamp (interrupt cause from the view of the time stamp)t
Bit 7: State of the synchronization via time message
= 0: No synchronization exists
= 1: Synchronization exists
Bit 6: (only 1 ms) State of the synchronization via optical fiber synch ronization
signal
= 0: No optical fiber signal exists
= 1: Optical fiber signal exists
Bit 5: Renewed starting of the time stamp
= 0: No renewed starting
= 1: Renewed starting just started
Bit 4: REDUNDANCY: Redundancy operation active/not active
= 0: No redundant operation (no redundant plant or
single operating mode or passive IM not yet ready)
= 1: Redundant operation running (station in data
exchange between active <-> passive IM)
Bit 3: REDUNDANCY: active IM
= 0: Right-hand IM active,
= 1: Left-hand IM active
Bit 2 = 1: Buffer overflow "internal" (messages are lost)
Bit 1: = 1: Buffer overflow "external" (warning: message loss will occur soon)
Bit 0: = 1: Message buffer is ready for fetching on the IM
8 BYTE Record number if a record (message buffer) is to be fetched
9 BYTE Number of messages contained in the record n: 1 – 20
10 BYTE Reserved
11 DATE_AND
_TIME Date and time at which the OB was requested
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-34 A5E00127662-01
The IM_DRV only evaluates Bit 5 in Byte 7 (status of the time stamp function). If
the bit = 1, all the process interrupts which have been received before but not
processed are rejected.
The bit is only set by the IM in the first process alarm after renewed starting.
Examples for renewed starting:
* REDUNDANCY: Changeover state active <-> passive IM
* Restarting of the time stamp function after a total failure
Record (message buffer)
An IM153-2 has 15 records (message buffers). Access to a record is specified by
the record number supplied in the process interrupt data.
Structure of a record (message buf f er) in the IM
Date Number of bytes Remarks
Message1 12 Signal or special message
.
. .
. .
.
Message20 12 Signal or special message
A maximum of 20 signal or special messages can be stored in a message buffer.
Structure of a special message from IM
Element Meaning Data type Remarks
1 Slot number of
the header
module
BYTE Fixed = 2
2 Identifier of the
special message BYTE 01h: Start-up data (a)
02h: Time message failure Subsequent signal messages may
have a precision worse than 10ms (b)
03h: Synchronization signal failure: Subsequent signal
messages may have a precision worse than 1ms (b)
04h: Time difference between message and internal clock > 1
second (d)
05h: STOP of the functionality time stamp (b)
06h: Buffer overflow: Subsequent signal messages are lost
until the buffer is free again (b)
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-35
Element Meaning Data type Remarks
3 Characteristic of
special message BYTE For further specification of the event
01h: BEGINNING 00h: END (a) or
01h: COMING 00h: GOING (b) (c) or
01h: POSITIVE 00h: NEGATIVE (d)
positive: Internal clock lost and was reset
negative: Internal clock gained and was reset:
4 Reserved BYTE Not used at present
5 Time of the
signal change ISP time
(8 BYTES) Complete time by ISP method (time since 1.1.1900; 00:00 h)
Structure of a signal message from IM
Element Meaning Data type Remarks
1 Slot number of the
module BYTE In connection with the channel number for address
referencing of the digital signal. Range of values:
0, 1, 2, 3 Not assigned
4 ... 11 Slot number of the DI module
12 ... 255 Not assi gned
2 Channel number
of the module BYTE In connection with the slot number for address referencing
of the digital signal. Range of values:
0, 1, ... 15 Channel number of the DI module
16 … 255 Not assigned
3 Signal state BYTE Bit 7 = 1: Signal coming
= 0: Signal going
Bit 6 ... Bit 0: Not used
4 Reserve BYTE Not used at present
5 Time of the signal
change ISP time
(8 BYTE) Complete time by ISP method (time since 1.1.1900; 00:00
h)
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-36 A5E00127662-01
2.8 MOD_1: Diagnosti c driver for S7-300/400 SM modules
w hich cannot be diagnosed with 16 channel s
2.8.1 MOD_1: Monitoring of S7-300/400 SM modules which cannot be
diagnosed with 16 channels maximum
Object name (Type + Number)
FB 91
Area of Application
The block monitors S7-300/400 SM modules with 16 channels maximum which
cannot be diagnosed (no mixed modules).
Callin g OBs
The block has to be installed in the following OBs in the run sequence (is carried
out automatically in CFC):
OB1 Cyclic program
OB70 I/O redundancy error
OB72 CPU redundancy error
OB83 Withdrawn/plugged interrupt
OB85 Program execution error
OB86 Rack failure
OB100 Restart (warm start)
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The MOD_1 block is installed behind the RACK block in the OBs mentioned
above of the respective runtime group of the rack (station).
Configuration of
- The MODE_xx inputs (mode of the channels xx of the module).
- The logical basic address of the LADDR module.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-37
Interconnection of
- The OUT structures CPU_DIAG of the OB_BEGIN block and RAC_DIAG
of the RACK block with the INOUT structures of the same name of the
MOD_1.
- The EN input with the output of an AND block.
Its inputs are interconnected with the outputs EN_SUBx (x = Number of the
DP Master system) of the OB_BEGIN block, EN_Rxxx (xxx = Rack/station
number) of the SUBNET block and EN_Mxx (xx = Module number) of the
RACK block.
Function and Operating Principle
The block analyzes all the events which affect a module and its channels
acyclically. It forms the MODE and value status (quality code) for the signal
processing blocks channel-specifically. Events are signaled with ALARM_8P.
The block is enabled for running by the higher-level RACK block. The event to be
evaluated is entered in the start information (CPU_DIAG) of the OB_DIAG block.
Each signal channel of the module has an input (MODE_xx). Here the
configurations carried out with HW Config are signaled to the module channels.
MODE_xx is read into the low word of the output OMODE_xx. This is only carried
out during the start-up/initial start or if ACC_MODE = TRUE. The current value
status of the channel is entered in the highest-value byte. If good, OMODE_xx =
16#80xxxxxx is set.
The following events lead to a value status "invalid value due to higher-level error"
(OMODE_xx = 16#40xxxxxx):
CPU redundancy loss (OB72) (if not switched,
output parameter QRACKF = TRUE)
I/O access error (OB70) (if not switched,
output parameter QRACKF = TRUE)
Rack failure (OB86) (output parameter QRACKF = TRUE)
The above events are evaluated by the RACK block. The following ones by the MOD
block:
I/O access error (OB85) (output parameter QPERAF = TRUE)
Module withdrawn (OB83) (output parameter QMODF = TRUE)
The events "Module withdrawn" and "I/O access error" are signaled to the OSs by
means of ALARM_8P. In the case of a diagnostic interrupt a difference is made
between module and channel faults, whereby a message number is assigned to
each channel.
During starting up the system checks whether the module is available (plugged).
The module state information read here is available in the form of service output
parameters (MOD_INF).
For detailed information on the faults: Please refer to the manual "System Software
for S7-300/400 – System and Standard Functions".
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-38 A5E00127662-01
Redundancy
Redundancy monitoring of the DP Master systems on an H system is carried out in
the higher-level RACK block.
MODE setti ng
The inputs MODE_xx are available for a maximum of 16 signal channels. The initial
value is "Zero" (no signal). Depending on the signal channel xx you have to set the
type and, if appropriate, the coding of the measuring range of an analog module at
the MODE_xx input.
Refer to MODE
Note
If you change the configuration of the MODE_xx inputs during operation, the
change does not become active until the input ACC_MODE = 1 has been set at
the outputs.
OMODE structure
Refer to OMODE
Addressing
Refer to Addressing
In the case of HART modules which access the process image in reading and
writing mode configuration is carried out as for input modules. It is generally not
permissible to specify different input and output ranges.
Example: SM332 AO 2x0/4..20mA HART 332-5TB00-0AB0:
Address input range HW
Config Address output range HW
Config LADDR
(decimal / hex)
544 544 544 / 16#0220
Error handling
No plausibility checks are carried out with reference to the input parameters.
Also refer to: Error information of the output MSG_STAT parameter
Service information
In order to analyze faults you can read the module state information, which is
entered during starting up, via the structured output parameter MOD_INF (refer to
the reference manual "System software for S7-300/400 – System and standard
functions", system state list, module state information).
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-39
Start-up characteristics
After a restart or an initial start the system checks whether the module is available
under the logical base address. A restart (OB100) is signaled via the LSB in Byte 2
of the outputs OMODE_xx.
Time response
Does not exist.
Message characteristics
MOD_1 signals module faults by means of ALARM_8P. The inputs DELAY1 and
DELAY2 are used to delay signaling of the I/O access error. DELAY1 is used to
specify the time in seconds which the block waits after an I/O access error (OB85)
for a higher-level error (rack failure or withdrawn/plugged), before it outputs the
message. The message is turned off only when no higher-level fault is detected
after the set time expires. DELAY2 determines the number of seconds which the
block waits until it signals the I/O access error still existing after a higher-level error
has passed. Both values have a default value of 2 seconds.
Messaging can be de-activated by using EN_MSG = FALSE.
Operator control and monitoring
The block does not have a faceplate (Display block).
Note: Under "Connections of …" the variables are marked (column OC&M "+")
which are transferred to the OS, if the option "Can be operator controlled and
monitored" is set in the object properties of the block in CFC. Default: Option not
set.
2.8.2 Connections of MOD_1 / MOD_2
The connections of the blocks MOD_1and MOD_2 are identical with the exception
of the number of the MODE_xx and OMODE_xx. The number of channels to be
monitored determines the number of the respective input and outputs (xx).
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data type Initial I/O OC&M
ACC_MODE 1=Accept MODE Settings BOOL 0 I/O
CPU_DIAG System Structure STRUCT I/O
DELAY1 Alarm Delay 1 (s) INT 2 I
DELAY2 Alarm Delay 2 (s) INT 2 I
EN_MSG 1=Enable Message BOOL 1 I
EV_ID Message ID DWORD 0 I
LADDR Logical Address of Module INT 0 I
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-40 A5E00127662-01
Connection
(parameter) Meaning Data type Initial I/O OC&M
MOD_INF System Structure:Module Information STRUCT O
MODE_xx Mode Channel xx WORD 0 I
MSG_ACK Message Acknowledged WORD 0 O
MSGSTAT Message Failure WORD 0 O
OMODE_xx Mode Channel xx DWORD 0 O +
QERR 1=Program Error BOOL O
QMODF 1=Module Withdrawn/Out of Order BOOL 0 O +
QPERAF 1=Module I/O Access Failure BOOL 0 O
QRACKF 1=Rack/Station Fai lure BOOL 0 O
RAC_DIAG Rack diagnostics (System Structure) STRUCT I/O
RACK_NO Rack Number BYTE 0 I
SLOT_NO Slot Number BYTE 0 I
SUBN_TYP 1=External DP interface BOOL 0 I
SUBN1_ID ID of Primary DP master system BYTE 255 I
SUBN2_ID ID of Redundant DP master syst em BY TE 255 I
2.8.3 Message texts and auxiliary process values of MOD_1 / MOD_2
Assignment of message texts and cl asses to the block parameters of MOD_1 /
MOD_2
Message
block
ALARM_8P
Message
number Block
parameter Default message text Message
class
EV_ID 1 Module @1%d@/@2%d@/@3%d@: Withdrawn S
2 QPERAF Module @1%d@/@2%d@/@3%d@: Access
error S
3 QMODF Module @1%d@/@2%d@/@3%d@:
@4W%t#MOD_n_TXT@ (n = 1 or 2) S
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-41
Assignment of the auxiliary process values for the block parameters of MOD_1 /
MOD_2
Message block
ALARM_8P Auxiliary
process
value
Block parameter Meaning
EV_ID 1 MOD_INF.SUBN_ID Number DP Master system ( byte)
2 MOD_INF.RACK_NO Rack / Station number (byte)
3 MOD_INF.SLOT_NO Slot number (byte)
4 Text number from MOD_n_TXT (n =1or 2)
(Message 1)
The event class/event number, the corresponding message texts and their text
numbers of the text library MOD_n_TXT are listed in the text library for signal
modules
2.9 MOD_2: Diagnosti c driver for S7-300/400 SM modules
w hich cannot be diagnosed with 32 channel s
2.9.1 MOD_2: Monitoring of S7-300/400 SM modules which cannot be
diagnosed with 32 channels
Object name (Type + Number)
FB 92
Area of Application
The block monitors S7-300/400 SM modules with 32 channels maximum which
cannot be diagnosed (no mixed modules).
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-42 A5E00127662-01
Callin g OBs
The block has to be installed in the following OBs in the run sequence (is carried
out automatically in CFC):
OB1 Cyclic program
OB70 I/O redundancy error
OB72 CPU redundancy error
OB83 Withdrawn/plugged interrupt
OB85 Program execution error
OB86 Rack failure
OB100 Restart (warm start)
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The MOD_2 block is installed behind the RACK block in the OBs mentioned
above of the respective runtime group of the rack (station).
Configuration of
- The MODE_xx inputs (mode of the channels xx of the module)
- The logical basic address of the LADDR module.
Interconnection of
- The OUT structures CPU_DIAG of the OB_BEGIN block and RAC_DIAG
of the RACK block with the INOUT structures of the same name of the
MOD_2.
- The EN input with the output of an AND block.
Its inputs are interconnected with the outputs EN_SUBx (x = Number of the
DP Master system) of the OB_BEGIN block, EN_Rxxx (xxx = Rack/station
number) of the SUBNET block and EN_Mxx (xx = Module number) of the
RACK block.
Function and Operating principle
The block analyzes all the events which affect a module and its channels
acyclically. It forms the MODE and value status (quality code) for the signal
processing blocks channel-specifically. Events are signaled with ALARM_8P.
The block is enabled for running by the higher-level RACK block. The event to be
evaluated is entered in the start information (CPU_DIAG) of the OB_DIAG block.
Each signal channel of the module has an input (MODE_xx). Here the
configurations carried out with HW Config are signaled to the module channels.
MODE_xx is read into the low word of the output OMODE_xx. This is only carried
out during the start-up/initial start or if ACC_MODE = TRUE. The current value
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-43
status of the channel is entered in the highest-value byte. If good, OMODE_xx =
16#80xxxxxx is set.
The following events lead to a value status "invalid value due to higher-level error"
(OMODE_xx = 16#40xxxxxx):
CPU redundancy loss (OB72) (if not switched,
output parameter QRACKF = TRUE)
I/O access error (OB70) (if not switched,
output parameter QRACKF = TRUE)
Rack failure (OB86) (output parameter QRACKF = TRUE)
The above events are evaluated by the RACK block. The following ones by the MOD
block:
I/O access error (OB85) (output parameter QPERAF = TRUE)
Module withdrawn (OB83) (output parameter QMODF = TRUE)
The events "Module withdrawn" and "I/O access error" are signaled to the OSs by
means of ALARM_8P. In the case of a diagnostic interrupt a difference is made
between module and channel faults, whereby a message number is assigned to
each channel.
During starting up the system checks whether the module is available (plugged).
The module state information read here is available in the form of service output
parameters (MOD_INF).
For detailed information on the faults: Please refer to the manual "System Software
for S7-300/400 – System and Standard Functions".
Redundancy
Monitoring of the redundancy of the DP Master systems at an H system is carried
out in the higher-level RACK block.
MODE setti ng
The inputs MODE_xx are available for a maximum of 32 signal channels. The initial
value is "Zero" (no signal). Depending on the signal channel xx you have to set the
type and, if appropriate, the coding of the measuring range of an analog module at
the MODE_xx input.
Refer to MODE
Note
If you change the configuration of the MODE_xx inputs during operation, the
change does not become active until the input ACC_MODE = 1 has been set at
the outputs.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-44 A5E00127662-01
OMODE structure
Refer to OMODE
Addressing
Refer to Addressing
In the case of HART modules which access the process image in reading and
writing mode configuration is carried out as for input modules. It is generally not
permissible to specify different input and output ranges.
Example: SM332 AO 2x0/4..20mA HART 332-5TB00-0AB0:
Address input range
HW Config Address output range
HW Config LADDR
(decimal / hex)
544 544 544 / 16#0220
Error handling
No plausibility checks are carried out with reference to the input parameters.
Also refer to: Error information of the output MSG_STAT parameter
Service information
In order to analyze faults you can read the module state information, which is
entered during starting up, via the structured output parameter MOD_INF (refer to
the reference manual "System software for S7-300/400 – System and standard
functions", system state list, module state information).
Start-up characteristics
After a restart or an initial start the system checks whether the module is available
under the logical base address. A restart (OB100) is signaled via the LSB in Byte 2
of the outputs OMODE_xx.
Time response
Does not exist.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-45
Message characteristics
MOD_2 signals module faults by means of ALARM_8P. The inputs DELAY1 and
DELAY2 are used to delay signaling of the I/O access error. DELAY1 is used to
specify the time in seconds which the block waits after an I/O access error (OB85)
for a higher-level error (rack failure or withdrawn/plugged), before it outputs the
message. DELAY2 determines the number of seconds which the block waits until it
signals the I/O access error still existing after a higher-level error has passed. Both
values have a default value of 2 seconds.
Messaging can be de-activated by using EN_MSG = FALSE.
Operator control and monitoring
The block does not have a faceplate (display block).
Note
Under "Connections of …" the variables are marked (column OC&M "+") which
are transferred to the OS, if the option "Can be operator controlled and monitored"
is set in the object properties of the block in CFC. Default: Option not set.
2.10 MOD_D1: Diagnostic driver for S7-300/400 SM modules
w hich can be diagnosed with 16 channels
2.10.1 MOD_D1: Monitoring of S7-300/400 SM modules which can be
diagnosed with 16 channels maximum
Object name (Type + Number)
FB 93
Area of Application
The block monitors S7-300/400 SM modules with 16 channels maximum which can
be diagnosed (no mixed modules).
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-46 A5E00127662-01
Callin g OBs
The block has to be installed in the following OBs in the run sequence (is carried
out automatically in CFC):
OB1 Cyclic program
OB70 I/O redundancy error
OB72 CPU redundancy error
OB82 Diagnostic interrupt
OB83 Withdrawn/plugged interrupt
OB85 Program execution error
OB86 Rack failure
OB100 Restart (warm start)
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The MOD_D1 block is installed behind the RACK block in the OBs mentioned
above of the respective runtime group of the rack (station).
Configuration of
- The MODE_xx inputs (mode of the channels xx of the module),
SUBN1_ID, SUBN2_ID and SUBN_TYP.
- The logical basic address LADDR of the module.
Interconnection of
- The OUT structures CPU_DIAG of the OB_BEGIN block and RAC_DIAG
of the RACK block with the INOUT structures of the same name of the
MOD_D1.
- The EN input with the output of an AND block.
Its inputs are interconnected with the outputs EN_SUBx (x = Number of the
DP Master system) of the OB_BEGIN block, EN_Rxxx (xxx = Rack/station
number) of the SUBNET block and EN_Mxx (xx = Module number) of the
RACK block.
Function and Operating Principle
The block analyzes all the events which affect a module and its channels
acyclically. It forms the MODE and value status (quality code) for the signal
processing blocks channel-specifically. The events are signaled with ALARM_8P.
The MOD_D1 block is enabled for running by the higher-level RACK block. The
event to be evaluated is entered in the start and diagnostic information
(CPU_DIAG) of the CPU block. Each signal channel of the module has an input
(MODE_xx). Here the configurations carried out with HW Config are signaled to the
module channels. MODE_xx is read into the low word of the outputOMODE_xx.
This is only carried out during the start-up/initial start or if ACC_MODE = TRUE.
The current value status of the channel is entered in the highest-value byte. If
good, OMODE_xx = 16#80xxxxxx is set.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-47
The following events lead to a value status "invalid value due to higher-level error"
(OMODE_xx = 16#40xxxxxx):
CPU redundancy loss (OB72) (if not switched,
output parameter QRACKF = TRUE)
I/O redundancy error (OB70) (if not switched,
output parameter QRACKF = TRUE)
Rack failure (OB86) (output parameter QRACKF = TRUE)
The above events are evaluated by the RACK block. The following ones by the MOD
block:
I/O access error (OB85) (output parameter QPERAF = TRUE)
Module withdrawn (OB83) (output parameter QMODF = TRUE)
Diagnostic interrupt (OB82) One differentiates between module faults
and channels faults
Module faults are the following events (output parameter QMODF = TRUE):
External auxiliary voltage lacking
Front connector missing
Module not configured
Incorrect parameters in the module
Module missing / incorrect
Communication fault CPU module
Time monitoring triggered (watchdog)
Module-internal supply voltage failed
Rack failure
Processor failure
EPROM fault
RAM fault
ADC/DAC fault
Fuse tripped
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-48 A5E00127662-01
Channel faults are the following events (value status "invalid value", OMODE_xx
= 16#00xxxx):
Configuration and parameterization errors
Common-Mode error, only analog input/output
P short-circuit
M short circuit
Output transistor has a break
Wire breakage
Reference channel error (only analog input)
Measuring range underflow (only analog input)
Measuring range overflow (only analog input)
Load voltage lacking (only analog and digital output)
Sensor supply lacking (only digital output)
Fuse tripped (only digital output)
Ground fault (only digital input/output)
Overtemperature (only digital output)
The events "Module withdrawn", "I/O access error" and "Diagnostic interrupt" are
signaled to WinCC by means of ALARM_8P.
In the case of a diagnostic interrupt a difference is made between module and
channel faults, whereby a message number is assigned to each channel. Only one
event each per channel can be signaled as coming/going. As long as an event of a
channel is active as coming, further events of the same channel are lost.
During starting up the system checks whether the module is available (plugged).
The module state information read here is available in the form of service output
parameters (MOD_INF).
The detailed information on the faults (refer to the reference manual "System
software for S7-300/400 – System- and standard functions", diagnostic data, Byte0
to Byte8, structure of the channel-specific diagnostic data) is entered in the output
parameter DIAG_INF on the data type STRUCT.
Note
Even if you oper ate a HART module in t he HART operat in g MOD E
MODE=16#070C, possible HART protocol errors and re-configurations are
masked by the MOD_D1 driver block and are not signaled as channel errors.
Redundancy
Monitoring of the redundancy of the DP Master systems at an H system is carried
out in the higher-level RACK block.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-49
MODE setti ng
The inputs MODE_xx are available for a maximum of 16 signal channels. The initial
value is "Zero" (no signal). Depending on the signal channel xx you have to set the
type and, if appropriate, the coding of the measuring range of an analog module at
the MODE_xx input.
Refer to MODE
Note
If you change the configuration of the MODE_xx inputs during operation, the
change does not become active until the input ACC_MODE = 1 has been set at
the outputs.
OMODE structure
Refer to OMODE
Addressing
Refer to Addressing
In the case of HART modules which access the process image in reading and
writing mode configuration is carried out as for input modules. It is generally not
permissible to specify different input and output ranges.
Example: SM332 AO 2x0/4..20mA HART 332-5TB00-0AB0:
Address input range
HW Config Address output range
HW Config LADDR
(decimal / hex)
544 544 544 / 16#0220
Error handling
No plausibility checks are carried out with reference to the inputs .
Also refer to: Error information of the output MSG_STAT parameter
Service information
In order to analyze faults you can read the module state information, which is
entered during starting up, via the structured output parameter MOD_INF (refer to
the reference manual "System software for S7-300/400 – System and standard
functions", system state list, module state information).
In addition detailed module diagnostic information is contained in the output
parameters MODDIAG0 to MODDIAG8 after a diagnostic interrupt (refer to the
reference manual "System software for S7-300/400 – System- and standard
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-50 A5E00127662-01
functions", diagnostic data, Byte0 to Byte8). The output parameters CHDIAG00 to
CHDIAG15 contain detailed channel state information (refer to the reference
manual "System software for S7-300/400 – System- and standard functions",
structure of the channel-specific diagnostic data).
The diagnostic information is reset after a going diagnostic interrupt (there are no
channel errors or module faults).
Start-up characteristics
After a restart or an initial start the system checks whether the module is available
under the logical base address. A restart (OB100) is signaled via the LSB in Byte 2
of the outputs OMODE_xx.
Overload behavior
The MOD_D1 block counts the OB82 calls. The counter is reset in the OB1. If more
than two OB82 events occur successively before the cycle checkpoint (OB1) is
reached, these are rejected and a message "Failure OB82 DP Master:x Rack:y
Slot: z" is emitted.
Time response
Does not exist.
Message characteristics
MOD_D1 signals module faults by means of ALARM_8P_1. In addition the
ALARM_8P_2 and ALARM_8P_3 specified for channel faults are called up. The
inputs DELAY1 and DELAY2 are used to delay signaling of the I/O access error.
DELAY1 is used to specify the time in seconds which the block waits after an I/O
access error (OB85) for a higher-level erroe (rack failure or withdrawn/plugged),
before it outputs the message. The message is turned off only when no higher-
level error is detected after the set time expires. DELAY2 determines the number of
seconds which the block waits until it signals the I/O access error still existing after
a higher-level error has passed. Both values have a default value of 2 seconds.
Messaging can be de-activated by using EN_MSG = FALSE.
Operator control and monitoring
The block does not have a faceplate (Display block).
Note
In "Connection of MOD_1 / MOD_2" the variables are identified (with a "+" in the
column OCM ) which are transferred from this instance block to the OS when the
option "Operator C and M capability for diagnostic blocks" in the "Generate
Module Driver" settings is selected. Default: option is not set.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-51
2.10.2 Connections of MOD_D1 / MOD_D2
The connections of the blocks MOD_D1and MOD_D2 are identical with the
exception of the number of the MODE_xx and OMODE_xx. The number of
channels to be monitored determines the number of the respective input and
outputs (xx).
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data type Initial I/O OC&M
ACC_MODE 1=Accept MODE Settings BOOL 0 I/O
CPU_DIAG CPU diagnostics (System structure
)
STRUCT I/O
DELAY1 Alarm Delay 1 (s) INT 2 I
DELAY2 Alarm Delay 2 (s) INT 2 I
DIAG_INF Diagnostic Information STRUCT O
EN_MSG 1=Enable Message BOOL 1 I
EV_IDx Message ID DWORD 0 I
LADDR Logical Address of Module INT 0 I
MOD_INF Module Parameter STRUCT O
MODE_xx Mode Channel xx WORD 0 I
MSG_ACKx Message Acknowledged x WORD 0 O
MSGSTATx Message Failure x WORD 0 O
OMODE_xx Mode Channel xx DWORD 0 O +
QERR 1=Program Error BOOL 0 O
QMODF 1=Module Withdrawn/Out of Order BOOL 0 O +
QPERAF 1=Module I/O Access Failure BOOL 0 O
QRACKF 1=Rack Fail ure BOOL 0 O
RAC_DIAG Rack diagnostic STRUCT I/O
RACK_NO Rack Number BYTE 0 I
SLOT_NO Slot Number BYTE 0 I
SUBN_TYP 1=External DP interface BOOL 0
SUBN1_ID ID of Primary DP master system BYTE 255 I
SUBN2_ID ID of Redundant DP master syst em BYTE 2 55 I
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-52 A5E00127662-01
2.10.3 Message texts and auxiliary process values of MOD_D1
Assignment of message texts and cl asses to the block parameters of MOD_D1
Message
block
ALARM_8P
Message
number Block
parameter Default message text Message
class
EV_ID1 1 QMODF Module @1%d@/@2%d@/@3%d@: withdrawn S
2 QPERAF Module @1%d@/@2%d@/@3%d@: Access
error S
3 QMODF Module @1%d@/@2%d@/@3%d@:
@5W%t#MOD_D1_TXT@ S
4 Module @1%d@/@2%d@/@3%d@:
Multi.Diagnose OB82 lock S
5 BG @1%d@/@2%d@/@3%d@:
@4W%t#MOD_D1_TXT@ S
EV_ID2 1 - Module @1%d@/@2%d@/@3%d@:
Channel 00 @4W%t#MOD_D1_TXT@ S
...
... ...
... ...
...
8 - Module @1%d@/@2%d@/@3%d@:
Channel 07 @10W%t#MOD_D1_TXT@ S
EV_ID3 1 - Module @1%d@/@2%d@/@3%d@:
Channel 08 @4W%t#MOD_D1_TXT@ S
...
... ...
... ...
...
8 - Module @1%d@/@2%d@/@3%d@:
Channel 15 @10W%t#MOD_D1_TXT@ S
The event class/event number, the corresponding message texts and their text
numbers of the text library MOD_D1_TXT are listed in the text library for signal
modules
Note
Detailed channel errors are only registered for modules with channels of channel
type16#61, 16#63, 16#70, 16#71, 16#72, 16#73. Only the first 8 bits are
registered for modules whose diagnostic bits per channel exceed 8 bits.
Non-detailed messages have the following structure (Example): BG 1/2/10: Error
Channel15
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-53
Assignment of the auxiliary process values for the block parameters of MOD_D1
Message
block
ALARM_8P
Auxiliary
process
value
Block parameter Meaning
EV_ID 1 1 MOD_INF.SUBN_ID Number DP Master system (byte)
2 MOD_INF.RACK_NO Rack / Station number (byte)
3 MOD_INF.SLOT_NO Slot number (byte)
4 Text number (Message 1-3) from MOD_D1_TXT
EV_ID 2 1 MOD_INF.SUBN_ID Number DP Master system (byte)
2 MOD_INF.RACK_NO Rack / Station number (byte)
3 MOD_INF.SLOT_NO Slot number (byte)
4 Text number (Message 1-8) from MOD_D1_TXT
EV_ID 3 1 MOD_INF.SUBN_ID Number DP Master system (byte)
2 MOD_INF.RACK_NO Rack / Station number (byte)
3 MOD_INF.SLOT_NO Slot number (byte)
4 Text number (Message 1-8) from MOD_D1_TXT
2.11 MOD_D2: Diagnostic driver for S7-300/400 SM modules
w hich can be diagnosed with 32 channels
2.11.1 MOD_D2: Monitoring of S7-300/400 SM modules which can be
diagnosed with 32 channels
Object name (Type + Number)
FB 94
Area of Application
The block monitors S7-300/400 SM modules with 32 channels maximum which can
be diagnosed (no mixed modules).
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-54 A5E00127662-01
Callin g OBs
The block has to be installed in the following OBs in the run sequence (is carried
out automatically in CFC):
OB1 Cyclic program
OB70 I/O redundancy error
OB72 CPU redundancy error
OB82 Diagnostic interrupt
OB83 Withdrawn/plugged interrupt
OB85 Program execution error
OB86 Rack failure
OB100 Restart (warm start)
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The MOD_D2 block is installed behind the RACK block in the OBs mentioned
above of the respective runtime group of the rack (station).
Configuration of
- The inputs MODE_xx (Mode of channels xx of the module) SUBN1_ID,
SUBN2_ID and SUBN_TYP
- The logical address LADDR of the module.
Interconnection of
- The OUT structures CPU_DIAG of the OB_BEGIN block and RAC_DIAG
of the RACK block with the INOUT structures of the same name of the
MOD_D2.
- The EN input with the output of an AND block, of which the inputs are
interconnected with the outputs EN_SUBx (x = ID of the DP master
system) of the OB_BE G IN block, EN_Rxxx (xxx = Rack/Station ID) of the
subnet block and EN_Mxx (xx = Module ID) of the rack block.
Function and Operating Principle
The block analyzes all the events which affect a module and its channels
acyclically. It forms the MODE and value status (quality code) for the signal
processing blocks channel-specifically. The events are signaled with ALARM_8P.
The signaling function can be switched off.
The block is enabled for running by the higher-level RACK block. The event to be
evaluated is entered in the start and diagnostic information (CPU_DIAG) of the
CPU block. Each signal channel of the module has an input (MODE_xx). Here the
configurations carried out with HW Config are signaled to the module channels.
MODE_xx is read into the low word of the output OMODE_xx. This is only carried
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-55
out during the start-up/initial start or if ACC_MODE = TRUE. The current value
status of the channel is entered in the highest-value byte. If good, OMODE_xx =
16#80xxxxxx is set.
The following events lead to a value status "invalid value due to higher-level error"
(OMODE_xx = 16#40xxxxxx):
CPU redundancy loss (OB72) (if not switched,
output parameter QRACKF = TRUE)
I/O redundancy error (OB70) (if not switched,
output parameter QRACKF = TRUE)
The above events are evaluated by the RACK block. The following ones by the MOD
block:
Rack failure (OB86) (output parameter QRACKF = TRUE)
I/O access error (OB85) (output parameter QPERAF = TRUE)
Module withdrawn (OB83) (output parameter QMODF = TRUE)
Diagnostic interrupt (OB82) One differentiates between module faults
and channels faults
Module faults are the following events (output parameter QMODF = TRUE):
External auxiliary voltage lacking
Front connector missing
Module not configured
Incorrect parameters in the module
Module missing / incorrect
Communication fault CPU module
Time monitoring triggered (watchdog)
Module-internal supply voltage failed
Rack failure
Processor failure
EPROM fault
RAM fault
ADC/DAC fault
Fuse tripped
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-56 A5E00127662-01
Channel faults are the following events (value status "invalid value", OMODE_xx
= 16#00xxxx):
Configuration and parameterization errors
Common-Mode error, only analog input/output
P short-circuit
M short circuit
Output transistor has a break
Wire breakage
Reference channel error (only analog input)
Measuring range underflow (only analog input)
Measuring range overflow (only analog input)
Load voltage lacking (only analog and digital output)
Sensor supply lacking (only digital output)
Fuse tripped (only digital output)
Ground fault (only digital input/output)
Overtemperature (only digital output)
The events "Module withdrawn", "I/O access error" and "Diagnostic interrupt" are
signaled to WinCC by means of ALARM_8P.
In the case of a diagnostic interrupt a difference is made between module and
channel faults, whereby a message number is assigned to each channel. Only one
event each per channel can be signaled as coming/going. As long as an event of a
channel is active as coming, further events of the same channel are lost.
During starting up the system checks whether the module is available (plugged).
The module state information read here is available in the form of service output
parameters (MOD_INF).
The detailed information on the faults (refer to the reference manual "System
software for S7-300/400 – System- and standard functions", diagnostic data, Byte
0 to Byte 8, structure of the channel-specific diagnostic data) is entered in the
output parameter DIAG_INF on the data type STRUCT.
Redundancy
The block supports the line redundancy of the CPU 417H in the case of
decentralized I/Os To this purpose the inputs SUBN1_ID (connection to CPU 0)
and SUBN2_ID (connection to CPU 1) are to be configured with the numbers of the
redundant lines. If there is no line redundancy, the remaining input must have the
value 16#FF (def ault) ass igned.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-57
MODE setti ng
The inputs MODE_xx are available for a maximum of 32 signal channels. The initial
value is zero (no signal). Depending on the signal channel xx you have to set the
type and, if appropriate, the coding of the measuring range of an analog module at
the MODE_xx input.
Refer to MODE
Note
If you change the configuration of the MODE_xx inputs during operation, the
change does not become active until the input ACC_MODE = 1 has been set at
the outputs.
OMODE structure
Refer to OMODE
Addressing
Refer to Addressing
Error handling
No plausibility checks are carried out with reference to the input parameters.
Also refer to: Error information of the output MSG_STAT parameter
Service information
In order to analyze faults you can read the module state information, which is
entered during starting up, via the structured output parameter MOD_INF (refer to
the reference manual "System software for S7-300/400 – System and standard
functions", system state list, module state information).
In addition detailed module diagnostic information is contained in the output
parameters MODDIAG0 to MODDIAG10 after a diagnostic interrupt (refer to the
reference manual "System software for S7-300/400 – System- and standard
functions", diagnostic data, Byte 0 to Byte 10). The output parameters CHDIAG00
to CHDIAG31 contain detailed channel state information (refer to the reference
manual "System software for S7-300/400 – System- and standard functions",
structure of the channel-specific diagnostic data).
The diagnostic information is reset after a going diagnostic interrupt (there are no
channel errors or module faults).
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-58 A5E00127662-01
Start-up characteristics
After a restart or an initial start the system checks whether the module is available
under the logical base address. A restart (OB100) is signaled via the LSB in Byte 2
of the outputs OMODE_xx.
Time response
Does not exist.
Message characteristics
MOD_D2 signals module faults by means of ALARM_8P_1. In addition the
ALARM_8P_2, ALARM_8P_3, ALARM_8P_4 and ALARM_8P_5 specified for
channel faults are called up. The inputs DELAY1 and DELAY2 are used to delay
signaling of the I/O access error. DELAY1 is used to specify the time in seconds
which the block waits after an I/O access error (OB85) for a higher-level error (rack
failure or withdrawn/plugged), before it outputs the message. The message is
turned off only when no higher-level error is detected after the set time expires.
DELAY2 determines the number of seconds which the block waits until it signals
the I/O access error still existing after a higher-level error has passed. Both values
have a default value of 2 seconds.
The message can be turned off with EN_MSG = FALSE.
Operator control and monitoring
The block does not have a faceplate.
Note
In "Connection of MOD_1 / MOD_2" the variables are identified (with a "+" in the
column OCM ) which are transferred from this instance block to the OS when the
option "Operator C and M capability for diagnostic blocks" in the "Generate
Module Driver" settings is selected. Default: option is not set.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-59
2.11.2 Message texts and auxiliary process values of MOD_D2
Assignment of message texts and cl asses to the block parameters of MOD_D2
Message
block
ALARM_8P
Message
number Block
parameter Default message text Message
class
EV_ID1 1 QMODF Module @1%d@/@2%d@/@3%d@: withdrawn S
2 QPERAF Module @1%d@/@2%d@/@3%d@: Access error S
3 QMODF Module @1%d@/@2%d@/@3%d@:
@5W%t#MOD_D2_TXT@ S
4 Module @1%d@/@2%d@/@3%d@:
Multi.Diagnose OB82 lock S
5 BG @1%d@/@2%d@/@3%d@:
@4W%t#MOD_D2_TXT@ S
6- S
7- S
8- S
EV_ID2 1 - Module @1%d@/@2%d@/@3%d@: Channel 00
@4W%t#MOD_D2_TXT@ S
... ...
8 - Module @1%d@/@2%d@/@3%d@: Channel 07
@4W%t#MOD_D2_TXT@ S
EV_ID3 1 - Module @1%d@/@2%d@/@3%d@: Channel 08
@4W%t#MOD_D2_TXT@ S
... ...
8 - Module @1%d@/@2%d@/@3%d@: Channel 15
@4W%t#MOD_D2_TXT@ S
EV_ID4 1 - Module @1%d@/@2%d@/@3%d@: Channel 16
@4W%t#MOD_D2_TXT@ S
... ...
8 - Module @1%d@/@2%d@/@3%d@: Channel 23
@4W%t#MOD_D2_TXT@ S
EV_ID5 1 - Module @1%d@/@2%d@/@3%d@: Channel 24
@4W%t#MOD_D2_TXT@ S
... ...
8 - Module @1%d@/@2%d@/@3%d@: Channel 31
@4W%t#MOD_D2_TXT@ S
The event class/event number, the corresponding message texts and their text
numbers of the text library MOD_D2_TXT are listed in the text library for signal
modules
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-60 A5E00127662-01
Assignment of the auxiliary process values for the block parameters of MOD_D2
Message
block
ALARM_8P
Auxiliary
process
value
Block parameter Meaning
EV_ID1 1 MOD_INF.SUBN_ID DP master system ID (byte)
2 MOD_INF.RACK_NO Rack / Station number (byte)
3 MOD_INF.SLOT_NO Slot number (byte)
4 - Text number (Message 1 - 3) from MOD_D2_TXT
EV_ID2 1 MOD_INF.SUBN_ID DP master system ID (byte)
2 MOD_INF.RACK_NO Rack / Station number (byte)
3 MOD_INF.SLOT_NO Slot number (byte)
4 - Text number (Message 1 - 8) from MOD_D2_TXT
EV_ID3 1 MOD_INF.SUBN_ID DP master system ID (byte)
2 MOD_INF.RACK_NO Rack / Station number (byte)
3 MOD_INF.SLOT_NO Slot number (byte)
4 - Text number (Message 1 - 8) from MOD_D2_TXT
EV_ID4 1 MOD_INF.SUBN_ID DP master system ID (byte)
2 MOD_INF.RACK_NO Rack / Station number (byte)
3 MOD_INF.SLOT_NO Slot number (byte)
4 - Text number (Message 1 - 8) from MOD_D2_TXT
EV_ID5 1 MOD_INF.SUBN_ID DP master system ID (byte)
2 MOD_INF.RACK_NO Rack / Station number (byte)
3 MOD_INF.SLOT_NO Slot number (byte)
4 - Text number (Message 1 - 8) from MOD_D2_TXT
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-61
2.12 CH_AI: Analog value input
Object name (Type + Number)
FC 275
Area of Application
The block is used for signal processing of an analog input value from S7-300/400
SM analog input modules.
Callin g OBs
The calling OB is the watchdog interrupt OB3x into which the block is installed (for
example OB 32).
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The MODE input is interconnected to the corresponding output OMODE_xx of
the MOD block.
Function and Operating principle
The block cyclically processes all the channel-specific signal functions of an analog
input module.
The block reads an analog non-linearized value from the (part) process image and
adapts it to its physical size or determines a percentage value from it. The MODE
input is used to determine in which form the non-linearized value exists and is to be
processed. If the high byte of the MODE input parameter = 16#40 (value status =
higher-level error), the non-linearized value is handled as invalid.
A quality code which can have the following states is generated for the resultant
value
State Quality code
Valid value 16#80
Simulation 16#60
Last valid value 16#44
Substitution value 16#48
Invalid value 16#00
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-62 A5E00127662-01
Addressing
The symbol generated with HW Config (symbol table) for the analog input channel
has to be interconnec te d with the input VA LUE .
Non-linearized value check
Depending on the measured value and the measuring range a nominal range of
the analog input module is obtained by converting the analog signal into a digital
value (non-linearized value). In addition there is an over- and underrange in which
the analog signal can still be converted. There is an overflow or underflow outside
these limits. The block indicates whether the non-linearized value lies inside the
nominal range of the module.
If the value drops below the nominal range, the output parameter value QCHF_LL
= TRUE is set. If the value exceeds the nominal range, the output parameter value
QCHF_HL = TRUE is set.
In case of an overflow or underflow QBAD = TRUE (channel error) is also set.
Note
In case of a wire breakage at 4 to 20 mA signals the module response is not
uniform. Depending on the module either 16#7FFF (overflow) or 16#8000
(underflow) is written as the non-linearized value into the process image. The
channel block CH_AI then correspondingly emits either an overflow (QCHF_HL =
TRUE) or an underflow (QCHF_LL = TRUE), each together with QBAD = TRUE.
Exception: If you have set "Diagnostic interrupt" of the analog input module with
HW Config, only QBAD = TRUE is set at a "Channel error" (for example wire
break) at a diagnostic interrupt.
NAMUR limit check
The NAMUR guidelines for analog signal processing define limits for life zero (4 to
20 mA) analog signals which have a channel error:
3.6 mA = Analog signal = 21 mA
The above NAMUR limits are set as fixed defaults for limit monitoring. If you want
to set other limits, you have to set the inputCH_F_ON = TRUE and set
corresponding new limits in mA at the inputs CH_F_HL and CH_F_LL. If the lower
or upper active limit is exceeded, QBAD = TRUE is set at a life zero analog signal.
Note
The selectable limits must lie below the upper limit of the overrange or above the
lower limit of the underrange of the module. Values outside the NAMUR range are
also possible in as far as the module does not limit the measured values
automat ical ly to t he se.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-63
Normal value
The non-linearized value is adjusted according to ist physical size by the inputs
VLRANGE, VHRANGE and MODE (see also OMODE_xx). The interconnectability
of the settings of VLRANGE and VHRANGE with other block parameters are
determined by the outputs OVLRANGE and OVHRANGE. The conversion
algorithm depends on a linearized input signal. If VLRANGE = 0 and VHRANGE =
100 you get a percentage value. If VHRANGE = VLRANGE is set, you get the the
input signal of the analog input module (e.g. mA) according to the MODE setting. If
the non-linearized value is already a physical value, please set VLRANGE = 0 and
VHRANGE = 1. The Quality Code is set to QUALITY = 16#80.
Note
In the measuring mode "Thermocouples external or internal comparison", the
physiacl size is adjusted to +/- 80 mV in the modules of S7 300. You have to
determine the temperature with reference to the conversion tables concerned.
The physical equivalence in mV is delivered by the module as non-linearized
value, plea se set VHR ANGE and VLR ANG E +/- 80 mV her e.
Simulation
With the input parameter SIM_ON = TRUE, the value of the input SIM_V is given
with Quality Code QUALITY = 16#60. In simulation operation too, a valid operating
mode has to be set in Low Word of the input MODE. Otherwise QBAD = 1 is
output. Simulation has highest priority. If the block is in the simulation status, QSIM
= TRUE is set.
Substitute value
With the input parameter SUBS_ON = TRUE, the value of the input SUBS_V is
output as value, as long as the non-linearized value is invalid. The Quality Code is
set as QUALITY = 16#48 and QBAD = 1.
Hold last value
With input parameter SUBS_ON = FALSE, the last valid output value (V_LAST) is
output, if the non-linearized value is invalid. For V_DELTA > 0, the following
applies:
ABS (V - V_LAST) > V_DELTA: V = V_LAST1 (next to last valid output value)
ABS (V - V_LAST) V_DELTA: V = V_LAST (last valid output value)
The Quality Code is set as QUALITY = 16#44 and QBAD = 1.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-64 A5E00127662-01
Accept value del ay
After restart or if the Quality Code is changed from "BA D" to "GOOD", the Quality
Code and value are not updated until the CNT_LIM cycles have passed. If
CNT_LIM = 0 (Default setting), this function is switched off. During the accept value
delay, the Quality Code = 16#00 and QBAD = 1. The last value remains during the
accept value delay.
Error handling
No plausibility checks are carried out with reference to the input parameters. In
case of invalid operating mode in the low word of the MODE input it is assumed
that the non-linearized value is invalid.
Start-up characteristics
Does not exist.
Time response
Does not exist.
Message characteristics
The block does not have message characteristics.
Operator control and monitoring
The block does not have a faceplate (display block).
2.12.1 Connections of CH_AI
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data type Initial I/O
CH_F_HL High Limit of Input Value (mA) REAL 0 I/O
CH_F_LL Low Limit of Input Value (mA) REAL 0 I/O
CH_F_ON 1=Limit Failure Active BOOL 0 I/O
CNT_LIM Restart Counter Limit INT 0 I/O
CNT_RES Restart Counter INT 0 I/O
DELTA_ON Last Difference (V – V_LAST) exceeded BOOL 0 I/O
LAST_BAD Last QBAD BOOL 0 I/O
MODE Quality and Mode DWORD 0 I/O
OVHRANGE High Range of Process Value (Copy) REAL 0 O
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-65
Connection
(parameter) Meaning Data type Initial I/O
OVLRANGE Low Range of Process Value (Copy) REAL 0 O
QBAD 1=Bad Process Value BOOL 0 O
QCHF_HL 1 = Overdriven Process Value BOOL 0 O
QCHF_LL 1 = Underdriven Process Value BOOL 0 O
QSIM 1 = Simulation Active BOOL 0 O
QSUBS 1 = Failure Substitution Active BOOL 0 O
QUALITY Quality Code of Process Value BYTE 0 O
SIM_ON 1 = Activate Simulation BOOL 0 I/O
SIM_V Simulation Value REAL 0 I/O
SUBS_ON 1 = Enable Failure Substitution BOOL 0 I/O
SUBS_V Substitution Value REAL 0 I/O
VProcess Value REAL 0 O
VALUE Process Image Input Value WORD 0 I/O
VHRANGE High Range of Process Value REAL 100 I/O
VLRANGE Low Range of Process Value REAL 0 I/O
V_DELTA Delta (V - V_LAST) Process Value REAL 0 I/O
V_LAST Last Valid Process Value REAL 0 I/O
V_LAST1 Second-last Valid Process Value REAL 0 I/O
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-66 A5E00127662-01
2.13 CH_AO: Analog value output
Object name (Type + Number)
FC 276
Area of Application
The block is used for signal processing of an analog output value from S7-300/400
SM analog output.
Callin g OBs
The calling OB is the watchdog interrupt OB3x into which the block is installed (for
example OB 32) and the restart OB100.
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The MODE input is interconnected to the corresponding output OMODE_xx of
the MOD block.
The CH_AO block is installed after the MOD block assigned to it in the OB100.
Note
If you do not use the CFC function "Generate Module Driver", you have to ensure
that the CH_AO block is installed after the MOD-/PADP block assigned to it in the
OB100.
Function and Operating principle
The block processes all the channel-specific signal functions.
The block writes a process value as an analog non-linearized value into the (part)
process image. The MODE input is used to determine in which form the non-
lineari ze d val ue is to be generated .
If the high byte of the MODE input = 0 (value status), the non-linearized value
continues to be written into the (part) process image - however, a quality code
"invalid value" is set.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-67
The quality code can have the following states:
State Quality code
Valid value 16#80
Open value limited 16#56
Lower value limited 16#55
Simulation 16#60
Invalid value 16#00
Addressing
The symbol generated with HW Config (symbol table) for the analog output
channel has to be interconnected to the VALUE output .
Normal value
The parameters ULRANGE and UHRANGE map the process value U onto the
non-linearized value VALUE (quantification stages) of the analog output module
depending on the MODE. For example in the mode 4..20mA (16#0203) the non-
linearized value for 4mA is output for U = ULRANGE and the non-linearized value
for 20mA is output for U = UHRANGE.
PHYS_LIM is used to set the limitation of the VALUE non-linearized value. In the
default setting (PHYS_LIM = 0) the VALUE output value is limited to the
normalizing limits of the module. In accordance with the above example the block
calculates the non-linearized value for 20 mA for U > UHRANGE and the non-
linearized value for 4mA for U < ULRANGE Accordingly the quality codes 16#56
(upper value limited) and 16#55 (lower value limited) are applied at the QUALITY
output instead of the 16#80 (valid value).
In order to output analog values outside the normalization values up to the physical
limits of the module, you have to set PHYS_LIM = 1. The output values are not
limited until, in the above example, the module limits are exceeded by specifying U
= 200 (36mA) or U = -50 (-4mA) at ULRANGE = 0 and UHRANGE = 100. The
output values are then limited to the physical limits specified in the data sheets of
the modules and the corresponding quality codes are output.
The outputs QCHF_HL and QCHF_LL also provide information on whether the
output values have been limited.
Simulation
If the input parameter SIM_ON = TRUE, the value of SIM_U is output with Quality
Code (QUALITY) = 16#60. A valid mode must also be set in simulation mode in the
low word of the input MODE. Otherwise QBAD = 1 is output. If there is a higher-
level fault, QBAD = FALSE is set. Simulation has the highest priority. If the block is
in simulation state, QSIM = TRUE is set.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-68 A5E00127662-01
I/O fau lt
If the high byte of the input MODE = 0 (value status), the quality code QUALITY =
16#00 is set. The current non-linearized value is always written into the (part)
process image.
Value limiting
You can limit very low or very high process values which lead to an error (QBAD =
TRUE) before entry in the (part) process image.
If the switch LIMIT_ON = TRUE, the process values (V) are limited:
- To V_HL, if V > V_HL.
- To LL_V, if V < V_LL.
Error handling
No plausibility checks are carried out with reference to the input parameters. In
case of an invalid operating mode in the low word of the MODE input the digitized
output value is set to 0 and QUALITY = 16#00 is output.
Start-up characteristics
The MOD blocks set the LSB in Byte 2 of their output OMODE_xx in the OB100. If
the block recognizes this code, it acknowledges it and then reacts as follows:
If START_ON is not set, the process value U is processed and is transferred to the
process image. Otherwise the non-linearized value corresponding to the START_U
process value is written to the process image.
Time response
Does not exist.
Message characteristics
The block does not have message characteristics.
Operator control and monitoring
The block does not have a faceplate (display block).
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-69
2.13.1 Connections of CH_AO
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data type Initial I/O
LL_V Process value if U < V LL REAL 0 I/O
LIMIT_ON 1 = Limit control process value BOOL 0 I/O
MODE Quality and Mode DWORD 0 I/O
PHYS_LIM 1=Enable Physical Module Limits BOOL 0 I/O
QBAD 1=Bad Output Value BOOL 0 O
QCHF_HL 1 = Process Value High Limit Failure BOOL 0 O
QCHF_LL 1 = Process Value Low Limit Failure BOOL 0 O
QSIM 1 = Simulation Active BOOL 0 O
QUALITY Quality Code of Output Value BYTE 0 O
SIM_ON 1 = Activate Simulation BOOL 0 I/O
SIM_U Simulation Value REAL 0 I/O
START_ON 1=Enable Startup Substitution Value BOOL 0 I/O
START_U Startup Substitution Value REAL 0 I/O
UProcess Value REAL 0 I/O
UHRANGE High Range of Process Value REAL 0 I/O
ULRANGE Low Range of Process Value REAL 0 I/O
V_HL HART high limit value REAL 0 I/O
V_LL HART low limit value REAL 0 I/O
VALUE Process Image Output Value WORD 0 O
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-70 A5E00127662-01
2.14 CH_DI: Digital value input
Object name (Type + Number)
FC 277
Area of Application
The block is used for signal processing of a digital input value from S7-300/400 SM
digital input modules or a PA field device (PA-Profile 3.0 Discrete Input).
Callin g OBs
The calling OB is the watchdog interrupt OB3x into which the block is installed (for
example OB 32).
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The MODE input is interconnected to the corresponding output OMODE_xx of
the MOD block (or of the PADP block).
Function and Operating principle
The block processes all the channel-specific signal functions.
The block reads a digital value of the data type BOOL from the (part) process
image. If the high byte of the input parameter MODE = 16#40 (value status =
higher-level error), the digital value is treated as invalid. If the input parameter PQC
= TRUE, the value status of the digital value is read from the (part) process image.
A quality code which can have the following states is generated for the resultant
value:
State Quality code
Valid value 16#80
Simulation 16#60
Last valid value 16#44
Substitution value 16#48
Invalid value 16#00
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-71
Addressing
The symbol generated with HW Config (symbol table) for the digital input channel
has to be interconnected to the VALUE input. If the value status of the digital input
channel is also in the (part) proces s im age, you have to interc o nnect t he
corresponding symbol with the input VALUE_QC and set the input PQC = TRUE.
In the case of PA field devices (PA_ON = TRUE), the symbol generated with HW
Config (symbol table) for the digital input channel has to be interconnected to the
I_OUT_D input. The CFC function "Generate Module Driver" interconnects the
symbol for the Quality Code of the digital input channel automatically to the input
QC.
Normal value
The digital value of the (part) process image is output to the output parameter Q
with Quality Code QUALITY = 16#80.
Simulation
If the input parameter SIM_ON = TRUE, the value of the input SIM_I (PA_ON =
FALSE) or SIM_OUT (PA_ON = TRUE) is output to the output Q with Quality Code
QUALITY = 16#60. Simulation has the highest priority. If there is a higher-level
fault, QBAD = FALSE is set. If the block is in simulation state, QSIM = TRUE is set.
Substitution value
If the input parameter SUBS_ON = TRUE, the value of the input SUBS_I is output
to the output Q with Quality Code QUALITY = 16#48 and QBAD = 1, in as far as
the digital value of the (part) process image is invalid.
Hold last value
If the input parameter SUBS_ON = FALSE, the last valid output parameter is
output if the non-linearized value is invalid. The Quality Code is set to QUALITY =
16#44 and QBAD = 1.
PA_ON = TRUE
Last valid output value corresponds to V_LAST.
PA_ON = FALSE
Last valid output value corresponds to Q_LAST.
Error handling
No plausibility checks are carried out with reference to the input parameters.
Start-up characteristics
Do not exist.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-72 A5E00127662-01
Time response
Does not exist.
Message characteristics
The block does not have message characteristics.
Operator control and monitoring
The block does not have a faceplate (display block).
2.14.1 Connections of CH_DI
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data type Initial I/O
MODE Quality and Mode DWORD 0 I/O
PQC 1=Use Process Image Quality Bit BOOL 0 I/O
QProcess Value BOOL 0 O
Q_LAST Last Valid Process Value BOOL 0 I/O
QBAD 1=Bad Process Value BOOL 0 I/O
QSIM 1 = Simulation Active BOOL 0 O
QSUBS 1 = Failure Substitution Active BOOL 0 O
QUALITY Quality Code of Process Value BYTE 0 O
SIM_I Simulation Value BOOL 0 I/O
SIM_ON 1 = Activate Simulation BOOL 0 I/O
SUBS_I Substitution Value BOOL 0 I/O
SUBS_ON 1 = Enable Failure Substitution BOOL 0 I/O
VALUE Input Value BOOL 0 I/O
VALUE_QC Process Image Quality Bit BOOL 0 I/O
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-73
2.15 CH_DO: Digital value output
Object name (Type + Number)
FC 278
Area of Application
The block is used for signal processing of a digital output value from S7-300/400
SM digital output modules.
Callin g OBs
The calling OB is the watchdog interrupt OB3x into which the block is installed (for
example OB 32) and the restart OB100.
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The MODE input is interconnected to the corresponding output OMODE_xx of
the MOD block.
The CH_DO block is installed after the MOD block assigned to it in the OB100.
Note
If you do not use the CFC function "Generate Module Driver", you have to ensure
that the CH_DO block is installed after the MOD-/PADP block assigned to it in the
OB100.
Function and Operating principle
The block processes all the channel-specific signal functions.
The block writes a digital value into a (part) process image. If the high byte of the
MODE input parameter = 0 (value status), the digital value continues to be written
into the (part) process image - however, a quality code "invalid value" is set.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-74 A5E00127662-01
The quality code can have the following states:
State Quality code
Valid value 16#80
Simulation 16#60
Invalid value 16#00
Addressing
The symbol generated by HW Config in the symbol table for the digital output
channel has to be interconnected to the VALUE output.
Normal value
The digital value I0 is written to the (part) process image and Quality Code
(QUALITY) = 16#80 is set.
Simulation
If the input parameter SIM_ON = TRUE, the value of the input SIM_I (PA_ON =
FALSE) or SIM_SP (PA_ON = TRUE) is written to the (part) process image and
the Quality Code QUALITY = 16#60 is set. Simulation has the highest priority. If
there is a higher-level error, QBAD = FALSE is set. If the block is in simulation
state, QSIM = TRUE is set.
I/O fau lt
If the high byte of the input MODE = 0 (value status), the quality code QUALITY =
16#00 is set. The current digital value is always written into the (part) process
image.
Error handling
No plausibility checks are carried out with reference to the input parameters.
Start-up characteristics
The MOD blocks set the LSB in Byte 2 of their outputs OMODE_xx in the OB100. If
the block recognizes this code, it acknowledges it and then reacts as follows:
If START_ON is not set, the Process Value I is written to the process image.
Otherwise START_I is used instead of the Process Value I.
Time response
Does not exist.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-75
Message characteristics
The block does not have message characteristics.
Operator control and monitoring
The block does not have a faceplate (display block).
2.15.1 Connections of CH_DO
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data type Initial I/O
IProcess valu e BOOL 0I/O
MODE Quality and Mode DWORD 0 I/O
QBAD 1=Bad Output Value BOOL 0 O
QSIM 1=Simulation Active BOOL 0 O
QUALITY Quality Code of Output Value BYTE 0 O
SIM_I Simulation Value BOOL 0 I/O
SIM_ON 1=Activate Simulation BOOL 0 I/O
START_I Startup Substitution Value BOOL 0 I/O
START_ON 1=Enable Startup Substitution Value BOOL 0 I/O
VALUE Process Image Output Value BOOL 0 O
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-76 A5E00127662-01
2.16 CH_U_AI: Analog value input (Universal )
Object name (Type + Number)
FC 283
Area of application
The block is used for signal processing of a analog input value from S7-300/400
SM analog input modules or a PA field device (PA-Profile 3.0 Analog Input).
Callin g OBs
The calling OB is the watchdog interrupt OB3x into which the block is installed (for
example OB 32)
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The input PA_ON is configured in accordance with the I/O devices used (S7
signal modules (=0) or PA field devices (=1)).
The symbol for the Quality Code of the analog input channel is interconnected
to the input QC (at PA devices).
The MODE input is interconnected to the corresponding output OMODE_xx of
the MOD block (or of the PADP block).
Function and Operating principle
The block processes all the channel-specific signal functions and/or signals of a PA
field device of data type REAL with or without Quality Code cyclically.
The block uses the switch position (input PA_ON) to differentiate between a analog
non-linearized value and a REAL value of a field device with Quality Code(see
Adressing).
PA_ON = TRUE
As the REAL value of a PA field device is always defined with a status byte
(STATUS), PQC = TRUE has to be set.
The statusbyte contains information about the measured value and the status of
the PROFIBUS PA field device. The quality code QUALITY for the process value is
determined from the status of the input MODE and the output STATUS.
PA MODE recognizes a higher level error e.g. DP/PA Link failure via the input
MODE If the high byte of the input MODE = 16#40 (value status = higher-level
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-77
error), the analog value will be handled as invalid. The Quality Code (QUALITY) is
set to 16#44 or 16#48. The same is true for a STATUS with status "BAD".
Otherwise STATUS and QUALITZ are identical.
PA_ON = FALSE
The block reads an analog non-linearized value from a (part) process image and
adjusts ist physical size accordingly or evaluates a process value. The MODE input
determines in which form the non-linearized value appears and to be processed. If
the high byte of the MODE input = 16#40 (value status = higher-level error), the
non-linearized value is set as invalid.
The quality code can have the following states:
State Quality code
Valid value 16#80
Simulation 16#60
Last valid value 16#44
Substitute value 16#48
Invalid value 16#00
Addressing
The symbol generated by HW Config in the symbol table for the analog input
channel has to be interconnected to the VALUE input or (with PA_ON = TRUE)
OUT (process value) and QC (Quality Code). The CFC function “Generate Module
Driver” interconnects the symbol for Quality Code automatically with the QC input.
Non-linearized value check
Only if PA_ON = FALSE: Depending on the measured value and the measuring
range a nominal range of the analog input module is obtained by converting the
analog sign al int o a digit al value (non-li near i zed va lue) . In add iti on there is an over-
and underrange in which the analog signal can still be converted. There is an
overflo w or underf lo w outside these limits . The block indicates wh eth er the non-
linearized value lies inside the nominal range of the module.
If the value drops below the nominal range, the output parameter value QCHF_LL
= TRUE is set. If the value exceeds the nominal range, the output parameter value
QCHF_HL = TRUE is set.
In case of an overflow or underflow QBAD = TRUE (channel error) is also set.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-78 A5E00127662-01
Note
In case of a wire breakage at 4 to 20 mA signals the module response is not
uniform. Depending on the module either 16#7FFF (overflow) or 16#8000
(underflow) is written as the non-linearized value into the process image. The
channel block CH_U_AI then correspondingly emits either an overflow (QCHF_HL
= TRUE) or an underflow (QCHF_LL = TRUE), each together with QBAD = TRUE.
Exception: If you have set "Diagnostic interrupt" of the analog input module with
HW Config, only QBAD = TRUE is set at a "Channel error" (for example wire
break) at a diagnostic interrupt.
NAMUR limit check
Only if PA_ON = FALSE: The NAMUR guidelines for analog signal processing
define limits for life zero (4 to 20 mA) analog signals which have a channel error:
3.6 mA = Analog signal = 21 mA
The above NAMUR limits are set as fixed defaults for limit monitoring. If you want
to set other limits, you have to set the inputsCH_F_ON = TRUE and set
corresponding new limits in mA at the input parameters CH_F_HL and CH_F_LL. If
the lower or upper active limit is exceeded, QBAD = TRUE is set at a life zero
analog signal.
Note
The selectable limits must lie below the upper limit of the overrange or above the
lower limit of the underrange of the module. Values outside the NAMUR range are
also possible in as far as the module does not limit the measured values
automat ical ly to t he se.
Normal value
Only if PA_ON = FALSE: The non-linearized value is adjusted according to ist
physical size by the inputs VLRANGE, VHRANGE and MODE (see also
OMODE_xx). The interconnectability of the settings of VLRANGE and VHRANGE
with other block connections are determined by the outputs OVLRANGE and
OVHRANGE. The conversion algorithm depends on a linearized input signal. If
VLRANGE = 0 and VHRANGE = 100 you get a percentage value. If VHRANGE =
VLRANGE is set, you get the the input signal of the analog input module (e.g. mA)
according to the MODE setting. If the non-linearized value is already a physical
value, please set VLRANGE = 0 and VHRANGE = 1. The Quality Code is set to
QUALITY = 16#80.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-79
Note
In the measuring mode "Thermocouples external or internal comparison", the
physiacl size is adjusted to +/- 80 mV in the modules of S7 300. You have to
determine the temperature with reference to the conversion tables concerned.
The physical equivalence in mV is delivered by the module as non-linearized
value, plea se set VHR ANGE and VLR ANG E +/- 80 mV her e.
Simulation
With the input parameter SIM_ON = TRUE, the value of the input SIM_V is given
with Quality Code QUALITY = 16#60. In simulation operation too, a valid operating
mode has to be set in Low Word of the input MODE. Otherwise QBAD = 1 is
output. If there is a higher-level error, QBAD = FALSE is set. Simulation has
highest priority. If the block is in the simulation status, QSIM = TRUE is set.
Substitute value
With the input parameter SUBS_ON = TRUE, the value of the input SUBS_V is
output as value, as long as the non-linearized value is invalid. The Quality Code is
set as QUALITY = 16#48 and QBAD = 1.
Hold last value
With input parameter SUBS_ON = FALSE, the last valid output value (V_LAST) is
output, if the non-linearized value is invalid. For V_DELTA > 0, the following
applies:
ABS (V - V_LAST) > V_DELTA: V = V_LAST1
(second last valid output value)
ABS (V - V_LAST) V_DELTA: V = V_LAST
(last valid output value)
The Quality Code is set as QUALITY = 16#44 and QBAD = 1.
Accept value del ay
Only if PA_ON = FALSE: After restart or if the Quality Code is changed from "BAD"
to "GOOD", the Quality Code and value are not updated until the CNT_LIM cycles
have passed. If CNT_LIM = 0 (Default setting), this function is switched off. During
the accept value delay, the Quality Code = 16#00 and QBAD = 1. The last value
rem ains during the acc ept value de lay.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-80 A5E00127662-01
Value limiting
If PA_ON = TRUE, you can limit very low or very high process values from the
(part) process image.
If the switch LIMIT_ON = TRUE, the process values (V) are limited:
- To V_HL, if V > V_HL.
- To LL_V, if V < V_LL.
Error handling
No plausibility checks are carried out with reference to the input parameters. In
case of invalid operating mode in the low word of the MODE input it is assumed
that the non-linearized value is invalid.
Start-up characteristics
Does not exist.
Time response
Does not exist.
Message characteristics
The block does not have message characteristics.
Operator control and monitoring
The block does not have a faceplate (display block).
2.16.1 Connections of CH_U_AI
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data type Initial I/O
CH_F_HL Overrange of the Input Value (mA) REAL 0 I/O
CH_F_LL Underrange of the Input Value (mA) REAL 0 I/O
CH_F_ON 1 = Activate Limit-value Monitoring BOOL 0 I/O
CNT_LIM Counter limit INT 0 I/O
CNT_RES Counter INT 0 I/O
PA_ON 1 = Use PA field device in process image BOOL 0 I/O
LAST_BAD Last invalid process value BOOL 0 I/O
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-81
Connection
(parameter) Meaning Data type Initial I/O
LIMIT_ON 1 = Limit value control PA field device process
value BOOL 0 I/O
LL_V Process value, if V < V_LL REAL 0 I/O
MODE Value status and operating mode DWORD 0 I/O
OUT Input value process image REAL 0 I/O
OVHRANGE High limit of the process value (copy) REAL 0 O
OVLRANGE Low limit of the process value (copy) REAL 0 O
PQC 1 = Use value status in process image BOOL 0 I/O
QBAD 1 = P rocess value invalid BOOL 0 O
QC Value status of the input process value BYTE 0 I/O
QCHF_HL 1=Input value high limit failure BOOL 0 O
QCHF_LL 1=Input value low limit failure BOOL 0 O
QSIM 1 = Simulation activ BOOL 0 O
QSUBS 1 = Substitute value switching-in active BOOL 0 O
QUALITY Value status of the process value BYTE 0 O
SIM_ON 1 = Activate simulation BOOL 0 I/O
SIM_V Simulation value REAL 0 I/O
STATUS Status process value BYTE 0 O
SUBS_ON 1 = Enable substitute value switching-in BOOL 0 I/O
SUBS_V Substitute value REAL 0 I/O
VProcess value REAL 0 O
VALUE Input value WORD 0 I/O
VHRANGE Upper limit of the process value REAL 100 I/O
VLRANGE Lower limit of the process value REAL 0 I/O
V_DELTA Difference (V - V_LAST) Process value REAL 0 I/O
V_HL Upper limit value REAL 0 I/O
V_LAST Last valid process value REAL 0 I/O
V_LAST1 Second-last valid process value REAL 0 I/O
V_LL Lower limit value REAL 0 I/O
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-82 A5E00127662-01
2.17 CH_U_AO: Analog value output (Universal )
Object name (Type + Number)
FC 284
Area of application
The block is used for signal processing of a analog input value from S7-300/400
SM analog output modules or a PA field device (PA-Profile 3.0 Analog Output only
output of REAL value (e.g. SP) with Quality Code).
Callin g OBs
The calling OB is the watchdog interrupt OB3x into which the block is installed (for
example OB 32)and the restart OB100
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The input PA_ON is configured in accordance with the I/O devices used (S7
signal modules (=0) or PA field devices (=1)).
The symbol for the Quality Code of the analog output channel is
interconnected to the input QC_SP (at PA devices).
The MODE input is interconnected to the corresponding output OMODE_xx of
the MOD block (or of the PADP block).
The CH_U_AO block is installed after the MOD/PADP block which is assigned
to it in the OB100.
Note
If you do not use the CFC function "Generate Module Driver", you have to ensure
that the CH_U_AO block is installed after the MOD-/PADP block assigned to it in
the OB100.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-83
Function and Operating principle
The block processes all the channel-specific signal functions or the REAL value
with Quality Code cyclically.
The CH_U_AO block uses the switch position (input PA_ON) to differentiate
between an analog non-linearized value and a REAL value with Quality Code of a
PA field device (see Addressing).
PA_ON = TRUE
The REAL value (SP) with Quality Code (ST_SP) of a PA field device is written in
the (part) process image.
PA_ON = FALSE
The block writes the process value as analog non-linearized value in a (part)
process image. The MODE input determines in which form the non-linearized value
is to be created. If the high byte of the MODE input = 0 (value status), the non-
linearized value continues to be written into the (part) process image - however, a
quality code "invalid value" is set.
The quality code can have the following states:
State Quality Code
Valid value 16#80
Upper value limited 16#56
Lower value limited 16#55
Simulation 16#60
Invalid value 16#00
Addressing
The symbol generated by HW Config in the symbol table for the analog output
channel has to be interconnected to the VALUE output .
At PA field devices (PA_ON = TRUE), the symbol for the REAL value with O_SP
output is interconnected with the symbol of the Quality Code with the QC_SP
output . The CFC function “Generate Module Driver” interconnects the symbol for
Quality Code automatically with the QC_SP output.
Normal value
Only if PA_ON = FALSE: The parameters ULRANGE and UHRANGE map the
process value U onto the non-linearized value VALUE (quantification stages) of the
analog output module depending on the MODE. For example in the mode 4..20mA
(16#0203) the non-linearized value for 4mA is output for U = ULRANGE and the
non-linearized value for 20mA is output for U = UHRANGE.
PHYS_LIM is used to set the limitation of the VALUE non-linearized value. In the
default setting (PHYS_LIM = 0) the VALUE output value is limited to the
normalizing limits of the module. In accordance with the above example the block
calculates the non-linearized value for 20 mA for U > UHRANGE and the non-
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-84 A5E00127662-01
linearized value for 4mA for U < ULRANGE Accordingly the quality codes 16#56
(upper value limited) and 16#55 (lower value limited) are applied at the QUALITY
output instead of the 16#80 (valid value).
In order to output analog values outside the normalization values up to the physical
limits of the module, you have to set PHYS_LIM = 1. The output values are not
limited until, in the above example, the module limits are exceeded by specifying U
= 200 (36mA) or U = -50 (-4mA) at ULRANGE = 0 and UHRANGE = 100. The
output values are then limited to the physical limits specified in the data sheets of
the modules and the corresponding quality codes are output.
The outputs QCHF_HL and QCHF_LL also provide information on whether the
output values have been limited.
Simulation
If the input parameter SIM_ON = TRUE, the value of SIM_U is output with Quality
Code (QUALITY) = 16#60. A valid mode must also be set in simulation mode in the
low word of the input MODE. Otherwise QBAD = 1 is output. Simulation has the
highest priority. If there is a higher-level fault, QBAD = FALSE is set. If the block is
in simulation state, QSIM = TRUE is set.
I/O fau lt
If the high byte of the input MODE = 0 (value status), the quality code QUALITY =
16#00 is set. The current non-linearized value is always written into the (part)
process image.
Value limiting
(PA_ON = TRUE) you can limit very low or very high process values which lead to
an error (QBAD = TRUE) before entry in the (part) process image.
If the switch LIMIT_ON = TRUE, the process values (V) are limited:
- To V_HL, if V > V_HL.
- To LL_V, if V < V_LL.
Error handling
No plausibility checks are carried out with reference to the input parameters. In
case of an invalid operating mode in the low word of the MODE input the digitized
output value is set to 0 and QUALITY = 16#00 is output.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-85
Start-up characteristics
The MOD blocks set the LSB in Byte 2 of their outputs OMODE_xx in the OB100. If
the block recognizes this code, it acknowledges it and then reacts as follows:
If START_ON is not set, the process value U is processed and is transferred to the
process image. Otherwise the non-linearized value corresponding to the START_U
process value is written to the process image.
At PA field devices (PA_ON = TRUE), the current REAL value with Quality Code is
written to the process image.
Time response
Does not exist.
Message characteristics
The block does not have message characteristics.
Operator control and monitoring
The block does not have a faceplate.
2.17.1 Connections of CH_U_AO
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data type Initial I/O
LIMIT_ON 1 = Limit value control process value BOOL 0 I/O
LL_V Process value, if U < V_LL REAL 0 I/O
MODE Value status and operating mode DWORD 0 I/O
PA_ON 1 = PA field device, 0 = Signal module BOOL 0 I/O
O_SP Process image Setpoint REAL 0 O
PHYS_LIM 1 = Enable physical module limit values BOOL 0 I/O
QBAD 1 = Invalid output value BOOL 0 O
QCHF_HL 1 = Overdriven process value BOOL 0 O
QCHF_LL 1 = Underdriven process value BOOL 0 O
QC_SP Process image Quality Code Setpoint BYTE 0 O
QSIM 1 = Simulation active BOOL 0 O
QUALITY Value status of the output value BYTE 0 O
SIM_ON 1 = Activate simulation BOOL 0 I/O
SIM_U Simulation value REAL 0 I/O
START_ON 1 = Substitute value switching-in at start-up BOOL 0 I/O
START_U Substitute value at start-up REAL 0 I/O
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-86 A5E00127662-01
Connection
(parameter) Meaning Data type Initial I/O
ST_SP Status Setpoint BYTE 0 I/O
UProcess value REAL 0 I/O
UHRANGE Upper limit of the process value REAL 100 I/O
ULRANGE Lower limit of the process value REAL 0 I/O
VALUE Output value WORD 0 O
V_HL Upper limit value REAL 0 I/O
V_LL Lower limit value REAL 0 I/O
2.18 CH_U_DI: Digital value input (Universal)
Object name (Type + Number)
FC 285
Area of application
The block is used for signal processing of a digital input value from S7-300/400 SM
digital input modules or a PA field device (PA-Profile 3.0 Discrete Input).
Callin g OBs
The calling OB is the watchdog interrupt OB3x into which the block is installed (for
example OB 32).
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The input PA_ON is configured in accordance with the I/O devices used (S7
signal modules (=0) or PA field devices (=1)).
The symbol for the Quality Code of the analog output channel is
interconnected to the input QC (at PA devices).
The MODE input is interconnected to the corresponding output OMODE_xx of
the MOD block (or of the PADP block).
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-87
Function and Operating principle
The block processes all the channel-specific signal functions or a process value
with Quality Code of a PA field device cyclically.
The block uses the switch position (input PA_ON) to differentiate between a digital
value with or without Quality Code of the data type BOOL or a digital value with
Quality Code of the data type BYTE of a PA field device (see Addressing).
PA_ON = TRUE
The block cyclically reads in the (part) process image the process value (OUT_D)
with status byte (STATUS, see Adressing) of the PROFIBUS PA field device
(structure an accordance with the Discrete Input of the PA profiles). The status byte
contains information on the measured value and the state of the PROFIBUS PA
field device.The process value is displayed in the Q output as below:
Q = FALSE, if process value = 0
Q = TRUE, if process value <> 0 If the high byte of the MODE input parameter =
16#40 (value status = higher-level error), the process value and Quality Code are
treated as in PA_ON = FALSE.
The quality code QUALITY for the process value is determined from the status of
the input MODE and the output STATUS. PA MODE recognizes a higher level
error e.g. DP/PA Link failure via the input MODE If the high byte of the input MODE
= 16#80, the values in the (part) process image are valid. If the high byte of the
input MODE = 16#40 (value status = higher-level error), the digital value will be
handled as invalid. The Quality Code (QUALITY) is set to 16#44 or 16#48. The
same is true for a STATUS with status "BAD". Otherwise STATUS and QUALITY
are identical.
PA_ON = FALSE
The block reads a digital value of the data type BOOL from the (part) process
image. If the high byte of the MODE input parameter = 16#40 (value status =
higher-level error), the digital value is treated as invalid. If the input parameter PQC
= TRUE, the value status of the digital value is read in the (part) process image.
The quality code can have the following states:
State Quality Code
Valid value 16#80
Simulation 16#60
Last valid value 16#44
Substitute value 16#48
Invalid value 16#00
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-88 A5E00127662-01
Addressing
The symbol generated with HW Config (symbol table) for the digital input channel
has to be interconnected to the VALUE input. If the value status of the digital input
channel is also in the (part) proces s im age, you have to interc o nnect t he
corresponding symbol with the input VALUE_QC and set the input PQC = TRUE.
In the case of PA field devices (PA_ON = TRUE), the symbol generated with HW
Config (symbol table) for the digital input channel has to be interconnected to the
I_OUT_D input. The CFC function "Generate Module Driver" interconnects the
symbol for the Quality Code of the digital input channel automatically to the input
QC.
Normal value
The digital value of the (part) process image is output to the output Q with Quality
Code QUALITY = 16#80.
Simulation
If the input parameter SIM_ON = TRUE, the value of the input SIM_I (PA_ON =
FALSE) or SIM_OUT (PA_ON = TRUE) is output to the output Q with Quality Code
QUALITY = 16#60. Simulation has the highest priority. If there is a higher-level
fault, QBAD = FALSE is set. If the block is in simulation state, QSIM = TRUE is set.
Substitution value
If the input parameter SUBS_ON = TRUE, the value of the input SUBS_I is output
to the output Q with Quality Code QUALITY = 16#48 and QBAD = 1, in as far as
the digital value of the (part) process image is invalid.
Hold last value
If the input parameter SUBS_ON = FALSE, the last valid output value is output if
the non-linearized value is invalid. The Quality Code is set to QUALITY = 16#44
and QBAD = 1.
Last valid output value corresponds to Q_LAST.
Error handling
No plausibility checks are carried out with reference to the input parameters.
Start-up characteristics
Do not exist.
Time response
Does not exist.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-89
Message characteristics
The block does not have message characteristics.
Operator control and monitoring
The block does not have a faceplate (display block).
2.18.1 Connections of CH_U_DI
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data type Initial I/O
I_OUT_D Input value of the process image BYTE 0 I/O
MODE Value status and operating mode DWORD 0 I/O
OUT_D P rocess value BYTE 0 O
PA_ON 1 = PA field device BOOL 0 I/O
PQC 1 = Use value status in the process image BOOL 0 I/O
QProcess valu e BOOL 0 O
Q_LAST Last valid process value BOOL 0 I/O
QBAD 1 = Invalid process value BOOL 0 I/O
QC Value status in the process image (Symbol) BYTE 0 I/O
QSIM 1 = Simulation active BOOL 0 O
QSUBS 1 = Substitute value switching-in active BOOL 0 O
QUALITY Value status of the process value BYTE 0 O
SIM_I Simulation value BOOL 0 I/O
SIM_ON 1 = Activate simulation BOOL 0 I/O
SIM_OUT Simulation Value BYTE 0 I/O
STATUS Status process value BYTE 0 O
SUBS_I Substitute value BOOL 0 I/O
SUBS_ON 1 = Enable substitute value switching-in BOOL 0 I/O
SUBS_OUT Substitution Value BYTE 0 I/O
V_LAST Last valid process value BYTE 0 I/O
VALUE Input value BOOL 0 I/O
VALUE_QC Value status in the process image BOOL 0 I/O
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-90 A5E00127662-01
2.19 CH_U_DO Digital value output (Universal)
Object name (Type + Number)
FC 286
Area of application
The block is used for signal processing of a digital output value from S7-300/400
SM digital output modules or a PA field device (PA-Profile 3.0 Discrete Input only
SP or RCAS_IN).
Callin g OBs
The calling OB is the watchdog interrupt OB3x into which the block is installed (for
example OB 32) and the restart OB100.
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The input PA_ON is configured in accordance with the I/O devices used (S7
signal modules (=0) or PA field devices (=1)).
The symbol for the Quality Code of the analog output channel is
interconnected to the input QC (at PA devices).
The MODE input is interconnected to the corresponding output OMODE_xx of
the MOD block (or of the PADP block).
The CH_U_DO block is installed after the MOD/PADP block assigned to it in
the OB100.
Note
If you do not use the CFC function "Generate Module Driver", you have to ensure
that the CH_U_DO block is installed after the MOD-/PADP block assigned to it in
the OB100.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-91
Function and Operating principle
The block processes all the channel-specific signal functions or a process value
with Quality Code of a PA field device cyclically.
The block uses the switch position (input PA_ON) to differentiate between a digital
output value without Quality Code of the data type BOOL and a digital output value
with Quality Code of the data type BYTE of a PA field device (see Addressing).
PA_ON = TRUE
The block writes the process value with Quality Code (structure of the process
value corresponds to the Digital Output of the PA Profile, 1 Byte (SP) with 1 Byte
(ST_SP) Quality Code) in a (part) process image. The Quality Code contains
information on the state of the process value. The coding of the Quality Code is
described in the PROFIBUS PA 3.0 "General Requirements".
If the high byte of the MODE input = 16#40 (value status = higher-level error), the
process value with Quality Code continues to be written into the (part) process
image - however, a quality code "invalid value" is set at the block output QUALITY.
PA_ON = FALSE
The block writes a digital value in a (part) process image. If the high byte of the
MODE input = 0 (value status), the digital value continues to be written into the
(part) process image - however, a quality code "invalid value" is set.
The quality code can have the following states:
State Quality Code
Valid value 16#80
Simulation 16#60
Invalid value 16#00
Addressing
The symbol generated with HW Config (symbol table) for the digital output channel
has to be interconnected to the VALUE input.
In the case of PA field devices (PA_ON = TRUE), the symbol generated with HW
Config (symbol table) for the process value with Quality Code has to be
interconnected to the output variable O_SP. The CFC function "Generate Module
Driver" interconnects the symbol for the Quality Code of the analog output channel
automatically to the output QC_SP.
Normal value
The digital value is written to the (part) process image and Quality Code
(QUALITY) = 16#80 is set.
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-92 A5E00127662-01
Simulation
If the input parameter SIM_ON = TRUE, the value of the input SIM_I (PA_ON =
FALSE) or SIM_OUT (PA_ON = TRUE) is written to the (part) process image and
the Quality Code QUALITY = 16#60 is set. Simulation has the highest priority. If
there is a higher-level fault, QBAD = FALSE is set. If the block is in simulation
state, QSIM = TRUE is set.
I/O fau lt
If the high byte of the input parameter MODE = 0 (value status), the quality code
QUALITY = 16#00 is set. The current non-linearized value is always written into the
(part) process image.
Error handling
No plausibility checks are carried out with reference to the input parameters.
Start-up characteristics
The MOD blocks set the LSB in Byte 2 of their outputs OMODE_xx in the OB100. If
the block recognizes this code, it acknowledges it and then reacts as follows:
If START_ON is not set, the process value U is processed and is transferred to the
process image. Otherwise the non-linearized value corresponding to the START_U
process value is written to the process image.
At PA field devices (PA_ON = TRUE), the current BYTE value with Quality Code is
entered in the process image.
Time response
Does not exist.
Message characteristics
The block does not have message characteristics.
Operator control and monitoring
The block does not have a faceplate (display block).
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 2-93
2.19.1 Connections of CH_U_DO
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data type Initial I/O
IProcess valu e BOOL 0I/O
MODE Value status and operating mode DWORD 0 I/O
O_SP Process Image Setpoint BYTE 0 O
PA_ON 1 = PA field device BOOL 0 I/O
QBAD 1 = Invalid output value BOOL 0 O
QC_SP Process Image Quality Code Setpoint BYTE 0 O
QSIM 1 = Simulation active BOOL 0 O
QUALITY Value status of the output value BYTE 0 O
SIM_I Simulation value BOOL 0 I/O
SIM_ON 1 = Activate simulation BOOL 0 I/O
SIM_SP Simulation Setpoint BYTE 0 I/O
SP Setpoint BYTE 0 I/O
ST_SP Status Setpoint BYTE 0 I/O
START_I Substitute value at start-up BOOL 0 I/O
START_ON 1 = Substitute vale switching-in at start-up BOOL 0 I/O
VALUE Outp ut value BOOL 0 O
09.10.2001
Signal blocks and diagnostic drivers
Process Cont rol System PCS 7, Driver Block s
2-94 A5E00127662-01
09.10.2001
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-1
3 PROFIBUS PA blocks
3.1 PA_AI: Analog value i nput PROFIBUS P A
3.1.1 PA_AI: Analog Input PROFIBUS PA
Object name (Type + Number)
FB 101
Area of Application
The block processes (cyclic operation) the PA Profile "Transmitter" of a PA field
device in accordance with PROFIBUS PA 3.0 Class A and B or a main or
secondary variable of a HART analog input module.
Callin g OBs
The calling OB is the watchdog interrupt OB3x, in which you install the block (for
example OB32) and OB1.
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The installation of block in OB1.
The symbol for the Quality Code of the analog input channel is interconnected
to the input QC.
The MODE input is interconnected to the corresponding output OMODE_xx of
the PADP_L0x block.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-2 A5E00127662-01
Function and Operating principle
The block cyclically reads the process value with status byte (STATUS) of the
PROFIBUS PA field device (structure in accordance with the Analog Input of the
PA profiles) from the (part) process image. The process value exists as a physical
value. The status byte contains information on the measured value and the state of
the PROFIBUS PA field device.
In order to improve the interconnectability further important detailed information in
addition to the status byte as Boolean (BOOL) values is supplied at the output
interface. They correspond to the bit combinations specified in the PROFIBUS PA
3.0 "General Requirements". Device-specific control system messages are
generated via ALARM_8P on the basis of the status of the status byte.
The quality code (QUALITY) is determined by the status of the input MODE and
the output STATUS and used as a process value.
The block recognizes a higher-level error (for example failure of DP/PA-Link) via
the MODE input . If the High Byte of the input MODE = 16#80, the values in the
(part) process image are valid. If the high byte of the MODE input = 16#40 (value
status = higher-level error), the analog value is handled as invalid. The Quality
Code (QUALITY) is set to 16#44 or 16#48. The same is also true for a STATUS
with "BAD" status. Otherwise STATUS and QUALITY are identical.
In case of a higher-level error no messages are generated.
The operating mode in the Low Word of the MODE input is not taken into
consideration.
Addressing
The symbol generated with HW Config in the symbol table for the analog input
channel has to be interconnected to the VALUE input. The symbol for the Quality
Code of the analog input channel interconnects the CFC function "Generate
Module Driver" with the input parameter QC for you.
Simulation
If the input parameter SIM_ON = TRUE, the value of the input parameter SIM_V is
output with Quality Code (QUALITY =) 16#60. Simulation has the highest priority. If
there is a higher-level error, QBAD = FALSE is set. If the block is in the simulation
state, QSIM = TRUE is set. If there is no higher-level error and the PA field device
displays a Quality Code “BAD”, either the substitute value SUBS_V (SUBS_ON=
TRUE) or the last value is output.
Substitution value
If the input parameter SUBS_ON = TRUE, the value of the input SUBS_V is output
as the value, in as far as the values are invalid. The Quality Code is set to
(QUALITY =) 16#48 and QBAD = 1.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-3
Hold last value
If the input parameter SUBS_ON = FALSE, the last valid output parameter is
output if the values are invalid. The Quality Code is set to (QUALITY =) 16#44 and
QBAD = 1.
Value limiting
You can limit very low or very high process values from the (part) process image.
If the switch LIMIT_ON = TRUE, the process values (V) are limited:
- To V_HL, if V > V_HL.
- To LL_V, if V < V_LL.
Error handling
No plausibility checks are carried out with reference to the input parameters.
Start-up characteristics
Input MODE = 16#xx01xxxx: Initializ ing ALARM_8P.
Time response
Does not exist.
Message characteristics
As long as there is no higher-level error, the block signals the current state of the
Quality Code (status byte) when there is a change. The messages are event
messages which do not have to be acknowledged and are only stored in the
chronic list of the OS. If the QBAD and QUNCERT outputs are interconnected to
the CSF input (external error) of the technological block, this block generates a
control system message if a malfunction arises.
The DELAY input (default setting 2 seconds) is used to delay an event message
when there is a change in the Quality Code. With DELAY you can specify the
period in seconds which the block waits when there is a change in the Quality
Code after a higher-level error (DP Master system failure, DP/PA-Link failure,
device failure or I/O access error), (MODE = 16#40xxxxxx) has gone, until it emits
the message. Messaging can be de-activated by using EN_MSG = FALSE.
Operator control and monitoring
Does not exist.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-4 A5E00127662-01
3.1.2 Connections of PA_AI
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data type Initial I/O
DELAY Alarm Delay (s) INT 2 I
EN_MSG 1=Enable Alarm BOOL 1 I
EV_ID Event ID DWORD 0 I
LIMIT_ON 1=Limit on Input Value BOOL 0 I
LL_V High Limit Input Value. Set Value if V < V_LL REAL 0 I
MSG_STAT Message Failure of Alarm_8P WORD 0 O
MODE Value status and operating mode DWORD 0 O
QA_1 1 = Alarm/Warning 1 BOOL 0 O
QA_2 1 = Alarm/Warning 2 BOOL 0 O
QBAD 1 = Collected event QBAD_X BOOL 0 O
QBAD_0 1 = Non-specific BOOL 0 O
QBAD_1 1 = Configuration error BOOL 0 O
QBAD_2 1 = Not connected BOOL 0 O
QBAD_3 1 = Device failure BOOL 0 O
QBAD_4 1 = Sensor failure BOOL 0 O
QBAD_5 1 = No communication (last usable value) BOOL 0 O
QBAD_6 1 = No communication (no usable value) BOOL 0 O
QBAD_7 1 = Out of service BOOL 0 O
QBAD_HL 1 = High limit upper physical range of sensor has been
reached BOOL 0 O
QBAD_LL 1 = Low limit lower physical range of sensor has been reached BOOL 0 O
QC Process Image Input Value Quality Code BYTE 0 I
QCASCAD0 1 = OK (cascade) BOOL 0 O
QCASCAD1 1 = Initialization acknowledged BOOL 0 O
QCASCAD2 1 = Initialization request BOOL 0 O
QCASCAD3 1 = Not requested BOOL 0 O
QCASCAD4 1 = Reserved BOOL 0 O
QCASCAD5 1 = Do not select BOOL 0 O
QCASCAD6 1 = Local override BOOL 0 O
QCASCAD7 1 = Reserved BOOL 0 O
QCASCAD8 1 = Initiate fail safe BOOL 0 O
QCONST 1 = Constant BOOL 0 O
QERR 1 = Error output (inverted value of ENO) BOOL 1 O
QOUT_HHL 1 = Active critical alarm, high limit of OUT has been exceeded BOOL 0 O
QOUT_HL 1 = Active advisory alarm, high limit of OUT has been
exceeded BOOL 0 O
QOUT_LL 1 = Active advisory alarm, low limit of OUT has been
exceeded BOOL 0 O
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-5
Connection
(parameter) Meaning Data type Initial I/O
QOUT_LLL 1 = Active critical alarm, low limit of OUT has been exceeded BOOL 0 O
QNONCAS0 1 = OK (non-cascade) BOOL 0 O
QNONCAS1 1 = Update even t BOOL 0 O
QNONCAS2 1 = Active advisory alarm (priority <8) BOOL 0 O
QNONCAS3 1 = Active critical alarm (priority >8) BOOL 0 O
QNONCAS4 1 = Unacknowledged update event BOOL 0 O
QNONCAS1 1 = Active block alarm BOOL 0 O
QNONCAS2 1 = Active advisory alarm (priority <8) BOOL 0 O
QNONCAS3 1 = Active critical alarm (priority >8) BOOL 0 O
QNONCAS4 1 = Unacknowledged block alarm BOOL 0 O
QNONCAS5 1 = Unacknowledged advisory alarm BOOL 0 O
QNONCAS6 1 = Unacknowledged critical alarm BOOL 0 O
QNONCAS7 1 = Initial fail safe BOOL 0 O
QNONCAS8 1 = Maintenance required BOOL 0 O
QSIM 1 = Simulation Active BOOL 0 O
QSUBS 1 = Failure Substitution Active BOOL 0 O
QUALITY Value status of the process value BYTE 0 O
QUNCERT 1 = Collected event QUNCERTx BOOL 0 O
QUNCERT0 1 = Non-specific BOOL 0 O
QUNCERT1 1 = Last usable value BOOL 0 O
QUNCERT2 1 = Substitute set BOOL 0 O
QUNCERT3 1 = Initial value BOOL 0 O
QUNCERT4 1 = Sensor conversion not accurate BOOL 0 O
QUNCERT5 1 = Engineering unit violation (unit not in the valid set) BOOL 0 O
QUNCERT6 1 = Sub-normal BOOL 0 O
QUNCERT7 1 = Configuration error BOOL 0 O
QUNCERT8 1 = Sensor calibration BOOL 0 O
QUNCERT9 1 = Simulated value BOOL 0 O
SIM_ON 1 = Activate Simulation BOOL 0 I
SIM_V Simulation Value REAL 0 I
STATUS Process value status BYTE 0 O
SUBS_ON 1 = Enable Failure Substitution BOOL 0 I
SUBS_V Substitution Value REAL 0 I
VProcess value REAL 0 O
VALUE Process Image Input Value REAL 0 I
V_HL High Limit Input Value REAL 0 I
V_LL Low Limit Input Value REAL 0 I
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-6 A5E00127662-01
3.1.3 Message texts and auxiliary process values of PA_AI
Assignment of message texts and cl asses to the block parameters of PA_AI
Message block
ALARM_8P Message
number Block parameter Default message text Message class
EV_ID 1 QBAD Device error S
2 QUNCERT Uncerta in value S
3 QNONCAS1 Update event S
4 QNONCAS7 Initiate fail safe S
5 QNONCAS8 Maintenance required M
6 QOUT_LLL Lower alarm AL
7 QOUT_HHL Upper alarm AH
8 No message
The block has no auxiliary process values. If QBAD = TRUE because of a higher-
level error, no message is created.
3.2 PA_AO: Analog value output PROFIBUS PA
3.2.1 PA_AO: Analog Output PROFIBUS PA
Object name (Type + Number)
FB 103
Area of Application
The block processes (cyclic operation) the PA Profile "Actuator" of a PA field
device in accordance with PROFIBUS PA 3.0 Class A and B.
Callin g OBs
The calling OB is the watchdog interrupt OB3x, in which you install the block (for
example OB32) and OB1 and the restart OB100.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-7
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The installation of block in OB1 and in OB100.
The symbol for the Quality Code of the analog output channel O_SP is
interconnected to the output QC_SP and other selected options.
The MODE input is interconnected to the corresponding output OMODE_xx of
the PADP_L0x block.
Function and Operating principle
The block reads the user data from the (part) process image and writes them into
the (part) process image depending on the selection (with HW Config or SIMATIC
PDM) of the user data configuration of the PA-Profile "Analog Output" in
accordanc e with PRO FI BUS PA 3.0.
The coding of the set user data configuration of the PROFIBUS PA 3.0 Profile
"Analog Output" is contained in the Low Word of the input variable MODE. This
specifies which variables are to be read and written in the (part) process image.
The block cyclically writes the setpoint (SP) with Quality Code (configuration of the
setpoints and process values in accordance with the Analog Output of the PA
profiles, REAL with 1 byte Quality Code) into the (part) process image. The PA-
Profile contains the setpoint and other analog values as a physical unit. The
Quality Code contains the information on the state of the setpoint. The coding of
the Quality Code is described in the PROFIBUS PA 3.0 "General Requirements".
Optionally the reference variable (RCAS_IN) with Quality Code can be transferred
in the same cycle into the (part) process image.
The data of the PROFIBUS PA field device, as well as the process variable
(READBACK) and the discrete position feedback (POS_D) are read cyclically from
the (part) proces s image. Optionall y you can additional ly read the acti ve ref erenc e
variable (RCAS_OUT) and the detailed device information (CHECKBACK). The
device information is available at the block output in bit-granular form. The data are
read from the (part) process image. In order to improve the interconnectability
important detailed information is offered from the status bytes read (READBACK)
as Boolean (BOOL) values at the output interface. They correspond to the bit
combinations specified in the PROFIBUS PA 3.0 "General Requirements".
If there is a higher-level error, the data continue to be written into the (part) process
image and no data are read from the (part) process image. As long as the higher-
level error exists, the last values are retained with QBAD = TRUE.
Note
Zero is assigned as the initial value to the status byte of the setpoint (ST_SP) and
the reference variable (ST_RCAS_IN). The setpoint or the reference variable only
becomes active in the PROFIBUS PA field device if you set the corresponding
Quality Code to 16#80.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-8 A5E00127662-01
Addressing
You have to interconnect one of the symbols configured with HW Config (for
example SP) for the analog output channel (PROFIBUS PA 3.0 Profile "Analog
Output") with the corresponding connection:
Connection Data type
I_READBACK REAL
I_RCAS_OUT REAL
I_POS_D BYTE
O_SP REAL
O_RCAS_IN REAL
In CFC the "Generate Module Driver" function is used to automatically interconnect
the symbol for the corresponding Quality Code (if it exists) of the connection and
the remaining configured symbols of the analog output channel (with Quality
Code).
Simulation
If the input parameter SIM_ON = TRUE, the value of the input SIM_SP (and the
options SIM_RCAS_IN) is output with Quality Code (QUALITY) = 16#60. A valid
mode must also be set in the simulation mode in the Low Word of the MODE input.
Otherwise QBAD = 1 is output. Simulation has the highest priority. If there is a
higher-level error, QBAD = FALSE is set. If the block is in simulation state, QSIM =
TRUE is set.
Value limiting
You can limit very low or very high process values which lead to an error (QBAD =
TRUE) before entry in the (part) process image.
All the process values (V) (both input and output values) are limited at the switch
LIMIT_ON = TRUE:
- To V_HL, if V > V_HL.
- To LL_V, if V < V_LL.
Error handling
No plausibility checks are carried out with reference to the input parameters.
Start-up characteristics
Input MODE = 16#xx01xxxx: Initializ ing ALARM_8P.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-9
Time response
Does not exist.
Message characteristics
As long as there is no higher-level error, the block signals the state of the Quality
Code (status byte) of READBACK and the state of CHECKBACK when there is a
change. If the options READBACK or CHECKBACK are not activated, no
messages are output.
The messages are event messages which do not have to be acknowledged and
are only stored in the chronic list of the OS. If the QBAD, QCB and QUNCERT
outputs are interconnected to the CSF input (external error) of the technological
block, this block generates a control system message if a malfunction arises.
The DELAY input (default setting 2 seconds) is used to delay an event message
when there is a change in the Quality Code or change in the CHECKBACK state
(only rising edge). With DELAY you can specify the period in seconds which the
block waits after a higher-level error (DP Master system failure, DP/PA-Link failure,
device failure or I/O access error), (MODE = 16#40xxxxxx) has gone, until it emits
the message. Messaging can be de-activated by using EN_MSG = FALSE.
Operator control and monitoring via OS
The block does not have a faceplate.
3.2.2 Connections of PA_AO
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data
type Initial I/O
CHECK_0 Checkback Field Device BYTE 0 I
CHECK_1 Checkback Field Device BYTE 0 I
CHECK_2 Checkback Field Device BYTE 0 I
DELAY Alarm Delay (s) INT 2 I
EN_MSG 1=Enable Alarm BOOL 1 I
EV_ID Event ID DWORD 0 I
I_POS_D The current position of the valve (discrete) (symbol) BYTE 0 I
I_RCAS_OUT Function Block setpoint REAL 0 I
I_READBACK The actual posi tion of the final control element within the travel
span (between OPEN and CLOSE position) in PV units.
(symbol)
REAL 0 I
LIMIT_ON 1=Limit on Input Value BOOL 0 I
LL_V High Limit Input Value. Set Value if V < V_LL REAL I
MODE MODE Input parameter BYTE 0 I/O
MSG_STAT Message Failure WORD 0 O
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-10 A5E00127662-01
Connection
(parameter) Meaning Data
type Initial I/O
O_RCAS_IN Target setpoint provided by a supervisory host to the analog
control or output block (symbol) REAL 0 O
O_SP Setpoint (symbol) REAL 0 O
POS_D The current position of the valve (discrete).
The coding of the POS bytes is as follows:
0 = Not initialized 1 = Closed
2 = Opened 3 = Intermediate
BYTE 0 O
QA_1 1 = Alarm/Warning 1 BOOL 0 O
QA_2 1 = Alarm/Warning 2 BOOL 0 O
QBAD 1 = Collected event QBAD_X BOOL 0 O
QBAD_0 1 = Non-specific BOOL 0 O
QBAD_1 1 = Configuration erro r BOOL 0 O
QBAD_2 1 = Not connected BOOL 0 O
QBAD_3 1 = Device failure BOOL 0 O
QBAD_4 1 = Sensor failure BOOL 0 O
QBAD_5 1 = No communication (last usable value) BOOL 0 O
QBAD_6 1 = No communication (no usable value) BOOL 0 O
QBAD_7 1 = Out of service BOOL 0 O
QCASCAD0 1 = OK (cascade) BOOL 0 O
QCASCAD1 1 = Initialization acknowledged BOOL 0 O
QCASCAD2 1 = Initialization request BOOL 0 O
QCASCAD3 1 = Not requested BOOL 0 O
QCASCAD4 1 = Reserved BOOL 0 O
QCASCAD5 1 = Do not select BOOL 0 O
QCASCAD6 1 = Local override BOOL 0 O
QCASCAD7 1 = Reserved BOOL 0 O
QCASCAD8 1 = Initiate fail safe BOOL 0 O
QCB 1 = CHECKBACK (1 or more bits true) BOOL 0 O
QCB_0 1 = Field device in fail-safe position active BOOL 0 O
QCB_1 1 = Request for local operation BOOL 0 O
QCB_2 1 = Field device under local control, LOCKED OUT switch is in
gear. BOOL 0 O
QCB_3 1 = Emergency override active BOOL 0 O
QCB_4 1 = Actual position feedback different from expected position BOOL 0 O
QCB_5 1 = Indicates that the torque limit in OPEN direction is
exceeded BOOL 0 O
QCB_6 1 = Indicates that the torque limit in CLOSE direction is
exceeded BOOL 0 O
QCB_7 1 = Indicates status of travel monitoring equipment. If YES,
travel time for actuator has exceeded BOOL 0 O
QCB_8 1 = Actuator is moving towards open direction BOOL 0 O
QCB_9 1 = Actuator is moving towards close direction BOOL 0 O
QCB_10 1 = The alert generated by any change to the static data
(Function and Transducer Bl ock) BOOL 0 O
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-11
Connection
(parameter) Meaning Data
type Initial I/O
QCB_11 1 = Simulation of process values is enabled BOOL 0 O
QCB_12 Not used BOOL 0 O
QCB_13 1 = Internal control loop disturbed BOOL 0 O
QCB_14 1 = Positioner inactive (OUT status = BAD) BOOL 0 O
QCB_15 1 = Device under self test BOOL 0 O
QCB_15 1 = Device under self test ( MODE = out of service) BOOL 0 O
QCB_16 1 = Indicates that total valve travel limit is exceeded BOOL 0 O
QCB_17 1 = Indicates that an additional input (i.e. for diagnostics) is
activated BOOL 0 O
QCONST 1 = Consta nt BOOL 0 O
QC_POS_D Quality Code POS BYTE 0 I
QC_RCAS_IN Quality Code RCAS_IN (symbol) BYTE 0 O
QC_RCAS_OU
TQuality Code Function Block Setpoint BYTE 0 I
QC_READBA
CK Quality Code Function Block Setpoint (symbol) BYTE 0 I
QC_SP Quality Code Setpoint (symbol) BYTE 0 O
QERR 1 = Error output (inverted value of ENO) BOOL 1 O
QNONCAS0 1 = OK (non-cascade) BOOL 0 O
QNONCAS1 1 = Update event BOOL 0 O
QNONCAS2 1 = Active advisory alarm (priority <8) BOOL 0 O
QNONCAS3 1 = Active critical alarm (priority >8) BOOL 0 O
QNONCAS4 1 = Unacknowledged update event BOOL 0 O
QNONCAS5 1 = Unacknowledged advisory alarm BOOL 0 O
QNONCAS6 1 = Unacknowledged critical alarm BOOL 0 O
QNONCAS7 1 = Initial fail safe BOOL 0 O
QNONCAS8 1 = Maintenance required BOOL 0 O
QSIM 1=Simulation Active BOOL 0 O
QUNCERT 1 = Collected event QUNCERTx BOOL 0 O
QUNCERT0 1 = Non-specific BOOL 0 O
QUNCERT1 1 = Last usable value B OOL 0 O
QUNCERT2 1 = Substitute set BOOL 0 O
QUNCERT3 1 = Initial value BOOL 0 O
QUNCERT4 1 = Sensor conversion not accurate BOOL 0 O
QUNCERT5 1 = Engineering unit violation (unit not in the val id se t) BOOL 0 O
QUNCERT6 1 = Sub-normal BOOL 0 O
QUNCERT7 1 = Configuration error BOOL 0 O
QUNCERT8 1 = Sensor calibrati on BOOL 0 O
QUNCERT9 1 = Simulated value BOOL 0 O
RCAS_IN Target setpoint provided by a supervisory host to the analog
control or output block REAL 0 I
RCAS_OUT Function Block setpoint REAL 0 O
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-12 A5E00127662-01
Connection
(parameter) Meaning Data
type Initial I/O
READBACK The actual position of the final control element within the travel
span (between OPEN and CLOSE position) in PV units. REAL 0 O
SIM_ON 1 = Active Simulation BOOL 0 I
SIM_SP Simulation Setpoint REAL 0 I
SIM_RCAS_IN Simulation RCAS_IN REAL 0 I
SP Setpoint REAL 0 I
ST_POS_D Status POS BYTE 0 O
ST_READBAC
KFunction Block setpoint status BYTE 0 O
ST_RCAS_IN RCAS_IN status BYTE 0 I
ST_RCAS_OU
TFunction Block setpoint status BYTE 0 O
ST_SP Status setpoint BYTE 0 I
V_HL High Limit Input Value REAL 0 I
V_LL Low Limit Input Value REAL 0 I
3.2.3 Message texts and auxiliary process values of PA_AO
Assignment of message texts and cl asses to the block parameters of PA_AO
Message block
ALARM_8P Message
number Block parameter Default message text Message
class
EV_ID 1 QBAD Device failure S
2 QUNCERT Uncertai n value S
3 QNONC AS1 Update event S
4 QNONCAS7 Initiate fail safe S
5 QNONCAS8 Maintenance required M
6 QCB_0 Field device in fail safe active S
7 QCB_3 or QCB_11 Emergency override active
/Simulation enabled S
8 QCB_4 or QCB_7
or QCB_16 Discrepancy in direction S
The block has no auxiliary process value. If QBAD = TRUE because of a higher-
level error, no message is created.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-13
3.3 P A_DI: Digi tal value input PROFIBUS PA
3.3.1 PA_DI: Discrete Input PROFIBUS PA
Object name (Type + Number)
FB 104
Area of Application
The block is used to cyclically input digital values (Discrete Input) via a PROFIBUS
PA field devic e Clas s A and B.
Callin g OBs
The calling OB is the watchdog interrupt OB3x, in which you install the block (for
example OB32) and OB1.
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The installation of block in OB1.
The symbol for the Quality Code of the digital input channel is interconnected
to the input QC.
The MODE input Setting_PA_MODE is interconnected to the corresponding
output OMODE_xx of the PADP_L0x block.
Function and Operating Principle
The block cyclically reads the process value (OUT_D) with status byte (STATUS)
of the PROFIBUS PA field device (structure an accordance with the Discrete Input
of the PA profiles) from the (part) process image. The status byte contains
information on the measured value and the state of the PROFIBUS PA field device.
The process value and status bytes (total of 2 bytes) are read directly and
coherently as a WORD. Further important detailed information is supplied as
Boolean (BOOL) values at the output interface in addition to the status byte in
order to improve the interconnectability. They correspond to the bit combinations
specified in the PROFIBUS PA 3.0 "General Requirements". Device-specific
process control system messages are generated via ALARM_8P from the status of
the status bytes.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-14 A5E00127662-01
The quality code QUALITY for the process value is determined from the status of
the input MODE and the output STATUS. PA MODE recognizes a higher level
error e.g. DP/PA Link failure via the input MODE If the high byte of the input MODE
= 16#80, the values in the (part) process image are valid. If the high byte of the
input MODE = 16#40 (value status = higher-level error), the digital value will be
handled as invalid. The Quality Code (QUALITY) is set to 16#44 or 16#48. The
same is true for a STATUS with status "BAD". Otherwise STATUS and QUALITY
are identical.
Addressing
The symbol generated with HW Config in the symbol table for the digital input
channel has to be interconnected to the I_OUT_D input. The CFC function
"Generate Module Driver" interconnects the symbol for the Quality Code of the
digital input channel to the input parameter QC.
Simulation
If the input parameter SIM_ON = TRUE, the value of the input SIM_I is output with
Quality Code (QUALITY =) 16#60. Simulation has the highest priority. If there is a
higher-level error, QBAD = FALSE is set. If the block is in simulation state, QSIM =
TRUE is set. If there is no higher-level error and the PA field device displaysa
Quality Code “BAD”, either the substitute value SUBS_I (SUBS_ON= TRUE) or the
last value is outpit .
Substitution value
If the input parameter SUBS_ON = TRUE, the value of the input SUBS_I is output
as the value, in as far as the values are invalid. The Quality Code is set to
(QUALITY =) 16#48 and QBAD = 1.
Hold last value
If the input parameter SUBS_ON = FALSE, the last valid output parameter is
output if the values are invalid. The Quality Code is set to (QUALITY =) 16#44 and
QBAD = 1.
Error handling
No plausibility checks are carried out with reference to the input parameters.
Start-up characteristics
Input MODE = 16#xx01xxxx: Initializ ing ALARM_8P.
Time response
Does not exist.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-15
Message characteristics
As long as there is no higher-level error, the block signals the current state of the
Quality Code (status byte) when there is a change. The messages are event
messages which do not have to be acknowledged and are only stored in the
chronic list of the OS. If the QBAD and QUNCERT outputs are interconnected to
the CSF input (external error) of the technological block, this block generates a
control system message if a malfunction arises.
The DELAY input (default setting 2 seconds) is used to delay an event message
when there is a change in the Quality Code. With DELAY you can specify the
period in seconds which the block waits when there is a change in the Quality
Code after a higher-level error (DP Master system failure, DP/PA-Link failure,
device failure or I/O access error), (MODE = 16#40xxxxxx) has gone, until it emits
the message. Messaging can be de-activated by using EN_MSG = FALSE.
Operator control and monitoring
The block does not have a faceplate.
3.3.2 Connections of PA_DI
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data type Initial I/O
DELAY Alarm Delay (s) INT 2 I
EN_MSG 1=Enable Alarm BOOL 1 I
EV_ID Event ID DWORD 0 I
I_OUT_D Process Image Process Value BYTE 0 I
MODE MODE Input parameter DWORD 0 I/O
MSG_STAT Message Failure WORD 0 O
OUT_D Pr ocess value BYTE 0 O
QA_1 1 = Alarm/Warning 1 BOOL 0 O
QA_2 1 = Alarm/Warning 2 BOOL 0 O
QBAD 1 = Collected event QBAD_X BOOL 0 O
QBAD_0 1 = Non-specific BOOL 0 O
QBAD_1 1 = Configuration error BOOL 0 O
QBAD_2 1 = Not connected BOOL 0 O
QBAD_3 1 = Device failure BOOL 0 O
QBAD_4 1 = Sensor failure BOOL 0 O
QBAD_5 1 = No communication (last usable value) BOOL 0 O
QBAD_6 1 = No communication (no usable value) BOOL 0 O
QBAD_7 1 = Out of service BOOL 0 O
QC Process Image Value Quality Code BYTE 0 I
QCONST 1 = Constant BOOL 0 O
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-16 A5E00127662-01
Connection
(parameter) Meaning Data type Initial I/O
QERR 1 = Error output (inverted value of ENO) BOOL 1 O
QSIM 1=Simulation Active BOOL 0 O
QSUBS 1=Failure Substitution Active BOOL 0 O
QUALITY Value status of the process value BYTE 0 O
QUNCERT 1 = Collected event QUNCERTx BOOL 0 O
QUNCERT0 1 = Non-specific BOOL 0 O
QUNCERT1 1 = Last usable value BOOL 0 O
QUNCERT2 1 = Substitute set BOOL 0 O
QUNCERT3 1 = Initial value BOOL 0 O
QUNCERT4 1 = Sensor conversion not accurate BOOL 0 O
QUNCERT5 1 = En gineering unit vi olation (unit not in the
valid set) BOOL 0 O
QUNCERT6 1 = Sub-normal BOOL 0 O
QUNCERT7 1 = Configuration error BOOL 0 O
QUNCERT8 1 = Sensor calibration BOOL 0 O
QUNCERT9 1 = Simulated value BOOL 0 O
Q0 Process Value Bit 0 BOOL 0 O
Q1 Process Value Bit 1 BOOL 0 O
Q2 Process Value Bit 2 BOOL 0 O
Q3 Process Value Bit 3 BOOL 0 O
Q4 Process Value Bit 4 BOOL 0 O
Q5 Process Value Bit 5 BOOL 0 O
Q6 Process Value Bit 6 BOOL 0 O
Q7 Process Value Bit 7 BOOL 0 O
SIM_I Simulation Value BYTE 0 I
SIM_ON 1 = Activate Simulation BOOL 0 I
STATUS Process Value Status BYTE 0 O
SUBS_I Substitute Value BYTE 0 I
SUBS_ON 1 = Enable failure substitution BOOL 0 I
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-17
3.3.3 Message texts and auxiliary process values of PA_DI
Assignment of message texts and cl asses to the block parameters of PA_DI
Message block
ALARM_8P Message
number Block parameter Default message text Message class
EV_ID 1 QBAD Device failure S
2 QUNCERT Uncertain value S
3 QNONCAS1 Update ev ent S
4 QNONCAS7 Initiate fail safe S
5 QNONCAS8 Maintenance required M
6 No message
7 No message
8 - - No message
The block has no auxiliary process value. If QBAD = TRUE because of a higher-
level error, no message is created.
3.4 PA_DO: Digital value output PROFIBUS PA
3.4.1 PA_DO: Discrete Output PROFIBUS PA
Object name (Type + Number)
FB 105
Area of Application
The block is used to cyclically output digital values (SP or RCAS_IN, max. of 8) via
a PROFIBUS PA field device Class A and B.
Callin g OBs
The calling OB is the watchdog interrupt OB3x, in which you install the block (for
example OB32) and OB1 and the restart OB100.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-18 A5E00127662-01
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The installation of block in OB1 and OB100.
The symbol for the Quality Code of the digital output channel O_SP is
interconnected to the output QC_SP and other selected options.
The MODE input Setting_PA_MODE is interconnected to the corresponding
output OMODE_xx of the PADP_L0x block.
Function and Operating principle
The block reads the user data from the (part) process image and writes them into
the (part) process image depending on the selection (with HW Config or SIMATIC
PDM) of the user data configuration of the PA-Profile "Digital Output" in
accordanc e with PRO FI BUS PA 3.0.
The coding of the set user data configuration of the PROFIBUS PA 3.0 Profile
"Discrete Output" is contained in the Low Word of the input variable MODE. This
specifies which variables are to be read and written in the (part) process image.
The block cyclically writes the setpoint (SP) with Quality Code (configuration of the
setpoints and process values in accordance with the Digital Output of the PA
Profiles, 1 byte with 1 byte Quality Code) into the (part) process image. The Quality
Code contains the information on the state of the setpoint. The coding of the
Quality Code is described in the PROFIBUS PA 3.0 "General Requirements".
Optionally the setpoint in the state RCAS (Remote Cascade) (RCAS_IN) with
Quality Code can be transferred in the same cycle into the (part) process image.
Optionally, the data are read cyclically from the PROFIBUS PA field such as the
state of the valve (READBACK), the process value of the valve setting in the state
RCAS (RCAS_OUT) and the detailed device information (CHECKBACK) from the
(part) process image. The device information is available at the block output in bit-
granular form.
In order to improve the interconnectability important detailed information is offered
from the status bytes read as Boolean (BOOL) values at the output interface. They
correspond to the bit combinations specified in the PROFIBUS PA "General
Requirements". If READBACK and RCAS_OUT exist simultaneously, the detailed
information is derived from the READBACK status byte.
If there is a higher-level error, the data continue to be written into the (part) process
image and no data are read from the (part) process image. As long as the higher-
level error exists, the last values are retained with QBAD = TRUE.
Note
"Zero" is assigned as the initial value to the status byte of the setpoint (ST_SP)
and the reference variable (ST_RCAS_IN). The setpoint or the reference variable
only becomes active in the PROFIBUS PA field device if you set the
corresponding status byte to 16#80.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-19
Addressing
You have to interconnect one of the symbols configured with HW Config (for
example SP) for the digital output channel (PROFIBUS PA 3.0 Profile "Analog
Output") with the corresponding connection:
Connection Data type
I_READBACK BYTE
I_RCAS_OUT BYTE
O_SP BYTE
O_RCAS_IN BYTE
In CFC the "Generate Module Driver" function is used to automatically interconnect
the symbol for the corresponding Quality Code (if it exists) of the connection and
the remaining configured symbols of the digital output channel (with Quality Code).
Simulation
If the input parameter SIM_ON = TRUE, the value of the input SIM_SP (and the
option SIM_RC AS _IN) is output with Qual ity Code (QUALITY) = 16#60. A vali d
mode must also be set in the simulation mode in the Low Word of the MODE input.
Otherwise QBAD = 1 is output. Simulation has the highest priority. If there is a
higher-level error, QBAD = FALSE is set. If the block is in simulation state, QSIM =
TRUE is set.
Error handling
No plausibility checks are carried out with reference to the input parameters.
Start-up characteristics
Input MODE = 16#xx01xxxx: Initializ ing ALARM_8P.
Time response
Does not exist.
Message characteristics
As long as there is no higher-level error, the block signals the state of the Quality
Code (status byte) of READBACK and the state of CHECKBACK when there is a
change. If the options READBACK or CHECKBACK are not activated, no
messages are output.
The messages are event messages which do not have to be acknowledged and
are only stored in the chronic list of the OS. If the QBAD, QCB and QUNCERT
outputs are interconnected to the CSF input (external error) of the technological
block, this block generates a control system message if a malfunction arises.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-20 A5E00127662-01
The DELAY input (default setting 2 seconds) is used to delay an event message
when there is a change in the Quality Code or change in the CHECKBACK state
(only rising edge). With DELAY you can specify the period in seconds which the
block waits after a higher-level error (DP Master system failure, DP/PA-Link failure,
device failure or I/O access error), (MODE = 16#40xxxxxx) has gone, until it emits
the message. Messaging can be de-activated by using EN_MSG = FALSE.
Operator control and monitoring
The block does not have a faceplate.
3.4.2 Connections of PA_DO
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data
type Initial I/O
CHECK_0 Checkback Field Device BYTE 0 I
CHECK_1 Checkback Field Device BYTE 0 I
CHECK_2 Checkback Field Device BYTE 0 I
DELAY Alarm Delay (s) INT 2 I
EN_MSG 1=Enable Alarm BOOL 1 I
EV_ID Event ID DWORD 0 I
I_RCAS_OUT Function Block setpoint BYTE 0 I
I_READBACK Process value (READBACK) (symbol) BYTE 0 I
MODE MODE Input parameter BYTE 0 I/O
MSG_STAT Message Failure WORD 0 O
O_RCAS_IN Process image target setpoint provided by a supervisory host
to the analog control or output block (symbol) BYTE 0 O
O_SP Setpoint (symbol) BYTE 0 OI
QA_1 1 = Alarm/Warning 1 BOOL 0 O
QA_2 1 = Alarm/Warning 2 BOOL 0 O
QBAD 1 = Collected event QBAD_X BOOL 0 O
QBAD_0 1 = Non-specific BOOL 0 O
QBAD_1 1 = Configuration error BOOL 0 O
QBAD_2 1 = Not connected BOOL 0 O
QBAD_3 1 = Device failure BOOL 0 O
QBAD_4 1 = Sensor failure BOOL 0 O
QBAD_5 1 = No communication (last usable value) BOOL 0 O
QBAD_6 1 = No communication (no usable value) BOOL 0 O
QBAD_7 1 = Out of service BOOL 0 O
QCONST 1 = Constant BOOL 0 O
QCB_0 1 = Field device in fail-safe position active BOOL 0 O
QCB_1 1 = Request for local operation at device BOOL 0 O
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-21
Connection
(parameter) Meaning Data
type Initial I/O
QCB_2 1 = Field device under local control BOOL 0 O
QCB_3 1 = Emergency override active BOOL 0 O
QCB_4 1 = The actuator left the final position it had already reached BOOL 0 O
QCB_5 1 = Indicates a lead break of the valve connection BOOL 0 O
QCB_6 1 = Indicates a short circuit of the valve connection BOOL 0 O
QCB_7 Not used BOOL 0 O
QCB_8 1 = Actuator is moving towards open direction BOOL 0 O
QCB_9 1 = Actuator is moving towards close direction BOOL 0 O
QCB_10 1 = The alert generated by any change to the static data of
FB and TB BOOL 0 O
QCB_11 1 = Simulation of process values is enabled BOOL 0 O
QCB_12 Not used BOOL 0 O
QCB_13 1 = Internal control loop disturbed BOOL 0 O
QCB_14 1 = Valve inactive (status OUT_D bad) BOOL 0 O
QCB_15 1 = Device under self test BOOL 0 O
QCB_16 1 = Indicates that total valve travel limit is exceeded BOOL 0 O
QCB_17 1 = Limit for break time of change from OPEN to CLOSE
exceeded BOOL 0 O
QCB_18 1 = Limit for break time of change from CLOSE to OPEN
exceeded BOOL 0 O
QCB_19 1 = Error occurred i n the inte rnal cycle test BOOL 0 O
QCB_20 1 = Limit for time between change from OPEN to CLOSE
exceeded BOOL 0 O
QCB_21 1 = Limit for time between change from CLOSE to OPEN
exceeded BOOL 0 O
QCB_22 1 = Valve blocked mechanically BOOL 0 O
QC_RCAS_IN Quality Code Target Setpoint (symbol) BYTE 0 O
QC_RCAS_OUT Quality Code FB Setpoint (symbol) BYTE 0 I
QC_READBAC
KQuality Code Function Block Setpoint (symbol) BYTE 0 I
QC_SP Quality Code Setpoint (symbol) BYTE 0 O
QERR 1 = Error output (inverted value of ENO) BOOL 1 O
QSIM 1=Simulation Active BOOL 0 O
QSUBS 1=Failure Substitution Active BOOL 0 O
QUNCERT 1 = Collected event QUNCERTx BOOL 0 O
QUNCERT0 1 = Non-specific BOOL 0 O
QUNCERT1 1 = Last usable value BOOL 0 O
QUNCERT2 1 = Substitute set BOOL 0 O
QUNCERT3 1 = Initial value BOOL 0 O
QUNCERT4 1 = Sensor conversion not accurate BOOL 0 O
QUNCERT5 1 = Engineering unit violation (unit not in the val id se t) BOOL 0 O
QUNCERT6 1 = Sub-normal BOOL 0 O
QUNCERT7 1 = Configuration error BOOL 0 O
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-22 A5E00127662-01
Connection
(parameter) Meaning Data
type Initial I/O
QUNCERT8 1 = Sensor calibration BOOL 0 O
QUNCERT9 1 = Simulated value BOOL 0 O
RCAS_IN Target setpoint BYTE 0 I
RCAS_OUT Function Block setpoint BYTE 0 O
READBACK Process Value (READBACK) BYTE 0 O
SIM_ON 1 = Activate simulation BOOL 0 I
SIM_RCAS_IN Simulation target setpoint BYTE 0 I
SIM_SP Simulation Value BYTE 0 I
SP Setpoint REAL 0 I
ST_READBAC
KFunction Block setpoint status BYTE 0 O
ST_RCAS_IN RCAS_IN status BYTE 0 I
ST_RCAS_OUT Function Block setpoint status BYTE 0 O
ST_SP Setpoint status BYTE 0 I
V_HL High Limit Input Value REAL 0 I
V_LL Low Limi t Input Value REAL 0 I
3.4.3 Message texts and auxiliary process values of PA_DO
Assignment of message texts and cl asses to the block parameters of PA_DO
Message block
ALARM_8P Message
number Block parameter Default message text Message
class
EV_ID 1 QBAD Device failure S
2 QUNCERT Uncertai n value S
3 QNONCAS1 Update event S
4 QNONCAS7 Initiate fail safe S
5 QNONCAS8 Maintenance required M
6 QCB_0 Field device in fail safe active S
7 QCB_3 or QCB_11 Emergency override active
/Simulation anabled S
8 QCB_17or QCB_18 or
QCB_20 or QCB_21 Break/Transit time OPEN / CLOSE S
The block has no auxiliary process value. If QBAD = TRUE because of a higher-
level error, no message is created.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-23
3.5 P ADP_L0x: M onitoring of DP/P A slaves
3.5.1 PADP_L00: Monitoring of DP/PA slaves with up to 7 slots
Object name (Type + Number)
FB 109
Area of Application
The block monitors DP/PA field devices which are operated as a DP-V0 or DP-V1
slave behind a DP/PA Y-Link which is operated as a DP-V0 slave. The PA field
devices have to fulfill the PROFIBUS PA V3.0 Profile. For DP field devices
individual blocks have to be available for their diagnostic and signal processing.
Callin g OBs
The block has to be installed in the following OBs in the run sequence (is carried
out automatically in CFC):
OB1 Cyclic program
OB70 I/O redundancy error
OB72 CPU redundancy error
OB82 Diagnostic interrupt
OB85 Program execution error
OB86 Rack failure
OB100 Restart (warm start)
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The PADP_L00 block is installed in the run sequence behind the DPAY_V0
block
Configuration of
- The MODE_xx input (mode of slot xx of a field device).
- The PADP_ADR input (DP/PA Slave address behind DP/PA-Link or Y-
Link).
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-24 A5E00127662-01
Interconnection of
- The inputs to the inputs of the DPAY_V0
- The OUT structure CPU_DIAG of the OB_BEGIN and RAC_DIAG of the
DPAY_V0 block with the INOUT structures of the same name of the
PADP_ L00 bl ock.
Function and Operating Principle
The block acyclically analyzes all the events which concern a DP or PA field device
and its slots. Depending on the slot it forms the respective DP_MODE or
PA_MODE and value status for the DP or PA signal processing blocks. The
permissible PA_MODE is already defined for the PA signal processing blocks. In
the case of DP field devices the DP_MODE has to be defined individually for the
DP field device blocks. The events are signaled with ALARM_8P. The signaling
function can be switched off.
The block is enabled for running by the higher-level DPAY_V0 block. The event to
be evaluated is entered in the start information (CPU_DIAG) of the OB_BEGIN
block.
In diagnostic cases the data are already evaluated by the LINK block (DPAY_V0).
The diagnostic information which concern the PA field device are saved in the
structure DPA_M. The structure consists of two DWORD (S_01 for Module 1 to 16
and S_02 for Module 17 to 32) and one BOOL (S_ERR = DP/PA field device faulty)
variables. Two bits of the DWORD are assigned per slot of the DP/PA field device,
whereby Bit 0 and Bit 1 belong to Slot 1 of the DP/PA field device, etc. The slots 1
to 7 are evaluated. They are defined as follows:
State Bit 0 State Bit 1 Meaning
0 0 Module x OK (valid user data)
0 1 Module x fault (invalid user data)
1 0 Incorrect Module x (invalid user data)
1 1 No Module x (invalid user data)
An input (MODE_xx) exists for every slot (module) of the DP/PA field device. In the
case of PA field devices the configurations carried out with HW Config of the PA
field device slots (modules) are communicated.
In the case of DP field devices the user has to carry out its codings at the MODE
input himsel f.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-25
MODE_xx is read into the low word of the output OMODE_xx. This is only carried
out during the start-up/initial start or if ACC_MODE = TRUE. The current value
status of the slot is entered in the highest-value byte. If good, OMODE_xx =
16#80xxxxxx is set. The following events lead to a value status "Invalid value" due
to hi gher-level error (OMODE_xx = 16#40xxxxxx):
CPU redundancy loss (OB72) (if not switched,
output parameter QRACKF = TRUE)
I/O access error (OB70) (if not switched,
output parameter QRACKF = TRUE)
Rack failure (OB86) (output parameter QRACKF = TRUE)
Diagnostic interrupt concerning a
complete field device (OB82) (output parameter QMODF = TRUE,
if DPA_M.S_ERR = TRUE)
Diagnostic interrupt slot xx concerning
a field device (OB82): (output parameter OMODE_xx =
Module-(slot-)error specific DPA_M)
The above events are evaluated by the DPAY_V0 block.
In the case of a diagnostic interrupt the block signals to the WinCC field-device-
specifically by means of the ALARM_8P. A difference is made between a field
device and its slots, whereby a message number is assigned to each slot.
Redundancy
The redundancy evaluation of the DP Master systems at an H system is carried out
in the higher-level DPAY_V0 block.
MODE Setting for PA-Profiles
PA_MODE
Note
If you change the configuration of the MODE_xx inputs during operation, the
change does not become active until the input ACC_MODE = 1 has been set at
the outputs.
OMODE structure
Refer to OMODE
Error handling
No plausibility checks are carried out with reference to the input parameters.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-26 A5E00127662-01
Start-up characteristics
After a restart or an initial start the system checks whether the PA field device is
available under the logical base address. A restart (OB100) is signaled via the LSB
in Byte 2 of the outputs OMODE_xx.
Time response
Does not exist.
Message characteristics
The block signals field device faults by means of ALARM_8P and creates the
following messages in the OBs listed below:
OB No. Starting event Message
OB1 Cyclic processing Repeat updating ALARM_8P outputs / messages, if necessary
OB82 Diagnostic interrupt Device fault coming/going
Device module xx fault coming/going
Device module xx incorrect coming/going
Device module xx missing coming/going
OB100 Restart Initializing ALARM_8P
Operator control and monitoring
The block does not have a faceplate (display block).
Note
In "Connection of PADP L0x" the variables are identified (with a "+" in the column
OCM ) which are transferred from this instance block to the OS when the option
"Operator C and M capability for diagnostic blocks" in the "Generate Module
Driver" settings is selected. Default: option is not set.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-27
3.5.2 Message texts and auxiliary process values of PADP_L00
Assignment of message texts and cl asses to the block parameters of PADP_L00
Message block
ALARM_8P Message
number Block
parameter Default message text Message
class
EV_ID 1 QMODF Device @1%d@/@2%d@/@3%d@: Failure S
2 - Device @1%d@/@2%d@/@3%d@:
Module 00 @4W%t#PADP_L 00_ TXT@ S
... ...
8 - Device @1%d@/@2%d@/@3%d@:
Module 06 @10W%t#PADP_ L00 _TXT@ S
The message texts and their text numbers in the text library PADP_L00_TXT are
listed in the Text Library for DP-/PA-Slaves after a PA-/Y-LINK DP V0
Assignment of the auxiliary process values for the block parameters of PA_TOT
Message block
ALARM_8P Value Block parameter Meaning
EV_ID 1 SUBN_ID DP master system ID (byte)
2 RACK_NO Rack / Station number (byte)
3 PADP_ADR DP/PA device address (byte)
4 - Text number (Message 2-8) from PADP_L00_TXT
If the PA field device is connected behind a DP/PA-Link V0 which is not connected
and SUBN1_ID = 16#FF, SUBN2_ID is entered as the auxiliary process value.
3.5.3 PADP_L01: Monitoring of DP/PA slaves with up to 16 slots
Object name (Type + Number)
FB 110
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-28 A5E00127662-01
Area of Application
The block monitors DP/PA field devices which are operated as a DP-V0 or DP-V1
slave behind a DP/PA Y-Link which is operated as a DP-V0 slave. The PA field
devices have to fulfill the PROFIBUS PA V3.0 Profile. For DP field devices
individual blocks have to be available for their diagnostic and signal processing.
Callin g OBs
The block has to be installed in the following OBs in the run sequence (is carried
out automatically in CFC):
OB1 Cyclic program
OB70 I/O redundancy error
OB72 CPU redundancy error
OB82 Diagnostic interrupt
OB85 Program execution error
OB86 Rack failure
OB100 Restart (warm start)
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The PADP_L01 block is installed in the run sequence behind the DPAY_V0
block
Configuration of
- The MODE_xx input (mode of slot xx of a field device).
- The PADP_ADR input (DP/PA Slave address behind DP/PA-Link or Y-
Link).
Interconnection of
- The inputs to the inputs of the DPAY_V0
- The OUT structure CPU_DIAG of the OB_BEGIN and RAC_DIAG of the
DPAY_V0 block with the INOUT structures of the same name of the
PADP_ L01 bl ock.
Function and Operating Principle
The block acyclically analyzes all the events which concern a DP or PA field device
and its slots. Depending on the slot it forms the respective DP_MODE or
PA_MODE and value status for the DP or PA signal processing blocks. The
permissible PA_MODE is already defined for the PA signal processing blocks. In
the case of DP field devices the DP_MODE has to be defined individually for the
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-29
DP field device blocks. The events are signaled with ALARM_8P. The signaling
function can be switched off.
The block is enabled for running by the higher-level DPAY_V0 block. The event to
be evaluated is entered in the start information (CPU_DIAG) of the OB_BEGIN
block.
In diagnostic cases the data are already evaluated by the LINK block (DPAY_V0).
The diagnostic information which concern the PA field device are saved in the
structure DPA_M. The structure consists of two DWORD (S_01 for Module 1 to 16
and S_02 for Module 17 to 32) and one BOOL (S_ERR = DP/PA field device faulty)
variables. Two bits of the DWORD are assigned per slot of the DP/PA field device,
whereby Bit 0 and Bit 1 belong to Slot 1 of the DP/PA field device, etc. The slots 1
to 16 are evaluated. They are defined as follows:
State Bit 0 State Bit 1 Meaning
0 0 Module x OK (valid user data)
0 1 Module x fault (invalid user data)
1 0 Incorrect Module x (invalid user data)
1 1 No Module x (invalid user data)
An input (MODE_xx) exists for every slot (module) of the DP/PA field device. In the
case of PA field devices the configurations carried out with HW Config of the PA
field device slots (modules) are communicated.
In the case of DP field devices the user has to carry out its codings at the MODE
input himsel f.
MODE_xx is read into the low word of the outputOMODE_xx. This is only carried
out during the start-up/initial start or if ACC_MODE = TRUE. The current value
status of the slot is entered in the highest-value byte. If good, OMODE_xx =
16#80xxxxxx is set. The following events lead to a value status "Invalid value" due
to hi gher-level error (OMODE_xx = 16#40xxxxxx):
CPU redundancy loss (OB72) (if not switched,
output parameter QRACKF = TRUE)
I/O access error (OB70) (if not switched,
output parameter QRACKF = TRUE)
Rack failure (OB86) (output parameter QRACKF = TRUE)
Diagnostic interrupt concerning a
complete field device (OB82) (output parameter QMODF = TRUE,
if DPA_M.S_ERR = TRUE)
Diagnostic interrupt slot xx concerning
a field device (OB82): (output parameter OMODE_xx =
Module-(slot-)error specific DPA_M)
The above events are evaluated by the DPAY_V0 block.
In the case of a diagnostic interrupt the block signals to the WinCC field-device-
specifically by means of the ALARM_8P. A difference is made between a field
device and its slots, whereby a message number is assigned to each slot.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-30 A5E00127662-01
Redundancy
The redundancy evaluation of the DP Master systems at an H system is carried out
in the higher-level DPAY_V0 block.
MODE Setting for PA-Profiles
PA_MODE
Note
If you change the configuration of the MODE_xx inputs during operation, the
change does not become active until the input ACC_MODE = 1 has been set at
the outputs.
OMODE structure
Refer to OMODE
Error handling
No plausibility checks are carried out with reference to the input parameters.
Start-up characteristics
After a restart or an initial start the system checks whether the PA field device is
available under the logical base address. A restart (OB100) is signaled via the LSB
in Byte 2 of the outputs OMODE_xx.
Time response
Does not exist.
Message characteristics
The block signals field device faults by means of ALARM_8P and creates the
following messages in the OBs listed below:
OB No. Starting event Message
OB1 Cyclic processing Repeat updating ALARM_8P outputs / messages, if necessary
OB82 Diagnostic interrupt Device fault coming/going
Device module xx fault coming/going
Device module xx incorrect coming/going
Device module xx missing coming/going
OB100 Restart Initializing ALARM_8P
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-31
Operator control and monitoring
The block does not have a faceplate (display block).
Note
In "Connection of PADP L0x" the variables are identified (with a "+" in the column
OCM ) which are transferred from this instance block to the OS when the option
"Operator C and M capability for diagnostic blocks" in the "Generate Module
Driver" settings is selected. Default: option is not set.
3.5.4 Message texts and auxiliary process values of PADP_L01
Assignment of message texts and cl asses to the block parameters of PADP_L01
Message block
ALARM_8P Message
number Block
parameter Default message text Message
class
EV_ID1 1 QMODF Device @1%d@/@2%d@/@3%d@:
Failure S
2 - Device @1%d@/@2%d@/@3%d@:
Module 00
@4W%t#PADP_L01_TXT@
S
... ...
8 - Device @1%d@/@2%d@/@3%d@:
Module 06
@10W%t#PADP_L01_TXT@
S
EV_ID2 1 - Device @1%d@/@2%d@/@3%d@:
Module 07
@4W%t#PADP_L01_TXT@
S
... ...
8 - Device @1%d@/@2%d@/@3%d@:
Module 14
@10W%t#PADP_L01_TXT@
S
EV_ID3 1 - Device @1%d@/@2%d@/@3%d@:
Module 15
@5W%t#PADP_L01_TXT@
S
2- -
... ...
8-- -
The message texts and their text numbers in the text library PADP_L01_TXT are
listed in the Text Library for DP-/PA-Slaves after a PA-/Y-LINK DP V0
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-32 A5E00127662-01
Assignment of the auxiliary process values for the block parameters of
PADP_L01
Message block
ALARM_8P Value Block parameter Meaning
EV_ID1 1 SUBN_ID DP master system ID (byte)
2 RACK_NO Rack / Station number (byte)
3 PADP_ADR DP/PA device address (byte)
4 - Text number (Message 2-8) from PADP_L01_TXT
EV_ID2 1 SUBN_ID DP Master system ID(byte)
2 RACK_NO Rack / Station number (byte)
3 PADP_ADR DP/PA device address (byte)
4 - Text number (Message 1-8) from PADP_L01_TXT
EV_ID3 1 SUBN_ID DP master system ID (byte)
2 RACK_NO Rack / Station number (byte)
3 PADP_ADR DP/PA device address (byte)
4 - Text number (Message 1) from PADP_L01_TXT
If the PA field device is connected behind a DP/PA-Link V0 which is not connected
and SUBN1_ID = 16#FF, SUBN2_ID is entered as the auxiliary process value.
3.5.5 PADP_L02: Monitoring of DP/PA slaves with up to 32 slots
Object name (Type + Number)
FB 111
Area of Application
The block monitors DP/PA field devices which are operated as a DP-V0 or DP-V1
slave behind a DP/PA Y-Link which is operated as a DP-V0 slave. The PA field
devices have to fulfill the PROFIBUS PA V3.0 Profile. For DP field devices
individual blocks have to be available for their diagnostic and signal processing.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-33
Callin g OBs
The block has to be installed in the following OBs in the run sequence (is carried
out automatically in CFC):
OB1 Cyclic program
OB70 I/O redundancy error
OB72 CPU redundancy error
OB82 Diagnostic interrupt
OB85 Program execution error
OB86 Rack failure
OB100 Restart (warm start)
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The PADP_L02 block is installed in the run sequence behind the DPAY_V0
block
Configuration of
- The MODE_xx input (mode of slot xx of a field device).
- The PADP_ADR input (DP/PA Slave address behind DP/PA-Link or Y-
Link).
Interconnection of
- The inputs to the inputs of the DPAY_V0
- The OUT structure CPU_DIAG of the OB_BEGIN and RAC_DIAG of the
DPAY_V0 block with the INOUT structures of the same name of the
PADP_ L02 bl ock.
Function and Operating principle
The block acyclically analyzes all the events which concern a DP or PA field device
and its slots. Depending on the slot it forms the respective DP_MODE or
PA_MODE and value status for the DP or PA signal processing blocks. The
permissible PA_MODE is already defined for the PA signal processing blocks. In
the case of DP field devices the DP_MODE has to be defined individually for the
DP field device blocks. The events are signaled with ALARM_8P. The signaling
function can be switched off.
The block is enabled for running by the higher-level DPAY_V0 block. The event to
be evaluated is entered in the start information (CPU_DIAG) of the OB_BEGIN
block.
In diagnostic cases the data are already evaluated by the LINK block (DPAY_V0).
The diagnostic information which concern the PA field device are saved in the
structure DPA_M. The structure consists of two DWORD (S_01 for Module 1 to 16
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-34 A5E00127662-01
and S_02 for Module 17 to 32) and one BOOL (S_ERR = DP/PA field device faulty)
variables. Two bits of the DWORD are assigned per slot of the DP/PA field device,
whereby Bit 0 and Bit 1 belong to Slot 1 of the DP/PA field device, etc. The slots 1
to 32 are evaluated. They are defined as follows:
State Bit 0 State Bit 1 Meaning
0 0 Module x OK (valid user data)
0 1 Module x fault (invalid user data)
1 0 Incorrect Module x (invalid user data)
1 1 No Module x (invalid user data)
An input (MODE_xx) exists for every slot (module) of the DP/PA field device. In the
case of PA field devices the configurations carried out with HW Config of the PA
field device slots (modules) are communicated.
In the case of DP field devices the user has to carry out its codings at the MODE
input himsel f.
MODE_xx is read into the low word of the output OMODE_xx. This is only carried
out during the start-up/initial start or if ACC_MODE = TRUE. The current value
status of the slot is entered in the highest-value byte. If good, OMODE_xx =
16#80xxxxxx is set. The following events lead to a value status "Invalid value" due
to hi gher-level error (OMODE_xx = 16#40xxxxxx):
CPU redundancy loss (OB72) (if not switched,
output parameter QRACKF = TRUE)
I/O access error (OB70) (if not switched,
output parameter QRACKF = TRUE)
Rack failure (OB86) (output parameter QRACKF = TRUE)
Diagnostic interrupt concerning a
complete field device (OB82) (output parameter QMODF = TRUE,
if DPA_M.S_ERR = TRUE)
Diagnostic interrupt slot xx concerning
a field device (OB82): (output parameter OMODE_xx =
Module-(slot-)error specific DPA_M)
The above events are evaluated by the DPAY_V0 block.
In the case of a diagnostic interrupt the block signals to the WinCC field-device-
specifically by means of the ALARM_8P. A difference is made between a field
device and its slots, whereby a message number is assigned to each slot.
Redundancy
The redundancy evaluation of the DP Master systems at an H system is carried out
in the higher-level DPAY_V0 block.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-35
MODE Setting for PA-Profiles
PA_MODE
Note
If you change the configuration of the MODE_xx inputs during operation, the
change does not become active until the input ACC_MODE = 1 has been set at
the outputs.
OMODE structure
Refer to OMODE
Error handling
No plausibility checks are carried out with reference to the input parameters.
Start-up characteristics
After a restart or an initial start the system checks whether the PA field device is
available under the logical base address. A restart (OB100) is signaled via the LSB
in Byte 2 of the outputs OMODE_xx.
Time response
Does not exist.
Message characteristics
The block signals field device faults by means of ALARM_8P and creates the
following messages in the OBs listed below:
OB No. Starting event Message
OB1 Cyclic processing Repeat updating ALARM_8P outputs / messages, if necessary
OB82 Diagnostic interrupt Device fault coming/going
Device module xx fault coming/going
Device module xx incorrect coming/going
Device module xx missing coming/going
OB100 Restart Initializing ALARM_8P
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-36 A5E00127662-01
Operator control and monitoring
The block does not have a faceplate (display block).
Note
In "Connection of PADP L0x" the variables are identified (with a "+" in the column
OCM ) which are transferred from this instance block to the OS when the option
"Operator C and M capability for diagnostic blocks" in the "Generate Module
Driver" settings is selected. Default: option is not set.
3.5.6 Message texts and auxiliary process values of PADP_L02
Assignment of message texts and cl asses to the block parameters of PADP_L02
Message block
ALARM_8P Message
number Block
parameter Default message text Message
class
EV_ID1 1 QMODF Device @1%d@/@2%d@/@3%d@:
Failure S
2 - Device @1%d@/@2%d@/@3%d@:
Module 07
@4W%t#PADP_L02_TXT@
S
3 - Device @1%d@/@2%d@/@3%d@:
Module 15@5W%t#PAD P_L 02_TXT@ S
4 - Device @1%d@/@2%d@/@3%d@:
Module 23@5W%t#PAD P_L 02_TXT@ S
5 - Device @1%d@/@2%d@/@3%d@:
Module 31
@5W%t#PADP_L02_TXT@
S
EV_ID2 1 - Device @1%d@/@2%d@/@3%d@:
Module 00
@4W%t#PADP_L02_TXT@
S
7 - Device @1%d@/@2%d@/@3%d@:
Module 06
@10W%t#PADP_L02_TXT@
S
EV_ID3 1 - Device @1%d@/@2%d@/@3%d@:
Module 08
@4W%t#PADP_L02_TXT@
S
... ...
7 - Device @1%d@/@2%d@/@3%d@:
Module 14
@10W%t#PADP_L02_TXT@
S
EV_ID4 1 - Device @1%d@/@2%d@/@3%d@:
Module 16
@4W%t#PADP_L02_TXT@
S
... ...
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-37
Message block
ALARM_8P Message
number Block
parameter Default message text Message
class
7 - Device @1%d@/@2%d@/@3%d@:
Module 22
@10W%t#PADP_L02_TXT@
S
EV_ID5 1 - Device @1%d@/@2%d@/@3%d@:
Module 24
@4W%t#PADP_L02_TXT@
S
... ...
7 - Device @1%d@/@2%d@/@3%d@:
Module 30
@10W%t#PADP_L02_TXT@
S
The message texts and their text numbers in the text library PADP_L02_TXT are
listed in the Text Library for DP-/PA-Slaves after a PA-/Y-LINK DP V0
Assignment of the auxiliary process values for the block parameters of
PADO_L02
Message block
ALARM_8P Value Block parameter Meaning
EV_ID1 1 SUBN_ID DP master system ID (byte)
2 RACK_NO Rack / Station number (byte)
3 PADP_ADR DP/PA device address (byte)
4 - Text number (Message 2-8) from PADP_L02_TXT
EV_ID2 1 SUBN_ID DP Master system ID(byte)
2 RACK_NO Rack / Station number (byte)
3 PADP_ADR DP/PA device address (byte)
4 - Text number (Message 1-8) from PADP_L02_TXT
EV_ID3 1 SUBN_ID DP master system ID (byte)
2 RACK_NO Rack / Station number (byte)
3 PADP_ADR DP/PA device address (byte)
4 - Text number (Message 1-8) from PADP_L02_TXT
EV_ID4 1 SUBN_ID DP master system ID (byte)
2 RACK_NO Rack / Station number (byte)
3 PADP_ADR DP/PA device address (byte)
4 - Text number (Message 1-8) from PADP_L02_TXT
EV_ID5 1 SUBN_ID DP master system ID (byte)
2 RACK_NO Rack / Station number (byte)
3 PADP_ADR DP/PA device address (byte)
4 - Text number (Message 1) from PADP_L02_TXT
If the PA field device is connected behind a DP/PA-Link V0 which is not connected
and SUBN1_ID = 16#FF, SUBN2_ID is entered as the auxiliary process value.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-38 A5E00127662-01
3.5.7 Connections of PADP_L0x
The connections of the blocks PADP_L00, PADP_L01 and PADP_L02 are identical
with the exception of the number of MODE_xx and OMODE_xx. The number of
slots to be monitored determines the number of the respective input and outputs.
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data type Initial I/O OC&M
ACC_MODE 1=Accept New Mode Settings BOOL 0 I/O
CPU_DIAG CPU diagnostics STRUCT I/O
DPA_M Status Modules of DP/PA Slave STRUCT I
EN_MSG 1=Enable Alarm BOOL 1 I
EV_ID Event ID DWORD 0 I
MODE_xx Mode Channel (xx = 00 – 06 / 00 – 15 / 00 – 31) WORD 0 I
MSG_ACK Message Acknowledged WORD 0 O
MSGSTAT Message Failure WORD 0 O
OMODE_xx Mode Channel (xx = 00 – 06 / 00 – 15 / 00 – 31) DWORD 0 O +
PADP_ADR Address DP/PA field device BYTE 0 I
QERR 1=Program Error BOOL 1 O
QMODF 1=Module Withdrawn / Out of Order BOOL 0 O +
QRACKF 1=Rack/Station fai lure BOO L 0 O
RAC_DIAG 1=DPV1 mode STRUCT I/O
3.6 DPAY_V0: Monitoring of DP/PA-Link and Y-Link as V0
slave
3.6.1 DPAY_V0: Monitoring of DP/PA-Link and Y-Link as V0 slave
Object name (Type + Number)
FB 108
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-39
Area of Application
The block monitors the state of a DP/PA- or Y-Link as a V0 slave (IM157) and
signals the corresponding error events.
The DP/PA-Link is a PA master for the subordinate PA field devices and a slave at
the DP bus. The Y-Link is a DP master for the subordinate DP field devices and a
slave at the higher-l ev el DP bus.
Callin g OBs
The block has to be installed in the following OBs in the run sequence (is carried
out automatically in CFC):
OB1 Cyclic program
OB70 I/O redundancy error
OB72 CPU redundancy error
OB82 Diagnostic interrupt
OB85 Program execution error
OB86 Rack failure
OB100 Restart (warm start)
If the CFC function "Generate Module Driver" is used, the block is installed in the
run sequence behind the SUBNET block and before the PADP_L0x block and
Configured
- RACK_NO (Rack/Station number)
- DADDR (Diagnostic address of the DP/PA-Link or Y-Link)
- DPPA_xx (Slave xx address, 1st module (slot) address of the slave xx in
the link, number of slots of the slave xx)
Interconnection of
- The OUT structures CPU_DIAG of the OB_BEGIN block and SUB_DIAG
of the SUBNET block with the INOUT structures of the same name of the
DPAY_V0.
- In case of PA or DP field devices, PADP_L0x
Function and Operating Principle
The DPAY_V0 block generates a process control system fault message for the OS
in case of redundancy losses and link failures. In addition it indicates faults within
the link (SUBN1ERR, SUBN2ERR) and the preferred channel (SUBN1ACT,
SUBN2ACT) when the links are activated at the output bar. The output structure
RAC_DIAG contains the geographic address of the link as well as the group error
information RACK_ERR. If RACK_ERR = 1, the corresponding link is not available.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-40 A5E00127662-01
The block requires an interfacing to the PROFIBUS DP. This can be integrated
either in the CPU or be effected as an external DP interface (CP). The conversion
of PROFIBUS DP to PROFIBUS PA is carried out by means of a SIMATIC DP/PA-
Link.
All the field devices of a link are only addressed via the DP address of the IM157 at
the higher-level DP bus.
The AS addresses the field devices via the link, meaning indirectly. The topological
structure of the PA bus is mapped in the flat structure of the slave interface. A
maximum of 64 field devices can be operated behind a link. Any number of virtual
slots (maximum of 223) of the link can be assigned per field device. In order to
assign the diagnostic data to the field devices, the block has an input structure
(DPPA_xx) of 3 bytes per field device with the following meaning:
1. Byte (SLAV_NO) = User number (address) of the field device at the PA or DP
Master system of the LINK
2. Byte (SLOT_NO) = 1st module address of the field device in the LINK
3. Byte (SLAV_SL) = Number of slots of the field device
The CFC function "Generate Module Driver" imports these data from HW Config.
The start information is read from the I/O structure CPU_DIAG. It has to be
interconnected to the structure CPU_DIAG of the OB_BEGIN block (is
implemented with the CFC function "Generate Module Driver" for you).
The block generates a corresponding message (see Message behavior) on the
basis of the start information of the calling OBs if the current instance is affected.
The block determines the currently active preferred channel (SUBN1ACT,
SUBN2ACT) in the case of redundant PROFIBUS DP interfaces by evaluating the
error events and, if required, the diagnostic address ADDR of the link.
The diagnostic data (OB82) are read with SFC 13 (DPNRM_DG, Diagnostic data
consistent). The reading process can take several cycles (OB1). In rare cases it is
therefore possible that the triggering diagnostic event cannot be recognized.
The diagnostic user data contain information on the state of the link and the
connected field devices. The state of the link is displayed in the structure
DPPA_ST.
The state of a field device is entered in the structure DPA_M_xx.
A field device can have a maximum of 32 slots (module). Depending on the
number of slots of a field device three block types are available:
PADP_L00 (field device with a maximum of 7 slots)
PADP_L01 (field device with a maximum of 16 slots)
PADP_L02 (field device with a maximum of 32 slots)
The structure DPA_M_xx is interconnected to the structure DPA_M and the output
EN_Mx with EN of one of the PADP_Lxx blocks (is carried out for you by the CFC
function "G en er ate Mod ul e Driver ") .
The structure DPA_M_xx consists of two DWORD (S_01 for Module 1 to 16 and
S_02 for Module 17 to 32) and one BOOL (S_ERR = DP/PA field device faulty).
Two bits of the DWORD are assigned per slot of the DP/PA field device, whereby
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-41
Bit 0 and Bit 1 belong to Slot 1 (Module 1) of the DP/PA field device, etc. They are
defined as follows:
State Bit 0 State Bit 1 Meaning
0 0 Module x OK (valid user data)
0 1 Module x fault (invalid user data)
1 0 Incorrect Module x (invalid user data)
1 1 No Module x (invalid user data)
If the diagnostic interrupt applies for the complete DP/PA field device,
DPA_M_xx.S_ERR = TRUE is set.
If you want to change the inputs of the SUBNET block SUBN1_ID (connection to
CPU 0) and SUBN2_ID (connection to CPU 1) online without using the CFC
function "Generate Module Driver", you have to set the input ACC_ID = TRUE at
the corresponding block. This checks the link states and updates the output values.
Redundancy
The block supports the redundancy of the DP Master systems at an H system (only
distributed I/O devices). To this purpose the inputs of the SUBNET block
SUBN1_ID (connection to CPU 0) and SUBN2_ID (connection to CPU 1) are to be
configured with the numbers of the redundant DP Master systems. If there is no
redundancy of the DP Master systems, the remaining input must have the value
16#FF (default) assigned.
Error handling
Error handling of the block is limited to the error information of ALARM_8P.
Refer to Error information of the MSG_STAT output parameter
Start-up characteristics
The block initializes the messages of ALARM_8P. A check whether the link is
available is carried out. In the case of H systems the preferred channel of the links
is determined.
Overload behavior
The block counts the OB86 (no DP Master system failure, see SUBNET block) and
OB82 calls. Both counters are reset in the OB1. If more than two OB86s or more
than two OB82 events occur successively before the cycle checkpoint (OB1) is
reached, these are rejected and either the message "Failure OB86 DP Master:x
Rack:y" or the message "Failure OB82 DP Master:x Rack:y Slot: z" is emitted. If an
OB86 is rejected, the DP/PA-Link / Y-Link is registered as failed. If an OB82 is
rejected, the corresponding DP Slave is registered as failed.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-42 A5E00127662-01
Time response
Does not exist
Message characteristics
After it has been called up by OB70, OB72, OB85 or OB86, the block analyses the
state of the CPU, DP Master and link assigned to it. If necessary, it generates the
corresponding messages for redundancy loss and failure of the link by emitting an
ALARM_8P.
The block generally only signals events whose cause lies within the link monitored
by it. Redundancy losses and link failures which result from the failure of a DP
Master or of a CPU, are initially neither signaled nor indicated at the outputs
SUBN1ERR and SUBN2ERR.
The DELAY input allows a signal delay, which can be configured, for an outgoing
higher-order error. If, for example, the block recognizes an outgoing error in a DP
master connected to it, it initially assumes that there is a faulty assigned DP slave
in the link monitored by it and sets the corresponding output SUBNxERR. The error
is not canceled until the DP slave returns (in this case: OB86, OB70). The blocks
suppress the potential slave failure for DELAY seconds in order not to trigger a
wave of messages from the DP slaves which are not synchronized yet after the
master returns. An error message is not output to the OS unless a DP slave does
not report its return before this period expires.
You should not set the value of DELAY too high. Otherwise DP slaves which were
removed during the master failure or which are defective will be reported back to
the OS after the master returns with a correspondingly high delay period.
The block generates the following messages in the OBs listed below:
OB No. Starting event Message
OB1 Cyclic processing Repeat updating ALARM_8P outputs / messages, if necessary
OB70 Redundancy loss Link redundancy loss/return
OB85 I/O access error Link failure going
OB86 Rack monitoring Link failure coming/going
OB100 Restart Initializing ALARM_8P
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-43
Operator control and monitoring
The block does not have a faceplate.
Note
In "Connection of DPAY V0" the variables are identified (with a "+" in the column
OCM ) which are transferred from this instance block to the OS when the option
"Operator C and M capability for diagnostic blocks" in the "Generate Module
Driver" settings is selected. Default: option is not set.
3.6.2 Connections of DPAY_V0
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data
type Initial I/O OC&
M
ACC_ID 1=Accept New ID Settings BOOL 0 I/O
CPU_DIAG CPU diagnostics STRUCT I/O
DADDR Diagnostic Address of DP-Slave INT 0 I
DELAY Ala rm Delay (s) I NT 15 I
DPA_M_xx Status Modules of DP/PA Slave (xx = 00 – 63) STRUCT O
DPPA_ST DP/PA-/Y-Link Status STRUCT O
DPPA_xx Information of DP/PA-Slave (xx = 00 - 63) STRUCT I
EN_MSG 1=Enable Alarm BOOL 1 I
EN_Mxx 1=Enable module (xx = 00 - 63) BOOL 0 O
EV_ID Event ID DWORD 0 I
MSG_STAT Message Failure WORD 0 O
RAC_DIAG Rack diagnostic BOOL 0 O
RACK_NO Rack/Station Number WORD 0 I
SUB_DIAG OB_Start Information STRUCT I/O
SUBN_TYP 1=External DP interface BOOL 0 I
SUBN1_ID ID of Primary Subnet BYTE 255 I
SUBN1ACT 1 = Slave 1 Active BOOL 0 O +
SUBN1ERR 1 = Subnet Failure of Primary Subnet BOOL 0 O +
SUBN2_ID ID of Redundant Subnet BYTE 255 I
SUBN2ACT 1 = Slave 2 Active BOOL 0 O +
SUBN2ERR 1 = Subnet Failure of Primary Subnet BOOL 0 O +
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-44 A5E00127662-01
3.6.3 Message texts and auxiliary process values of DPAY_V0
Assignment of message text and message class
Message No. Default message text Message class
1 DP-Link @1%d@/ @3%d@: Redundancy loss S
2 DP-Link @2%d@/ @3%d@: Redundancy loss S
3 DP-Link @1%d@/ @3%d@: Failure S
4 DP-Link @2%d@/ @3%d@: Failure S
5- -
6- -
7- -
8- -
Assignment of the auxiliary values
Value Block parameter
1 Primary DP Master system ID (SUBN1_ID)
2 Redundant DP Master system ID (SUBN2_ID)
3 Rack/Station number (RACK_NO)
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-45
3.7 PA_TOT: Totalizer PROFIBUS PA
Object name (Type + Number)
FB 102
Area of Application
The block processes the cyclic parameters of the PA Profile "Totalizer" of a PA
field device in accordance with PROFIBUS PA 3.0 Class A and B.
Callin g OBs
The calling OB is the watchdog interrupt OB3x, in which you install the block (for
example OB32) and OB1 and the restart OB100.
Use in the CFC
If the CFC function "Generate Module Driver" is used, the following steps are
carried out automatically:
The installation of block in OB1 and OB100.
The symbol for the Quality Code of the analog input channel is interconnected
to the input QC and other selected options.
The MODE input is interconnected to the corresponding output OMODE_xx of
the PADP_L0x block.
Function and Operating principle
The block cyclically reads the process value (TOTAL) with status byte (Quality
Code) of the PROFIBUS PA field device (structure in accordance with the Totalizer
of the PA profiles) from the (part) process image. The process value exists as a
physical value. The status byte contains information on the measured value and
the state of the PROFIBUS PA field device or HART device.
In order to improve the interconnectability further important detailed information in
addition to the status byte as Boolean (BOOL) values is supplied at the output
interface. They correspond to the bit combinations specified in the PROFIBUS PA
3.0 "General Requirements". Device-specific control system messages are
generated via ALARM_8P on the basis of the status of the status byte.
The quality code QUALITY for the process value is determined from the status of
the input MODE and the output STATUS. PA MODE recognizes a higher level
error e.g. DP/PA Link failure via the input MODE The block recognizes a higher-
level error (for example failure of DP/PA-Link) via the MODE input MODE. If the
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-46 A5E00127662-01
High Byte of the input MODE = 16#80, the values in the (part) process image are
valid. If the High Byte of the MODE input = 16#40 (value status = higher-level
error), the analog value is handled as invalid. The Quality Code (QUALITY) is set
to 16#44 or 16#48. The same is true for a STATUS with status "BAD". Otherwise
STATUS and QUALITY are identical.
In case of a higher-level error no messages are generated
Optionally the input variables SET_TOT and MODE_TOT can be written to the
(part) process image.
Addressing
The symbol generated with HW Config in the symbol table for the analog input
channel has to be interconnected to the TOTAL input . The symbol for the Quality
Code of the analog input channel interconnects the CFC function "Generate
Module Driver" with the input QC and, as far as they exist, the outputsO_SET_TOT
and O_MODE_TOT for you.
Simulation
If the input parameter SIM_ON = TRUE, the value of the input SIM_V is output with
Quality Code (QUALITY =) 16#60. Simulation has the highest priority. If there is a
higher-level error, QBAD = FALSE is set. If the block is in simulation state, QSIM =
TRUE is set. If there is no higher-level error and the PA field device displays a
Quality Code “BAD”, either the substitute value SUBS_V (SUBS_ON= TRUE) or
the last value is output.
Substitution value
If the input parameter SUBS_ON = TRUE, the value of the input parameter
SUBS_V is output as the value, in as far as the values are invalid. The Quality
Code is set to (QUALITY =) 16#48 and QBAD = 1.
Hold last value
If the input parameter SUBS_ON = FALSE, the last valid output parameter is
output if the values are invalid. The Quality Code is set to (QUALITY =) 16#44 and
QBAD = 1.
Value limiting
You can limit very low or very high process values from the (part) process image.
If the switch LIMIT_ON = TRUE, the process values (V) are limited:
- To V_HL, if V > V_HL.
- To LL_V, if V < V_LL.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-47
Error handling
No plausibility checks are carried out with reference to the input parameters.
Start-up characteristics
Input MODE = 16#xx01xxxx: Initializ ing ALARM_8P.
Time response
Does not exist.
Message characteristics
As long as there is no higher-level error, the block signals the current state of the
Quality Code (status byte) when there is a change. The messages are event
messages which do not have to be acknowledged and are only stored in the
chronic list of the OS. If the QBAD and QUNCERT outputs are interconnected to
the CSF input (external error) of the technological block, this block generates a
control system message if a malfunction arises.
The DELAY input (default setting 2 seconds) is used to delay an event message
when there is a change in the Quality Code. With DELAY you can specify the
period in seconds which the block waits when there is a change in the Quality
Code after a higher-level error (DP Master system failure, DP/PA-Link failure,
device failure or I/O access error), (MODE = 16#40xxxxxx) has gone, until it emits
the message. Messaging can be de-activated by using EN_MSG = FALSE.
Operator control and monitoring
The block does not have a faceplate.
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-48 A5E00127662-01
3.7.1 Connections of PA_TOT
The state of delivery of the block display in the CFC is marked in the "Connection"
column: Connection name bold = Connection displayed, normal = Not displayed.
Connection
(parameter) Meaning Data type Initial I/O
DELAY Alarm Delay (s) INT 2 I
EN_MSG 1=Enable Alarm BOOL 1 I
EV_ID Event ID DWORD 0 I
LIMIT_ON 1=Limit on Input Value BOOL 0 I
LL_V High Limit Input Value. Set Value if V < V_LL REAL 0 I
MODE MODE Input parameter DWORD 0 I/O
MODE_TOT Mode Totalizer 0=Balanced, 1=pos_only, 2=neg_only, 3=hold BYTE 0 I
MSG_STAT Message Failure WORD 0 O
O_SET_TOT Totalize Algorithm BYTE 0 O
O_MODE_TOT Totalizer Mode BYTE 0 O
QA_1 1 = Alarm/Warning 1 BOOL 0 O
QA_2 1 = Alarm/Warning 2 BOOL 0 O
QBAD 1 = Collected event QBAD_X BOOL 0 O
QBAD_0 1 = Non-specific BOOL 0 O
QBAD_1 1 = Configuration error BOOL 0 O
QBAD_2 1 = Not connected BOOL 0 O
QBAD_3 1 = Device failure BOOL 0 O
QBAD_4 1 = Sensor failure BOOL 0 O
QBAD_5 1 = No communication (last usable value) BOOL 0 O
QBAD_6 1 = No communication (no usable value) BOOL 0 O
QBAD_7 1 = Out of service BOOL 0 O
QBAD_HL 1 = High limit upper physica l range of sensor has been
reached BOOL 0 O
QBAD_LL 1 = Low limit lower physi cal range of sensor has been reached BOOL 0 O
QC Input Process Value Quality Code BYTE O I
QCASCAD0 1 = OK (cascade) BOOL 0 O
QCASCAD1 1 = Initialization acknowledged BOOL 0 O
QCASCAD2 1 = Initialization request BOOL 0 O
QCASCAD3 1 = Not requested BOOL 0 O
QCASCAD4 1 = Reserved BOOL 0 O
QCASCAD5 1 = Do not select BOOL 0 O
QCASCAD6 1 = Local override BOOL 0 O
QCASCAD7 1 = Reserved BOOL 0 O
QCASCAD8 1 = Initiate fail safe BOOL 0 O
QCONST 1 = Constant BOOL 0 O
QERR 1 = Error output (inverted value of ENO) BOOL 1 O
QOUT_HHL 1 = Active critical alarm, high limit of OUT has been exceeded BOOL 0 O
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 3-49
Connection
(parameter) Meaning Data type Initial I/O
QOUT_HL 1 = Active advisory alarm, high limit of OUT has been
exceeded BOOL 0 O
QOUT_LL 1 = Active advisory alarm, low limit of OUT has been
exceeded BOOL 0 O
QOUT_LLL 1 = Active critical alarm, low limit of OUT has been exceeded BOOL 0 O
QNONCAS0 1 = OK (non-cascade) BOOL 0 O
QNONCAS1 1 = Update event BOOL 0 O
QNONCAS2 1 = Active advisory alarm (priority <8) BOOL 0 O
QNONCAS3 1 = Active critical alarm (priority >8) BOOL 0 O
QNONCAS4 1 = Unacknowledged update event BOOL 0 O
QNONCAS5 1 = Unacknowledged advisory alarm BOOL 0 O
QNONCAS6 1 = Unacknowledged critical alarm BOOL 0 O
QNONCAS7 1 = Initial fail safe BOOL 0 O
QNONCAS8 1 = Maintenance required BOOL 0 O
QSIM 1 = Simulation Active BOOL 0 O
QSUBS 1 = Failure Substitution Active BOOL 0 O
QUALITY Value status of the process value BYTE 0 O
QUNCERT 1 = Collected event QUNCERTx BOOL 0 O
QUNCERT0 1 = Non-specific BOOL 0 O
QUNCERT1 1 = Last usable value BOOL 0 O
QUNCERT2 1 = Substitute set BOOL 0 O
QUNCERT3 1 = Initial value BOOL 0 O
QUNCERT4 1 = Sensor conversion not accurate BOOL 0 O
QUNCERT5 1 = Engineering unit violation (unit not in the valid set) BOOL 0 O
QUNCERT6 1 = Sub-normal BOOL 0 O
QUNCERT7 1 = Configuration error BOOL 0 O
QUNCERT8 1 = Sensor calibration BOOL 0 O
QUNCERT9 1 = Simulated value BOOL 0 O
SET_TOT Algorithm 0=Totalize, 1=Reset assign 0, 2=preset assign
PRESET_TOT BYTE 0 I
SIM_ON 1 = Activate Simulation BOOL 0 I
SIM_V Simulation Value REAL 0 I
STATUS Process Value Status BYTE 0 O
SUBS_ON 1 = Enable Failure Substitution BOOL 0 I
SUBS_V Substitution Value REAL 0 I
TOTAL Input Value REAL 0 I
VProcess Value REAL 0 O
V_HL High Limit Input Value REAL 0 I
V_LL Low Limit Input Value REAL 0 I
09.10.2001
PROFIBUS PA blocks
Process Cont rol System PCS 7, Driver Block s
3-50 A5E00127662-01
3.7.2 Message texts and auxiliary process values of PA_TOT
Assignment of message texts and cl asses to the block parameters of PA_ TOT
Message block
ALARM_8P Message
number Block parameter Default message text Message class
EV_ID 1 QBAD Device failure S
2 QUNCERT Uncerta in value S
3 QNONCAS1 Update event S
4 QNONCAS7 Initiate fail safe S
5 QNONCAS8 Maintenance required M
6 QOUT_LLL Lower alarm AL
7 QOUT_HHL Upper alarm AH
8No message
09.10.2001
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 A-1
A Appendix
A.1 Addressing
If you do not use the CFC function "Generate Module Driver", you have to set the
logical basic address of the module created with HW Config at the input LADDR. If
the input SUBN_TYP = FALSE, the RACK of the module is connected to an
integrated DP interface (distributed I/O device interface) of the CPU module by
means of a line. Otherwise set SUBN_TYP = TRUE.
The following points are generally to be observed for all the SM and PA modules:
In the case of pure input modules, that is modules which write data exclusively
into the input range of the CPU process image the basic address can be taken
directly from HW Config.,
for exam ple: the m odule SM 331 AI 8x 12 Bit 33 1-7KF0 1- 0A B0 :
Address input range HW
Config Address output range HW
Config LADDR
(decimal / hex)
512 - 512 / 16#0200
In the case of pure output modules, that is modules which read data
exclusively from the output range of the CPU process image, the MSB (most
significant bit) has to be set in the basic address from HW Config.;
for example the module SM332 AO 4x12Bit 332-5HD01-0AB0:
Address input range HW
Config Address output range HW
Config LADDR
(decimal / hex)
- 512 -32256 / 16#8200
04.10.200104.10.200104.10.200109.10.200109.10.2001
Appendix
Process Cont rol System PCS 7, Driver Block s
A-2 A5E00127662-01
A.2 Error information of the MSG_STAT output parameter
The messages can be de-activated via the input EN_MSG = FALSE (output
parameter MSG_STAT(_x) remains unchanged).
The ALARM8_P(_x) block is called in the acyclic OBs and OB1 if message
suppression has not been suppressed Error information of the ALARM_8P(_x)
(messages cannot be emitted) is displayed in the output parameter
MSG_STAT(_x).
The error information of the output parameter MSG_STAT and of the
acknowledgment word MSG_ACK(_x) of ALARM8_8P is described in the on-line
help for SSFB35 (ALARM_8P).
A. 3 MODE settings for Signal Modules
Measuring range coding of the analog input module
Depending on the coding of the measuring range of the analog input modules, the
parameter MODE_xx (measuring range coding) corresponding to the channel must
be specified in accordance with the table. When thermoelements are used (due to
the various combinations of the measuring type (Coding A) with the measuring
range (Coding B)) this is to be calculated in accordance with the following formula
and the result then entered as an INTEGER value at the MODE input:
MODE = 256 Coding A + Coding B
Please note that in the table Codings A and B are binary e nc ode d and that the
result is shown as the MODE parameter as a hexadecimal number.
Measuring type Coding (A) Measuring range Coding
(B) MODE
(256A+B)
Voltage 2#0001 ± 25 mV 2#1010 16#010A
± 50 mV 2#1011 16#010B
± 80 mV 2#0001 16#0101
± 250 mV 2#0010 16#0102
± 500 mV 2#0011 16#0103
± 1 V 2#0100 16#0104
± 2.5 V 2#0101 16#0105
± 5 V 2#0110 16#0106
1 to 5 V 2#0111 16#0107
± 10 V 2#1001 16#0109
± 100 V 2#1100 16#010C
4-wire measuring transducer 2#0010 ± 3.2 mA 2#0000 16#0200
± 5 mA 2#0101 16#0205
± 10 mA 2#0001 16#0201
0 to 20 mA 2#0010 16#0202
4 to 20 mA 2#0011 16#0203
± 20 mA 2#0100 16#0204
04.10.200104.10.200104.10.200109.10.200109.10.2001
Appendix
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 A-3
Measuring type Coding (A) Measuring range Coding
(B) MODE
(256A+B)
HART interface 2#0111 4 to 20 mA 2#1100 16#070C
2-wire measuring transducer 2#0011 4 to 20 mA 2#0011 16#0303
Resistor 4-wire connection 2#0100 48 2#0000 16#0400
150 2#0010 16#0402
300 2#0100 16#0404
600 2#0110 16#0406
6000 2#1000 16#0408
Resistor 3-wire connection 2#0101 48 2#0000 16#0500
150 2#0010 16#0502
300 2#0100 16#0504
600 2#0110 16#0506
6000 2#1000 16#0508
Resistor 2-wire connection 2#0110 48 2#0000 16#0600
150 2#0010 16#0602
300 2#0100 16#0604
600 2#0110 16#0606
6000 2#1000 16#0608
Thermal resistor + linearization
4-wire connection 2#1000 Pt 100 climate range 2#0000 16#0800
Pt 200 climate range 2#0111 16#0807
Pt 500 climate range 2#1000 16#0808
Pt 1000 climate range 2#1001 16#0809
Ni 100 climate range 2#0001 16#0801
Ni 1000 climate range 2#1010 16#080A
Pt 100 standard range 2#0010 16#0802
Pt 200 standard range 2#0011 16#0803
Pt 500 standard range 2#0100 16#0804
Pt 1000 standard range 2#0101 16#0805
Ni 100 standard range 2#1011 16#080B
Ni 1000 standard range 2#0110 16#0806
Ni 120 standard range 2#1100 16#080C
Ni 120 climate range 2#1101 16#080D
Cu10 climate range 2#1110 16#080E
Cu10 standard range 2#1111 16#080F
Ni 200 standard range 2#10000 16#0810
Ni 200 climate range 2#10001 16#0811
Ni 500 standard range 2#10010 16#0812
Ni 500 climate range 2#10011 16#0813
Thermal resistor + linearization
3-wire connection 2#1001 Pt 100 climate range 2#0000 16#0900
Pt 200 climate range 2#0111 16#0907
Pt 500 climate range 2#1000 16#0908
04.10.200104.10.200104.10.200109.10.200109.10.2001
Appendix
Process Cont rol System PCS 7, Driver Block s
A-4 A5E00127662-01
Measuring type Coding (A) Measuring range Coding
(B) MODE
(256A+B)
Pt 1000 climate range 2#1001 16#0909
Ni 100 climate range 2#0001 16#0901
Ni 1000 climate range 2#1010 16#090A
Pt 100 standard range 2#0010 16#0902
Pt 200 standard range 2#0011 16#0903
Pt 500 standard range 2#0100 16#0904
Pt 1000 standard range 2#0101 16#0905
Ni 100 standard range 2#1011 16#090B
Ni 1000 standard range 2#0110 16#0906
Ni 120 standard range 2#1100 16#090C
Ni 120 climate range 2#1101 16#090D
Cu10 climate range 2#1110 16#090E
Cu10 standard range 2#1111 16#090F
Ni 200 standard range 2#10000 16#0910
Ni 200 climate range 2#10001 16#0911
Ni 500 standard range 2#10010 16#0912
Ni 500 climate range 2#10011 16#0913
Thermal resistor + linearization
2-wire connection 2#1100 Pt 100 climate range 2#0000 16#0C00
Pt 200 climate range 2#0111 16#0C07
Pt 500 climate range 2#1000 16#0C08
Pt 1000 climate range 2#1001 16#0C09
Ni 100 climate range 2#0001 16#0C01
Ni 1000 climate range 2#1010 16#0C0A
Pt 100 standard range 2#0010 16#0C02
Pt 200 standard range 2#0011 16#0C03
Pt 500 standard range 2#0100 16#0C04
Pt 1000 standard range 2#0101 16#0C05
Ni 100 standard range 2#1011 16#0C0B
Ni 1000 standard range 2#0110 16#0C06
Ni 120 standard range 2#1100 16#0C0C
Ni 120 climate range 2#1101 16#0C0D
Cu10 climate range 2#1110 16#0C0E
Cu10 standard range 2#1111 16#0C0F
Ni 200 standard range 2#10000 16#0C10
Ni 200 climate range 2#10001 16#0C11
Ni 500 standard range 2#10010 16#0C12
Ni 500 climate range 2#10011 16#0C13
04.10.200104.10.200104.10.200109.10.200109.10.2001
Appendix
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 A-5
Measuring type Coding (A) Measuring range Coding
(B) MODE
(256A+B)
Thermocouples internal comparison 2#1010 Type B [PtRh-PtRh]
Type N [NiCrSi-NiSi]
Type E [NiCr-CuNi]
Type R [PtRh-Pt]
Type S [PtRh-Pt]
Type J [Fe-CuNi IEC]
Type L [Fe-CuNi DIN]
Type T [Cu-CuNi IEC]
Type K [NiCr-Ni]
Type U [Cu-CuNi DIN]
2#0000
2#0001
2#0010
2#0011
2#0100
2#0101
2#0110
2#0111
2#1000
2#1001
16#0A00
16#0A01
16#0A02
16#0A03
16#0A04
16#0A05
16#0A06
16#0A07
16#0A08
16#0A09
Thermocouples external co mparison 2#1011 Type B [PtRh-PtRh]
Type N [NiCrSi-NiSi]
Type E [NiCr-CuNi]
Type R [PtRh-Pt]
Type S [PtRh-Pt]
Type J [Fe-CuNi IEC]
Type L [Fe-CuNi DIN]
Type T [Cu-CuNi IEC]
Type K [NiCr-Ni]
Type U [Cu-CuNi DIN]
2#0000
2#0001
2#0010
2#0011
2#0100
2#0101
2#0110
2#0111
2#1000
2#1001
16#0B00
16#0B01
16#0B02
16#0B03
16#0B04
16#0B05
16#0B06
16#0B07
16#0B08
16#0B09
Thermocouples + linearization
internal comparison 2#1101 Type B [PtRh-PtRh]
Type N [NiCrSi-NiSi]
Type E [NiCr-CuNi]
Type R [PtRh-Pt]
Type S [PtRh-Pt]
Type J [Fe-CuNi IEC]
Type L [Fe-CuNi DIN]
Type T [Cu-CuNi IEC]
Type K [NiCr-Ni]
Type U [Cu-CuNi DIN]
2#0000
2#0001
2#0010
2#0011
2#0100
2#0101
2#0110
2#0111
2#1000
2#1001
16#0D00
16#0D01
16#0D02
16#0D03
16#0D04
16#0D05
16#0D06
16#0D07
16#080D
16#090D
Thermocouples + linearization
external comparison 2#1110 Type B [PtRh-PtRh]
Type N [NiCrSi-NiSi]
Type E [NiCr-CuNi]
Type R [PtRh-Pt]
Type S [PtRh-Pt]
Type J [Fe-CuNi IEC]
Type L [Fe-CuNi DIN]
Type T [Cu-CuNi IEC]
Type K [NiCr-Ni]
Type U [Cu-CuNi DIN]
2#0000
2#0001
2#0010
2#0011
2#0100
2#0101
2#0110
2#0111
2#1000
2#1001
16#0E00
16#0E01
16#0E02
16#0E03
16#0E04
16#0E05
16#0E06
16#0E07
16#080E
16#090E
04.10.200104.10.200104.10.200109.10.200109.10.2001
Appendix
Process Cont rol System PCS 7, Driver Block s
A-6 A5E00127662-01
Measuring range coding of the analog output modules
Depending on the coding of the measuring range of the analog output modules, the
parameter MODE_xx (measuring range coding) corresponding to the channel must
be specified in accordance with the table.
Measuring type Measuring range MODE
Voltage 1 to 5 V 16#0107
0 to 10 V 16#0108
± 10 V 16#0109
Current 0 to 20 mA 16#0202
4 to 20 mA 16#0203
± 20 mA 16#0204
HART interface 4 to 20 mA 16#070C
Measuring range coding of the digital input and digital output modules
There is neither a measuring type nor a measuring range for digital input and digital
output modules: MODE = 16#FFFF (at DI)
MODE = 16#FFFE (at DO)
OMODE structure
The outputs OMODE_xx of data type DWORD are structured as follows and have
the following meaning:
Byte 3: 16#80: Value status "valid value"
16#20: Value status "valid value"
16#00: Value status "invalid value"
16#40: Value status "invalid value"
(redundancy error)
(channel error)
(higher-level error)
Byte 2: 16#01: Restart (OB100) has been carried out
Byte 1, 0 (Low Word): MODE (see above)
Example:
16#80010203 corresponds to value state "valid value", restart has been carried
out, current 4 to 20mA
04.10.200104.10.200104.10.200109.10.200109.10.2001
Appendix
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 A-7
A.4 MODE settings for PA Devices
MODE_xx inputsare available for a maximum of 32 slots of a PA field device. Their
initial value is zero (no reading/writing). Per Slot xx you have to set the selected
combination of the options of the PROFIBUS PA 3.0 - Profile at the MODE_xx
input:
Block Connection (parameter)
(cyclic data)
permitted combination
and sequence
Input (I) / Output (O)
(PLS view) MODE 16#xxyy,
O=xx I=yy
Analog Input (PA_AI) OUT I 16#0001
Totalizer (PA_TOT) TOTAL I 16#000F
Totalizer (PA_TOT) TOTAL
SET_TOT I
O16#070F
Totalizer (PA_TOT) TOTAL
SET_TOT
MODE_TOT
I
O
O
16#080F
Analog Output (PA_AO) SP O 16#0100
Analog Output (PA_AO) SP
READBACK
POS_D
O
I
I
16#0103
Analog Output (PA_AO) SP
CHECK_BACK O
I16#0104
Analog Output (PA_AO) SP
READBACK
POS_D
CHECK_BACK
O
I
I
I
16#0105
Analog Output (PA_AO) RCAS_IN,
RCAS_OUT O
I16#0206
Analog Output (PA_AO) RCAS_IN,
RCAS_OUT,
CHECK_BACK
O
I
I
16#0207
Analog Output (PA_AO) SP
RCAS_IN
READBACK
RCAS_OUT
POS_D
CHECK_BACK
O
O
I
I
I
I
16#0308
Discrete Input (PA_DI) OUT_D I 16#0002
Discrete Output (PA_DO) SP_D O 16#0400
Discrete Output (PA_DO) SP_D
READBACK_D O
I16#0409
Discrete Output (PA_DO) SP_D
CHECKBACK_D O
I16#040A
Discrete Output (PA_DO) SP_D
READBACK_D
CHECK_BACK_D
O
I
I
16#040B
Discrete Output (PA_DO) RCAS_IN_D
RCAS_OUT_D O
I16#050C
04.10.200104.10.200104.10.200109.10.200109.10.2001
Appendix
Process Cont rol System PCS 7, Driver Block s
A-8 A5E00127662-01
Block Connection (parameter)
(cyclic data)
permitted combination
and sequence
Input (I) / Output (O)
(PLS view) MODE 16#xxyy,
O=xx I=yy
Discrete Output (PA_DO) RCAS_IN_D
RCAS_OUT_D
CHECK_BACK_D
O
I
I
16#0D05
Discrete Output (PA_DO) SP_D
RCAS_IN_D
READBACK_D
RCAS_OUT_D
CHECK_BACK_D
O
O
I
I
I
16#0E06
A. 5 Text Library for Si gnal Modules
The event class/event ID, their message texts and text IDs of the text libraries
MOD_1_TXT / MOD_2_TXT / MOD_D1_TXT and MOD_D2_TXT are summarized
in the following table:
Text ID. Event class / ID Message text Remark
1 08/50, 08/60, 08/70, 08/80 Configuration erro r
2 08/51, 08/61 Common mode error
3 08/52, 08/62, 08/72, 08/82 P short circuit
4 08/53, 08/63, 08/73, 08/83 M short circuit
5 08/54, 08/64, 08/74, 08/84 Wire breakage
6 08/55 Reference channel error
7 08/56 Below measuring range
8 08/57 Above measuring range
9 08/66, 08/86 Load voltage missing
10 08/71, 08/81 Mass error
11 08/75 Sensor supply missing
12 08/87 Over-temperature
13 08/00 Module OK
14 08/01 Internal error
15 08/02 External error
16 08/04 External auxiliary voltage missing
17 08/05 Front connector missing
18 08/06 No configuration
19 08/07 False parameter in BG
20 08/30 False/Missing user module
21 08/31 Communication error
22 08/32 Operating mode RUN/STOP STOP: incoming,
RUN: outgoing
23 08/33 Time-check operates
04.10.200104.10.200104.10.200109.10.200109.10.2001
Appendix
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 A-9
Text ID. Event class / ID Message text Remark
24 08/34 Failed BG-int. Supply voltage
25 08/35 Battery 1 empty
26 08/36 Standby supply fails
27 08/41 Processor failure
28 08/42 EPROM error
29 08/43 RAM error
30 08/44 ADU/DAU error
31 08/45 Fuse blown
32 08/46 Process interrupt lost
33 03/61 withdrawn EV_CLAS = 16#39
34 03/61 plugged EV_CLAS = 16#38
35 03/63 false BG type plugged EV_CLAS = 16#39
36 03/64 faulty BG plugged EV_CLAS = 16#39
37 03/65 BG plugged (Para m.error) EV_CLAS = 16#39
38 Chatter error
39 Changeover contact diagnostics
A.6 Text Libraries for DP-/PA-Slaves after a PA-/Y-LINK DP
V0
PADP_L00_TXT
PADP_L01_TXT
PADP_L02_TXT
Text ID. Message text
1 Module error
2 False module
3 Module missing
04.10.200104.10.200104.10.200109.10.200109.10.2001
Appendix
Process Cont rol System PCS 7, Driver Block s
A-10 A5E00127662-01
A.7 Technical data
The column headings have the following meaning:
Block type name
The symbolic identifier in the symbol table of the library for the respective FB or
FC. FC It must be unique within the project.
Object name
The object name consists of the block type (FB, FC) and the number.
Typical Execution Time
The time which the CPU needs to process the corresponding block program under
normal circumstances (for example, for a driver this is the execution time in the
watchdog interrupt organization block (OB3x) without message generation in the
event of channel errors).
The table below shows the execution times of the blocks in a 417-4H CPU (6ES7
417-4HL01-0AB0). With other CPUs the run time depends on their performance.
Block Length in Load/Work Memory
Memory requirements of the program code, with each block type having unique
requirements.
Length of the Instance Data in Load/Work Memory
Memory requirement of an instance DB.
Length of the Local Data
The local-data memory required in the OB when the block is called. This is limited
CPU-specifically. When it is exceeded, a CPU STOP is caused. The local data
requirements are checked in CFC when you compile/download and downloading is
prevented if there is not enough local data memory.
04.10.200104.10.200104.10.200109.10.200109.10.2001
Appendix
Process Cont rol System PCS 7, Driver Block s
A5E00127662-01 A-11
Block Outputs Messages
Where “yes“ is indicated for a block, this means that the block outputs messages.
Block Type Name
(Object Name)
Typical
Executio
n
Time
CPU 417-
4H
[ ms ]
Block Length in
Load/Work
Memory
[ bytes ]
Length of the Instance
Data in Load
/Work Memory
[ bytes ]
Length of
the
Local Data
[ bytes ]
Block
Outputs
Messag
es
CH_AI (FC 275) 0,080 5484 / 4724 28
CH_AO (FC 276) 0,060 1696 / 1436 28
CH_DI (FC 277) 0,035 418 / 314 4
CH_DO (FC 278) 0,025 330 / 248 2
CH_U_AI (FC 283) 0,065 5036 / 4340 30
CH_U_AO (FC 284) 0,050 1472 / 1254 28
CH_U_DI (FC 285) 0,024 658 / 512 4
CH_U_DO (FC 286) 0,018 522 / 416 2
IM_DRV (FB 90) 0, 300 13090 / 10398 5938 / 4056 112 yes
MOD_1 (FB 91) 0,400 4584 / 3580 1080 / 326 60 yes
MOD_2 (FB 92) 0,600 4982 / 3912 1240 / 422 58 yes
MOD_D1 (FB 93) 0,400 12876 / 10960 1724 / 666 68 yes
MOD_D2 (FB 94) 0,600 13092 / 11052 2396 / 1070 70 yes
OB_BEGIN (FB 100) 0,500 20470 / 17092 6164 / 3632 208 yes
OB_END (FC 280) 0,010 514 / 86 4
OB_DIAG (FC 281) 0,080 5148 / 4266 86
DPAY_V0 (FB 108) 0,900 9986 / 7362 3568 / 1374 134 yes
PADP_L00 (FB 109) 0,220 3564 / 2728 888 / 254 40 yes
PADP_L01 (FB 110) 0,900 4704 / 3662 1394 / 570 40 yes
PADP_L02 (FB 111) 1,000 6330 / 5040 1992 / 944 40 yes
PA_AI (FB 101) 0, 100 2046 / 1706 504 / 222 12 yes
PA_AO (FB 103) 0, 140 3058 / 2592 636 / 272 18 yes
PA_DI (FB 104) 0,080 1782 / 1488 440 / 192 12 yes
PA_DO (FB 105) 0, 120 2804 / 2392 552 / 218 18 yes
PA_TOT (FB 102) 0,100 2176 / 1814 520 / 226 18 yes
PO_UPDAT (FC 279) - 324 / 252 10
RACK (FB 107) 0,300 8366 / 7048 1108 / 236 100 yes
SUBNET (FB 106) 0,800 5374 / 4132 1146 / 214 106 yes
04.10.200104.10.200104.10.200109.10.200109.10.2001
Appendix
Process Cont rol System PCS 7, Driver Block s
A-12 A5E00127662-01
04.10.200104.10.200104.10.200109.10.200109.10.2001
Process Cont rol System PCS 7, Driver Blocks
A5E00127662-01 Index-1
Index
A
Addressing.................................................... A-1
Analog Input PROFIBUS PA..........................3-1
Analog Output PROFIBUS PA.......................3-6
Analog value output................... 2-66, 2-80, 2-82
AS ...........................................................2-2, 2-3
Assignment of the control system
messages
of the OB_BEGIN.......................................2-6
Auxiliary process values...............................3-22
B
Block description............................................1-3
General informat ion on...............................1-2
C
CH_AI..................................................2-62, 2-64
Connections .............................................2-64
CH_AO................................................2-66, 2-69
Connections .............................................2-69
CH_DI .................................................2-70, 2-72
Connections .............................................2-72
CH_DO................................................2-73, 2-75
Connections .............................................2-75
CH_U_AI.............................................2-78, 2-80
CH_U_AO................................. 2-82, 2-83, 2-85
Connections .............................................2-85
CH_U_DI.............................................2-86, 2-89
Connections .............................................2-89
CH_U_DO...........................................2-90, 2-93
Connections .............................................2-93
Connections...............2-2, 2-5, 2-11, 2-14, 2-19,
..................2-24, 2-31, 2-39, 2-51, 2-64, 2-69,
..................2-72, 2-75, 2-80, 2-85, 2-89, 2-93,
..............3-4, 3-9, 3-15, 3-20, 3-38, 3-43, 3-48
CH_U_AO ................................................2-85
CH_U_DI..................................................2-89
CH_U_DO................................................2-93
MOD_1 / MOD_2......................................2-39
MOD_D1 / MOD_D2 ................................2-51
PADP_L0x................................................3-38
Connections of CH_AI..................................2-64
Connections of CH_AO................................2-69
Connections of CH_DI..................................2-72
Connections of CH_DO................................2-75
Connections of DPAY_V0............................3-43
Connections of IM_DRV...............................2-31
Connections of MOD_1 / MOD_2.................2-39
Connections of MOD_D1 / MOD_D2...........2-51
Connections of OB_BEGIN............................2-5
Connections of OB_DIAG............................ 2-14
Connections of OB_END.............................2-11
Connections of PA_AI.................................... 3-4
Connections of PA_AO.................................. 3-9
Connections of PA_DI .................................3-15
Connections of PA_DO................................ 3-20
Connections of PA_TOT.............................. 3-48
Connections of PADP_L00 / L01 / L02 ........ 3-38
Connections of RACK.................................. 2-24
Connections of SUBNET ............................. 2-19
CPU.............. 2-1, 2-2, 2-3, 2-4, 2-12 , 2-13, 2-14
D
Digital value input ...............................2-70, 2-86
Discrete Input PROFIBUS PA...................... 3-13
Discrete Output PROFIBUS PA...................3-17
DP Master ...........................................2-17, 2-18
DP/PA........................................3-23, 3-27, 3-32
Monitoring..............................3-23, 3-27, 3-32
DP/PA-Link.................................................. 3-38
Monitoring................................................ 3-38
DP-/PA-Slaves after.......................................A-9
Text Libraries.............................................A-9
DPAY_V0...................................3-39, 3-43, 3-44
Auxiliary process values .......................... 3-44
Connections............................................. 3-43
Message texts.......................................... 3-44
Message texts and auxiliary process
values .................................................. 3-44
E
Error information of the MSG_STAT output
parameter ..................................................A-2
G
General informat ion on.................................. 1-2
block description........................................ 1-2
General information on the block description. 1-2
I
IM 153-2.......................................................2-33
IM_DRV.....................................2-28, 2-29, 2-31
Auxiliary process values .......................... 2-31
Connections............................................. 2-31
Message texts.......................................... 2-31
Interface IM153-2......................................... 2-33
04.10.200104.10.200104.10.200109.10.200109.10.2001
Index
Process Cont rol System PCS 7, Driver Blocks
Index-2 A5E00127662-01
M
Message texts and auxiliary
process values.............2-20, 2-24, 2-31, 2-40,
.................... 2-52, 2-59, 3-6, 3-12, 3-17, 3-22,
.............................3-27, 3-31, 3-36, 3-44, 3-50
DPAY_V0.................................................3-44
MOD_1 / MOD_2.....................................2-40
MOD_D1..................................................2-52
MOD_D2..................................................2-59
PA_AI.........................................................3-6
PA_AO.....................................................3-12
PA_DI ......................................................3-17
PA_DO.....................................................3-22
PA_TOT...................................................3-50
PADP_L00...............................................3-27
PADP_L01...............................................3-31
PADP_L02...............................................3-36
RACK.......................................................2-25
SUBNET ..................................................2-20
Message texts and auxiliary
process values of DPAY_V0....................3-44
Message texts and auxiliary
process values of MOD_1 / MOD_2 ........2-40
Message texts and auxiliary
process values of MOD_D1.....................2-52
Message texts and auxiliary
process values of MOD_D2.....................2-59
Message texts and auxiliary
process values of PA_AI............................3-6
Message texts and auxiliary
process values of PA_AO........................3-12
Message texts and auxiliary
process values of PA_DI..........................3-17
Message texts and auxiliary
process values of PA_DO........................3-22
Message texts and auxiliary
process values of PA_TOT......................3-50
Message texts and auxiliary
process values of PADP_L00..................3-27
Message texts and auxiliary
process values of PADP_L01..................3-31
Message texts and auxiliary
process values of PADP_L02..................3-36
Message texts and auxiliary
process values of RACK..........................2-24
Message texts and auxiliary
process values of SUBNET......................2-20
Message texts and auxiliary
process values of the IM_DRV.................2-31
MOD_1 ....................2-36, 2-37, 2-39, 2-40, 2-41
Auxiliary process values ..........................2-40
connections..............................................2-39
Message texts.................................2-40, 2-41
MOD_1 / MOD_2................................2-39, 2-40
Connections.............................................2-39
Message texts and auxiliary
process values.....................................2-40
MOD_2 .............................2-39, 2-40, 2-42, 2-45
Auxiliary process values ..........................2-41
Connections.............................................2-39
Message texts ..........................................2-40
MOD_D1 .................2-46, 2-48, 2-50, 2-51, 2-52
Auxiliary process values...........................2-53
Connections .............................................2-51
Message texts ..........................................2-52
Message texts and auxiliary
process values ..................................... 2-52
MOD_D1 / MOD_D2.....................................2-51
Connections .............................................2-51
MOD_D2 ..........................2-51, 2-54, 2-58, 2-59
Auxiliary process values...........................2-60
Connections .............................................2-51
Message texts ..........................................2-59
Message texts and auxiliary
process values ..................................... 2-59
MODE.............................................A-2, A-6, A-7
MODE setting................................................A-7
PA..............................................................A-7
MODE settings.......................................A-2, A-7
PA Devices................................................A-7
Signal Modules.......................................... A-2
MODE settings for PA Devices......................A-7
MODE settings for Signal Modules................ A-2
Monitoring...............2-38, 2-43, 2-47, 2-48, 2-55,
.....................................3-23, 3-27, 3-32, 3-38
DP/PA.........3-23, 3-24, 3-28, 3-29, 3-32, 3-34
DP/PA-Link............................ 3-39, 3-40, 3-41
S7-300/400 SM.............2-36, 2-41, 2-45, 2-53
MSG_STAT...................................................A-2
N
Notes on Using Driver Blocks.........................1-1
O
OB................................................................2-13
OB_BEGIN......2-1, 2-2, 2-3, 2-5, 2-6, 2-10, 2-11
Connections ...............................................2-5
Control system messages....2-6, 2-7, 2-8, 2-9
OB_DIAG .................................. 2-12, 2-13, 2-14
Connections .............................................2-14
OB_END............................................. 2-10, 2-11
Connections .............................................2-11
P
PA Devices....................................................A-7
MODE settings.......................................... A-7
PA-/Y-LINK DP V0.........................................A-9
PA_AI.............................................. 3-1, 3-4, 3-6
Auxiliary process values.............................3-6
Connections ...............................................3-4
Message texts ............................................3-6
Message texts and auxiliary
process values ....................................... 3-6
PA_AO .......................................... 3-6, 3-9, 3-12
Auxiliary process values...........................3-12
Connections ...............................................3-9
Message texts ..........................................3-12
04.10.200104.10.200104.10.200109.10.200109.10.2001
Index
Process Cont rol System PCS 7, Driver Blocks
A5E00127662-01 Index-3
Message texts and auxiliary
process values .....................................3-12
PA_DI........................................ 3-13, 3-15, 3-17
Auxiliary process values...........................3-17
Connections .............................................3-15
Message texts..........................................3-17
Message texts and auxiliary
process values .....................................3-17
PA_DO...................................... 3-17, 3-20, 3-22
Connections .............................................3-20
Message texts..........................................3-22
Message texts and auxiliary
process values .....................................3-22
PA_DO.....................................................3-22
PA_MODE..................................................... A-7
Setting....................................................... A-7
PA_TOT.................................... 3-45, 3-48, 3-50
Auxiliary process values...........................3-50
Connections .............................................3-48
Message texts..........................................3-50
Message texts and auxiliary
process values .....................................3-50
PADP_L00 ................................ 3-23, 3-24, 3-27
Auxiliary process values...........................3-27
Message texts..........................................3-27
Message texts and auxiliary
process values .....................................3-27
PADP_L00/ L01/ L02....................................3-38
Connections .............................................3-38
PADP_L01 ..........................................3-28, 3-31
Auxiliary process values...........................3-32
Message texts..........................................3-31
Message texts and auxiliary
process values .....................................3-31
PADP_L02 ..........................................3-33, 3-36
Auxiliary process values...........................3-37
Message texts.................................3-36, 3-37
Message texts and auxiliary
process values .....................................3-36
PADP_L0x....................................................3-38
Connections .............................................3-38
PO_UPDAT..................................................2-25
R
RACK.......................2-20, 2-21, 2-22, 2-23, 2-24
Auxiliary process values .......................... 2-24
Connections............................................. 2-24
Message texts.......................................... 2-24
Message texts and auxiliary
process values..................................... 2-24
S
S7-300/400 SM.................2-36, 2-41, 2-45, 2-53
Monitoring.....................2-36, 2-41, 2-45, 2-53
Signal Modules...................................... A-2, A-8
MODE settings...........................................A-2
Text Library................................................A-8
SUBNET...........................2-17, 2-18, 2-19, 2-20
Auxiliary process values .......................... 2-20
Connections............................................. 2-19
Message texts.......................................... 2-20
Message texts and auxiliary
process values..................................... 2-20
T
Technical data .............................................A-10
Text library.....................................................A-9
Text Library....................................................A-8
Signal Modules..........................................A-8
Text Library for Signal Modules.....................A-8
Totalizer PROFIBUS PA..............................3-45
V
V0 ................................................................ 3-39
Y
Y-Link .................................................3-39, 3-41
04.10.200104.10.200104.10.200109.10.200109.10.2001
Index
Process Cont rol System PCS 7, Driver Blocks
Index-4 A5E00127662-01
04.10.200104.10.200104.10.200109.10.200109.10.2001