Endress+Hauser FOUNDATION Fieldbus Function Blocks Operating Instruction
Pubblicità
Pubblicità
Guideline
FOUNDATION Fieldbus
Function Blocks
BA00062S/04/en/01.10
Version 1.01.xx
71105753
Guideline: FOUNDATION Fieldbus Function Blocks Table of Contents
Table of Contents
Table of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Registered Trademarks . . . . . . . . . . . . . . . . . . . . . . 4
1 Safety . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1
Designated use . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2
Installation, commissioning and operation . . . . . . . . 5
1.3
Operational safety . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4
Conventions and icons . . . . . . . . . . . . . . . . . . . . . . 5
1.5
About this manual . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 Function Block Application Process . . 7
2.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2
Block objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3
Block parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3.1
Parameter types . . . . . . . . . . . . . . . . . . . . . . 9
2.3.2
Parameter identifiers . . . . . . . . . . . . . . . . . 10
2.3.3
Universal parameters . . . . . . . . . . . . . . . . . 11
2.3.4
Parameters in an Engineering Tool . . . . . . 12
2.3.5
Changing function block parameters . . . . . 13
2.4
Block operation . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.4.1
Block mode parameter MODE_BLK . . . . 14
2.4.2
Block modes . . . . . . . . . . . . . . . . . . . . . . . 14
2.4.3
Mode priority . . . . . . . . . . . . . . . . . . . . . . . 16
2.4.4
Mode shedding . . . . . . . . . . . . . . . . . . . . . 18
2.5
Parameter calculation . . . . . . . . . . . . . . . . . . . . . . 19
2.5.1
Process variable PV . . . . . . . . . . . . . . . . . . 19
2.5.2
Scaling parameters XD_SCALE, PV_SCALE,
OUT_SCALE . . . . . . . . . . . . . . . . . . . . . . 20
2.5.3
Setpoint SP . . . . . . . . . . . . . . . . . . . . . . . . 22
2.5.4
Ouput variable, OUT . . . . . . . . . . . . . . . . . 23
2.5.5
Back calculation . . . . . . . . . . . . . . . . . . . . 23
2.6
Status handling . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.6.1
Status propagation . . . . . . . . . . . . . . . . . . . 24
2.6.2
Status message . . . . . . . . . . . . . . . . . . . . . . 24
2.6.3
Substatus and limit propagation . . . . . . . . 26
2.6.4
Control loop integrity . . . . . . . . . . . . . . . . 27
2.7
Fault state handling . . . . . . . . . . . . . . . . . . . . . . . . 30
2.7.1
Control blocks . . . . . . . . . . . . . . . . . . . . . . 30
2.7.2
Output blocks . . . . . . . . . . . . . . . . . . . . . . 30
2.7.3
Forcing fault state . . . . . . . . . . . . . . . . . . . 31
2.8
Function block options . . . . . . . . . . . . . . . . . . . . . 32
2.8.1
GRANT_DENY . . . . . . . . . . . . . . . . . . . . 32
2.8.2
IO_OPTS . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.8.3
CONTROL_OPTS . . . . . . . . . . . . . . . . . . 34
2.9
Alert handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.9.1
Events and alarms . . . . . . . . . . . . . . . . . . . 35
2.9.2
Reporting, priority and acknowledgement 36
2.9.3
Limit alarms . . . . . . . . . . . . . . . . . . . . . . . 37
2.9.4
Event update and alarm summaries . . . . . . 38
2.9.5
Alarm display parameters . . . . . . . . . . . . . 39
2.9.6
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.10
Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3 Resource Block . . . . . . . . . . . . . . . . . 42
3.1
Informative parameters . . . . . . . . . . . . . . . . . . . . . 42
3.1.1
Device software . . . . . . . . . . . . . . . . . . . . . 42
3.1.2
Device hardware . . . . . . . . . . . . . . . . . . . . 43
3.1.3
Hardware write lock . . . . . . . . . . . . . . . . . 43
3.1.4
Simulation . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.2
Operational parameters . . . . . . . . . . . . . . . . . . . . . 44
3.2.1
Block operation . . . . . . . . . . . . . . . . . . . . . 44
3.2.2
Resource state . . . . . . . . . . . . . . . . . . . . . . 44
3.2.3
Resource restart . . . . . . . . . . . . . . . . . . . . . 45
3.2.4
Resource options . . . . . . . . . . . . . . . . . . . . 45
3.2.5
Alert reporting . . . . . . . . . . . . . . . . . . . . . . 46
3.2.6
Software write lock . . . . . . . . . . . . . . . . . . 47
3.2.7
Block errors . . . . . . . . . . . . . . . . . . . . . . . . 47
3.3
Block parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4 Transducer Blocks . . . . . . . . . . . . . . 50
4.1
Device transducer blocks (Endress+Hauser) . . . . . . 51
4.1.1
Block configuration . . . . . . . . . . . . . . . . . . 52
4.1.2
Block parameters . . . . . . . . . . . . . . . . . . . . 52
4.2
Display block (DISP) . . . . . . . . . . . . . . . . . . . . . . . 53
4.2.1
Block configuration . . . . . . . . . . . . . . . . . . 53
4.2.2
Block parameters . . . . . . . . . . . . . . . . . . . . 53
4.3
Diagnosis block (DIAG) . . . . . . . . . . . . . . . . . . . . . 54
4.3.1
Block configuration . . . . . . . . . . . . . . . . . . 54
4.3.2
Block parameters . . . . . . . . . . . . . . . . . . . . 54
5 Input Blocks . . . . . . . . . . . . . . . . . . . 55
5.1
Analog Input (AI) . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.1.1
Functional description . . . . . . . . . . . . . . . . 55
5.1.2
Block Configuration . . . . . . . . . . . . . . . . . 57
5.1.3
Block operation . . . . . . . . . . . . . . . . . . . . . 58
5.1.4
Block parameters . . . . . . . . . . . . . . . . . . . . 59
5.2
Discrete Input (DI) . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.2.1
Functional description . . . . . . . . . . . . . . . . 60
5.2.2
Block configuration . . . . . . . . . . . . . . . . . . 61
5.2.3
Block operation . . . . . . . . . . . . . . . . . . . . . 61
5.2.4
Block parameters . . . . . . . . . . . . . . . . . . . . 62
5.3
Multiple Analog Input (MAI) . . . . . . . . . . . . . . . . . 63
5.3.1
Functional description . . . . . . . . . . . . . . . . 63
5.3.2
Block configuration . . . . . . . . . . . . . . . . . . 63
5.3.3
Block operation . . . . . . . . . . . . . . . . . . . . . 64
5.3.4
Block parameters . . . . . . . . . . . . . . . . . . . . 64
5.4
Multiple Discrete Input (MDI) . . . . . . . . . . . . . . . . 65
5.4.1
Functional description . . . . . . . . . . . . . . . . 65
5.4.2
Block configuration . . . . . . . . . . . . . . . . . . 65
5.4.3
Block operation . . . . . . . . . . . . . . . . . . . . . 66
5.4.4
Block parameters . . . . . . . . . . . . . . . . . . . . 66
Endress+Hauser 1
Table of Contents Guideline: FOUNDATION Fieldbus Function Blocks
6 Control Blocks . . . . . . . . . . . . . . . . . . 67
6.1
PID Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.1.1
Functional description . . . . . . . . . . . . . . . . 68
6.1.2
Closed-loop control . . . . . . . . . . . . . . . . . . 71
6.1.3
Feedforward control . . . . . . . . . . . . . . . . . 72
6.1.4
Cascade control . . . . . . . . . . . . . . . . . . . . . 74
6.1.5
Output tracking . . . . . . . . . . . . . . . . . . . . . 76
6.1.6
Remote cascade . . . . . . . . . . . . . . . . . . . . . 77
6.1.7
Remote output . . . . . . . . . . . . . . . . . . . . . . 79
6.1.8
Block operation . . . . . . . . . . . . . . . . . . . . . 81
6.1.9
Block parameters . . . . . . . . . . . . . . . . . . . 82
6.2
Enhanced PID Control . . . . . . . . . . . . . . . . . . . . . 84
6.2.1
Bumpless transfer . . . . . . . . . . . . . . . . . . . 84
6.2.2
Enhanced output tracking . . . . . . . . . . . . . 85
6.2.3
Additional parameters . . . . . . . . . . . . . . . . 86
6.3
Advanced PID Control . . . . . . . . . . . . . . . . . . . . . 87
6.3.1
PID algorithm . . . . . . . . . . . . . . . . . . . . . . 88
6.3.2
PI sampling . . . . . . . . . . . . . . . . . . . . . . . . 88
6.3.3
Adaptive gain . . . . . . . . . . . . . . . . . . . . . . 89
6.3.4
Anti-reset wind-up . . . . . . . . . . . . . . . . . . 89
6.3.5
Special treatment for error . . . . . . . . . . . . 90
6.3.6
Mode indication . . . . . . . . . . . . . . . . . . . . 91
6.3.7
Additional parameters . . . . . . . . . . . . . . . . 91
6.4
Step Output PID . . . . . . . . . . . . . . . . . . . . . . . . . . 92
6.4.1
Functional description . . . . . . . . . . . . . . . . 92
6.4.2
Block configuration . . . . . . . . . . . . . . . . . 95
6.4.3
Block operation . . . . . . . . . . . . . . . . . . . . . 97
6.4.4
Block parameters . . . . . . . . . . . . . . . . . . . 98
7 Calculation and Logic Blocks . . . . . . 100
7.1
Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
7.1.1
Range extension . . . . . . . . . . . . . . . . . . . 101
7.1.2
Calculated variables . . . . . . . . . . . . . . . . 103
7.1.3
Block operation . . . . . . . . . . . . . . . . . . . . 106
7.1.4
Block parameters . . . . . . . . . . . . . . . . . . 107
7.2
Output Splitter . . . . . . . . . . . . . . . . . . . . . . . . . . 108
7.2.1
Functional description . . . . . . . . . . . . . . . 109
7.2.2
Block configuration . . . . . . . . . . . . . . . . 111
7.2.3
Block operation . . . . . . . . . . . . . . . . . . . . 112
7.2.4
Block parameters . . . . . . . . . . . . . . . . . . 113
7.3
Signal Characterizer . . . . . . . . . . . . . . . . . . . . . . 114
7.3.1
Functional Description . . . . . . . . . . . . . . 114
7.3.2
Block configuration . . . . . . . . . . . . . . . . 115
7.3.3
Block operation . . . . . . . . . . . . . . . . . . . . 116
7.3.4
Block parameters . . . . . . . . . . . . . . . . . . 117
7.4
Cascade Signal Characterizer . . . . . . . . . . . . . . . 118
7.4.1
Functional Description . . . . . . . . . . . . . . 119
7.4.2
Block configuration . . . . . . . . . . . . . . . . 120
7.4.3
Block operation . . . . . . . . . . . . . . . . . . . . 122
7.4.4
Block Errors . . . . . . . . . . . . . . . . . . . . . . 122
7.4.5
Block parameters . . . . . . . . . . . . . . . . . . 123
7.5
Integrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
7.5.1
Functional description . . . . . . . . . . . . . . . 124
7.5.2
Block configuration . . . . . . . . . . . . . . . . 128
7.5.3
Block operation . . . . . . . . . . . . . . . . . . . . 129
7.5.4
Block parameters . . . . . . . . . . . . . . . . . . 130
7.6
Analog Alarm . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
7.6.1
Functional description . . . . . . . . . . . . . . . 132
7.6.2
Block configuration . . . . . . . . . . . . . . . . . 135
7.6.3
Block operation . . . . . . . . . . . . . . . . . . . . 137
7.6.4
Block parameters . . . . . . . . . . . . . . . . . . . 138
7.7
Enhanced Analog Alarm . . . . . . . . . . . . . . . . . . . 139
7.8
Input Selector . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
7.8.1
Functional description . . . . . . . . . . . . . . . 140
7.8.2
Block configuration . . . . . . . . . . . . . . . . . 142
7.8.3
Block operation . . . . . . . . . . . . . . . . . . . . 143
7.8.4
Block parameters . . . . . . . . . . . . . . . . . . . 144
7.9
Setpoint Ramp Generator (SPG) . . . . . . . . . . . . . 145
7.9.1
Functional description . . . . . . . . . . . . . . . 145
7.9.2
Block configuration . . . . . . . . . . . . . . . . . 148
7.9.3
Block operation . . . . . . . . . . . . . . . . . . . . 150
7.9.4
Block parameters . . . . . . . . . . . . . . . . . . . 150
7.10
Enhanced Setpoint Ramp Generator . . . . . . . . . . 152
7.11
Timer and Logic . . . . . . . . . . . . . . . . . . . . . . . . . 153
7.11.1 Functional description . . . . . . . . . . . . . . . 153
7.11.2 Block configuration . . . . . . . . . . . . . . . . . 160
7.11.3 Block operation . . . . . . . . . . . . . . . . . . . . 161
7.11.4 Block parameters . . . . . . . . . . . . . . . . . . . 161
7.12
Lead-Lag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
7.12.1 Functional description . . . . . . . . . . . . . . . 163
7.12.2 Block configuration . . . . . . . . . . . . . . . . . 166
7.12.3 Block operation . . . . . . . . . . . . . . . . . . . . 167
7.12.4 Block parameters . . . . . . . . . . . . . . . . . . . 167
7.13
Output Signal Selector and Dynamic Limiter . . . . 168
7.13.1 Functional description . . . . . . . . . . . . . . . 168
7.13.2 Block configuration . . . . . . . . . . . . . . . . . 170
7.13.3 Block operation . . . . . . . . . . . . . . . . . . . . 174
7.13.4 Block parameters . . . . . . . . . . . . . . . . . . . 175
7.14
Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
7.14.1 Functional description . . . . . . . . . . . . . . . 176
7.14.2 Block configuration . . . . . . . . . . . . . . . . . 176
7.14.3 Block operation . . . . . . . . . . . . . . . . . . . . 177
7.14.4 Block parameters . . . . . . . . . . . . . . . . . . . 177
7.15
Constant and Contained RW . . . . . . . . . . . . . . . . 178
7.15.1 Functional description . . . . . . . . . . . . . . . 178
7.15.2 Block configuration . . . . . . . . . . . . . . . . . 180
7.15.3 Block operation . . . . . . . . . . . . . . . . . . . . 182
7.15.4 Block parameters . . . . . . . . . . . . . . . . . . . 183
7.16
Flip-flop and Edge Trigger . . . . . . . . . . . . . . . . . . 185
7.16.1 Functional description . . . . . . . . . . . . . . . 185
7.16.2 Block configuration . . . . . . . . . . . . . . . . . 189
7.16.3 Block operation . . . . . . . . . . . . . . . . . . . . 191
7.16.4 Block parameters . . . . . . . . . . . . . . . . . . . 192
7.17
Advanced Equations . . . . . . . . . . . . . . . . . . . . . . 193
7.17.1 Functional description . . . . . . . . . . . . . . . 193
7.17.2 Block configuration . . . . . . . . . . . . . . . . . 193
7.17.3 Block operation . . . . . . . . . . . . . . . . . . . . 194
7.17.4 Block parameters . . . . . . . . . . . . . . . . . . . 194
7.18
Density . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
7.18.1 Functional description . . . . . . . . . . . . . . . 195
7.18.2 Block configuration . . . . . . . . . . . . . . . . . 197
7.18.3 Block operation . . . . . . . . . . . . . . . . . . . . 198
7.18.4 Block parameters . . . . . . . . . . . . . . . . . . . 199
7.19
Flexible function blocks . . . . . . . . . . . . . . . . . . . 200
2 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
8 Output Blocks . . . . . . . . . . . . . . . . . 201
8.1
Analog Output . . . . . . . . . . . . . . . . . . . . . . . . . . 201
8.1.1
Functional description . . . . . . . . . . . . . . . 201
8.1.2
Block configuration . . . . . . . . . . . . . . . . . 203
8.1.3
Block operation . . . . . . . . . . . . . . . . . . . . 204
8.1.4
Block parameters . . . . . . . . . . . . . . . . . . . 205
8.2
Discrete Output . . . . . . . . . . . . . . . . . . . . . . . . . . 206
8.2.1
Functional description . . . . . . . . . . . . . . . 206
8.2.2
Block configuration . . . . . . . . . . . . . . . . . 208
8.2.3
Block operation . . . . . . . . . . . . . . . . . . . . 209
8.2.4
Block parameters . . . . . . . . . . . . . . . . . . . 210
8.3
Multiple Analog Output . . . . . . . . . . . . . . . . . . . . 211
8.3.1
Functional description . . . . . . . . . . . . . . . 211
8.3.2
Block configuration . . . . . . . . . . . . . . . . . 212
8.3.3
Block operation . . . . . . . . . . . . . . . . . . . . 213
8.3.4
Block parameters . . . . . . . . . . . . . . . . . . . 214
8.4
Multiple Discrete Output . . . . . . . . . . . . . . . . . . . 215
8.4.1
Functional description . . . . . . . . . . . . . . . 215
8.4.2
Block configuration . . . . . . . . . . . . . . . . . 216
8.4.3
Block operation . . . . . . . . . . . . . . . . . . . . 216
8.4.4
Block parameters . . . . . . . . . . . . . . . . . . . 217
Table of Contents
Appendix A:
Interpreting parameter status . . . . . 218
Appendix B:
Standard data types and structures . 220
Appendix C:
Manufacturer-specific data structures 224
Index . . . . . . . . . . . . . . . . . . . . . . . . 226
Endress+Hauser 3
Revision History
Version Manual
1.00.xx
BA062S/04/en/07.09
Changes
Original manual
1.01.xx
BA00062S/04/en/01.10 Input Selector
Guideline: FOUNDATION Fieldbus Function Blocks
Remarks
Description corrected
Registered Trademarks
FOUNDATION
TM
Fieldbus
Trademark of the Fieldbus Foundation, Austin, TX 78759, USA
Microsoft
®
, Windows
®
, Windows 2000
®
,Windows XP
® and the Microsoft logo are registered trademarks of the Microsoft Corporation.
All other brand and product names are trademarks or registered trademarks of the companies and organisations in question
4 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Safety conventions
1 Safety
1 Safety
1.1
Designated use
This guideline contains an overview of the standard function blocks which are described in the
FOUNDATION Fieldbus specifications FF 890 - 894. It is intended as an aid for the use of these blocks as implemented in Endress+Hauser field devices. The actual blocks contained in and the approved usage of the individual devices can be taken from the corresponding device operating instructions.
A separate function block manual, BA022S/04/en, exists for the ControlCare Field Controllers
SFC162 and SFC173.
1.2
Installation, commissioning and operation
Endress+Hauser FOUNDATION Fieldbus devices are designed to operate safely in accordance with current technical safety and EU directives. Essential to their use is a FOUNDATION Fieldbus control system. Field devices, links, junction boxes, cables and other hardware comprising the Fieldbus system must also be designed to operate safely in accordance with current technical safety and EU directives.
If devices are installed incorrectly or used for applications for which they are not intended, or if the function blocks and controller are not configured correctly, it is possible that dangers may arise. For this reason, the system must be installed, connected, configured, operated and maintained according to the instructions in this and the associated manuals: personnel must be authorised and suitably qualified.
1.3
Operational safety
Information on the safe operation of Endress+Hauser field devices can be taken from the correspondiing manual. For system components, please refer to the manufacturer’s instructions
1.4
Conventions and icons
In order to highlight safety relevant or alternative operating procedures in the manual, the following conventions have been used, each indicated by a corresponding icon in the margin.
Icon Meaning
A note highlights actions or procedures which, if not performed correctly, may indirectly affect operation or may lead to an instrument response which is not planned
Caution!
Caution highlights actions or procedures which, if not performed correctly, may lead to personal injury or incorrect functioning of the instrument
Warning!
A warning highlights actions or procedures which, if not performed correctly, will lead to personal injury, a safety hazard or destruction of the instrument
Endress+Hauser 5
1 Safety Guideline: FOUNDATION Fieldbus Function Blocks
1.5
About this manual
This manual is concerned with the function block model used in Foundation Fieldbus devices. It discusses the function block application process and then proceeds to describe the various blocks that are to be found in Endress+Hauser devices. It is structured as follows:
• Chapter 1: Safety gives general information on the ControlCare platform
• Chapter 2: Introduction briefly describes the FOUNDATION Fieldbus function block application process together with the associated objects, parameters and options
• Chapter 3: Resource block describes the resource block and its parameters. Every device has a resource block that is structured in the same way
• Chapter 4: Transducer block provides a general description of FOUNDATION Fieldbus transducer blocks and their use.
Descriptions of the transducer blocks of devices offered by Endress+Hauser and other vendors are to be found in the appropriate device manuals.
• Chapter 5: Input blocks describes the Analog Input block (AI), Multiple Analog Input block (MAI), Discrete Input block
(DI) and Multiple Discrete Input block (MDI), with particular reference to their use in the
ControlCare platform.
• Chapter 6: Control blocks describes the PID, PI, I controller block and other control blocks
• Chapter 7: Arithmetic and logic blocks describes the various arithmetuc and logic blocks, e.g. Signal Characterizer (SC), Input Selector block (IS), Integrator or Totalizer (IT), Arithmetic (AR) etc.
• Chapter 8: Output blocks describes the Analog Output block (AO), Multiple Analog Output block (MAI), Discrete Output block (DO) and Multiple Discrete Output block (MDO), with particular reference to their use in the ControlCare platform.
• Appendices contain procedures and information on advance applications, e.g. interpretation of parameter status in SCADA systems
The manual aims to provide a balance between background information and the practical use of the blocks. A full description of the function block application process is to be found in the Fieldbus
Foundation Specifications FF-891, FF-892, FF-893 and FF 894. These form the basis of many of the parameter descriptions found here.
The screenshots used to illustrate the various functions in Chapter 2 have been taken from
Endress+Hauser’s engineering tool ControlCare Application Designer. Other tools, e.g. NI
Configurator, operate in a similar manner.
The examples used to explain the functions and operation of the different blocks are based mainly on Endress+Hauser devices. The values of the example parameters which are used to explain the settings required to run a block are device specific and could differ for other devices (other channel number, unit etc.).
6 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 2 Function Block Application Process
2 Function Block Application Process
2.1
Introduction
FOUNDATION Fieldbus function blocks are "black boxes" which transform input parameters into output parameters via parametric algorithms. They are executed repeatedly, either to a schedule or on the occurance of an event. Once invoked, they run to completion.
The output of one function block can be linked to the input of another, see ControlCare Application
Designer Tutorials, Chapter 1.5. Such linkages exist both within a device or between devices.
Interfaces between function blocks located in the same device are locally defined. External links use the services of the function block shell, which provides access to FMS application layer services.
Function blocks are supported by resource and transducer blocks as well as by view, trend, alert and link objects as illustrated in Fig. 2.1.
Trend object
Link object
Local I/O
Transducer block
Function Block Application Process
Function block
Link object
Function block
View object
Link object Link object
Local hardware support
Resource block
Alert object
Link object
Fig. 2-1: Function block linkages (Fig 11, Foundation Fieldbus FF-800-1.3)
Figure 2-1 shows a general function block application process. The input parameter values to the transducer block and particular function blocks are collected from other blocks or, in the case of a transmitter, the sensor electronics. When the process is invoked, a snapshot is made of the momentary values, which are then used to execute the block. Any changes in input values during the execution are ignored.
Once the process has started, the algorithm takes the input values and generates outputs as it progresses. The execution is controlled by so-called contained parameters, which are not visible as input and output parameters, but which may be accessed and modified remotely as specified by the function block.
The operation of the algorithm may be affected by input events. The receipt of events during execution is regulated by a control function, which also generates corresponding output events.
On completion of the algorithm, the block data is saved for use on the next invocation and a snapshot is made of the output data. This is then released simultaneously for use in other function blocks.
Endress+Hauser 7
2 Function Block Application Process Guideline: FOUNDATION Fieldbus Function Blocks
2.2
Block objects
The various objects within the function block application process have the function described in
Table 2-1 below, see also Fig. 2.1:
Object
Resource blocks
Description
Only one resource block is defined for each fieldbus device. It contains the associated hardwarespecific characteristics. These comprise a set of contained parameters but no input or output parameters.
Transducer blocks
A resource block contains an algorithm that is used to control and monitor the operation of the device hardware. Its execution is dependent upon the characteristics of the physical device, as defined by the manufacturer. The algorithm might cause events to be generated during its execution.
Transducer blocks decouple local input/output functions from the function blocks. They read from sensor hardware and write to actuator hardware. This allows the transducer block to be executed as frequently as is necessary to obtain good data from the sensor or to ensure valid writes to the actuators without burdening the function block(s) to which they are linked. By having standardised signal as output, they also isolate the function block from vendor-specific characteristics of the sensor/actuator.
Function blocks Function blocks comprise a complete set of parameters, an algorithm and events. Unlike resource and transducer blocks, function blocks are executed to a schedule or on the occurance of an event. The algorithms perform input, ouput, calculation, logic and control functions for the application system. In the case of input and output functions, they are linked to the transducer blocks of actuators and sensors respectively, which are in turn connected to the actuator or sensor hardware.
View and trend objects View objects aid the management and control of function blocks by making the configuration and operational parameters visible to the user. They allow operator data to be grouped together for efficient transfer and processing.
Alert objects
Link objects
Trend objects provide history information which allows the behaviour of a function block to be examined.They allow short-term history data can be collected and saved within the device.
Alert objects generate messages when alarms and events are detected. They report these by sending an event notification and waiting a specified period of time for an acknowledgement.
This process is completed, even when the condition that triggered the alert no longer exists. If no acknowledgement is received within a predefined time-out, the event notification will be retransmitted. This ensures that the alert message is not lost.
The function block model recognises two types of alert: events and alarms. Events are used to report a change of status of a function block, for example when a parameter crosses a particular threshold. Alarms are used to report not only the status change, but also the return to original status.
Link objects contain information regarding the connecting together of the inputs and outputs of function blocks. They are also used to define external access to trend, view and alert objects.
They identify the parameter or object to be linked, the field message service (FMS) used to transfer the data and the virtual communications relationship (VCR) used for transfer. In the case of input/output parameter links, the remote parameter is also identified.
Tab. 2-1: Function block alpplication process objects
8 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 2 Function Block Application Process
Generation, access and storage
Usage
2.3
Block parameters
2.3.1
Parameter types
Resource blocks, transducer blocks and function blocks all contain parameters. They can be classified according two criteria:
• How they are generated, accessed and stored
• How they are used by the function block application process
Every parameter is characterized by one type attribute from each of these classes.
The type attributes associated with generation, access and storage are listed in Table 2-2 below:
Parameter type Description
Dynamic Dynamic parameters are normally read only. Their value is calculated by the block algorithm, e.g. the output value of a function block. If there is a power failure, they are recalculated.
Static
Non-volatile
Static parameters are normally read-write and have a specific configured value that seldom changes. If there is a power failure, they are restored by the device in which they reside. An interface or temporary device may write to them on an infrequent basis. All parameter changes are tracked by incrementing the static revision parameter ST_REV of the associated block, see Chapter 2.3.4, and generate an update event.
Non-volatile parameters are normally read-write and are frequently overwritten. If there is a power failure, the last saved value must be restored by the device. Normally changes in the value are not tracked.
Tab. 2-2: Parameter type attributes associated with generation and strarge
The type attributes associated with usage listed in Table 2-3 below:
Parameter type Description
Input Input parameters obtain their value from outside the block, normally thorough a link to an output parameter of another function block. The block algorithm will normally transform or operate on the input parameter to produce the block’s ouput value. Most blocks use a single input value in their algorithm, the so-called primary input value. The execution may be supported by other so-called secondary input values, see e.g. PID Control Block, Chapter 6.1.
Contained
Output
Contained parameters may be set by an operator, a higher level device, or calculated. They are parameters that reside within the block and cannot be linked to another function block input or output. They may be viewed, however, by an external application. An example of a contained parameter common to all blocks is the block mode parameter MODE_BLK.
Output parameters are normally generated by the block algorithm. Their value may be dependent on the value of the mode parameter of the block. The primary output parameter of a block will normally be linked to an input parameter of another function block. Some blocks also contain secondary output parameters such as alarm and event parameters that play a supporting role to the primary output parameter.
Tab. 2-3: Parameter type attributes associated with usage
Endress+Hauser 9
2 Function Block Application Process
Example
Guideline: FOUNDATION Fieldbus Function Blocks
2.3.2
Parameter identifiers
Details of the formal model for parameter identification can be taken from Foundation Fieldbus
Specification FF-890, Function Block Application Process, Part 1. Expressed briefly, the host application must be able to find any parameter in the system by means of a unique identifier. This is composed of two elements, which are put together to form the construct Tag.Parameter
• Tag is the block tag assigned to the function block by the host application
• Parameter is the DD member ID of the parameter and is unique to the block.
Using the Tag.Parameter construct, the host application is able to access the parameter value or its description, its data type index and the parameter semantics.
If the process value PV value of an Analog Input block is assigned the tag "TT100_AI_1.PV" by the engineering tool, the tag is expanded to show its two elements Value and Status using the
Tag.Parameter construct as follows:
TT100_AI_1.PV.Value and
TT100_AI_1.PV.Status
whereby the block tag is normally generated by default. Fig. 2-3 shows an example of export to an
OPC Server with tags taken from the control strategy. The project was off-line, hence the bad quality status.
Aliases
Fig. 2-2: Example of the Tag.Parameter construct in an OPC server (Tag View)
In some DCS systems it is possible to assign alias names to the parameter identifiers generated by the system. These are also exported to the OPC Server.
10 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
ST_REV
2 Function Block Application Process
2.3.3
Universal parameters
Resource blocks, transducer blocks and function blocks all operate in the same manner. To this end, there are a number of parameters that are common to all. These appear in the order below and are used for the following purposes:
Parameter
ST_REV
TAG_DESC
STRATEGY
ALERT_ KEY
MODE_BLK
BLOCK_ERR
Description
Indicates the revision level of the block’s static parameters and may be used in configuration management
Allows the entry of a block description (up to 32 characters) which may be used in a human interface or in block documentation to clarify the block application
Allows the entry of a user assigned value that may be used in configuration or diagnostics as a key in sorting block information
Allows the entry of a user assigned value that may be used in sorting alarms or events generated by a block
Determines the block operating mode and available modes for a block instance
Indicates the error status of hardware and software components associated with the block
Tab. 2-4: Universal parameters found in all function blocks
The parameters MODE_BLK and BLOCK_ERR are described in Chapter 2.4 and Chapter 2.8 respectively.
As described in Section 2.3.1, each block contains dynamic data, which change during the execution of the block and static data which normally do not. Since static data are seldom changed, a means is provided to avoid reading them more than once, unless they change. This is the static revision parameter ST_REV , which is incremented every time a static parameter attribute value is changed. It may also be incremented if a static parameter attribute is overwritten but the value is not changed.
Devices using the static data of another device receive a copy of ST_REV when either the static or dynamic data are read. As long as two successive copies match, the static data has not changed.
Should the ST_REV of a device change, the UPDATE_EVT parameter is output to alert other devices that one or more changes have occurred. A time stamp, relative parameter index and associated block index of the last parameter changed are included in the alert, along with the new value of ST_REV . If ST_REV has incremented by more than 1, the interface device will update all static data.
In order that downloads do not generate a burst of update alerts, these are not generated when a block is out of service. If a parameter is changed when the block is out of service, ST_REV is incremented as normal. This triggers an UPDATE_EVT alert when the block returns from OOS to an operational mode.
Endress+Hauser 11
2 Function Block Application Process
Control strategy and navigation tree
Guideline: FOUNDATION Fieldbus Function Blocks
2.3.4
Parameters in an Engineering Tool
Fig 2-3 shows a screenshot of a Process Cell navigation tree and the associated control strategy in the engineering tool Application Designer. Other DCS systems have similar views.
Off Line Characterization dialog
Fig. 2-3: Process Cell and cascade control stratetgy created off-line in ControlCare Application Desogner
The control strategy contains the blocks to be used to perform a particular control action together with the links between them. How it is created will depend on the engineering tool. The tool will normally assign a default block tag according to the naming preferences selected in it. As the links are made between the function blocks, the input and output parameters are added to the navigation tree. The arrows in the control strategy are in fact visualizations of the link objects, and the navigation tree a visualization of the tag.parameter construct.
The engineering tool will normally have an dialog which allows the function block parameters to be configured offline. Fig. 2-4 shows an example from Application Designer.
12
Fig. 2-4: Example of Off Line Characterization dialog
The dialog shows the parameters associated with the block in the dialog header. These are arranged in a tree, and depending upon data type, they can be expanded to show their elements. For example, the PV parameter expands to show the two elements PV.VALUE and PV.STATUS. The dialog also shows the value, the offset within the block and whether the parameter is read-write (RW) or Read
Only (RO).
Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 2 Function Block Application Process
On Line Characterization dialog
The engineering tool will normally have an dialog which allows the function block parameters to be viewed online. Fig. 2-5 shows an example from Application Designer.
Fig. 2-5: Example of On Line Characterization dialog with parameter quality
The PV parameter can be expanded to observe the status.
Now expand the MODE_BLK parameter and set the Target to OOS (out of service). To do this Press
Edit , click in the Value space, select OOS from the drop-down menu, then click End Edit . Note that the PV status changes from Good to Bad. Toggle between status codes and texts with the button
. Put the block target back into Auto, and note that the quality changes from bad to good again.
The execution of a block involves the inputs, outputs, contained parameters, and the algorithm of the block. The execution time for a block algorithm is defined as a parameter of the block. Its value is dependent on how the block was implemented.
2.3.5
Changing function block parameters
In most engineering tools, function block parameters may be set either off-line, e.g. during the planning stage, or on-line when the project is running. When on-line, Read Only parameters show the current values generated by the devices in the project.
With a few exceptions, e.g. SP of a PID block, Read/Write parameters are not directly editable online and the block must be put out of service before they can be changed.
Endress+Hauser 13
2 Function Block Application Process
Retained target mode
Guideline: FOUNDATION Fieldbus Function Blocks
2.4
Block operation
2.4.1
Block mode parameter MODE_BLK
The MODE_BLK parameter controls the operational mode of the block. It has four elements with the functions summarized in Table 2-5.
Element
Target mode
Actual mode
Permitted mode
Normal mode
Description
Sets the mode in which the block should normally operate. Most blocks have the target mode
Auto, exceptions being output and cascaded PID blocks which normally operate in Cas mode.
In addition, when parameters are changed on-line, the Target mode must normally be changed to OOS (out of service) before the change can be made.
Indicates the current mode of operation of the block. This may differ from the target mode, because under certain operating conditions, a block may not be able to reach the target mode, e.g. because it is not configured correctly or not receiving the correct information from an upstream or downstream block linked to it.
Lists the modes in which a block is able to operate. The modes supported vary according to the type and function of a block.
The normal mode indicates the mode in which the block normally operates. This parameter is not supported by all devices.
Tab. 2-5: MODE_BLK parameter elements
The user sets the target mode when the block is configured. When it goes on-line, the algorithm checks if the block can be executed in the requested mode. If this is not possible, the mode with the priority nearest to the target mode is selected, see Chapter 2.4.3. The actual mode displays the current mode of block operation.
When the target mode is OOS, Man, RCas or ROut, see Chapter 2.4.2, the target mode attribute may retain information about the previous target mode. This information may be used by the block in mode shedding and setpoint tracking, see Chapter 2.4.4.
2.4.2
Block modes
Resource blocks, transducer blocks or function blocks may support one or more of the modes listed in Table 2-6 below. They may be operated only in the modes they support.
Block Mode
Out of service (OOS)
Description
In this mode, the block is not executed. The output is maintained at last value or, in the case of output blocks, the output value may be maintained at an assigned fault state value.
For control blocks, the setpoint is maintained at last value, see Chapter 2.4.4.
Initialization manual (Iman) This mode cannot be requested through the target mode. Blocks connected to a downstream block by a back calculation link (BKCAL_OUT/BKCAL_IN) are forced into it when the status of the parameter indicates that the downstream block is not in cascade
(Cas mode). The normal algorithm is not executed, and the output tracks the
(BKCAL_IN) parameter. The setpoint may be maintained or initialized to the value of the process variable parameter.
Local override (LO) This mode is to be found in control and output blocks that support a track input parameter (TRK_VAL). Tracking is enabled in the Control Options parameter group, see
Chapter 2.8.2, and is initiated by the TRK_IN_D discrete parameter. For some devices a local lock-out switch must be used to enable Local Override.
Manual (Man)
In the local override mode, the block output tracks the value of the track input parameter
(TRK_VAL). The algorithm initializes so that no bump is experienced when the mode switches from LO back to the target mode. The setpoint may be maintained or initialized to the process variable parameter value.
In this mode, the block output is not calculated, but set by the operator. It may be limited.
The algorithm initializes so that no bump is experienced when the mode switches. Any setpoint may be maintained or initialized to the value of the process variable parameter or to the setpoint value associated with the previous (retained) target mode.
14 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 2 Function Block Application Process
Block Mode
Automatic (Auto)
Cascade (Cas)
Remote cascade (RCas)
Remote output (ROut)
Description
This is the normal operating mode of the majority of blocks. For control blocks operating in this mode, a local setpoint value SP is used by the normal block algorithm to determine the primary output value. The local setpoint value may be overwritten on-line – without changing the target mode to OOS – by a user using Application Designer or a SCADA program such as ControlCare P View.
This is the normal operating mode of a cascaded control block or output block. In this mode, the setpoint value used in the block algorithm is the cascade input v alue (CAS_IN) provided by an upstream function block. This and the BKCAL_OUT parameter are used to establish a bumpless cascade with the upstream block.
Note: the target mode of PROFIBUS output blocks integrated via the SPC173 Field
Controller is Auto.
In this mode, the setpoint value used in the block algorithm is the remote cascade input parameter (RCAS_IN) provided by an external control application. A remote cascade output parameter (RCAS_OUT) is maintained by the block to support initialization of the control application when the block mode is not remote cascade. The control application acts as a normal upstream block. Its algorithm is not synchronized to the function block schedule, however, and it does not use a link to transfer the setpoint to the block.
In this mode, the block output is not calculated but set to the value of the remote-output input parameter (ROUT_IN) provided by an external control application. A remoteoutput output parameter (ROUT_OUT) is maintained by the block to support initialization of the control application when the block output is not provided remotely.
The control application acts as a normal upstream block. Its algorithm is not synchronized to the function block schedule, however, and it does not use a link to transfer the setpoint to the block.
Tab. 2-6: Possible operation modes for fuinction blocks
Table 2-7 summarizes the source of the setpoint value SP and the output value OUT for the various modes.
Man
Auto
Cas
Rcas
Rout
Block mode Source of SP
OOS
Iman
LO
User
User
PID/EPID/APID: User
AO/DO: Fault state (last value or FSTATE_VAL)
Source of OUT
User
Other function block - following BKCAL_IN parameter
PID/EPID/APID: Other function block following
TRK_VAL parameter
AO/DO: Fault state (last value or FSTATE_VAL)
User
User (for PROFIBUS AO, PID)
User
Block algorithm
Other function block - following CAS_IN parameter Block algorithm
Control application running on an interface device Block algorithm
Block keeps last value Control Application running on an interface device
Tab. 2-7: Source of SP and OUT as a function of block mode
Endress+Hauser 15
2 Function Block Application Process Guideline: FOUNDATION Fieldbus Function Blocks
2.4.3
Mode priority
Each mode has an associated priority, see Table 2-8. Priority is used when the block calculates the actual mode or checks whether write access is allowed for a particular mode or another of higher priority. To calculate the actual mode, the block checks whether certain conditions are present which will prevent a change to the mode with the next lower priority.
Mode
OOS
IMan
LO
Man
Auto
Cas
Rcas
Rout
Description
Out of Service
Initialization Manual 6
Local Override 5
Priority
7 - highest
Manual
Automatic
Cascade
Remote Cascade
Remote Output
4
3
2
1
0 - lowest
Tab. 2-8: Block modes with corresponding priorities
When a block goes online, the actual mode is set to OOS. The block now checks whether it may change to the Iman mode. This is the case when all block parameters are valid and the target mode is not set to OOS, see Table 2-10. This procedure is repeated through all the modes supported by the block until the target mode is achieved. For instance, if the target mode is Cas, the conditions for OOS, IMan, LO, Man and Auto must be checked in this order. If all conditions are false, the actual mode will be the same as target mode.
Table 2-9 summarizes the conditions that force a block to operate in a particular mode when they are true.
Block Mode Conditions
OOS • Resource block is in OOS (resource state is Standby)
• Enumerated parameter has an invalid value
IMan
LO
• BKCAL_IN.status is Bad
• BKCAL_IN.status is Good - Fault State Active, Not Invited or Initialization Request.
• Fault state is active (in an output function block)
• CONTROL_OPTS.Track Enable active and TRK_IN_D is active.
• If target is Man then the CONTROL_OPTS.Track in Manual must be active
Man
Auto
• Target mode has just been changed manually from OOS
• Status attribute of primary input parameter (IN parameter) is Bad or Uncertain with option to treat
Uncertain as Bad and Bypass not set.
• Target mode is RCas or ROut and SHED_OPT=shed to Manual or shed to next
• Target mode is Cas and CAS_IN.status=Bad or cascade initialization not completed
• Target mode is RCas and RCAS_IN.status=Bad and SHED_OPT=shed to Auto or shed to next
• Target mode is ROut and ROUT_IN.status=Bad and SHED_OPT = shed to Auto or shed to next.
Cas
RCas
ROut
• Actual mode last execution was Cas.
• Target mode is Cas and cascade initialization has just completed
• Target mode is RCas and RCAS_IN.status=Bad and SHED_OPT=shed to next and cascade initialization has just completed
• Target mode is ROut and ROUT_IN.status=Bad and SHED_OPT=shed to next and cascade initialization has just completed
• RCas cascade initialization has just completed or actual mode last execution was RCas.
• ROut cascade initialization has just completed or actual mode last execution was ROut.
Tab. 2-9: Conditions governing Actual Mode calculation
16 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Trouble-shooting
2 Function Block Application Process
If a function block does not run in the desired target mode, Table 2-10 can be used to analyze the possible reason.
Target Mode Symptom, cause and remedy
OOS Block remains in OOS
• Resource block target mode is OOS
– Set the Resource block target mode to Auto
• Bad status for enumerated parameters
– Check that block has been configured correctly
Iman
LO
Block remains in Iman
• BKCAL_IN.status is Bad
– Link failure in backward path BKCAL_OUT/ BKCAL_IN
• BKCAL_IN.status is NotInitiated
– Downstream block can not execute in Cas
Check the target mode of downstream block as well fault state condition
– Link failure in forward path OUT/CAS_IN
Target mode LO cannot be attained
• CONTROL_OPTS setting wrong
– Check if setting is Track Enable or Track in Manual
• Value and status of TRK_IN_D wrong
– Check link, condition for activation, upstream block configuration
• Value and status of TRK_VAL bad
– Check parameter settings
• CAS_IN status of downstream block bad
– Check if CAS_IN and the delay time for fault state are being forced by FSTATE_TIME
Man
Auto
Cas
Block does not reach target mode Cas
• IN status bad
– Link failure in backward path BKCAL_OUT/ BKCAL_IN
– Link failure in forward path OUT/CAS_IN
Block does not reach target mode Rcas or Rout
• Block not synchronized
– Check that the update rate of RCAS_IN and ROUT_IN of the control application corresponds to the values in SHED_RCAS and SHED_ROUT respectively
• SHED_OPT parameter set Shed to Manual, no return; remote communcation has failed
– When communication reestablished, reset target mode to RCas or ROut
Block does not reach Auto
• Bad status for enumerated parameters
– Check that block has been configured correctly
– Check all parameters required for the block algorithm have been set
Block does not reach target mode Cas
• IN status bad
– Link failure in backward path BKCAL_OUT/ BKCAL_IN
– Link failure in forward path OUT/CAS_IN
Block does not reach target mode Rcas or Rout
• Block not synchronized
– Check that the update rate of RCAS_IN and ROUT_IN of the control application corresponds to the values in SHED_RCAS and SHED_ROUT respectively
• SHED_OPT parameter set Shed to Auto, no return; remote communcation has failed
– When communication reestablished, reset target mode to RCas or ROut
Block does not reach target mode Rcas or Rout
• Block not synchronized
– Check that the update rate of RCAS_IN and ROUT_IN of the control application corresponds to the values in SHED_RCAS and SHED_ROUT respectively
Tab. 2-10: Trouble-shooting table for block target mode
Endress+Hauser 17
2 Function Block Application Process
SHED_OPT
Guideline: FOUNDATION Fieldbus Function Blocks
2.4.4
Mode shedding
Mode shedding is a mechanism that allows the function block application process to interface with external, proprietary control applications running e.g. on a host computer, distributed control system controller (DCS) or programmable logic controller (PLC). Such applications are allowed to adjust the setpoint value SP of a function block in RCas mode and/or its primary output value OUT in ROut mode. When they do, they provide the application with the value of each parameter together with its status.
In order to ensure bumpless transfer in the event of an interface failure or a breakdown in communication, the function block involved monitors the traffic between the external application and itself. If a new value is not received within a specified "update time", determined by the parameters SHED_RCAS and SHED_ROUT in the device resource block, or a bad status is received, then the function block mode is changed to a non-remote mode of higher priority.
4
5
6
7
The SHED_OPT parameter is to be found in control and output blocks and configures the desired behavior when a remote mode, i.e. Rcas and Rout is shed. It also determines whether the shed mode is to be maintained once the RCAS_IN or ROUT_IN parameter updating is recovered. Table 2-11 summarizes the options
Index
0
1
2
3
8
Meaning
Uninitialized - Invalid
Normal shed, Normal return
– Actual mode changes to the next lowest priority non-remote mode permitted but returns to the target remote mode when the remote computer completes the initialization handshake.
Normal shed, No return
– Target mode changes to the next lowest priority non-remote mode permitted. The target remote mode is lost so there is no automatic return to it.
Shed to Auto, Normal return
– Target mode changes to Auto but returns to the target remote mode when the remote computer completes the initialization handshake.
Shed to Auto, No return
– Target mode changes to Auto. The target remote mode is lost so there is no automatic return to it.
Shed to Manual, Normal return
– Target mode changes Man but returns to the target remote mode when the remote computer completes the initialization handshake.
Shed to Manual, No return
– Target mode changes to Man. The target remote mode is lost so there is no automatic return to it.
Shed to Retained target, Normal return
– Target mode changes to retained target but returns to the target remote mode when the remote computer completes the initialization handshake.
Shed to Retained target, No return
– Target mode changes to retained target. The target remote mode is lost so there is no automatic return to it.
Tab. 2-11: Mode shedding options offered by Application Designer in RCas and Rout modes
18 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Linearization
Time constant
2 Function Block Application Process
2.5
Parameter calculation
2.5.1
Process variable PV
The process variable (PV) parameter of a block reflects the value and status of the primary input value or calculated value based on a multiple input. Depending on the function block it is characterized as follows:
• In the PID control and analog alarm (AALM) blocks, PV is the IN parameter after filtering
• In the analog input (AI) and output (AO) blocks, PV reflects the value from the transducer or transducer readback respectively, after filtering
• In the Arithmetic block (ARTH), PV is the combination of two input parameters for range extension.
Although it is a contained parameter, PV has a status. This is a copy of the primary input status or, when PV is based on multiple inputs, the worst encountered status. The PV value reflects the value of the calculated input regardless the mode of the block, unless its input is not usable. In this case,
PV holds the last usable value.
The parameter L_TYPE allows one of the following linearisation types to be selected:
Direct
Indirect
Indirect square root
With this setting the measured value from the transducer block (input value) avoids the linearisation function and is looped unchanged with the same unit through the block.
PV = Input value
The scaling and unit of XD_SCALE and OUT_SCALE must be the identical, otherwise the block will switch to OOS.
With this setting the measured value from the transducer block (input value) is re-scaled linearly via the input scaling XD_SCALE to the desired output range OUT_SCALE
PV =
X
100
– – Z where X = FIELD_VAL, Y = OUTSCALE_100%, Z = OUTSCALE_0%
With this setting the measured value from the transducer block (input value) is re-scaled via the parameter group XD_SCALE and recalculated using an evolution function. It is then rescaled again to the desired output range via the parameter group OUT_SCALE..
PV =
X
100
– – Z where X = FIELD_VAL, Y = OUTSCALE_100%, Z = OUTSCALE_0%
A damping filter may be applied in the PV signal through the time constant parameter PV_FTIME.
This represents the time in seconds PV requires to reach 63.2% of the final value after a step change to the input. If the PV_FTIME value is zero, the filter is disabled.
Endress+Hauser 19
2 Function Block Application Process Guideline: FOUNDATION Fieldbus Function Blocks
Scaling algorithm
2.5.2
Scaling parameters XD_SCALE, PV_SCALE, OUT_SCALE
A control system must deal with a number of different signals, e.g. 4 mA to 20 mA, relays, pulse, fieldbus etc. as well as a variety of engineering units. The scaling parameters are used to convert from one set of units to another. There are two main applications:
• Display devices require the range and engineering units for bar graphs and trending
• Control blocks require the range as percent of span, so that the tuning constants can remain dimensionless.
There are three main scaling parameters which operate back-to-back across a function block,
XD_SCALE , PV_SCALE and OUT_SCALE . Normalized parameters are used between the two scalings, which is reflected in a number of contained parameters that can be viewed only in % of scale, see Fig. 2-8. Each scaling parameter has four elements:
• EU_100:
• EU_0:
Upper range-end value in engineering units
Lower range-end value in engineering units
• UNITS_INDEX: Engineering units of range-end values
• DECIMAL: Number of figures after the decimal point (default = 2)
The scaled value is obtained from the formulae:
• Conversion to % of scale: VALUE% = (VALUE - EU_0) * 100/ (EU_100 - EU_0)
• Conversion to engineering units: VALUE = [VALUE%* (EU_100 - EU_0) /100 ] + EU_0
By default, the EU_0 and EU_100 parameters are set to 0 and 100 respectively.
XD_SCALE
PV_SCALE
EU_100 100%
Block
Algorithm
EU_0 0%
0% 100% EU_0 EU_100
OUT_SCALE
OUT_RANGE parameters
Fig. 2-6: Scaling of block parameters
Table 2-12 summarizes the typical use of the scaling parameters in the blocks in which they appear.
Block
Analog Input (AI)
XD_SCALE PV_SCALE
Scales transducer output range n/a
OUT_SCALE
Scales to engineering range
PIDcontrol n/a Engineering range to % of scale % of scale to engineering range
Analog Output (AO) Scales to transducer input range Scales to engineering range n/a
Tab. 2-12: Typical scaling parameter usage in different function blocks
A number of blocks offer an OUT_RANGE or similar range parameter which scales the associated value for output to a HMI. The ranging proceeds in exactly the same way as for the SCALE parameters.
20 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Example using scaling parameters
2 Function Block Application Process
The temperature of the liquid in a small feed tank is to be kept constant at around 60°C. The tank is heated by a heating element with a 4 mA –20 mA control input and which is capable of heating the tank to 120°C. The temperature is measured by a 4 mA – 20 mA transmitter with a measuring range of -50°C to +150°C. A simple AI – PID – AO loop is used to control the input signal to the heater element controller.
Analog Input Block
The 4 mA to 20 mA input signal is converted to a % scale via the XD_SCALE parameter:
EU_100 = 20; EU_0 = 4; UNITS_INDEX = mA and DECIMAL = 2 (default)
The temperature signal in °C is obtained from the OUT_SCALE parameter:
EU_100 = 150; EU_0 = –50; UNITS_INDEX = °C and DECIMAL = 2 (default)
PID Control Block
The setpoint SP and the IN value are in °C, but PID algorithm works internally with values in percent of span. The PID block therefore converts the error to percentage (PV_SCALE), it calculates the output in percentage, and then it converts to engineering unit of output (OUT_SCALE).
The –50°C to 150°C input signal is converted to % of scale with the PV_SCALE parameter:
EU_100 = 150; EU_0 = –50; UNITS_INDEX = °C and DECIMAL = 2 (default)
If setpoint SP = 60°C and IN = 50°C, the scaled values are, see also previous page,
SP% = (60+50)*100/(150+50) = 55.00%
PV% = (50+50)*100/(150+50) = 50.00%
The PID algorithm calculates the error in percent. If reverse action is configured, the error is the difference between SP% and PV%.
Error% = SP% - PV % = 5.00%
The PID algorithm applies the Error% to the calculation of the P, I and D terms. If, for the sake of simplicity, only the proportional term is enabled, the value of the output is:
GAIN = 2.0; RESET = +INF; RATE = 0.0; OUT% = 10.00%
The output value could be converted from percentage to engineering units with the OUT_SCALE parameter, however, in order to illustrate scaling in the Analog Output block, in the example the output is set to %:
EU_100 = 100; EU_0 = 0; UNITS_INDEX = % and DECIMAL = 2 (default)
OUT = 10%
Analog Output Block
The heating coil controller requires a 4 –20 mA signal at its input, which is done though the two scaling parameters PV_SCALE which converts the CAS_IN value to 0% – 100% and the XD_SCALE parameter which converts from 0% – 100% to the signal range required by the transducer, in our case, 4 mA –20 mA.
For PV_SCALE: EU_100 = 100; EU_0 = 0; UNITS_INDEX = % and DECIMAL = 2 (default)
For XD_SCALE: EU_100 = 20; EU_0 = 4; UNITS_INDEX = mA and DECIMAL = 2 (default)
The CAS_IN signal of 10% is unchanged after PV scaling. The OUT value and the value at the transducer channel is:
10*(16 mA – 4 mA)/100 + 4 mA = 5.6 mA
It should be noted that the readback signal from the transmitter is subject to a scaling in the other direction, i.e. XD_SCALE => (0% – 100%) => PV_SCALE, so that the BKCAL_OUT parameter is always in the same units as are output by the PID block.
Endress+Hauser 21
2 Function Block Application Process
Setpoint limits
Setpoint rate limits
Guideline: FOUNDATION Fieldbus Function Blocks
2.5.3
Setpoint SP
A setpoint is required by all control and output blocks. In non-cascaded control blocks it is set by the user in Application Designer. For output blocks and cascaded control blocks, it is provided by the CAS_IN parameter, see also Table 2-7. In addition, it is also possible to write a setpoint from a remote application when the block is operating in RCas mode.
Application Designer allows the user to apply limits to the setpoint value SP by entering appropriate values in the SP_HI_LIM and SP_LO_LIM parameters. These apply only if the block is operating in Auto mode. If the limits are to apply when the block is operating in Cas or RCas mode, then the option "Obey SP limits if Cas or RCas" must be selected in the CONTROL_OPTS parameter.
To avoid bump when the setpoint SP is changed, a ramp can be applied by entering appropriate values in SP_RATE_UP and SP_RATE_DN . Whether this function is available depends upon the block type and the block mode.
Target SP
Decrease in SP
Increase in SP
Time
Value SP
DELTA_2
DELTA_1
Time
DELTA_1/SP_RATE_UP DELTA_2/SP_RATE_DN
Fig. 2-7: Effect of SP_RATE_UP nad SP_RATE_DOWN on a change in setpoint
The setpoint rate limits can be applied to the:
• PID block in Auto mode
• AO block in Auto, Cas or RCas modes.
When the block is in Auto mode and the user changes the setpoint SP to a value greater than the current value, then the SP value ramps upward at a rate based on the parameter SP_RATE_UP . If the new setpoint is less than the current value, the SP value ramps downward at a rate based on the
SP_RATE_DN . If the parameter SP_RATE_DN and/or SP_RATE_UP is zero the rate limiting is disabled.
The Table 2-13 summarizes the conditions for setpoint limits and setpoint rate limits.
Block type Mode
PID
Required configuration for SP limits
SP_HI_LIM/SP_LO_LIM
None Auto
Cas/Rcas CONTROL_OPTS
"Obey SP limits if Cas or Rcas" is true
AO Auto None
Cas/Rcas Not applicable
Required configuration for SP rate limits
SP_RATE_UP/SP_RATE_DN
SP_RATE_UP/SP_RATE_DN not zero
Not applicable
SP_RATE_UP/SP_RATE_DN not zero
SP_RATE_UP/SP_RATE_DN not zero.
Tab. 2-13: Configuration of setpoint limit and rate limits
22 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Setpoint tracking PV
Ouput limits
2 Function Block Application Process
Some control strategies require that the transition from a "manual" mode (Rout, Man, LO and Iman) to an "auto" mode (Auto, Cas, Rcas) must be done with the control error equal to zero. In this case, the setpoint SP must be set equal to process value PV.
The CONTROL_OPTS of the PID block and the IO_OPTS of the AO block allow setpoint tracking of the process value to be activated when the block is in a "manual" mode.
This option is summarized in the following Table 2-14:
Option
SP-PV Track in Man
SP-PV Track in Rout
SP-PV Track in LO or Iman
CONTROL_OPTS
(PID)
X
X
X
IO_OPTS
(AO)
X
X
Meaning
The SP tracks the PV when the target mode is Man.
The SP tracks the PV when the actual mode is Rout.
The SP tracks the PV when the actual mode is LO or Iman.
Tab. 2-14: Setpoint tracking in CONTROL_OPS and IO_OPS
2.5.4
Ouput variable, OUT
When the actual block mode is Auto, Cas or RCas, the normal block algorithm is executed and the result output as the OUT parameter. This calculation is specific for each function block type. If the mode is a "manual" mode, the output will follow a value provided by another block (LO, Iman), the user (Man) or a control application running on an interface device (Rout).
In the PID and ARTH function blocks the parameters OUT_HI_LIM and OUT_LO_LIM can be used to limit the range of the OUT value. The limitation applies to all modes. For the PID block, output limits can be disabled in manual mode by selecting the option "No OUT limits in Manual" in the CONTROL_OPTS parameter.
2.5.5
Back calculation
The purpose of back calculation is to provide a value at the BKCAL_OUT (or BKCAL_SEL_N ) parameter that will cause the output of the upstream block to do the right thing to provide a bumpless mode transfer should there be no path from the downstream block to the final control element. BKCAL_OUT is linked to BKCAL_IN in all cases where it is used, and BKCAL_IN always sets the output value when the status requires that action.
The BKCAL_IN parameter carries the feedback, i.e. value and status, from the BKCAL_OUT parameter of a downstream control or analog output block. When BKCAL_IN is linked, the PID
Control block always acts on the status it carries. Should the status of BKCAL_IN indicate that there is no path to the final element, the block assumes IMan mode and initializes.
If the actual mode of the block is Auto, Cas, or Rcas and BKCAL_IN sees a limit status of high or low, the block will treat the value as the high or low OUT where the OUT limit may be the value offset by the block’s BKCAL_HYS parameter. The actual mode will not change, and the output will be free to move away from the limit.
If the actual mode of the block is Auto, Cas, or Rcas and BKCAL_IN sees a limit status of constant, the block will set its OUT to the BKCAL_IN value. It will not set the actual mode to IMan, unless the sub-status requires it.
If the status of BKCAL_IN is Bad, the actual block mode will go to IMan. The source of CAS_IN or BKCAL_IN is normally a block that follows the initialization procedure. If the source is a calculation block, the status may be Good (Non-cascade). If the source is a constant, the status may be Uncertain with an Initial or Substitute Value sub-status. In these cases, the initialization procedure will not be followed. The block will go immediately to its target mode when all other conditions are met.
Endress+Hauser 23
2 Function Block Application Process Guideline: FOUNDATION Fieldbus Function Blocks
2.6
Status handling
Fieldbus devices have the ability to detect faults that make a measurement bad or prevent an actuator from responding. This information is transmitted together with the value generated by the device in the form of a status attribute. One of the most important features of the function block application process is that the status is passed with the value from one block to another block and can be accessed by an interface device for use in a human interface or a historian.
2.6.1
Status propagation
Fig. 2-9 shows the information flow in a simple control loop. In the so-called forward path, the primary output value of the Analog Input (AI) block provides the input to the PID control block and the primary output of the PID block provides the input to the Analog Output (AO) block. This acts on the information, e.g. by opening or closing the connected valve, and reports the position change to the PID block via the so-called backward path by means of the back calculation parameter.
Backward path
AI
Primary output
Back calculation input
Primary input
Primary output
PID
Cascade input
Back calculation output
AO
Forward path
Fig. 2-8: Information flow in a simple control loop
Each value exchanged along the loop has an associated status. In our example, the status of the primary output of the AI block will be used as the status of the primary input of the PID block.
Simularly, the status of the back calculation output of the AO block is passed on to the back calculation input of the PID block. There is no specific propagation rule for statuses within blocks, however, so it is perfectly feasible that the status of the primary input of the PID Control block is
"Bad", but the primary output has the status "Good".
In normal operation all statuses within the loop will be "Good". A "Bad" status can be generated by a number of situations, e.g. by putting a block into manual mode when changing parameters online, incorrect configuration of the block, communication failure, device failure etc. Once the cause of a "Bad" status has been remedied, the follow-up statuses will normally turn to "Good" again. It is possible, however, to configure the application such that certain status changes require an acknowledgement before they return to "Good" again
2.6.2
Status message
All input and output parameters and some contained parameter values, e.g. setpoint SP and process value PV, are accompanied by a status. This gives the receiver information not only about the quality of the value but also information that it can use in exceptional circumstances. The status itself comprises three components: quality, substatus and limits, as described in Table 2-15.
Table 2-16 lists the possible status messages that can occur during operation. The hexadecimal value indicates that the "Not Limited" limit status is active. Each message may be output with the alternative limit status "High Limited", Low Limited" or "Constant". The associated hexadecimal values are 1, 2 or 3 units higher than that in the table. In ControlCare Application Designer, the numerical value of the status parameter can be displayed by pressing the Symbol button in the toolbar, , see also Appendix A.
24 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Status attributes
Substatus values
Endress+Hauser
2 Function Block Application Process
Bad
Bad
Bad
Bad
Bad
Bad
Bad
Bad
.
Status attribute Description
Quality Provides an indication of whether the value can be used in subsequent block processing. It may assume one of four values:
• Good Cascade : the quality of the value is good; it may be part of a cascade path
• Good Non-Cascade : the quality of the value is good; the block has a cascade path
• Uncertain: the quality of the value cannot be determined, but the value may still be useful
• Bad : the value is not useful.
Substatus
Limits
Complements the quality and carries information to initialize or break cascade control, alarms and others. There are different sets of substatus for each quality, which are listed in Table 2.14.
Provides information on whether the associated value is limited or not, as well the direction of the limits. The limits are classified as:
• Not Limited : the associated value is within limits or no limits have been set
• High Limited : the associated value is violating a high limit
• Low Limited: the associated value is violating a high limit
• Constant : the block sending the status is operating in IMAN, MAN or LO mode
Tab. 2-15: Status attributes
Quality Substatus Hex value
Not in
X
X
Cascade path
Forward Backward
X
X
X
X
0 = Non-specific (lowest priority)
1 = Configuration Error
2 = Not Connected
3 = Device Failure
4 = Sensor Failure
5 = No Communication, Last Usable Value
6 = No Communication, No Usable Value
7 = Out of Service (highest priority)
0x00
0x04
0x08
0x0c
0x10
0x14
0x18
0x1c
X
X
X
X
X
X
X
X
X
Quality Substatus
Uncertain 0 = Non-specific (lowest priority)
Uncertain 1 = Last Usable Value
Uncertain 2 = Substitute
Uncertain 3 = Initial Value
Uncertain 4 = Sensor Conversion not Accurate
Uncertain 5 = Engineering Unit Range Violation
Uncertain 6 = Sub-normal
Quality Substatus
GoodNC
GoodNC
GoodNC
GoodNC
GoodNC
GoodNC
GoodNC
0 = Non-specific (lowest priority)
1 = Active Block Alarm
2 = Active Advisory Alarm
3 = Active Critical Alarm
4 = Unacknowledged Block Alarm
5 = Unacknowledged Advisory Alarm
6 = Unacknowledged Critical Alarm
Quality Substatus
GoodC
GoodC
GoodC
GoodC
GoodC
GoodC
GoodC
GoodC
0 = Non-specific (lowest priority) 0xc0
1 = Initialization Acknowledge(IA) 0xc4
2 = Initialization Request(IR)
3 = Not Invited (NI)
0xc8
0xcc
4 = Not Selected(NS)
6 = Local Override(LO)
7 = Fault State Active(FSA)
8 = Initiate Fault State (IFS)
0xd0
0xd8
0xdc
0xe0
0x80
0x84
0x88
0x8c
0x90
0x94
0x98
Hex value
Hex value
0x40
0x44
0x48
0x4c
0x50
0x54
0x58
Hex value
Not in
X
X
X
X
X
X
X
Cascade path
Forward Backward
Not in
X
X
X
X
X
X
X
Cascade path
Forward Backward
Not in
Cascade path
Forward Backward
X
X
X
X
X
X
X
X
X
Tab. 2-16: Substatus values as a function of status quality
25
2 Function Block Application Process
Status options
Guideline: FOUNDATION Fieldbus Function Blocks
2.6.3
Substatus and limit propagation
The manner in which the status of block input parameters is propagated and used in the calculation of the block output status is determined for each function block type. The specific rules are described for each block, however, there are some general rules:
Rule Upstream status
Bad "Out of Service", "No Communication" are not propagated, as they are local to the block where they occur
Bad. Out of Service, Not Limited
Bad. No Communication, No Usable
Value, Not Limited
Bad "Sensor failure", "Device failure" are propagated intact through non-control functions. Control blocks generate an alert based on the input receiving the bad status.
Bad. Sensor Failure. Not Limited
Bad. Device Failure. Not Limited
Bad. Configuration Error. Not Limited
Received status
Bad. Non-specific, Not Limited
Bad. Sensor Failure. Not Limited
Bad. Device Failure. Not Limited
Bad. Non-Specific. Not Limited
Control blocks do not normally propagate input status to their output parameters.
Control Selector is an exception.
Input: Bad. Non-Specific. High
Limited
Uncertain substatusess are not propagated Uncertain. Subnormal.Not limited
GoodNC is propagated as GoodNC - Nonspecific, since all of substatuses are local
GoodNC. *** . Not Limited
GoodNC alarm substatuses are not propagated
Substatus is not propagated when two or more measurements are combined
Output. GoodC. Non-Specific. Not
Limited
Uncertain.Non-specific.Not limited
GoodNC. Non-Specific. Not Limited
GoodNC. Active Critical Alarm. Not
Limited
GoodNC. Non-Specific. Not Limited
GoodNC. Active Advisory Alarm. Not
Limited
GoodNC. Non-Specific. Not Limited
GoodNC. Non-Specific. Not Limited
MAN mode GoodC. Non-Specific. Constant A manual mode output is constant, but never uncertain
GoodC substatuses are propagated according to the function block type
GoodC. ***. Not Limited GoodC. ***. Not Limited
Tab. 2-17: General rules for status propagation
In addition to the general rules, specific options may be selected in some function blocks using the
STATUS_OPTS parameter. :
Bit
0
1
2
3
4
5
6
7
8
9
10 -
15
Option
IFS if BAD IN
IFS if BAD CAS_IN
Uncertain as Good
Propagate Fail Forward
Description Block
Sets Initiate Fault State status in the OUT parameter if the status of the
IN parameter is Bad.
PID
Sets Initiate Fault State status in the OUT parameter if the status of the
CAS_IN parameter is Bad
PID
If the status of the IN parameter is Uncertain, treats it as Good.
Propagates a transducer block status Bad.DeviceFailure or
Bad.SensorFailure to OUT without generating an alarm
PID, IS
AI, DI
Propagate Fail Backward AO, DO
Target to Manual if BAD IN Sets the target mode to Man if the status of the IN parameter is BAD.
This latches a PID block into the Man state if the input ever goes bad.
Uncertain if Limited Sets the output status of the block to Uncertain when limit alarms
HI_HI_, HI_, LO_ or LO_LO_ are violated
PID
AI
BAD if Limited
If the status from the actuator is Bad "Device failure" or "Fault State
Active", or Local Override is active, propagates this as Bad "Device
Failure" or Good Cascade "Fault State Active", or Local Override to
BKCAL_OUT respectively without generating an alarm.
Uncertain if Man
Target to next permitted mode if BAD CAS_IN
Reserved
Sets the output status of the block to Bad when limit alarms HI_HI_,
HI_, LO_ or LO_LO_ are violated
Sets the output status of the block to Uncertain if the actual mode of the block is Man
AI
AI, DI, IS;
IT
Sets the target mode to next permitted mode if the target mode is CAS and the status of CAS_IN is BAD.
PID
Tab. 2-18: Satus options (STATIUS_OPTS)
26 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Forward path
2 Function Block Application Process
2.6.4
Control loop integrity
The status of control and output block parameters is used for a number of purposes, e.g. to ensure bumpless transfer from one operating mode to another, to prevent reset windup, etc.
Closed-loop control normally includes an integrator, which drives the valve to the position required to bring the measurement to the setpoint. As long as an error exists, the integrator will continue to move its output in a direction that corrects the error. For predictable control, the output must NOT move if the error cannot be corrected.
If the control loop is broken and integration is allowed to continue, it will proceed until it reaches a limit. If the loop is now closed, the process will be disturbed, perhaps dangerously, as the integrator forces the output to a value beyond the valve limits and must first decrease output before the valve begins to close again. This behaviour is known as reset or integral wind-up. The error between measurement and setpoint, therefore, cannot be brought to zero by integration. The integration must be brought back to a reasonable value before control can resume. This period of lost control is avoided by utilizing status information passed between function blocks.
There are four cases to be considered for status generation:
• the forward path
• the backward path
• cascade control
• cascade initialization
Each case requires its own part of the status information.
In addition to normal operation with "Good" status, the following conditions might occur:
• Measurement is lost
• Connection to the process is lost
• Measurement is calculated using bad data, but the calculation has enough process data in it to allow control to continue
The following conditions can be passed forward from the source of the problem to the first integrating controller on the path:
Status*
GoodNC. Non-Specific. High Limited
Condition
Value is from a block that cannot generate a higher value because it is limited in that direction, either internally or by the transducer
GoodNC. Non-Specific. Low Limited Value is from a block that cannot generate a lower value because it is limited in that direction, either internally or by the transducer
Value cannot move; it is constant GoodNC. Non-Specific. Constant
GoodC. Initiate Fault State (IFS). Not Limited Value is from a block that has failed. The failure may be propagated to the downstream block for alarm and display purposes
Bad. No Communication, Last Usable Value.
Not Limited
Communication has failed along the path, the last usable value is offered
Bad. No Communication, No Usable Value.
Not Limited
Uncertain. Non-Specific. Not Limited
Communication has failed along the path, there is no usable value
Quality of the value is uncertain i.e. not good, but not bad either. The loop is degraded, but not broken. The block has an option to use the data or treat it as bad
*Examples of status messages: if a higher priority substatus or limit status is present, it will be passed on
Tab. 2-19: Forward path status and conditions
In the case of multiple sensors measuring the same value, "Good" status will indicate agreement of a specified number of sensors. "Uncertain" is used for anything less than the required number of sensors, provided at least one is working.
Endress+Hauser 27
2 Function Block Application Process
Backward path
Cascade control
Guideline: FOUNDATION Fieldbus Function Blocks
In addition to normal operation with "Good" status, it is possible that the loop has been broken between control function block to the actuator.
In order that the upstream block is informed of the condition of the downstream block, a backcalculation value and status is sent along the backward path, i.e. from the downstream block to the upstream block. In the case of an actuator or control function block in cascade mode, this includes information about constrained movement and the working setpoint (or process variable). The information can be used for limiting or locking the output of an integrating controller or for initializing the upstream block.
The following conditions can be passed backward from the source of the problem to the first integrating controller on the path:
Status*
GoodC. Non-Specific. High Limited
Condition
Value is from a block that cannot generate a higher value because it is limited in that direction, either internally or externally
GoodC. Non-Specific. Low Limited Value is from a block that cannot generate a lower value because it is limited in that direction, either internally or externally
Value cannot move; it is constant GoodC. Non-Specific. Constant
GoodC. Initiate Fault State (IFS). Not Limited Value is from a block that has failed. The failure may be propagated to the upstream block for alarm and display purposes
GoodC. Local Override (LO). Not Limited Value is from an output block that has been locally overridden by a local key switch or has interlock logic active
GoodC. Fault State Active (FSA). Not Limited Value is from an output block that has Fault State logic active
Bad. No Communication, Last Usable Value.
Not Limited
Communication has failed along the path, the last usable value is offered
Bad. No Communication, No Usable Value.
Not Limited
Bad.Configuration Error.Not Limited
Communication has failed along the path, there is no usable value
Value is from a Control Selector which has not selected the corresponding input
*Examples of status messages: if a higher priority substatus or limit status is present, it will be passed on
Tab. 2-20: Backward path status and conditioins
In cascade control, the output of control function blocks does not go to an actuator, but becomes the setpoint of a downstream output function block or another control function block.
As far as the upstream control block is concerned, the loop can be broken by anything that breaks the loop of the downstream block or by the downstream control or output block operating in the wrong mode. When the cascade loop is broken, the output of the upstream control block must be made to match exactly the setpoint (or process variable)of the downstream block, in order to ensure bumpless transfer into a cascade mode. The value passed from the downstream to the upstream block to do this is called the initialization value. While the upstream block is setting its output to the initialization value, it with adopt the Iman mode.
In some cases, the source of the setpoint of a block is an interface device which does not contain the function block application. The application running on the interface device still has the same initialization requirements.
28 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Cascade initialization
2 Function Block Application Process
In order to implement cascade control, the following conditions are passed between the blocks:
Status Condition
Conditions passed from the downstream block to the upstream block or interface device
GoodC. Not Invited. Not Limited
GoodC. Initialization Request (IR).
Not Limited
Value is an initialization value for a source (CAS_IN, RCAS_IN or
ROUT_IN), because the downstream loop is broken or the mode of the downstream block is wrong. Cascade control is not invited.
Downstream block invites an initialized response on CAS_IN, RCAS_IN or ROUT_IN because the downstream loop is no longer broken and the target mode is now correct for the input.
Condition passed from the upstream to the downstream block
GoodC. Initialization Acknowledge (IA).
Not Limited
Downstream block invites an initialized response on CAS_IN, RCAS_IN or ROUT_IN because the downstream loop is no longer broken and the target mode is now correct for the input.
*Examples of status messages: if a higher priority substatus or limit status is present, it will be passed on
Tab. 2-21: Cascade status and conditions
The cascade path is always handled the same way for any block that supports a cascade structure
(i.e. has at least one backward path output). It is handled in the same way for each of Cas, RCas, and ROut modes, but with different parameters in the forward and backward paths. Table 2-22 specifies the parameters.
Mode Forward
Cas OUT
RCas
ROut
RCAS_IN
ROUT_IN
Backward
BKCAL_OUT
RCAS_OUT
ROUT_OUT
Tab. 2-22: Back calculation parameters as a function of block mode
In the case of RCas and ROut modes, both forward and backward parameters are part of the same block and are contained parameters read or written by an interface device. For Cas mode, the forward path is the OUT parameter of the upstream block linked to the CAS_IN parameter of the downstream block. The backward path comprises the BKCAL_OUT parameter of the downstream block linked to BKCAL_IN parameter of the upstream block.
When two blocks are operating in cascade and the loop is broken, the substatuses exchanged between them control the recovery to normal operation. Provided both blocks have the target modes required for cascade control, the procedure is as follows:
Step Mode*
1 Not cascade mode
2
3
4
Initialize
Initialization complete
Cascade complete
Action
• The loop is broken because the operating mode or conditions do not permit the cascade
• The downstream block sends "Not Invited" as its output status
• The operating mode of the upstream block moves to Iman and a reply is sent
• Provided the upstream block has not replied with "Initialization
Acknowledge", the downstream block moves to the next permissible operating mode.
• The downstream block now sends "Initialization Request" as its output status and waits for the reply "Initialization Acknowledge".
• The upstream block initializes, moves to the next permissible mode and replies with "Initialization Acknowledge"
• The downstream block moves to its normal operating mode, begins normal operation using the input value provided by the upstream control block, and sends a normal status, e.g. "Non-Specific" as its output
• The upstream block now begins normal operation and sends a normal status as its output , e.g. Non-Specific.
Tab. 2-23: Status generation on block initialization
Endress+Hauser 29
2 Function Block Application Process Guideline: FOUNDATION Fieldbus Function Blocks
2.7
Fault state handling
Fault state is a special condition for an Analog Output or Discrete Output block that allows the connected device to fail-to-safe when the block detects an abnormal situation or the user sets the condition "Fault State" in the resource block.
An abnormal situation occurs when:
• there is bad input to the block (bad sensor, for example)
• there is no communication between blocks for a period longer than a specified time
Blocks that support cascade control such as PID, OSDL and SPLT, propagate the fault state status forward to the output block. When the condition that activated the fault state is rectified, the fault state is cleared and the block returns to the normal operation.
2.7.1
Control blocks
Blocks such as PID, OSDL and SPLT that support cascade control must be configured to send an
Initiate Fault State (IFS) status when they detect a bad input. The following options must be selected:
• Option "IFS if bad IN" in the STATUS_OPTS parameter and/or
• Option "IFS if bad CAS_IN" in the OSDL_OPTS parameter must be selected
The block now generates an IFS status in its OUT value when it detects a bad input.
Should a block operating in cascade mode (Cas, RCas) receive an IFS status, it is reported to forward path. For example, a PID block might receive a "Good Cascade IFS" status in the CAS_IN input from an upstream PID block. If the target mode of the PID block is Cas, then the IFS status will become the status of OUT , replacing the normal status. If the block is operating in Auto, however, the IFS status is not propagated forward.
2.7.2
Output blocks
Output blocks must be configured to respond to the IFS status. This is done by setting up a timeout parameter FSTATE_TIME and a fail-safe parameter FSTATE_VAL (AO block ) or
FSTATE_VAL_D (DO block) as follows:
• Set FSTATE_TIME , in units of 1/32 ms, to the time the output block can normally wait before responding to a fault state in or loss of communication with the upstream block
• Set FSTATE_VAL/FSTATE_VAL_D to the set point value (SP/SP_D)that causes the output device to assume fail-safe position.
The IO_OPTS parameter must now be configured to determine the block response to a fault state, whereby multiple choices are allowed. The option is set by ticking the selection box:
Option
Fault State to value
Target to Man if IFS
Set
On fault state, FSTATE_VAL/
FSTATE_VAL_D substitutes SP/SP_D
On fault state, the block mode is forced to
Man. In this mode, parameters can be changed
Clear)
On fault state, the last valid SP/SP_D value is used
On fault state, the block mode is forced to
Local Override, parameters cannot be changed until the fault state is cleared
Tab. 2-24: Configuration of IO_OPS for falut state handling
A third option, "Use Fault State value on restart" causes the value of FSTATE_VAL/FSTATE_VAL_D to be used on device restart. In this case, the value is used, although no fault state exists.
30 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 2 Function Block Application Process
The output block will now respond to the following fault conditions by entering the configured fault state:
• Loss of communication to CAS_IN for a time that exceeds FSTATE_TIME
• IFS status in the CAS_IN input when the target mode is Cas for a time that exceeds
FSTATE_TIME
• IFS status in the RCAS_IN when the target mode is Rcas for a time that exceeds
FSTATE_TIME
In the backward path, the block sends the Not Invited (NI) status to indicate that the block is in
"Fault State".
After re-establishment of communication or closing of the circuit which initiated the action:
• blocks in Local Override recover automatically to the target mode
• blocks in Man must be reconfigured to adopt the target mode.
2.7.3
Forcing fault state
The resource block can be used to force all output function blocks associated with the device to change immediately to their fault state condition. The setup is as follows:
• Check that "Fault State supported" is available in the FEATURES parameter
• Select the option "Fault State supported" in FEATURES_SEL to enable the Fault State function in the resource block.
• Set SET_FSTATE to On to cause all output blocks to adopt their fault state behaviour
( FAULT_STATE becomes active in the STATUS_OPTS )
• Set CLEAR_FSTATE to On to cause all output blocks to resume normal operation
( FAULT_STATE is cleared in the STATUS_OPTS ).
• FAULT_STATE indicates the current Fault State in the resource block.
Endress+Hauser 31
2 Function Block Application Process
Grant
Deny
Options
Guideline: FOUNDATION Fieldbus Function Blocks
2.8
Function block options
In addition to the common parameters, many blocks share common option parameters with which control the responses to input/output, control or status conditions. These are available in four bit strings that contain static configuration binary choices, see also previous chapters.
2.8.1
GRANT_DENY
GRANT_DENY controls access permission to various types of block parameter for higher level applications, e.g. a host computer or local operating panel. The parameter has two attributes named
Grant and Deny. The operation of these parameters is as described below, but the actual usage (if any) depends on the philosophy of the plant.
Depending on the philosophy of the plant, the operator, a higher level device or when local is selected, a local operator's panel may turn on an item of the Grant attribute. By doing or allowing this action, the operator gives up control of the selected parameters to the intervening device.
The function block does not check writes to any of the selected parameters for grant-deny permission. It is up to other devices to obey and enforce the rules, because the function block has no way to know what is writing to it. When the operator wants to regain control of the parameters, he clears the Grant item. The function block will then automatically set the corresponding Denied item. This indicates to the intervening device that control has been taken away.
The Deny attribute is provided for use by a monitoring application in an interface device and may not be changed by an operator. It allows the monitoring application to determine if control has been temporarily taken away during the execution of a batch program. This is done by first clearing one or all of the Denied items before execution of a batch program, then checking the Denied item after execution. The Grant item itself should not be checked for this condition, because the operator may have cleared and subsequently set the Grant item during batch program execution, a sequence that might be missed by a slowly scanning monitor program. The Denied item may not be cleared by the operator, thus latching the fact that control was taken away.
1
2
3
Table 2-25 indicates the various options of the GRANT_DENY parameter
Description Bit Option
GRANT
0 Program
Tune
Alarm
Local
A higher level device may change the:
• target mode,
• setpoint (if the block mode is Man or Auto) or
• output (if the block mode is Man) of the block
A higher level device may change the tuning parameters of the block
A higher level device may change the alarm parameters of the bloc
A local operator's panel or hand-held device may change the:
• target mode,
• setpoint (if the block mode is Man or Auto) or
• output (if the block mode is Man) of the block
1
2
DENY
0 Program Denied
3
Tune Denied
Alarm Denied
Local Denied
The Program permission item has been turned off
The Tune permission item has been turned off
The Alarm permission item has been turned off
The Local permission item has been turned off
Tab. 2-25: GRANT_DENY options
32 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 2 Function Block Application Process
2.8.2
IO_OPTS
IO_OPTS activates the options for processing the input and output values of the function block
(I/O options). The following options apply when the they have been selected and the appropriate condition is true:
Bit
0
1
Option
Invert
SP-PV Track in MAN
Description
Permits the setpoint to track the process variable when the target mode of the block is MAN.
Block
Indicates whether the discrete input or ouput value should be logically inverted before it is stored in the process variable.
Normally a discrete value of zero(0) will be considered to be a logical zero(0) and an non-zero discrete value will be considered to be a logical (1). If invert is selected, the logical NOT of a non-zero field value would result in a zero(0) discrete output, the logical NOT of a zero field value would result in a discrete output value of one(1).
DI, DO
AO, DO
2
3
4
5
6
7
8
9
Reserved
SP-PV Track in LO
SP Track retained target
Increase to close
Fault State to value
Use Fault State value on restart
Target to Man if Fault State activated
Use PV for BKCAL_OUT
Permits the setpoint to track the process variable when the actual mode of the block is LO.
AO, DO
Permits the setpoint to track the RCAS or CAS parameter based on the retained target mode when the actual mode of the block is LO or
MAN. When SP-PV track options are enabled, then SP Track retained target will have precedence in the selection of the value to track if the actual mode is MAN and LO
AO, DO
AO Indicates whether the output value should be inverted before it is communicated to the I/O channel.
Selects the output action to take when fault occurs.
(0: freeze, 1: go to preset value)
AO, DO
Uses the value of FSTATE_VAL(_D) if the device is restarted, otherwise use the non-volatile value. This does not act like Fault State, just uses the value
AO, DO
AO, DO Sets the target mode to MAN, thus losing the original target, if Fault
State is activated. This latches an output block into the manual mode
The BKCAL_OUT value is normally the working SP. This option changes it to the PV
Enables the low cutoff algorithm for flow measurements
AO, DO
AI 10 Low cutoff
11 Reserved
12 Reserved
13 Reserved
14 Reserved
15 Reserved
Tab. 2-26: Input/Output block options
Endress+Hauser 33
2 Function Block Application Process Guideline: FOUNDATION Fieldbus Function Blocks
2.8.3
CONTROL_OPTS
CONTROL_OPTS contains the available controller options for specifying the automation strategy.
The options apply when the they have been selected and the appropriate condition is true:
6
7
Bit
0
1
2
3
4
5
Option
Bypass Enable
SP-PV Track in MAN
SP-PV Track in ROUT
Permits the setpoint to track the process variable when the target mode of the block is MAN..
Permits the setpoint to track the process variable when the actual mode of the block is ROUT
PID, EPID,
APID, STEP
PID, EPID,
APID
SP-PV Track in LO or IMan Permits the setpoint to track the process variable when the actual mode of the block is LO or IMAN.
SP Track retained target
PID, EPID,
APID, STEP
Permits the setpoint to track the RCAS or CAS parameter based on the retained target mode when the actual mode of the block is IMAN, LO,
MAN, or ROUT. When SP-PV track options are enabled, then SP
Track retained target will have precedence in the selection of the value to track when the actual mode is MAN, IMAN, ROUT, and LO
PID, EPID,
APID, STEP
Direct Acting Defines the relationship between a change in PV and corresponding change in output. When Direct is selected, an increase in PV results in an increase in the output.
PID, EPID,
APID; STEP
Balance Ramp
Track Enable
Description
Allows BYPASS to be set. Some control algorithm applications cannot provide closed loop control if bypassed.
Block
PID, EPID,
APID, CHAR
8
9
Track in Manual
Use PV for BKCAL_OUT
Not used
Enables the external tracking function. If true, the value in TRK_VAL will replace the value of OUT if TRK_IN_D becomes true and the target mode is not MAN.
PID, E; PID,
APID
Enables TRK_VAL to replace the value of OUT when the target mode is MAN and TRK_IN_D is true. The actual mode will then be LO
PID, EPID,
APIDP
BKCAL_OUT and RCAS_OUT values are normally the working SP. If this option is enabled, then the PV value will be used after the cascade is closed.
PID, EPID,
APID, STEP
10 BIAS may be adjusted
11 Convert IN_1 to
OUT_SCALE
10 Act on IR
Not used
Not used
If this option is true, then when IR (initiation request) is received as the status in BKCAL_IN, the SP will be adjusted within setpoint limits to provide bumpless transfer when the cascade is closed. If the setpoint required to provide bumpless transfer is outside the setpoint limits, then any difference added to provide bumpless transfer will be removed in the BAL_TIME
PID, EPID,
APID
11 Use BKCAL_OUT with IN_1 Normally, BKCAL_OUT is associated with initialization of an upstream block which is providing CAS_IN. If this option is set, then
BKCAL_OUT is to be associated with the upstream block providing
IN_1. This option may be used with the Ratio and Bias/Gain block to determine the value and status which must be provided in
BKCAL_OUT for proper initialization and handshaking.
PID, EPID,
APID
PID, EPID,
APID, STEP
12 Restrict SP to limits in CAS or
RCAS
Normally the setpoint will not be restricted to the setpoint limits except when entered by a human interface device. However, if this option is selected, the setpoint will be restricted to the setpoint absolute limits in the Cas and RCas modes
13 No OUT limits in MAN Does not apply OUT_HI_LIM or OUT_LO_LIM when target and actual modes are MAN. Trust the operator to do the right thing.
PID, EPID,
APID
14 Reserved
15 Reserved
Tab. 2-27: Control options
34 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Handling mechanism
2 Function Block Application Process
2.9
Alert handling
FOUNDATION Fieldbus Specification 890 describes an alert handling concept for FOUNDATION
Fieldbus applications. Alerts are alarms and events, which represent state changes within function block applications. Within the model, devices supporting alert handling report to an interface device via an alert object. The interface device is responsible for alert processing. If e.g. a SCADA system is used as operational interface, this has the consequence that the alarming can be configured offline in the individual function block during the engineering phase. The operating system then accesses the alert parameters through the HSE OPC server.
Alerts are handled as follows. The alert notifier examines the results of resource, transducer and function block executions to determine if any of a defined set of alert states has been entered. When this is the case, the alert object builds a report message, a so-called event notification, and publishes it to the network. The time at which the alert state was detected is included as a time stamp in the alert message.
If several alerts are present at one time, they are queued and published according thier age and priority. The associated alert is removed from the queue as soon as a reply is received confirming the receipt of the notification. The time-out period for receiving replies and number of alerts awaiting reply can be configured in the Resource Block of each device. If the time-out period is exceeded, the alert is added to a retransmission list.
Alert handling also includes acknowledgement of alerts. This indicates that the alert has been processed by an interface device to satisfy operational interface requirements. The acknowledgement can be configured to be disabled, manual or automatic.
2.9.1
Events and alarms
Events are usually associated with a change in configuration caused by , e.g. a user intervention. As mentioned previously, specific changes in dynamic parameters are not tracked, as these are part and parcel of normal operation. The following events are signalled and can be tracked when the appropriate parameters are set:
• A change of status of the WRITE_LOCK parameter in the Resource Block, see Chapter 3.2.6
• Any change in a static parameter in any block
The parameter UPDATE_EVT provides an alert for any change in a static parameter and includes the relative parameter index and its associated block index together with the new value of ST_REV . The alert is auto-acknowledged. Alerts are not generated while a block is
Out of Service, but the ST_REV parameter continues to increment. When the block returns to normal operation, an alert is generated if the ST_REV parameter has increased.
There are two basic types of alarm, whereby both entering and exiting a limiting alarm condition creates a change in alert status:
• Block alarms reflect errors in the hardware and software associated with the block
The alarms generated are displayed in the parameter BLOCK_ERR and depend upon the block. Block alarms always have Priority 2. The parameter BLOCK_ALM displays details, communicates the alarm to the interface device and allows the alarm to be acknowledged.
• Limit alarms are generated due to the limiting of process variables
The parameter ALARM_SUM summarizes the current status of all the limit alarms. Limits are set in the xxx_LIM parameter of the block and the ALARM_HYS parameter imposes a universal hysteresis. Alarm priority is set in the appropriate xxx_PRI parameter. The xxx_ALM parameter displays the current status of the limit and allows alarms to be acknowledged.
Endress+Hauser 35
2 Function Block Application Process
Reporting
Priority and acknowledgement
Guideline: FOUNDATION Fieldbus Function Blocks
2.9.2
Reporting, priority and acknowledgement
Alert reporting is set up for the entire resource through the device Resource Block. The message
"Reports supported" in the FEATURES parameter of the resource block indicates that the device has an alert notifier. The reporting of alerts must be activated in the Resource Block by selecting the option "Reports supported" in the FEATURE_SEL parameter, see Chapter 3.2.4.
Three parameters control the queuing of alerts:
• MAX_NOTIFY can be read online and indicates the maximum number of alert reports that the device can send without receiving a confirmation
• LIM_NOTIFY allows the user to select the number of alert reports the device can send without receiving a confirmation. If LIM_NOTIFY is set to zero, then no alerts are reported.
• CONFIRM_TIME determines the time the resource will wait for confirmation of receipt of a report before trying again. If the CONFIRM_TIME = 0 the device will not retry.
The alert priority is set in the corresponding alarm priority parameter of the function block concerned. By default, an alert must be manually acknowledged in the corresponding alarm display parameter, see Chapters 2.9.4 and 2.9.5. manual acknowledgement can be disabled for one or more alarm classes by ticking the option "xxx Alarm Disable" or "xxx Alarm Auto Acknowledge" (depends on the device DD) in the parameter ACK_OPTION . When disabled, the alert is automatically acknowledged .
Table 2-29 summarizes the parameters to be configured to activate alert reporting and set up alarm priorities and acknowledgement.
Parameter
ALERT_KEY
Description
Optional index that identifies the plant unit, see Chapter 2.3.4
FEATURE_SEL Activates the salient feature provided it is supported by the device
• Reports: When ticked, activates reporting for all blocks
• Soft Write Lock: When ticked, activates reporting for change in WRITE_LOCK parameter, provided there is no hardware lock
Indicates maximum number of unconfirmed reports that can be stored by the device MAX_NOTIFY
LIM_NOTIFY Sets number of unconfirmed reports that to be stored by the device
– LIM_NOTIFY may not exceed MAX_NOTIFY
– If LIM_NOTIFY = 0, then no alerts are reported
CONFIRM_TIME Sets time limit for receipt of alert notification confirmation from interface device.
– Setting is multiplied by 1/32 milliseconds to obtain time period
– If no confirmation is received within this time, the report is sent again
ACK_OPTION Enables or disables auto-acknowledgment in block for each class of alarm. When disabled (no tick in box), the alarms must be acknowledged in the salient xxx_ALM parameter.
For resource block:
• 1: Write Lock Alarm Disabled /Write Lock Alarm Auto Acknowledge
• 8: Block Alarm Disabled (Resource block)/Block Alarm Auto Acknowledge
For other blocks, see also Table 2-31:
• 0: Discrete Alarm Disabled
• 1: HiHi Alarm Disabled
• 2: Hi Alarm Disabled
• 3: LoLo Alarm Disabled
• 4: Lo Alarm Disabled
• 5: Deviation Hi Alarm Disabled/Deviation Hi Alarm Auto Acknowledge
• 6: Deviation Lo Alarm Disabled/Deviation Lo Alarm Auto Acknowledge
• 7: Block Alarm Disabled/Block Alarm Auto Acknowledge
WRITE_PRI
DISC_PRI
LO_LO_PRI
LO_PRI
HI_PRI
HI_HI_PRI
DV_HI_PRI
DV_LO_PRI
Priority of an alarm or event. If no setting is made the acknowledgement is "undefined".
• 0-1: Associated alert is not sent as a notification; normally auto-acknowledged.
• 2: Reserved for alerts that do not require the attention of a plant operator.
Block alarm and update event have this priority; normally auto-acknowledged.
• 3-7: Advisory alarms. Alarms of this priority will normally be acknowledged.
• 8-15: Critical alarms. Alarms of this priority will normally be acknowledged.
Tab. 2-28: Parameters for alert reporting
36 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 2 Function Block Application Process
2.9.3
Limit alarms
The user can set limits on a number of process values that are used by various function blocks.
Table 2-30 summarizes the possibilities
Block
AI
DI
PID, AALM
PID
SPG
Parameter
OUT
OUT_D
PV
PV-SP
BKCAL_IN/OUT
Disc x
Hi_Hi x x
Hi x x
Lo_Lo x x
Lo x x
Dev_Hi Dev_Lo x x x x
Tab. 2-29: Limit values as a function of parameter and block
An alarm occurs when a value meets, exceeds or drops below a limit.
• For a high alarm, an alarm is true when the analog value is greater than the limit. The status of the alarm remains true until the value drops below the limit minus any alarm hysteresis.
• For a low alarm, an alarm is true when the analog value is lower than the limit. The status of the alarm remains true until the value rises above the limit plus any alarm hysteresis.
An alarm type can be disabled by setting its respective alarm limit parameter to
infinity. This is the default value of all alarm limits. The value range is given by the scaling of the output parameter.
If the entered value exceeds this range (excluding
infinity), a block configuration error is flagged in BLOCK_ERR .
The parameters required to set up process value limiting are summarized in Table 2-31.
Parameter
DISC_LIM
HI_HI_LIM
HI_LIM
LO_LIM
LO_LO_LIM
DV_HI_LIM
DV_LO_LIM
Block
DI
PID, SPG
Description
Value of discrete output OUT_D (0 or 1) for which an alert is to be sent
AI, AALM, PID Limit value in units of PV_SCALE or OUT_SCALE for upper critical limit
Limit value in units of PV_SCALE or OUT_SCALE for upper advisory limit
Limit value in units of PV_SCALE or OUT_SCALE for lower advisory limit
Limit value in units of PV_SCALE or OUT_SCALE for lower critical limit
Limit value in units of PV_SCALE for PV or PV-SP upper limit
Limit value in units of PV_SCALE for PV or PV-SP lower limit
ALARM_HYS AI, AALM, PID Amount the PV or OUT value must return within the alarm limits, expressed as a percent of the PV/OUT span, before the alarm condition clears. The span used depends on the block type:
• PID: PV_SCALE
• AI, Setpoint generator, Analog alarm: OUT_SCALE
DI, AI, AALM,
PID, SPG
DISC_PRI
LO_LO_PRI
LO_PRI
HI_PRI
HI_HI_PRI
DV_HI_PRI
DV_LO_PRI
Priority of an alarm or event. If no setting is made the acknowledgement is "undefined".
• 0-1: Associated alert is not sent as a notification; normally auto-acknowledged.
• 2: Reserved for alerts that do not require the attention of a plant operator.
Block alarm and update event have this priority; normally auto-acknowledged.
• 3-7: Advisory alarms. Alarms of this priority will normally be acknowledged.
• 8-15: Critical alarms. Alarms of this priority will normally be acknowledged.
ACK_OPTION Enables or disables auto-acknowledgment in block for each class of alarm. When disabled (no tick in box), the alarms must be acknowledged in the salient xxx_ALM parameter.
• 0: Discrete Alarm Disabled
• 1: HiHi Alarm Disabled
• 2: Hi Alarm Disabled
• 3: LoLo Alarm Disabled
• 4: Lo Alarm Disabled
• 5: Deviation Hi Alarm Disabled/Deviation Hi Alarm Auto Acknowledge
• 6: Deviation Lo Alarm Disabled/Deviation Lo Alarm Auto Acknowledge
• 7: Block Alarm Disabled/Block Alarm Auto Acknowledge
Tab. 2-30: Parameters for process value limiting
Endress+Hauser 37
2 Function Block Application Process
BLOCK_ERR
XD_ERROR
UPDATE_EVT
ALARM_SUM
Guideline: FOUNDATION Fieldbus Function Blocks
2.9.4
Event update and alarm summaries
The BLOCK_ERR parameter reflects the error status of hardware or software components associated with the block and that have a direct impact on its correct operation. It comprises a bit string in which block error conditions (0= inactive, 1 = active) are reflected as follows:
5
6
3
4
7
1
2
Bit
0
Condition
Other (LSB)
Block Configuration Error
Link Configuration Error
Simulate Active
Local Override
Device Fault State Set
Device Needs Maintenance Soon
Input Failure/ process variable has BAD status
11
12
13
14
15
Bit
8
9
10
Condition
Output Failure
Memory Failure
Lost Static Data
Lost NV Data
Readback Check Failed
Device Needs Maintenance Now
Power-up
Out-of-Service (MSB)
Tab. 2-31: Block error parameter conditions
The bits maintained depend upon the type and function of the block. The block alarms are displayed and communicated to the host system via the parameter BLOCK_ALM . The alarms must be acknowledged in the BLOCK_ALM parameter, see also Chapter 2.9, unless the option "Block
Alarm Auto Acknowledge"/"Block Alarm Disabled" (Depends on Device DD) has been ticked in the parameter ACK_OPTION .
Note!
• For the resource block, simulate active is used to indicate whether the simulate hardware jumper is present on the associated device. An active state (1) of this attribute indicates that the jumper is present and that it is possible for the user to enable simulation in an input or output class function block.
The XD_ERROR parameter reflects the error status of hardware or software components associated with a transducer block and that have a direct impact on its correct operation. It comprises a bit string in which block error conditions (0= inactive, 1 = active) are reflected as follows:
Bit
16
17
18
19
20
Condition
Unspecified Error
General Error
Calibration Error
Configuration Error
Electronics Failure
Bit
21
22
23
24
25
Condition
Mechanical Failure
I/O Failure
Data Integrity Error
Software Error
Algorithm Error
Tab. 2-32: Transducer block parameter conditions
The UPDATE_EVT parameter captures the dynamic information associated with a write to a static parameter within the block. The parameter has the following attributes:
• UNAKNOWLEDGED: shows the status of the alert acknowledgement
• UPDATE_STATE: shows reported state of the update
• TIME_STAMP: shows the time at which the static parameter was changed
• STATIC_REVISION: shows the new static revision level (ST_REV)
• RELATIVE_INDEX: shows the index of the changed parameter
The ALARM_SUM parameter summarizes the status of up to 16 process alarms belonging to the same block. The parameter has four attributes, see also Chapter 2.9.5:
• CURRENT: shows for each alarm whether it is active
• UNAKNOWLEDGED: shows for each alarm whether it has been acknowledged
• UNREPORTED: shows for each alarm whether it has been reported
• DISABLED: shows for each alarm whether it has been disabled in ACK_OPTION
38 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 2 Function Block Application Process
2.9.5
Alarm display parameters
Each block has one or more parameters to capture the dynamic information associated with an alarm.
• Hardware and software errors for the block are captured in the parameter BLOCK_ALM
• For the resource block, WRITE_LOCK changes are captured in the parameter WRITE_ALM
• Limit value alarms are captured in the corresponding parameter xxx_ALM
All types have the structure shown in Table 2-34. The information contained is transferred to an alert object when the alarm is reported. If the alert has a priority greater than 2 and the alarm class has not been disabled in the ACK_OPTIONS parameter, it can be acknowledged in the parameter
UNACKNOWLEDGE .
Parameter
BLOCK_ALM
WRITE_ALM
DISC_ALM
HI_HI_ALM
HI_ALM
LO_ALM
LO_LO_ALM
DV_HI_ALM
DV_LO_ALM
Attribute Value
UNACKNOWLEDGED As read or entered
ALARM_STATE
TIME_STAMP
As read
As read
SUB_CODE
VALUE
As read
As read
Description
Indicates acknowledgement of current alert state: i.e.
Undefined, Acknowledged, Unacknowledged
• User can acknowledge via this parameter
Indicates of whether the alert is active and reported.
The alarm state is cleared when the block goes to
Out of Service mode. Possible values are:
• Clear-Reported, Clear-Not Reported,
Active-Reported, Active-Not Reported
Indicates time when the alarm state was detected.
The value is maintained until alert confirmation has been received.
Displays number specifying the cause of the alert
The value of the associated parameter at the time the alert was detected
Tab. 2-33: Alarm display parameters
Endress+Hauser 39
2 Function Block Application Process Guideline: FOUNDATION Fieldbus Function Blocks
2.9.6
Example
Fig. 2-11 shows a typical response to a HI limit violation. A HI_LIM of 190 is set for the OUT variable of a function block. The alarm hysteresis parameter ALARM_HYS is set to 10. When the
OUT value exceeds 190, the HI_ALM.Unacknowledged parameter changes from Acknowledged to
Unacknowledged and the HI_ALM.ALARM_STATE parameter changes to Active_Not_Reported.
An alarm notification message is now output to the bus. The HI_ALM.ALARM_STATE parameter changes to Active_Reported. The Alarm Notification is answered within the set CONFIRM_TIME.
When the operator acknowledges the alarm in the HI_ALM.Unacknowledged parameter, this changes to Acknowledged.
The process value now returns to limits, the HI_ALM.ALARM_STATE parameter changes to
Clear_Not_Reported only after it passes the HI limit minus the hysteresis (for LO limits, the hysteresis acts in the other direction). At this point an alarm notification message is output to the bus and the HI_ALM.ALARM_STATE parameter changes to Clear_Reported. In the example, no reply is received to the message within the set CONFIRM_TIME, and the message is output again.
OUT. VALUE
190
180
ALARM_HYS t
HI_ALM.ALARM_ STATE
ACTIVE_NOT_REP
ACTIVE_REP
CLR_NOT_REP
CLR_REP t
HI_ALM.
UNACKNOWLEDGED
UNACK
ACK t
40
BUS
INTERFACE DEV_TX
FIELD DEV_TX
ALERT NOTIFY - CONFIRMATION
1
2 3
ALERT ACK (OPERATOR PLANT INTERVENTION)
ALERT NOTIFY 1 ALERT NOTIFY 1
2 t
> CONFIRM_TIME < CONFIRM_TIME
Fig. 2-9: Alert processing
Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Enable simulation
Disable simulation
Effect
2 Function Block Application Process
2.10 Simulation
Simulation allows the checking and diagnosis of function blocks and control loops during installation and commissioning of the plant. To this end, all input and output function blocks have a
SIMULATE , SIMULATE_D or SIMULATE_P parameter, which overrides the transducer block input or hardware channel output when the function is enabled.
In order to prevent accidental switching to simulation mode during operation, every device has a hardware lock, i.e. a jumper, switch or relay that controls the simulation function within the device as a whole. The state of this lock is indicated in the resource block BLOCK_ERR parameter, which flags "Simulation Active" when it is enabled. If the hardware lock is in the disable position, it is not possible to write to the SIMULATE ( SIMULATE_D or SIMULATE_P ) parameters.
Once activated within the device as a whole, simulation can be enabled within an individual I/O block by expanding the SIMULATE ( SIMULATE_D or SIMULATE_P ) parameter.
• Set the status of the simulated variable in SIMULATE_STATUS etc.
• Set the value of the simulated variable in SIMULATE_VALUE etc.
• Set ENABLE_DISABLE to "Active" to start simulation in the block
The parameters TRANSDUCER_STATUS and TRANSDUCER_VALUE indicate the status and value of the raw process value or readback value. The block output/readback reflects the simulated parameters after processing in the block. When simulation is active, the BLOCK_ERR parameter of the I/O block flags "Simulation Active".
Simulation in an I/O block is disabled by setting ENABLE_DISABLE to "Disable". In this state
SIMULATE_STATUS and SIMULATE_VALUE etc. track TRANSDUCER_STATUS and
TRANSDUCER_VALUE in order to provide a bumpless transfer from disabled to enabled.
Simulation for the whole device is disabled by resetting the hardware lock.
Note
• Some devices must be restarted in order to detect a change in the hardware lock, while others do this during normal device operation.
Table 2-35 indicates the effect of simulation on the output of the block. When simulation is enabled in an input block, the simulated parameter becomes the OUT parameter (Process Value) after scaling, linearization and filtering. The status value can be used to simulate transducer faults.
For output blocks, the simulated parameter becomes the READBACK parameter. The status can be used to simulate transducer faults. The transducer value and status reflect the transducer readback value and status. The transducer maintains last the output and ignores the OUT of the block.
Block Simulation condition
Action
AI, DI, PUL Enable
Disable
SIMULATE.Simulate Value and Status -> PV
(after scaling,linearization and filtering)
SIMULATE.Transducer Value and Status -> PV
(after scaling,linearization and filtering) and
SIMULATE.Simulate Value and Status
AO, DO Enable
Disable
SIMULATE.Simulate Value and Status -> READBACK
SIMULATE.Transducer Value and Status -> READBACK and SIMULATE.Simulate Value and Status
Tab. 2-34: Effect of simulation
Endress+Hauser 41
3 Resource Block Guideline: FOUNDATION Fieldbus Function Blocks
3 Resource Block
Every FOUNDATION Fieldbus device has a resource block comprising all data that uniquely identify and characterize its hardware and software. Since the resource block has contained parameters only, i.e. no block input/output data, it cannot be linked to other blocks.
Resource block parameters can be classified into two groups, informative and operational. Each group is further divided into static and dynamic data.
• Informative parameters provide an overview of the hardware and software implemented in the device. Parameters of this nature include device type, device name, manufacturer ID, serial number. In addition, when on-line, the block also indicates the settings of any hardware switches controlling the write lock and simulation functions.
• Operational parameters influence the execution of the other blocks in the field device. In this case, the resource block acts as a central unit that checks the device status, flags alarms when necessary and controls the operability of the other blocks and hence the device itself.
In the following, only the major parameters are described in detail. Short descriptions of parameters with specialised use and described elsewhere in this manual are to be found in the table in
Chapter 3.3.
3.1
Informative parameters
3.1.1
Device software
The resource block contains a number of parameters which act as an "electronic" nameplate for the associated device. In addition, there are a number of parameters that indicate or influence the performance of the device. They can be viewed when the device is online.
Parameter
DD_RESOURCE
MANUFAC_ID
DEV_TYPE
DEV_REV
DD_REV
MIN_CYCLE_T
MEMORY_SIZE
FREE_SPACE
FREE_TIME
Description
Tag of the resource containing the device description
Manufacturer’s identification number
Manufacturer's model number associated with the resource
Manufacturer’s revision number associated with the resource
Revision of the DD associated with the resource
Minimum time, in units of in 1/32 ms, that the device requires for function block execution
• Any function block schedule time downloaded to the device must be greater than this value
Indicates the total memory in kbytes available in the device for function b lock configuration
Indicates the percentage of configuration memory that is still available
Indicates the approximate percentage of time that the device has left for processing new function blocks, should they be configured
ITK_VER
ENP_VERSION
DEVICE_TAG
SERIAL_NUMBER
Version number of the ITK test used as basis for certifying the device
Version number of the Electronic Nameplate
Device tag downloaded from the project to the device
Manufacturer’s serial number for the device
ORDER_CODE Manufacturer’s order code for the device
FIRMWARE_REVISION Revision number of the firmware of the device
42 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 3 Resource Block
3.1.2
Device hardware
In addition to the "nameplate", the resource block has a number of parameters that indicate the hardware configuration of the device. They can be viewed when the device is online. In some cases it is possible to influence the configuration of the device through an associated parameter.
Parameter
HARD_TYPES
FEATURES
FEATURE_SEL
WRITE_LOCK
Description
Read only bitstring that indicates the types of hardware that are available to the device
• If an I/O block is configured that requires a type of hardware that is not available to the device, the BLOCK_ERR parameter indicates a configuration error
Read only parameter indicating the hardware and sofware features available in the device
• See Chapter 3.2.4 for additional information
Read/Write parameter allowing the selected hardware and sofware features to be enabled
• Click in the box to activate the feature; multiple selections allowed
Indicates the position of the hardware jumper controlling the write protection of the device
• LOCKED: device data cannot be modified
• NOT LOCKED: device data can be modified
3.1.3
Hardware write lock
If the device is provided with a hardware lock, e.g. jumper, switch or magnetic relay, for configuring write protection, the option "Hard Write lock supported" will appear in the FEATURES parameter.
After selection of the option "Hard Write lock" in the FEATURE_SEL parameter, the parameter
WRITE_LOCK shows the status of the jumper. The following statuses are possible:
• LOCKED: static and non-volatile parameters cannot be changed. Block connections and calculation results will proceed normally, but the configuration will be locked
• NOT LOCKED: static and non-volatile parameters can be changed
When the jumper is configured for "LOCKED" and "Hard Write lock" is activated in
FEATURE_SEL , there can be no write actions to parameters in the device. The hard lock stays active until the jumper position is changed.
If the position of the jumper is changed from "LOCKED" to "NOT LOCKED", the discrete alert
WRITE_ALM is generated at the priority WRITE_PRI . Resetting the´jumper will clear the alert, if it exists.
Note
• Some devices must be restarted in order to detect a change in the hardware lock, while others do this during normal device operation.
3.1.4
Simulation
Simulation is obligatory in all FOUNDATION Fieldbus devices and is controlled by a hardware lock, e.g. a jumper, switch or magnetic relay. When the hardware lock is in the position "Enable
Simulation", the alert "Simulation active" appears in the BLOCK_ERR parameter.
Chapter 2.10 contains a full description of simulation.
Note
• Some devices must be restarted in order to detect a change in the simulationock, while others do this during normal device operation.
Endress+Hauser 43
3 Resource Block Guideline: FOUNDATION Fieldbus Function Blocks
3.2
Operational parameters
3.2.1
Block operation
Chapter 2.4 provides a general description of block operation and block parameters.
In the case of the resource block, the MODE_BLK parameter MODE_BLK.Target
controls operation of the entire device. If the parameter is set to "Out of Service" (OOS), all function block execution within the complete device is disabled. The actual mode of all the function blocks within the device are changed to OOS, but their target mode is not changed.
The resource block operates normally when it is in AUTO mode. In some cases, the IMAN mode is also supported: the block assumes this status when the resource is initializing or receiving a software download.
When the block is out of service, the status is flagged with the message "Block status OOS" in the parameter BLOCK_ERR .
3.2.2
Resource state
The current operating status of the resource block can be viewed when the device is online through the parameter RS_STATE . Depending upon the device, the following states are possible:
State
UNDEFINED
START/RESTART
INITIALIZATION
ON-LINE LINKING
ON-LINE
STANDBY
FAILURE
Description
The block is in an invalid state.
This state is entered on power-up or on restoration of power to a device. In it, the memory and other hardware necessary for reliable operation are tested. If the hardware tests are successful, the initialization state will be entered. Otherwise, the failure state is assumed.
The initialization state is entered from the start/restart or failure states. In it, all unreported function block alarms will be automatically confirmed and acknowledged. Once the system management SM_STATE object is detected to be operational, block execution may be scheduled and the resource state will move to on-line linking.
This state is entered from the on-line and initialization states. In it, the status of defined links is evaluated. If all defined links are established, then the resource state move to on-line.
This is the normal operating status; the resource block is in operating mode AUTO. it is entered from the on-line linking status. The connections configured between the function blocks have been linked. If any connections are missing, the state reverts to on-line linking.
This state is entered if the mode of the resource block is changed to out-of-service (OOS). In it, the actual mode of all function blocks in the resource will be forced to OOS mode. The mode of transducer blocks may not be affected. On a change in the resource block mode to AUTO, the state will revert to start/restart.
This state may be entered from any state except standby. Transition to this state is caused by the detection of a memory or other hardware failure which would prevent reliable operation. The failure may pertain either to the whole device or only to the resource. Based on this state being active, a function block of the output class may change its output to a fault state position. In this state, hardware status will be tested. If the hardware failure clears, then the state will move to initialization.
44 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 3 Resource Block
3.2.3
Resource restart
The RESTART parameter offers several options for restarting the device, see the table below. The device is restarted by selecting the restart mode when the resource block is out of service, but the device is online. After restart, the RESTART parameter returns to the value "Run"
2
3
Index Option
1 Run
Restart resource
Restart with defaults
Description
Passive state of the parameter
Restarts the resource as configured (clears up garbage problems)
Restarts the resource with default configuration
4 Restart processor Restarts the processor only
5 – 10 Restart with factory defaults Restarts with manufacturer specific default values
• If these restarts are not implemented, the parameter defaults to Run
3.2.4
Resource options
The FEATURES parameter indicates the resouce block options that are supported by the device
(see FF Specification 890). The features themselves are enabled by selecting the appropriate option from the drop-down menu of FEATURE_SEL parameter when the device is offline. Multiple selections are allowed.
If an option is selected in FEATURE_SEL that is not available in FEATURES , a block configuration error is flagged in the parameter BLOCK_ERR .
3
4
5
Index Option
0
1
2
6
7
8
9
109
11
12
Unicode strings
Reports supported
Fault State supported
Description
Device supports output as unicode strings
See Chapter 2.9, Alert handling
Device supports alert reports
See Chapter 2.7, Fault State handling
Device causes all output blocks to assume the predefined fault state defined in
Fault State type I/O action when the physical input or the SET_FSTATE parameter flags a fault.
Soft Write lock supported
Hard Write lock supported
Device has a software write lock
Device has a hardware write lock
Output readback supported Device reads back the actual valve position to the associated output function block (actuators only)
Direct write to output hardware
Device writes one or more hardware values when the resource is dead
(manufacturer-specific option)
Change of BYPASS in an automatic mode
Device allows the change of bypass when the associated function block is in an automatic mode
• Normally this is only possible when the block is out of service or in manual
MVC Report Distribution supported
MVC Publishing/Subscribing supported
Multi-bit Alarm (Bit-Alarm)
Support
Restart/Relink required after using FB_Action
Deferral of Inter-Parameter
Write Checks
Device supports multivarible container functionality
• The resource receiving the report must also support MVC
Device supports multivarible container publishing/subscribing
• All resources in the system must also support MVC publishing/subscribing
Device supports multibit alarm parameters
• When not selected, the device treats multibit alarms as simple alarms
• For more information, see Chapter 4.4.3.12 of FF Specification 890
Device requires restart/relink after instantiation or deletion of function blocks with the FB_Action service
• For more information see Chapter 4.14.3.6 of FF Specification 890
Disables inter-parameter write checks when the resource and function blocks are out of service or the transducer block is out of serve or in manual mode
Endress+Hauser 45
3 Resource Block
Resource block alerts
Guideline: FOUNDATION Fieldbus Function Blocks
3.2.5
Alert reporting
Alert reporting, see Chapter 2.9, is enabled for the entire resource by selecting the option "Reports supported" in the FEATURE_SEL parameter of the device resource block. The associated alert priority is set in the corresponding priority parameter xxx_PRI of the function block where the alert is generated.
The priority and time stamp of the alert determines the order of processing when more than one alarm is active at a particular time, whereby the oldest alert with highest priority is processed first.
Three parameters control the queuing of alerts:
• MAX_NOTIFY can be read online and indicates the maximum number of alert reports that the device can send without receiving a confirmation
• LIM_NOTIFY allows the user to select the number of alert reports the device can send without receiving a confirmation. If LIM_NOTIFY is set to zero, then no alerts are reported.
• CONFIRM_TIME determines the time the resource will wait for confirmation of receipt of a report before trying again. If the CONFIRM_TIME = 0 the device will not retry.
For the resource block, two types of alert are of interest:
• Block alarms, which are automatically assigned priority 2
• Write (protection) alarms, which are normally configured as advisory alarms
The parameter ACK_OPTION configures the automatic acknowledgement of alerts. Depending on the device, it may be implemented as a tickbox to enable automatic acknowledgement or disable manual acknowledgement in the xxx_ALM parameter of the corresponding alert.
• Disabling automatic acknowledgement of the write protection alert, means that the alert must be manually acknowledged in the WRITE_ALM parameter
• Disabling automatic acknowledgement of block alarms, means that each alert must be manually acknowledged in the BLOCK_ALM parameter
The table below summarizes the parameters to be set to activate alert reporting and setting up of alarm priorities and acknowledgement.
Parameter
ALERT_KEY
CONFIRM_TIME Sets time limit for receipt of alert notification confirmation from interface device.
– Setting is multiplied by 1/32 milliseconds to obtain time period
– If no confirmation is received within this time, the report is sent again
MAX_NOTIFY
LIM_NOTIFY
Indicates maximum number of unconfirmed reports that can be stored by the device
Sets number of unconfirmed reports that to be stored by the device
– LIM_NOTIFY may not exceed MAX_NOTIFY
– If LIM_NOTIFY = 0, then no alerts are reported
ACK_OPTION
Description
Optional index that identifies the plant unit. May be used in the host for sorting alarms, etc.
WRITE_PRI
When unticked, disables auto-acknowledgment in block for each class of alarm. The alarms must then be acknowledged in the salient xxx_ALM parameter.
• 1: Write Lock Alarm Disabled/Write Lock Alarm Auto Acknowledgement
• 8: Block Alarm Disabled/Block Alarm Auto Acknowledgement (Resource block only)
Priority of an alarm or event. If no setting is made the acknowledgement is "undefined".
• 0-1: Associated alert is not sent as a notification; normally auto-acknowledged.
• 2: Reserved for alerts that do not require the attention of a plant operator.
Block alarm and update event have this priority; normally auto-acknowledged.
• 3-7: Advisory alarms. Alarms of this priority will normally be acknowledged.
• 8-15: Critical alarms. Alarms of this priority will normally be acknowledged.
46 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 3 Resource Block
3.2.6
Software write lock
If the device supports software write protection, the option "Soft Write lock supported" will appear in the FEATURES parameter. If the device also has a hardware write lock and this is active, see
Chapter 3.1.2, the corresponding hardware jumper must be configured for "UNLOCKED" before the soft write lock can be activated. In some cases, the device must be restarted before the change in jumper position is registered.
To activate the soft write lock, first select the option "Soft Write lock" in the FEATURE_SEL parameter. The write protection can now be activated through the WRITE_LOCK parameter. The following statuses can be selected from the drop-down menu:
• LOCKED: static and non-volatile parameters cannot be changed. Block connections and calculation results will proceed normally, but the configuration will be locked
• NOT LOCKED: static and non-volatile parameters can be changed
If WRITE_LOCK is changed from LOCKED to NOT LOCKED , the discrete alert WRITE_ALM is generated at the priority WRITE_PRI . The priority of the alarm determines if it is to be acknowledged or not, see Chapter 2.9.2. Resetting WRITE_LOCK will clear the alert, if it exists.
3.2.7
Block errors
The ALARM_SUM parameter provides a summary of all alarms active for the resource block. The parameter BLOCK_ERR indicates the type of error that is present. If automatic acknowledgement of block alarms is disabled in the ACK_OPTION parameter, they must be acknowledged in the
BLOCK_ALM parameter.
The table below indicates the possible alarms for the Resource Block..
Condition
Block Configuration Error
Simulate Active
Device Fault State Set
Out-of-Service
Reason
• I/O block has been configured that requires a type of hardware that is not available to the device
• Feature selected in FEATURE_SEL that is not supported by the device
• More than one CYCLE_TYPE selected in CYCLE_SEL
• CYCLE_TYPE selected in CYCLE_SEL not supported by device
• The hardware jumper for simulation is set to allow simulation
Note: this is not an alarm, but an indication the simulation is possible by selecting "Simulation Enable" in the I/O function block
• FAULT_STATE is active
• MODE_BLK.Target currently set to OOS
Endress+Hauser 47
3 Resource Block
Resource block
48
Guideline: FOUNDATION Fieldbus Function Blocks
3.3
Block parameters
Parameter
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
RS_STATE
TEST_RW
DD_RESOURCE
MANUFAC_ID
DEV_TYPE
DEV_REV
DD_REV
GRANT_DENY
HARD_TYPES
RESTART
FEATURES
FEATURE_SEL
CYCLE_TYPE
CYCLE_SEL
MIN_CYCLE_T
MEMORY_SIZE
NV_CYCLE_T
FREE_SPACE
FREE_TIME
SHED_RCAS
SHED_ROUT
FAULT_STATE
–
–
–
–
–
–
–
–
–
Valid range
Default value
0
Blank
–
–
– 0
1 – 255 0
O/S
1 – 4
–
–
–
0
Description/Action
See Chapter 2.3.4
See Chapter 2.4
–
0
–
–
–
See Chapter 3.1.2.
Read/write test parameter - used only for conformance testing.
Blank Tag of the resource containing the device description
– Manufacturer’s identification number
Manufacturer's model number associated with the resource
Manufacturer’s revision number associated with the resource
Revision of the DD associated with the resource
See Chapter 2.8.1
Types of hardware available as channel numbers.
See Chapter 3.2.3
See Chapter 3.2.4.
–
–
–
–
0
Identifies the event input types supported by the device, which invoke the execution of the device function blocks
• Scheduled: the blocks execute when a schedule event input is received from the LAS
• Block execution: the blocks execute when a block execution event input is received from another block that has just completed its execution
• Manufacturer specific: the blocks execute according to a manufacturer-specific schedule event input
Selects the block execution method for the device.
• Endress+Hauser devices require no configuration
Indicates the interval, in units of 1/32 ms, at which modified non-volatile parameters are stored to a non-volatile memory
• 0 indicates that parameters are not stored in normal operation
• For Endress+Hauser devices, non-volatile parameters are stored on power down only
Available configuration memory (kbytes) in empty resource.
• Check before attempting a download.
Interval between writing copies of NV parameters to nonvolatile memory (1/32 ms). Zero means never.
0 to 100
0 to 100
–
–
–
Percent of memory available for further configuration.
Zero in a preconfigured resource.
Percent of the block processing time that is free to process additional blocks.
640000 See Chapter 2.4.4
Timeout, in units of 1/32 ms, for communication with an external application writing to function block RCas locations
• If the timeout is exceed, communication is assumed to be lost and the mode is shed, see Chapter 2.4.4
• If the timeout is 0, mode shedding is disabled
640000 See Chapter 2.4.4
Timeout, in units of 1/32 ms, for communication with an external application writing to function block ROut locations
• If the timeout is exceed, communication is assumed to be lost and the mode is shed, see Chapter 2.4.4
• If the timeout is 0, mode shedding is disabled
Indicates whether the output function blocks of the device are being forced into failsafe mode, see Chapter 2.6
• 1: Blocks in normal operation
• 2: Blocks being forced into failsafe mode (see SET_FSTATE)
Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 3 Resource Block
Parameter
SET_FSTATE
CLR_FSTATE
MAX_NOTIFY
LIM_NOTIFY
CONFIRM_TIME
WRITE_LOCK
UPDATE_EVT
BLOCK_ALM
ALARM_SUM
ACK_OPTION
WRITE_PRI
WRITE_ALM
ITK_VER
ENP_VERSION
DEVICE_TAG
SERIAL_NUMBER
ORDER_CODE
FIRMWARE_REVISION
MS_RESOURCE_DIRECTORY
Legend: RO - Read only
Valid range
1, 2
1, 2
Default value
1
Description/Action
1
Forces all output blocks of the device into their failsafe mode.
• 1: Off,
• 2: Enable force
Disables the force of failsafe mode caused by SET_FSTATE
• 1: Off,
• 2: Disable force
See Chapter 3.2.5
MAX_
NOTIFY
RO
0 to
MAX_
NOTIFY
1,2
0, 1 0
0 to 15 0
640000
1 See Chapters 3.1.2, 3.2.4
Alert generated by any change in static data, see Chapter 2.9.4.
See Chapter 3.2.7
The current alert status, unacknowledged states, unreported states, and disabled states of the alarms associated with the function block.
See Chapter 3.2.5
Priority of the alarm generated by clearing the write lock.
Alert is generated if the write lock parameter is cleared.
Version number of the ITK test used as basis for certifying the device
Version number of the Electronic Nameplate
Device tag downloaded from the project to the device
Manufacturer’s serial number for the device
Manufacturer’s order code for the device
Revision number of the firmware of the device
Array describing the grouping of the enhanced parameters
(not relevant to operatioin)
Endress+Hauser 49
4 Transducer Blocks
Measuring devices
Guideline: FOUNDATION Fieldbus Function Blocks
4 Transducer Blocks
A transducer block acts as a "buffer" between a measuring or actuating device and the function block application process. Its purpose is to:
• encapsulate all parameters influencing the physical set up of the device
• for measuring devices, provide a standardized signal to an analog input block
• for actuating devices, process the standardized signal provided by an analog output block
In addition to measuring and actuating devices, transducer blocks are also required for local I/O modules of the ControlCare Field Controller.
Fig. 4-1 shows the how the transducer block functions in simple measuring device. The measuring signal of the device is converted to a process value by the transducer block and transmitted to the analog (or discrete) input block. Here the process value can be scaled or limits can be set before it is made available as the IN value to a control loop.
Actuating devices
50
Transducer
Block
Resource Block
Analog
Input
Block
OUT value of measuring device/
IN value of control loop
Signal from device
Process value (PV)
Fig. 4-1: Function of transducer block in an analog measuring device
The CHANNEL parameter links the transducer and analog input blocks. In the case of multivariable devices, each process variable is assigned a different channel number and the device provides an equal number of input blocks for use in the control strategy.
For an actuator, see Fig. 4-2, the analog (or discrete) output block receives a setpoint value from the control loop, which may run centrally in the controller or distributed in the field devices. After scaling, e.g. to a current signal range, the setpoint value is transmitted to the transducer block as the output value of the function block. The transducer block now generates the physical signal that drives the valve to the desired position.
OUT value of control loop
CAS_IN value of actuator
Analog
Output
Block
Resource Block
Transducer
Block
OUT value
Fig. 4-2: Function of transducer block in an analog actuating device
Signal to actuator
Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Example of a device transducer block
4 Transducer Blocks
4.1
Device transducer blocks (Endress+Hauser)
Device transducer blocks contain all parameters required to physically set up the measurement and present the result to the "outside" world. Thus they usually contain parameters associated with calibration, signal processing (square-root, linearization, inversion, cut-offs), output settings, safety settings etc. Depending on type, the measuring device may have a single or several transducer blocks.
Currently, there are profiles for pressure, temperature and flow available but they often cover only a subset of the transducer parameters of a device. As a consequence, the user is faced with a variety of implementations.
• For older devices, the device is configured using manufacturer-specific parameters that are to be found at the end of the parameter list. In some cases, these parameters can be changed only when on-line and only after the entry of a enabling code.
• More recent devices, e.g. the TMT162 temperature measuring device, already follow Fieldbus
Foundation guidelines and use a quasi-standard parameter set. In this case, no manufacturerspecific parameters are required and the device can usually be configured offline.
Transducer Block “Flow”
Simulation -
Value Measurand
Low Flow
Cut Off
Off Value
On Value
Amplifier
Simulation -
Measurand
Positive Zero
Return
Low Flow Cut Off
Pressure Shock Suppression
Empty Pipe Detection
MODE_BLK
O/S
AUTO
Mass
Flow
Volume
Flow
Corr. Vol.
Flow
Density
Ref.
Density
Temp.
Ch 1
Ch 2
Ch 3
Ch 4
Ch 5
Ch 6
Transducer Block “Totalizer”, etc.
Fig. 4-3: Schematic diagram of Flow Transducer block of Promass 83 Coriolis flowmeter
Fig. 4-3 shows the example of the Endress+Hauser Promass 83 which has two transducer blocks as standard (flow and totalizer) and a number of others which are available for specific variants of the device. It can be seen that the flow transducer block allows the switching on and off of the functions
"Low Flow Cut Off", "Pressure Shock Suppression" and "Empty Pipe Detection". "Low Flow Cut Off" requires the entry of an "Off" and an "On" value to complete configuration. The block also supports simulation of the measurand and positive zero return.
The MODE_BLK parameter is to be found, along with other standard parameters, in every device transducer block. The process values measured by the device, in this case six, are presented at an equal number of channels. Thus volume flow is made available to a connected Analog Input block when the block’s CHANNEL parameter is set to "2". More information on the Promass 83 can be found in Device Function manual BA066D/06/en.
Endress+Hauser 51
4 Transducer Blocks
MODE_BLK.Target
Methods
Block errors
Guideline: FOUNDATION Fieldbus Function Blocks
4.1.1
Block configuration
For more information on configuration of the transducer blocks of the individual devices, please consult the associated device manuals
For normal operation, MODE_BLK.Target
is set to AUTO. This is set during offline configuration and comes into effect when the control strategy is downloaded to the controller.
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
When MODE_BLK.Target
is set to MAN and block simulation is enabled, the process value output by the block can be entered manually.
The Foundation Fieldbus specification provides for the use of so-called methods to simplify the configuration of the device. A method is an interactive sequence of steps that must be followed in order to obtain a particular function from the device. Thus, for example, the steps for the basic calibration of a level device: reset, empty calibration, full calibration might comprise a method named “Basic calibration". The user can call up this method to calibrate the device. He need do nothing else but supply the information which the method asks for as it progresses through each step. The setting of the block mode, reading, writing and plausibility checking of the parameters etc. is automatically done by the program.
A method is part of the device description supplied with the device. Some Endress+Hauser devices support methods.
On execution of the block, the device checks for correct configuration. Block errors are indicated in the BLOCK_ERR parameter.
Condition
Block Configuration Error
Reason
• See associated device operating manual
Simulate Active • The current transducer block value has been entered manually
Input Failure/ process variable has BAD status • Device failure or device initiating etc.
Out-of-Service • MODE_BLK.Target currently set to OOS
Device transducer block
4.1.2
Block parameters
The table below gives an overview of the common Device Transducer block parameters
Parameter
ST_VER
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
Device specific parameters.
UPDATE_EVT
BLOCK_ALM
Legend: RO - Read only
Valid range/
Options
Default value
0 to 255 0
1 to 255 1
0 blanks
TARGET O/S
0 to 15
0
Description/Action
See Chapter 2.3.4
Set to AUTO; Set to MAN to enter parameter by hand
See Chapter 4.3.2
See device operating manuaol
Alert generated by any change in static data, see Chapter 2.9.4.
See Chapter 2.9
52 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 4 Transducer Blocks
4.2
Display block (DISP)
The Display transducer block is provided by all instruments that support the use of an integral or pluggable display module. In addition to the common block parameters, it contains parameters which allow the on and off-line configuration of the display. When on-line, it is possible to read the selected variables.
MODE_BLK.Target
Configuration parameters
4.2.1
Block configuration
For normal operation, MODE_BLK.Target
is set to AUTO. This is set during offline configuration and comes into effect when the control strategy is downloaded to the controller.
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
The configuration parameters provided depend upon the device providing the block. Normally the user can configure:
• The source of the displayed value
• Accompanying text
• Number of decimal points
• Max and minimum value of bargraph, if provided
• Alternation time for multiple value displays
In addition, advanced functions such as display lighting and brightness might be influenced. The appropriate device manual should be consulted.
Display transducer block
4.2.2
Block parameters
The table below gives an overview of the common Display transducer block parameters
Parameter
ST_VER
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
UPDATE_EVT
BLOCK_ALM
TRANSDUCER_TYPE
XD_ERROR
Device specific parameters.
Legend: RO - Read only
Valid range/
Options
Default value
0 to 255 0
1 to 255 1
0 blanks
TARGET O/S
0 to 15
Description/Action
See Chapter 2.3.4
0
Set to AUTO
See Chapter 4.3.2
Alert generated by any change in static data, see Chapter 2.9.4.
See Chapter 2.9
Transducer type to which the display block is connected
Transducer Block Errors, see Chapter 2.9.4
See device operating manuaol
Endress+Hauser 53
4 Transducer Blocks Guideline: FOUNDATION Fieldbus Function Blocks
4.3
Diagnosis block (DIAG)
The Diagnosis transducer block provides information on the hardware and software features provided by the device. Some devices offer an additional Advanced Diagnosis transducer block which can be used if this option has been implemented in the device.
MODE_BLK.Target
Configuration parameters
4.3.1
Block configuration
For normal operation, MODE_BLK.Target
is set to AUTO. This is set during offline configuration and comes into effect when the control strategy is downloaded to the controller.
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
The configuration parameters provided depend upon the device providing the block. For the
SFC162 Field Controller, for example, it contains:
• Online measurement of block execution time
• Hardware revision
• Firmware revision
• Serial number of device
• Serial number of main board
• A parameter BEHAVIOR which defines which initial values for parameters will be used after a block instantiation.
For other devices it might contain locking statuses and access codes. The appropriate device manual should be consulted.
4.3.2
Block parameters
The table below gives an overview of the common Diagnosis transducer block parameters
Diagnosis transducer block Parameter
ST_VER
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
UPDATE_EVT
BLOCK_ALM
TRANSDUCER_TYPE
XD_ERROR
Device specific parameters.
Legend: RO - Read only
Valid range/
Options
Default value
0 to 255 0
1 to 255 1
0 blanks
TARGET O/S
0 to 15
0
Description/Action
See Chapter 2.3.4
Set to AUTO
See Chapter 4.3.2
Alert generated by any change in static data, see Chapter 2.9.4.
See Chapter 2.9
Transducer type to which the display block is connected
(optional)
Transducer Block Errors, see Chapter 2.9.4 (Optional)
See device operating manuaol
54 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 5 Input Blocks
5 Input Blocks
5.1
Analog Input (AI)
The Analog Input block characterizes the incoming analog signal from a device transducer, temperature or hardware configuration block. The result of execution is the OUT parameter, see
Fig. 5-1.
CHANNEL as per device manual
FIELD_VAL(X)
OUT_SCALE
OUT_SCALE
DIRECT
L_TYPE
INDIRECT
IND_SQRT
IO_OPTS
LOW_CUT
PV MANUAL
PV_FTIME
AUTO
ALARMS
OUT
CHANNEL
L_TYPE
Fig. 5-1: Schematic diagram of the analog input block
5.1.1
Functional description
The CHANNEL parameter determines the transducer block logical channel that is to be connected to the Analog Input block and thus the process value to be used by the block. If more than one process value from a device is required for the control strategy, an Analog Input block must be created for each one.
The linearization parameter L_TYPE determines how the process value from the transducer block will be scaled in the input block. One of the following options must be set:
• Direct no scaling, i.e. the process value is the OUT value.
• Indirect linear scaling, i.e. the process value is scaled by XD_SCALE and OUT_SCALE before it becomes the OUT value.
• Indirect Sq Root square root scaling, i.e. the OUT value is the square root of the process value after scaling in
XD_SCALE and OUT_SCALE . This option is used for
p flow measurement.
Note
• If a device transducer block already provides or has been configured to provide a square root output, then only the direct or indirect options should be used.
Endress+Hauser 55
5 Input Blocks Guideline: FOUNDATION Fieldbus Function Blocks
XD_SCALE
OUT_SCALE
IO_OPTS and LOW_CUT
PV_FTIME
ALARM_HYS
XXX_PRI
XXX_LIM
FSAFE_TYPE
FSAFE_VAL
,
XD_SCALE is used prior to output scaling to convert the raw process value from the transducer block to a process value expressed as percentage of range. The result can be read from the
FIELD_VAL parameter. The XD_SCALE parameter expands to reveal the following elements (the example illustrates the scaling of a current input with range limits of 4 mA and 20 mA):
• EU_100 is the upper range limit of the input signal, e.g. 20
• EU_0 is the lower range limit of the input signal, e.g. 4
• UNIT_INDEX is the unit of the input signal, e.g. mA
• DECIMAL is the number of figures behind the decimal point
Examples of input ranges for temperature sensing elements associated with the Temperature
Transducer block are to be found in Chapter 5.2.3.
OUT_SCALE is used to scale the process value to the range and units required by any follow-up block. The result is the OUT value. The OUT_SCALE parameter expands to reveal the following elements (the example illustrates the scaling to an output value range limits of 0% and 100%):
• EU_100 is the upper range limit of the output signal, e.g. 100
• EU_0 is the lower range limit of the output signal, e.g. 0
• UNIT_INDEX is the unit of the output signal, e.g. %
• DECIMAL is the number of figures behind the decimal point
For flow measurement, a low-flow cut-off limit can be set which causes the OUT value to be set to zero when it falls below the value entered in LOW_CUT .
• Activate the function by selecting the Low Cut-Off option in the IO_OPTS parameter.
• Enter the cut-off value in percent of OUT_SCALE in the LOW_CUT parameter.
The PV_FTIME parameter allows the ouput to be damped by entering a suitable positive value in seconds. The default value is zero.
The Analog Input block supports alarming of the OUT value using the parameters ALARM_HYS ,
XXX_PRI and XXX_LIM , in which global hysteresis, alarm priority and alarm values can be set individually for HI_HI_, HI_, LO_ and LO_LO_ limits. A full description of the function is to be found in Chapter 2.9.
The latest Endress+Hauser devices have an enhanced AI function block with two extra parameters
FSAFE_TYPE and FSAFE_VAL . When configured, these dictate how the block reacts on failure.
FSAFE_TYPE determines the value to be output on block failure:
• Fail Safe Value: the block outputs the value FSAFE_VAL with the last valid status
• Last Good Value: the lock outputs last good value with the last valid status
• Wrong Value: the block outputs last good value with Bad status
If the first option is used, a value with the same engineering units as OUT_SCALE must be entered in FSAFE_VAL .
56 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 5 Input Blocks
5.1.2
Block Configuration
Note
• For some engineering tools, the parameters must be configured in the order they appear in the dialog for offline configuration
The basic configuration of an Analog Input block is shown in the table below for a TMT162 temperature transmitter and a Promass 83F mass flowmeter. A full description of the configuration is to be found in the Operating Instructions
• BA224REN for TMT162
• BA065DEN for Promass 83F
The range limits for the TMT162 temperature transmitter are determined by the transducer block parameters SENSOR_TYPE and PRIMARY_OUTPUT_TYPE. For SENSOR_TYPE = Pt100 and
PRIMARY_OUTPUT_TYPE = SV_1 the transducer block outputs a temperature signal in the range
-200°C to +850°C. The XD_SCALE and OUT_SCALE parameters generate the OUT value of the
Anlaog Input block from any part of this range, in our case -50°C to 150°C.
Parameter
MODE BLOCK/TARGET
XD_SCALE/EU_100*
XD_SCALE/EU_0
XD_SCALE/UNITS_INDEX
OUT_SCALE/EU_100
OUT_SCALE/EU_0
OUT_SCALE/UNITS_INDEX
CHANNEL
L_TYPE
PV_FTIME
FSAFE_TYPE
FSAFE_VAL
Function
Normal operating mode of block
Upper range value for process variable
Lower range value for process variable
Unit of process variable
Upper range limit for output variable
Lower range limit for output variable
Unit of output variable
Output channels of Transducer Block aasigned to Ananlog Input Block.
• TMT = Primary, RJ or Sensor vlaue 1/2 depending on whether one or two sensors are connected
• Promass = 1 to 7, depending on which type of process value is required
Temperature
TMT162
Auto
150 (max.850)
–50 (min. –200)
°C
100
0
%
Sensor Value 1
Selects the type of linearisation for the input value.
• Direct : PV value = OUT value,
Identical XD_SCALE and OUT_SCALE
• Indirect: PV value scaled to OUT value
• Indirect Square Root: as Indirect but scaling with root function
Output damping constant (in seconds).
Selects fail safe type to be output on block failure
Sets value for FSAFE_TYPE option Fail Safe
Value
Indirect
1
Fail Safe Value
0
Flow
Promass 83F
Auto
18
0 t/h (unit)
100
0
%
1 = mass flow
Indirect
1 n/a n/a
Endress+Hauser 57
5 Input Blocks
Mode
SIMULATE
Status propagation
Block errors
58
Guideline: FOUNDATION Fieldbus Function Blocks
5.1.3
Block operation
The block normally operates in AUTO mode. When online, the status and value of block output is displayed in the OUT parameter. The value and status of the signal from the transducer block can be viewed in the FIELD_VAL parameter. Any limit alarms are displayed in the ALARM_SUM and, if necessary, can be acknowledged in the HI_HI_ALM etc. parameters.
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
When MODE_BLK.Target
is set to MAN, the block output can be manipulated by entering the desired status and value in the OUT parameter. The PV parameter indicates the correct state.
The process value in the Analog Input block can be simulated in order to check the function of it and subsequent blocks during commissioning. A prerequisite for this is that the hardware lock of the device is set to enable. When simulation is enabled, "Simulation Active" appears in the resource block parameter BLOCK_ERROR by , see Chapter 2.9 and Chapter 3.2.7.
Simulation parameters can be changed when the block is in AUTO mode. Expand the SIMULATE parameter to enter a simulated value:
• Set the status of the simulated variable in SIMULATE_STATUS
• Set the value of the simulated variable in SIMULATE_VALUE
• Set ENABLE_DISABLE to "Active" to start simulation
The parameters TRANSDUCER_STATUS and TRANSDUCER_VALUE indicate the status and value of the raw process value. The block output OUT reflects the simulated parameters after processing in the block.
Simulation in an I/O block is disabled by setting ENABLE_DISABLE to "Disable". In this state
SIMULATE_STATUS and SIMULATE_VALUE etc. track TRANSDUCER_STATUS and
TRANSDUCER_VALUE in order to provide a bumpless transfer from disabled to enabled.
The Analog Input block supports the qualities Bad, Uncertain and GoodNC together with the associated substatuses, see Chapter 2.3.2. For example, if the OUT value exceeds the OUT_SCALE range and no worse condition exists in the block then the OUT status will be "Uncertain, EU Range
Violation". Status propagation can be influenced by selecting the following options in the
STATUS_OPTS parameter, see Chapter 2.8.3.
Option
Propagate Fail Forward
Uncertain if Limited
BAD if Limited
Uncertain if Man
Description
Propagates a transducer block status Bad.DeviceFailure or Bad.SensorFailure to OUT without generating an alarm.
– Allows the user to detemine whether alarming (sending of an alert) will be done by the block or propagated downstream
Sets the output status of the block to Uncertain when limit alarms HI_HI_, HI_, LO_ or LO_LO_ are violated
– Option when alarms have been set on the output value
Sets the output status of the block to Bad when limit alarms HI_HI_, HI_, LO_ or
LO_LO_ are violated
– Option when alarms have been set on the output value
Sets the output status of the block to Uncertain if the actual mode of the block is Man
Block errors are indicated in the BLOCK_ERR parameter.
Condition
Block Configuration Error
Reason
• CHANNEL or L_TYPE parameter has an invalid value
• CHANNEL and HC transducer block configuration not compatible
• XD_SCALE does not have a suitable engineering unit or range for the sensor type of the transducer block
• XXX_LIM limit value is out of valid range
Simulate Active • The current OUT value and status is simulated
Input Failure/ process variable has BAD status • I/O module or device failure, device initiating etc.
Out-of-Service • MODE_BLK.Target currently set to OOS
• L_TYPE is "Uninitialised": set to one of other options
Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Analog Input block
5 Input Blocks
5.1.4
Block parameters
Parameter
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
PV
OUT
SIMULATE
XD_SCALE
OUT_SCALE
GRANT_DENY
IO_OPTS
STATUS_OPTS
CHANNEL
L_TYPE
LOW_CUT
PV_FTIME
FIELD_VAL
UPDATE_EVT
BLOCK_ALM
ALARM_SUM
ACK_OPTION
ALARM_HYS
HI_HI_PRI
HI_HI_LIM
HI_PRI
HI_LIM
LO_PRI
LO_LIM
LO_LO_PRI
LO_LO_LIM
HI_HI_ALM
HI_ALM
LO_ALM
LO_LO_ALM
FSAFE_TYPE
FSAFE_VAL
Legend: RO = Read Only
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
RO
Description/Action
See Chapter 2.3.4
Disable
0
0
Block mode, set to MODE_BLK.Target to AUTO
Block errors, see Chapter 5.2.3
Process value used in executing the block
Output value calculated as a result of executing the block
See Chapter 5.2.2, Enable/Disable options:
• Disable
• Active
0
0
0-100% Transduced value scaling to % of range
0-100% OUT value scaling t engineering units
Access options, see Chapter 2.8.1
I/O options, see Chapter 2.8.2 and Chapter 5.2.1
Status options, see Chapter 2.8.4 and Chapter 5.2.2
The number of the logical hardware channel to the transducer that is connected to this I/O block, see Chapter 5.1.
0 - 3 0
0, 1
0 %
0 s
0
Linearization mode, see Chapter 5.2.1
• 1: Direct
• 2: Indirect
• 3: Indirect Square Root.
Low flow cut-off value in % of scale, see Chapter 5.2.1
Time constant (s) of a single exponential filter for process value
Raw value of the field device in percent of PV range
Alert generated by any change to the static data.
Block alarms, see Chapter 2.9
Alarm summary, see Chapter 2.9
See Chapter 2.9
• 0: Auto ACK Disable
• 1: Auto ACK Enable
0 to 50 % 0.5%
0 to 15
+INF
0 to 15
+INF
0 to 15
0 to 15
-INF
-INF
Alarm hysteresis in % of OUT_SCALE, see Chapter 2.9
Priority of the HI_HI alarm, see Chapter 2.9
Setting of HI_HI alarm in engineering units, see Chapter 2.9.
Priority of the HI alarm, see Chapter 2.9
Setting of HI alarm in engineering units, see Chapter 2.9.
Priority of the LO alarm, see Chapter 2.9.
Setting of LO alarm in engineering units, see Chapter 2.9.
Priority of the LO_LO alarm, see Chapter 2.9
Setting of LO_LO alarm in engineering units, see Chapter 2.9
Status of HI_HI alarm and its associated time stamp.
Status of HI alarm and its associated time stamp.
Status of LO alarm and its associated time stamp.
Status of LO_LO alarm and its associated time stamp.
Customized AI block parameter
Selects fail safe type to be output on block failure
• Fail Safe Value: block outputs FSAFE_VAL
• Last Good Value: block outputs last good value with status
• Wrong Value: block outputs last good value with Bad status
Customized AI block parameter
Sets value for FSAFE_TYPE option Fail Safe Value
Endress+Hauser 59
5 Input Blocks
CHANNEL
IO_OPS.Invert
STATUS_OPTS
PV_FTIME
DISC_PRI
DISC_LIM
Guideline: FOUNDATION Fieldbus Function Blocks
5.2
Discrete Input (DI)
The Discrete Input block characterizes the incoming discrete signal from a limit switch transducer or hardware configuration block. The result of execution is the OUT_D parameter, see Fig. 5-2.
CHANNEL as per device manual
SIMULATE_D
OPTIONAL
INVERT
FILTER
PV_FTIME
FIELD_VAL_D
PV_D
OUTPUT
ALARMS
DISC
MODE
OUT_D
Fig. 5-2: Schematic diagram of Discrete Input block
5.2.1
Functional description
The CHANNEL parameter determines the transducer block logical channel that is to be connected to the Discrete Input block.
If required, the INVERT option in the parameter group IO_OPTS inverts the discrete signal by placing a boolean NOT between the field value FIELD_VAL_D and the output OUT_D when true.
False (default)
True (box ticked)
A discrete value of zero (0) is considered to be a logical zero (0), and a non-zero discrete value a logical one (1)
A discrete value of zero (0) is considered to be a logical one (1), and a non-zero discrete value a logical zero (0)
FIELD_VAL_D uses the XD_STATE value to indicate the true state on/off state of the connected hardware.
STATUS_OPTS controls the status propagation of the signal to downstream blocks, see
Chapter 5.3.3.
PV_FTIME can be used to specify the time the hardware must be in a particular state before the logical state is passed on to PV_D. The default value is zero.
The Discrete Input block supports alarming of the OUT_D value using the parameters DISC_PRI and DISC_LIM , in which alarm priority and alarm value ("0" or "1") can be set. A full description of the function is to be found in Chapter 2.9.
60 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Order of parameters
SIMULATE_D
5 Input Blocks
5.2.2
Block configuration
The basic configuration of a Discrete Input block is shown in the table below. It is assumed that the discrete signal originates from rack 1, slot 2, group 0 and I/O point 3 of the local I/O, i.e. channel number 1203, and is to be inverted. In our case the default status options will be taken, so that the
STATUS_OPTS parameter does not have to be configrued (see Chapter 5.3.3).
Parameter
MODE BLOCK/TARGET
IO_OPS
CHANNEL
PV_FTIME
Function
Normal operating mode of block
Causes signal to be inverted when option ticked
Output channel of the local I/O connected to the block
• Rack 1, slot 2, group 0 and I/O point 3 = 1203
Output damping constant (in seconds).
Example value
Auto
Invert
1203
1
Some block parameters have a write check based on the value of others parameters. It is therefore important to set the parameters in the order shown (the same order in which they are displayed in the Off Line Characterization dialog.
After characterization of the block, the parameters will appear in the FOUNDATION Fieldbus tree.
If you find a parameter in the wrong position, it can be move by dragging and dropping to the correct one.
5.2.3
Block operation
The block normally operates in AUTO mode. When online, the status and value of block output is displayed in the OUT_D parameter. The XD_STATE parameter indicates the true state on/off state of the connected hardware. Any discrete alarm is displayed in the ALARM_SUM and, if necessary, can be acknowledged in the DISC_ALM parameter.
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
When MODE_BLK.Target
is set to MAN, the block output can be manipulated by entering the desired status and value in the OUT_D parameter. The PV_D value indicates the correct state.
The process value in the Discrete Input block can be simulated in order to check the function of it and subsequent blocks during commissioning. A prerequisite for this is that the hardware lock of the device is set to enable. When simulation is enabled, "Simulation Active" appears in the resource block parameter BLOCK_ERROR by , see Chapter 2.9 and Chapter 3.2.7.
Simulation parameters can be changed when the block is in AUTO mode. Expand the
SIMULATE_D parameter to enter a simulated value:
• Set the status of the simulated variable in SIMULATE_STATUS
• Set the value of the simulated variable in SIMULATE_VALUE
• Set ENABLE_DISABLE to "Active" to start simulation
The parameters TRANSDUCER_STATUS and TRANSDUCER_VALUE indicate the status and value of the raw process value. The block output OUT_D reflects the simulated parameters after processing in the block.
Simulation in an I/O block is disabled by setting ENABLE_DISABLE to "Disable". In this state
SIMULATE_STATUS and SIMULATE_VALUE etc. track TRANSDUCER_STATUS and
TRANSDUCER_VALUE in order to provide a bumpless transfer from disabled to enabled.
Endress+Hauser 61
5 Input Blocks
Status propagation
Block errors
Guideline: FOUNDATION Fieldbus Function Blocks
The Discrete Input block supports the qualities Bad, Uncertain and GoodNC together with the associated substatuses, see Chapter 2.3.2. Status propagation can be influenced by selecting the following options in the STATUS_OPTS parameter, see Chapter 2.8.3.
Option
Propagate Fail Forward
Uncertain if Man
Description
Propagates a transducer block status Bad.DeviceFailure or Bad.SensorFailure to
OUT_D without generating an alarm.
– Allows the user to detemine whether alarming (sending of an alert) will be done by the block or propagated downstream
Sets the output status of the block to Uncertain if the actual mode of the block is Man
Block errors are indicated in the BLOCK_ERR parameter.
Condition
Block Configuration Error
Reason
• CHANNEL parameter has an invalid value
• CHANNEL and HC transducer block configuration not compatible
Simulate Active • The current OUT_D value and status is simulated
Input Failure/ process variable has BAD status • I/O module or device failure, device initiating etc.
Out-of-Service • MODE_BLK.Target currently set to OOS
5.2.4
Block parameters
Parameter
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
PV_D
OUT_D
SIMULATE_D
XD_STATE
OUT_STATE
GRANT_DENY
IO_OPTS
STATUS_OPTS
CHANNEL
PV_FTIME
FIELD_VAL_D
UPDATE_EVT
BLOCK_ALM
ALARM_SUM
ACK_OPTION
DISC_PRI
DISC_LIM
DISC_ALM
Legend: RO = Read Only
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
RO
Description/Action
See Chapter 2.3.4
0, 1
0, 1
0, 1
0 to 15
0, 1
Disable
0
0
0
0
0
0
0 s
0
+INF
Block mode, set to MODE_BLK.Target to AUTO
Block errors, see Chapter 5.2.3
Process value used in executing the block
Output value calculated as a result of executing the block
See Chapter 5.2.2, Enable/Disable options:
• Disable
• Active
True logic state of connected hardware
Logic state used by PV_D and OUT_D
Access options, see Chapter 2.8.1
"Invert" inverts signal, see Chapter 2.8.2 and Chapter 5.3.1
Status options, see Chapter 2.8.4 and Chapter 5.2.3
The number of the logical hardware channel to the transducer that is connected to this I/O block, see Chapter 5.1.
Time constant (s) of a single exponential filter for process value
Raw value of the field device
Alert generated by any change to the static data.
Block alarms, see Chapter 2.9
Alarm summary, see Chapter 2.9
See Chapter 2.9
• 0: Auto ACK Disable
• 1: Auto ACK Enable
Priority of the discrete alarm, see Chapter 2.9
State for which alarm must be output, see Chapter 2.9.
Status of discrete alarm and its associated time stamp.
62 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
CHANNEL
5 Input Blocks
5.3
Multiple Analog Input (MAI)
The Multiple Analog Input block is intended to operate with FF I/O subsystems which are capable of providing 8 analog values., see Fig 5-3.
The block does not support linearization, scaling, low-flow cut off or simulation. If these properties are required, an Analog Input block must be created for the output channel in question.
I/O points
AI 0 to AI 7 read together
CHANNEL
INPUT
SNAP OF
TRANSDUCER
BLOCK
OUTPUTS
MANUAL
AUTO
MANUAL
AUTO
MANUAL
AUTO
MANUAL
AUTO
MANUAL
AUTO
MANUAL
AUTO
MANUAL
AUTO
MANUAL
AUTO
MODE
Fig. 5-3: Schematic diagram of Multiple Analog Input block
OUT_1
OUT_2
OUT_3
OUT_4
OUT_5
OUT_6
OUT_7
OUT_8
5.3.1
Functional description
The CHANNEL parameter determines the transducer block logical channel carrying the analog inputs. The channel configuration should be taken from the manufacturer’s operating manual.
5.3.2
Block configuration
The basic configuration of a Multiple Analog Input block is shown in the table below. It is assumed that the analog signals are obtained from an Endress+Hauser ControlCare SFC444 analog input module located in rack 1, slot 4.
Parameter
MODE BLOCK/TARGET
CHANNEL
Function
Normal operating mode of block
Output channel of the local I/O connected to the block
• Rack 1, slot 4, group 0 and I/O point 9 = 1409
Example value
Auto
1409
Endress+Hauser 63
5 Input Blocks
Status propagation
Block errors
Guideline: FOUNDATION Fieldbus Function Blocks
5.3.3
Block operation
The block normally operates in AUTO mode. When online, the status and value of block output is displayed in the OUT_X parameter.
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
When MODE_BLK.Target
is set to MAN, the block output can be manipulated by entering the desired status and value in the OUT_x parameter.
The Multiple Analog Input block supports the qualities Bad, Uncertain and GoodNC together with the associated substatuses, see Table 5-11 above and Chapter 2.3.2.
On execution of the block, the device checks for correct configuration. Block errors are indicated in the BLOCK_ERR parameter.
Condition
Block Configuration Error
Reason
• CHANNEL has an invalid value
• CHANNEL and HC transducer block configuration not compatible
Input Failure/ process variable has BAD status • I/O module or device failure, device initiating etc.
Out-of-Service • MODE_BLK.Target currently set to OOS
Multiple Analog Input block
5.3.4
Block parameters
Parameter
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
CHANNEL
OUT_1...OUT_8
UPDATE_EVT
BLOCK_ALM
Legend: RO = Read Only
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
0
Description/Action
See Chapter 2.3.4
Block mode, set to MODE_BLK.Target to AUTO
Block errors, see Chapter 5.2.3
The number of the logical hardware channel to the transducer that is connected to this I/O block, see Chapter 5.1.
Output value and status for channel x calculated as a result of executing the block
Alert generated by any change to the static data.
Block alarms, see Chapter 2.9
64 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
CHANNEL
5 Input Blocks
5.4
Multiple Discrete Input (MDI)
The Multiple Digital Input block is intended to operate with FF I/O subsystems which are capable to provide 8 digital values, see Fig. 5-4. If signal characterization or simulation is required, Discrete
Input blocks must be used.
I/O points
DI 0 to DI 7 read together
CHANNEL
INPUT
SNAP OF
TRANSDUCER
BLOCK
OUTPUTS
MANUAL
AUTO
MANUAL
AUTO
MANUAL
AUTO
MANUAL
AUTO
MANUAL
AUTO
MANUAL
AUTO
MANUAL
AUTO
MANUAL
AUTO
MODE
Fig. 5-4: Schematic diagram of Multiple Discrete Input block
OUT_D1
OUT_D2
OUT_D3
OUT_D4
OUT_D5
OUT_D6
OUT_D7
OUT_D8
5.4.1
Functional description
The CHANNEL parameter determines the transducer block logical channel carrying the descrete inputs.
5.4.2
Block configuration
The basic configuration of a Multiple Analog Input block is shown in the table below. It is assumed that the analog signals are obtained from an Endress+Hauser ControlCare SFC411 discrete input module located in rack 2, slot 2. The Group 1 connections are used:
Parameter
MODE BLOCK/TARGET
CHANNEL
Function
Normal operating mode of block
Output channel of the local I/O connected to the block
• Rack 2, slot 2, group 1 and I/O point 9 = 2219
Example value
Auto
2219
Endress+Hauser 65
5 Input Blocks
Block errors
Guideline: FOUNDATION Fieldbus Function Blocks
5.4.3
Block operation
The block normally operates in AUTO mode. When online, the status and value of block output is displayed in the OUT_DX parameter.
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
When MODE_BLK.Target
is set to MAN, the block output can be manipulated by entering the desired status and value in the OUT_Dx parameter. Status propagation
The Multiple Discrete Input block supports the qualities Bad, Uncertain and GoodNC together with the associated substatuses, see Chapter 2.3.2.
On execution of the block, the device checks for correct configuration. Block errors are indicated in the BLOCK_ERR parameter.
Condition
Block Configuration Error
Reason
• CHANNEL has an invalid value
• CHANNEL and HC transducer block configuration not compatible
Input Failure/ process variable has BAD status • I/O module or device failure, device initiating etc.
Out-of-Service • MODE_BLK.Target currently set to OOS
Multiple Discrete Input block
5.4.4
Block parameters
Parameter
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
CHANNEL
OUT_D1...OUTD8
UPDATE_EVT
BLOCK_ALM
Legend: RO = Read Only
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
0
0 s
Description/Action
See Chapter 2.3.4
Block mode, set to MODE_BLK.Target to AUTO
Block errors, see Chapter 5.2.3
The number of the logical hardware channel to the transducer that is connected to this I/O block, see Chapter 5.1.
Output value and status after execution of the block
Alert generated by any change to the static data.
Block alarms, see Chapter 2.9
66 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 6 Control Blocks
6 Control Blocks
6.1
PID Control
The PID Control block provides proportional, integral and derivative control of the process. The block attempts to correct the error or control deviation between a measured process variable, PV and a desired setpoint, SP , by calculating an actuating or manipulated variable and then outputting a corrective action as an OUT value that adjusts the process accordingly, see Fig. 6-1.
The block can be configured to perform a number of control tasks including closed-loop control, feedforward control, cascade control and remote interfacing. A number of options, e.g. bypass or tracking, ensure that the connected actuator continues to operate or fails to safe on bad input under certain process conditions.
CAS_IN
RCAS_IN
SP
LIMITS
RCAS_OUT
SP
SELECTOR
IN
OPERATOR ENTRY
PV_TIME
FF_VAL
FF_SCALE
FF_GAIN
TRK_VAL
TRK_IN_D
BKCAL_IN
TRK_SCALE
OUT_SCALE
SP
ROUT_IN
PID +
FF
OUT_SCALE
OUT
SELECTOR
OUT
LIMITS
ROUT_OUT
SP
PV
CONTROL_OPTS
OUT
BKCAL_OUT
Fig. 6-1: Schematic diagram of PID Control block
Chapter 6.1.1 contains a general description of the block. Subsequent parts of Chapter 6.1 concentrate on its configuration for specific tasks and its behaviour during operation. Chapter 6.1.8 contains a overview of all parameters of the block.
Endress+Hauser 67
6 Control Blocks
Process value
Feedforward
Guideline: FOUNDATION Fieldbus Function Blocks
6.1.1
Functional description
Fig. 6.2 shows the internal structure of the PID function block.
FF_VAL
PID Bloc k
Feed forward calculation
CAS_IN
Setpoint from supervisory host system
RCAS_IN
FF_GAIN
FF_SCALE
RCAS_OUT
Setpoint limiting
SP SP_HI_LIM
SP_LO_LIM
SP_RATE_DN
SP_RATE_UP
TRK_IN_D
BKCAL_IN
IN
MODE
Scaling and filtering
PV
PV_SCALE
PV_FILTER
TRK_SCALE
OUT_SCALE
Bypass
PID
Equation
GAIN
RATE
RESET
Alarm detection
HI_HI_LIM / HI_LIM
LO_LO_LIM / LO_LIM
DV_HI_LIM / DV_LO_LIM
Output from supervisory host system
ROUT_IN ROUT_OUT
Output limiting
Calculated actuating variable
OUT_HI_LIM
OUT_LO_LIM
OUT_SCALE
TRK_VAL Converter
BCAL_OUT
OUT
Fig. 6-2: Functional diagram of PID Control block
The control variable is connected to IN , scaled in PV_SCALE and passed through the filter
PV_FTIME . If the value of PV_TIME is zero (default), the filter is disabled. The resulting process value PV is used in conjunction with the setpoint SP in the PID algorithm. PV will normally adopt the status of IN , unless there is a block or process alarm, in which case its quality will become
"Uncertain". If the block operates in Local Override (LO), the limit status of PV is "Constant" and the PID algorithm is not executed.
PV can be limited using the parameters HI_HI_LIM , HI_LIM , LO_LO_LIM , and LO_LIM , whereby the default value is no limit. A universal alarm hysteresis in percent of PV span can be set for all limits in the ALARM_HYS parameter. Alarm priorities are set in the associated parameter, i.e. HI_HI_PRI etc.
If PV is out of limits, an alarm is sent to the fieldbus host system. Alarms are displayed in the
ALARM_SUM parameter and must be acknowledged in the associated alarm parameter, i.e.
HI_HI_ARM etc. Automatic alarm acknowledgement can be enabled by selecting the appropriate option in ACK_OPTS .
The PID Control block supports the feedforward algorithm. An external value that is proportional to some disturbance in the control loop is connected to FF_VAL . The value is converted to percent of output span by FF_SCALE . This is multiplied by FF_GAIN and added to the target output of the
PID algorithm ("F" in the PID equation).
To prevent bumping the output, the last good value of "F" is used if the status of FF_VAL is "Bad".
When the status returns to good, the block adjusts its integral term to maintain the previous output.
68 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Setpoint
PID control algorithm
6 Control Blocks
Depending upon the operating mode of the PID Control block, the target setpoint and status is provided by SP , CAS_IN or RCAS_IN as shown below:
MODE_BLK
AUTO
CAS
RCAS
Setpoint value
SP
CAS_IN
RCAS_IN
Origin
Value is constant and entered manually by the operator.
Originates from an upstream function or control block
Originates from a supervisory host
The setpoint SP can be adjusted in AUTO mode. To ensure bumpless transfer when the setpoint SP changes, a downward or upward ramp in PV units per second can be set in the parameters
SP_RATE_DN and SP_RATE_UP respectively. The setpoint then moves from the old to the new value at the set rate. If the ramp rate is set to zero, the new setpoint will be used immediately.
A valid range for setpoint operator entries can be defined by entering appropriate limits in
SP_HI_LIM and SP_LO_LIM in units of PV_SCALE. If an invalid SP is entered, the parameter reverts to the last valid entry. Normally, the limits apply to SP only but they can be enabled for
CAS_IN and RCAS_IN by selecting the option "Obey SP limits if CAS or RCAS" in
CONTROL_OPTS .
The PID Control block algorithm involves three separate parameters:
• the proportional value or P-term determines the reaction to the current error
• the integral value of I-term determines the reaction based on the sum of recent errors and
• the derivative value or D-term, determines the reaction to the rate at which the error has been changing.
The weighted sum of these three actions is output to a control element such as the position of a control valve or power into a heating element according to the following equation: y = GAIN e +
1
RESET
e t +
+ + F whereby:
• y = Actuating (or manipulated) variable calculated from the PID algorithm (OUT).
• GAIN= Proportional gain factor (100/proportional band)
• RESET= Time constant for the integral action in seconds/repeat
• RATE= Time constant for the derivative action in seconds
• e =
• PV
• F =
Control deviation or error (e = SP - PV)
Process value
Disturbance variable (F = FF_VAL x FF_GAIN)
By default, the PID algorithm is "Indirect Acting", i.e. the output increases when PV is less than SP and decreases when the reverse is true. This behaviour can be reversed by selecting the "Direct
Acting" option in CONTROL_OPTS . The output will now decrease when PV is less than SP and vice versa. The option also controls whether positive or negative feedback is applied and affects the calculation of the limit state for BKCAL_OUT .
The control deviation "e" can be limited using the parameters DV_HI_LIM and DV_LO_LIM , whereby the default value is not limited-. A universal alarm hysteresis in percent of PV span can be set for both limits in the ALARM_HYS parameter (this also applies to HI_HI_LIM etc.). Alarm priorities are set in DV_HI_PRI and DV_LO_PRI .
If DV violates the defined limit values, an alarm is sent to the fieldbus host system. Alarms are displayed in the ALARM_SUM parameter and must be acknowledged in DV_HI_ARM and
DV_LO_ALM . Automatic alarm acknowledgement can be enabled by selecting the appropriate option in ACK_OPTS .
Endress+Hauser 69
6 Control Blocks
Bypass
Back calculation
Output
Output tracking
Guideline: FOUNDATION Fieldbus Function Blocks
The bypass function allows an operator to bypass the PID algorithm if the PV of a secondary cascade control-loop is "Bad". The function is enabled by selecting the option "Bypass Enable" in
CONTROL_OPTS . The bypass itself can be switched on and off by changing to MAN or OOS mode and selecting the appropriate option in BYPASS .
When BYPASS is "On", the value of SP , in percent of range, is passed directly to the target output, and the value of OUT is used for BKCAL_OUT . When the operating mode returns to CAS, the upstream block is requested to initialize to the value of OUT .
When BYPASS is reset to "Off" and the block returns to CAS, the upstream block is requested to initialize to the PV value, regardless of the “Use PV for BKCAL_OUT” option, see back calculation.
The BKCAL_IN parameter carries the feedback, i.e. value and status, from the BKCAL_OUT parameter of a downstream block and is used to prevent reset windup and to initialize the control loop. The PID Control block always acts on the status it carries, independent of any control options and independent of whether it is operating in AUTO, CAS or RCAS mode. Possible statuses and actions are listed in Chapter 2.3.
Normally, the BKCAL_OUT parameter of the PID Control block itself carries the value and status of SP . Depending on the CONTROL_OPTS parameter, it may be forced to a different condition.
When the block operates in RCAS, RCAS_OUT (= SP) provides the back calculation for the host, allowing action to be taken under limiting conditions or mode change.
CONTROL_OPS option
None
None, but RCAS mode
Bypass Enable, BYPASS "On"
Bypass Enable, BYPASS "Off"
Use PV for BKCAL_OUT
BKCAL_OUT value and status
SP value and status
PV value and status after limiting
OUT value and substatus "Initialization Request" on return to CAS
OUT value and status after receipt of substatus "Initialization Acknowledge"
PV value and substatus "Initialization Request" on return to CAS,
SP value and status after receipt of substatus "Initialization Acknowledge"
PV value and status
When the block is operating in AUTO, CAS or RCAS mode, the actuating variable becomes the output OUT after being being scaled in OUT_SCALE . It can also be limited in OUT_HI_LIM and
OUT_LOW_LIM . If the calculated value of the output exceeds or drops below these limits, the appropriate limit value is used as output. The BKCAL_HYS parameter places a hysteresis, in percent of output scale, on the limit values.
If the block is in MAN mode, the OUT value and status may be set by hand. In order to prevent bumps on change from one mode to another, the OUT value is balanced. The time taken for the transition from the old to the new value can be entered in BAL_TIME .
If the block is in ROUT mode, the PID algorithm is not used and OUT is fed directly from a supervisory host system via the parameter ROUT_IN . It may also be replaced by an external tracking value as in output tracking. ROUT_OUT provides the feedback to the host
The PID Control block supports the track algorithm, allowing the output to be forced to a value on command by a discrete value. The actual mode then goes to local override, LO. Tracking is enabled for AUTO and RCAS modes by selecting the option "Track Enable" in CONTROL_OPTS . If tracking is to be enabled in MAN mode, the option "Track in Manual" must be selected as well. The
TRK_VAL input brings in an external track value or may be set manually. The value is converted to percent of output span using the parameter values of TRK_SCALE . When TRK_IN_D is true, the converted TRK_VAL replaces OUT and the operating mode is forced to LO. The track request is ignored if the current mode is OOS.
If the status of TRK_IN_D is "Bad", its last usable value will be maintained and acted upon. If the device restarts, losing the last usable value, the status will be set to false. If there is no last usable value, the present value of the output will be used.
70 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Example
6 Control Blocks
6.1.2
Closed-loop control
Basic closed-loop control requires process input, e.g. a measurement provided by an Analog Input block, that has an effect on the process output, e.g. the Analog Output block, which is calculated by the control block. The result (the control signal) is used as input to the process, closing the loop.
A measurement of flow upstream of a valve ensures a constant flow rate downstream of a valve, by causing the valve to open and close, see Fig. 6-3.
CV
102
FCV
101
PID control
FT
100
Block configuration
Fig. 6-3: Example of closed-loop control
Fig. 6-4 shows the control strategy together with links that must be made between the blocks.
FT100
AI
OUT IN
BKCAL_IN
PID
OUT CAS_IN
AO
OUT
BKCAL_OUT
FCV101 CV102
Fig. 6-4: Links required for basic closed-loop control
The block is configured as follows, see also the table below:
• Set MODE_BLK.Target
to AUTO
• Enter the setpoint value in the units required by the PID algorithm in SP
• Scale the input from the AI block to the units required by the PID algorithm in PV_SCALE
• Scale the output of the block in the units required by the AO block in OUT_SCALE
• To bypass the PID algorithm on bad input status, select Bypass Enable in CONTROL_OPTS
• To ensure bumpless transfer should SP change, e.g. though a manual intervention, set a rate of change in the SP_RATE_DN and SP_RATE_UP parameters with which the old SP value adapts to the new SP value
• Set the parameters GAIN , RESET and RATE to values appropriate to your application.
Parameter
MODE_BLK.Target
SP
PV_SCALE.EU_100
PV_SCALE.EU_0
PV_SCALE.UNITS_INDEX
OUT_SCALE/EU_100
OUT_SCALE/EU_0
OUT_SCALE/UNITS_INDEX
CONTROL_OPTS
SP_RATE_DN
SP_RATE_UP
GAIN
RESET
RATE
Function
Normal operating mode of block
Setpoint for ideal process control
Upper range limit for process variable
Lower range limit for process variable
Unit of process variable
Upper range limit for output variable
Lower range limit for output variable
Unit of output variable
Sets control options for bad input
Rate of change from old to new, higher SP
Rate of change from old to new, lower SP
Tuning constants for the P, I and D terms of the PID block respectively.
Example value
Auto
60%
100
0
%
100
0
%
Bypass Enable
0
0
1.5
0.1 s
0.5 s
Endress+Hauser 71
6 Control Blocks
Example
Guideline: FOUNDATION Fieldbus Function Blocks
6.1.3
Feedforward control
Feedforward control may be used where a system responds to a measured disturbance in a predictable way. Provided that the disturbance is measurable, the effect of the disturbance on the output of the system is known and the controller affects the output before the disturbance does, feedforward control can be implemented. Feedforward control can also be used with closed-loop control to improve reference tracking performance.
The temperature of water measured downstream of a heat exchanger controls the supply of steam by opening and closing a control valve, see Fig. 6-5. A flowmeter upstream of the heat exchanger gives information on the the amount of water to flowing through the exchanger. The flowmeter
Analog Output block supplies the feedforward information, the temperature device Analog Input block the process value. The Analog Output block of the control valve controls the control valve actuator.
Feedforward TCV
102
PID control
CV
103
FT
101
TT
100
Fig. 6-5: Example of feedforward control
Fig. 6-6 shows the control strategy together with links that must be made between the blocks.
OUT
FT101
AI
TT100
AI
FF_VAL
OUT IN
BKCAL_IN
PID
OUT CAS_IN
AO
OUT
BKCAL_OUT
TCV102 CV103
Fig. 6-6: Links required for feedforward and closed loop control
72 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Block configuration
6 Control Blocks
The table blelow lists the basic parameters for feedforward control with some examples of values.
The block is configured as follows:
• Set MODE_BLK.Target
to AUTO
• Enter the setpoint value in the units required by the PID algorithm in SP
• Scale the input from the AI block providing the control measurement to the units required by the PID algorithm in PV_SCALE
• Scale the output of the block in the units required by the AO block in OUT_SCALE
• To bypass the PID algorithm on bad input status, select Bypass Enable in CONTROL_OPTS
• To ensure bumpless transfer should SP change, e.g. though a manual intervention, set a rate of change in the SP_RATE_DN and SP_RATE_UP parameters with which the old SP value adapts to the new SP value
• Set the parameters GAIN , RESET and RATE to values appropriate to your application
• Scale the input from the AI block providing the feedforward measurement to the units required by the PID algorithm in FF_SCALE
• Enter the gain associated with the feedforward variable in FF_GAIN .
Parameter
MODE_BLK.Target
SP
PV_SCALE.EU_100
PV_SCALE.EU_0
PV_SCALE.UNITS_INDEX
OUT_SCALE/EU_100
OUT_SCALE/EU_0
OUT_SCALE/UNITS_INDEX
CONTROL_OPTS
SP_RATE_DN
SP_RATE_UP
GAIN
RESET
RATE
FF_SCALE.EU_100
FF_SCALE.EU_0
FF_SCALE.UNITS_INDEX
FF_GAIN
Function
Normal operating mode of block
Setpoint for ideal process control
Upper range limit for process variable
Lower range limit for process variable
Unit of process variable
Upper range limit for output variable
Lower range limit for output variable
Unit of output variable
Sets control options for bad input
Rate of change from old to new, higher SP
Rate of change from old to new, lower SP
Tuning constants for the P, I and D terms of the PID block respectively.
Upper range limit for feedforward variable
Lower range limit for feedforward variable
Unit of feedforward variable
The gain that the feedforward input is multiplied by before it is added to the calculated control output.
Example value
Auto
60%
100
0
%
1.5
0.1 s
0.5 s
100
0
%
1
100
0
%
Bypass Enable
0
0
Endress+Hauser 73
6 Control Blocks
Example
Guideline: FOUNDATION Fieldbus Function Blocks
6.1.4
Cascade control
Cascade control uses the output of the primary PID Control block to manipulate the setpoint of the secondary PIC Control block as if it were the final control element. This allows disturbances in the secondary loop as well as non-linear valve and other final control element problems to be handled by the secondary PID Control block. In addition, the operator can directly control the secondary loop during certain modes of operation, such as startup
The requirements for cascade control are:
• the process dynamics of the secondary loop must be at least four times as fast as those of the primary loop
• the secondary loop must have influence over the primary loop.
• the secondary loop must be measurable and controllable.
The temperature of water measured upstream of a heat exchanger is used as input to a primary PID
Control block which manipulates a secondary block controlling the supply of steam by opening and closing a control valve, see Fig. 6-7. The input to the secondary block is the flowrate of the steam.
The flowmeter Analog Output block supplies the input value to the secondary loop, the temperature device Analog Input block the process value. The Analog Output block of the control valve controls the control valve actuator. secondary loop
FT
102
FCV
103 primary loop
TC
101
CV
104
TT
100
74
Fig. 6-7: Example of cascade control
Fig. 6-8 shows the control strategy together with links that must be made between the blocks.
TT100
AI
FT102
AI
OUT IN
PID
BKCAL_IN
TC101 OUT
OUT
CAS_IN
IN
BKCAL_IN
PID
FCV103
BKCAL_OUT AO
OUT CAS_IN
CV104
OUT
BKCAL_OUT
Fig. 6-8: Links required for cascade control
Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Block configuration
Primary loop
Secondary loop
6 Control Blocks
The table below lists the basic parameters for cascade control with some examples of values. The block is configured as follows:
• Set MODE_BLK.Target
to AUTO
• Enter the setpoint value in the units required by the PID algorithm in SP
• Scale the input from the AI block to the units required by the PID algorithm in PV_SCALE
• Scale the output of the block in the units required by the AO block in OUT_SCALE
• To bypass the PID algorithm on bad input status, select Bypass Enable in CONTROL_OPTS
• To ensure bumpless transfer should SP change, e.g. though a manual intervention, set a rate of change in the SP_RATE_DN and SP_RATE_UP parameters with which the old SP value adapts to the new SP value
• Set the parameters GAIN , RESET and RATE to values appropriate to your application.
• Set MODE_BLK.Target
to CAS
• Enter the setpoint value in the units required by the PID algorithm in SP
• Scale the input from the AI block to the units required by the PID algorithm in PV_SCALE
• Scale the output of the block in the units required by the AO block in OUT_SCALE
• To bypass the PID algorithm on bad input status, select Bypass Enable in CONTROL_OPTS
• To ensure bumpless transfer should SP change, e.g. though a manual intervention, set a rate of change in the SP_RATE_DN and SP_RATE_UP parameters with which the old SP value adapts to the new SP value
• Set the parameters GAIN , RESET and RATE to values appropriate to your application
• To ensure automatic recovery to CAS if the mode changes, e.g. due to bad input, select the option "Normal shed, Normal return" in the SHED_OPT parameter
(For other options see Chapter 2.4.4)
Parameter
MODE_BLK.Target
SP
PV_SCALE.EU_100
PV_SCALE.EU_0
PV_SCALE.UNITS_INDEX
OUT_SCALE/EU_100
OUT_SCALE/EU_0
OUT_SCALE/UNITS_INDEX
CONTROL_OPTS
SP_RATE_DN
SP_RATE_UP
GAIN
RESET
RATE
SHED_OPT
Function
Normal operating mode of block
Setpoint for ideal process control
Upper range limit for process variable
Lower range limit for process variable
Unit of process variable
Upper range limit for output variable
Lower range limit for output variable
Unit of output variable
Sets control options for bad input
Rate of change from old to new, higher SP
Rate of change from old to new, lower SP
Tuning constants for the P, I and D terms of the PID block respectively.
Behaviour when shedding from remote mode
Example value
Primary loop: AUTO
Secondary loop: CAS
60%
100
0
%
100
0
%
Bypass Enable
0
0
1.5
0.1 s
0.5 s
Normal shed, normal return
Endress+Hauser 75
6 Control Blocks
Example
Block configuration
Guideline: FOUNDATION Fieldbus Function Blocks
6.1.5
Output tracking
The output tracking function allows the PID Control block output to be overridden and replaced by a predefined value set in the TRK_VAL parameter. The override is only effective when tracking is enabled and the TRK_IN_D value is true. During this time, the block mode changes to LO (local override). The function is normally used to force the block to output a fail-safe value.
A measurement of flow upstream of a valve is used to ensure a constant flow rate into a vessel, see
Fig. 6-9. To prevent overspill, the vessel is equipped with a level limit switch. If the liquid rises to the switch the latter switches, causing the valve to close (and the pump to stop). The flowrate is controlled as in Chapter 6.1.1, the tracking signal is delived through a Discrete Input block.
M
104
CV
103
FCV
102
Track input
PID control
FT
100
LS
101
Fig. 6-9: Example of output tracking
Fig. 6-10 shows the control strategy together with links that must be made between the blocks.
OUT_D
LS101
DI-0
Channel e.g. 1300
LS101
DI
FT100
AI
TRK_IN_D
OUT IN
BKCAL_IN
PID
OUT CAS_IN
FCV102
AO
OUT
BKCAL_OUT
CV103
Fig. 6-10: Links required for tracking (with basic loop-control)
Output tracking is configured as follows:
• Depending upon type, configure the control loop is as described in Chapters 6.1.1 to 6.1.3.
• Enable tracking by selecting "Track Enable" in the CONTROL_OPS parameter
• Select the option "Use uncertain as good" in the STATUS_OPS parameter
• Scale the track value to the units of the OUT value in TRK_SCALE
• Enter the track value in TRK_VAL .
Parameter
CONTROL_OPTS
STATUS_OPTS
TRK_SCALE.EU_100
TRK_SCALE.EU_0
TRK_SCALE.UNITS_INDEX
TRK_VAL
Function
Enables output tracking
Sets the way the status of the tracking value is used
Upper range limit for track value
Lower range limit for track value
Unit of process track value
Value to be output by the block
Example value
Track Enable
Use uncertain as good
100
0
%
0%
76 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Example
6 Control Blocks
6.1.6
Remote cascade
The remote cascade function allows a setpoint value calculated by an external application, e.g. a
Modbus controller, to be used as the primary loop input of a cascade control loop. Since the external application is not contained in the function block schedule, a timeout must be set in the resource block as well as the response of the PID Control block when the timeout is exceeded.
The temperature of water measured upstream of a heat exchanger is acquired by an external
Modbus controller and used as input to a primary PID Control block that runs in it. The resulting setpoint manipulates a secondary block controlling the supply of steam by opening and closing a control valve, see Fig. 6-11. The input to the secondary block is the flowrate of the steam. The flowmeter Analog Output block supplies the input value to the secondary loop, the Modbus Control
Slave block provides the setpoint to the secondary block, see Chapter 10.3. The Analog Output block of the control valve controls the control valve actuator.
Note
• The connection to the external application may also be made via OPC server, in which case the parameter Device Tag-PID-n.RCAS_IN
carries the setpoint and the parameter Device Tag-PID-n.RCAS_OUT
the feedback.
secondary loop
FT
102
FCV
103 setpoint
CC
101
Primary loop running in external controller
CV
104
TT
100
Endress+Hauser
Fig. 6-11: Example of remote cascade
Fig. 6-12 shows the control strategy together with links that must be made between the blocks. For more details on creating control strategies, see the appropriate ControlCare tutorial.
FT102
AI
MBCS
IN1
CC101
OUT1
OUT
RCAS_IN
IN
BKCAL_IN
PID
FCV103
RCAS_OUT AO
OUT CAS_IN
CV104
OUT
BKCAL_OUT
Fig. 6-12: Links required for remote cascade (through MBCS block)
77
6 Control Blocks
Block configuration
SHED_OPT
Guideline: FOUNDATION Fieldbus Function Blocks
The remote cascade is configured as follows:
• In the Resource Block of the device set SHED_RCAS to the maximum time allowable for the execution of the Control PID block
• In the PID Control block set MODE_BLK.Target
to RCAS
• Scale the input from the AI block to the units required by the PID algorithm in PV_SCALE
• Scale the output of the block in the units required by the AO block in OUT_SCALE
• To bypass the PID algorithm on bad input status, select Bypass Enable in CONTROL_OPTS
• To ensure bumpless transfer should SP change, e.g. though a manual intervention, set a rate of change in the SP_RATE_DN and SP_RATE_UP parameters with which the old SP value adapts to the new SP value
• Set the parameters GAIN , RESET and RATE to values appropriate to your application
• To ensure automatic recovery to RCAS if the mode changes, e.g. due to a timeout, select the option "Shed to Auto, Normal return" in the SHED_OPT parameter
Parameter
Resource Block
SHED_RCAS
Function Value
Timeout, in units of 1/32 ms
• If the timeout is exceed, communication is assumed to be lost and the mode is shed, SHED_OPTS
• If the timeout is 0, mode shedding is disabled e.g. 6400 (= 200 ms)
PID Control Block
MODE_BLK.Target
SP
PV_SCALE.EU_100
PV_SCALE.EU_0
PV_SCALE.UNITS_INDEX
OUT_SCALE.EU_100
OUT_SCALE.EU_0
OUT_SCALE.UNITS_INDEX
CONTROL_OPTS
STATUS_OPTS
BYPASS
SP_RATE_DN
SP_RATE_UP
GAIN
RESET
RATE
SHED_OPT
Normal operating mode of block
Setpoint for safe operation
(used if RCAS_IN fails due to timeout)
Upper range limit for process variable
Lower range limit for process variable
Unit of process variable
Upper range limit for output variable
Lower range limit for output variable
Unit of output variable
Sets control options for bad input
Enables output tracking
Sets the way the status of the tracking value is used
When ON, SP value is transferred to the OUT without the calculation of PID terms.
Rate of change from old to new, higher SP
Rate of change from old to new, lower SP
Tuning constants for the P, I and D terms, of the PID block respectively.
RCAS
60%
100
0
%
100
0
%
Bypass Enable
Track Enable
Use uncertain as good
OFF
0
0
1.5
0.1 s
0.5 s
Shed to Auto, Normal return
Behaviour when shedding from remote mode
• 1: Normal shed, Normal return (sheds to CAS)
• 2: Normal shed, No return (sheds to CAS)
• 3: Shed to Auto, Normal return
• 4: Shed to Auto, No return
• 5: Shed to Manual, Normal return
• 6: Shed to Manual, No return
• 7: Shed to Retained target, Normal return
• 8: Shed to Retained target, No return
The option "Shed to Auto, Normal return" causes the PID Control block to run in AUTO mode should the communication between the block and the external controller be interrupted. When communication is re-establishment the block automatically to recovers to RCAS.
The option "Shed to Auto, No return" causes the PID Control block to run in AUTO mode should the communication between the block and the external controller be interrupted. When communication is re-establishment the block stays in AUTO mode. It must be manually reset to
RCAS.
The other modes set the the block mode specified and behave analogously.
78 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 6 Control Blocks
6.1.7
Remote output
The remote output function allows a the output of a PID Control block to be overridden by an external application. To do this the block target must be set to ROUT mode and a value must be written to ROUT_IN . Since the external application is not contained in the function block schedule, a timeout set in the resource block as well as the response of the PID Control block when the timeout is exceeded must also be set.
The connection to the external application may be made via OPC server, in which case:
• the parameter Device Tag-PID-n.ROUT_IN
carries the output value,
• the parameter Device Tag-PID-n.ROUT_OUT
the feedback
• the parameter Device Tag-PID-n.MODE_BLK.Target sets the mode block target.
For example, a measurement of flow upstream of a valve is used to ensure a constant flow rate into a vessel, see Fig. 6-13. To prevent overspill, the vessel is equipped with a level limit switch. If the liquid rises to the switch the latter switches, sending an alarm to the operating system. The operator now responds responds by setting the block mode to ROUT and writing a value to ROUT_IN .
M
105
CV
104
FCV
103
Remote track
PID control
FT
100
CC
102 e.g.
intervention via SCADA program
LS
101
Overspill alarm
Fig. 6-13: Example of remote output
Fig. 6-14 shows the control strategy together with links that must be made between the blocks. For more details on creating control strategies, see the appropriate ControlCare tutorial.
FT102
AI
OPC Server
Device Tag-PID-n.ROUT_IN
Device Tag-PID-n.ROUT_OUT
ROUT_IN ROUT_OUT
OUT IN
BKCAL_IN
PID
FCV103
AO
OUT CAS_IN
CV104
OUT
BKCAL_OUT
Fig. 6-14: Links required for remote output
Endress+Hauser 79
6 Control Blocks
Block configuration
SHED_OPT
Guideline: FOUNDATION Fieldbus Function Blocks
The remote cascade is configured as follows:
• In the Resource Block of the device set SHED_RCAS to the maximum time allowable for the execution of the Control PID block
• To ensure automatic recovery to ROUT if the mode changes, e.g. due to a timeout, select the option "Normal shed, Normal return" in the SHED_OPT parameter
The remote output track is made operational on-line by writing ROUT to the MODE_BLK.Target
parameter. When the override is to be lifted, the block target is reset to the normal operating mode.
Parameter
Resource Block
SHED_RCAS
Function Value
Timeout, in units of 1/32 ms
• If the timeout is exceed, communication is assumed to be lost and the mode is shed, SHED_OPTS
• If the timeout is 0, mode shedding is disabled e.g. 6400 (= 200 ms)
PID Control Block
SHED_OPT Normal shed, normal return
Behaviour when shedding from remote mode
• 1: Normal shed, Normal return
• 2: Normal shed, No return
• 3: Shed to Auto, Normal return
• 4: Shed to Auto, No return
• 5: Shed to Manual, Normal return
• 6: Shed to Manual, No return
• 7: Shed to Retained target, Normal return
• 8: Shed to Retained target, No return
The option "Normal shed, Normal return" causes the PID Control block to run in CAS mode should the communication between the block and the external controller be interrupted. When communication is re-establishment the block automatically to recovers to RCAS.
The option "Normal shed, No return" causes the PID Control block to run in CAS mode should the communication between the block and the external controller be interrupted. When communication is re-establishment the block stays in CAS mode. it must be manually reset to RCAS.
The other modes set the the block mode specified and behave analogously.
80 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Operating mode
Status propagation
6 Control Blocks
6.1.8
Block operation
When configured as a primary control-loop, the block normally operates in AUTO mode. For secondary control-loops the operating mode may be CAS or RCAS. The value and status of the setpoint SP can be changed on-line in AUTO and CAS modes.
When MODE_BLK.Target
is set to MAN, the block output can be manipulated by entering the desired status and value in the OUT parameter. Similarly, when the block is set to ROUT, the OUT parameter is overwritten by the value and status in ROUT_IN . In both cases, the PV parameter indicates the correct value and state.
The block is forced to LO, when output track is configured and TRK_IN_D is true. It recovers to the set target mode, when TRK_IN_D returns to false. The block will be forced to IMAN from CAS or RCAS if the BKCAL_IN parameter has the substatus "Initialisation Request". After initialisation and clearing of the substatus, the block will recover to target mode.
If other parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
Operation can be checked on-line by viewing a number of parameters:
Parameter
IN
Meaning
Value and status of input from upstream block
PV Value and status of process value after scaling
SP, CAS_IN, RCAS_IN Depending upon operating mode, current value and status of set point
OUT
FF_VAL
TRK_VAL
TRK_IN_D
BKCAL_IN
BKCAL_OUT
Value and status of block output
Value and status of any variable connected to the feedforward input
Value and status of any variable connected to the output track input
Value and status of any discrete variable connected to the output track trigger
For a secondary control-loop, value and status of feedback from downstream block
Value and status of feedbackfor an upstream block
The PID Control block supports the qualities Bad, Uncertain and GoodC together with the associated sub-and limit statuses, see Chapter 2.3.2.
PV normally adopts the status quality of IN . If the status of IN is "Good", but there is a block or process alarm, PV will have the status "Uncertain". OUT follows PV , BKCAL_IN and the setpoint, carrying the quality, substatus and limit status with the highest priority.
Status propagation can be influenced by selecting any of the following options in the
STATUS_OPTS parameter, see Chapter 2.8.3.
STATUS_OPTS option
IFS if BAD IN
IFS if BAD CAS_IN
Uncertain as Good
Target to Manual if BAD IN
Target to next permitted mode if
BAD CAS_IN
Description
Sets Initiate Fault State status in the OUT parameter when IN is "Bad"
Sets Initiate Fault State status in the OUT parameter when CAS_IN is "Bad"
If the status of the IN parameter is "Uncertain", treats it as "Good"
Sets the target mode to "Man" if the status of IN is "Bad"
Sets the target mode to next permitted mode if the target mode is "Cas" and CAS_IN is "Bad"
Endress+Hauser 81
6 Control Blocks
Block errors
PID block
82
Guideline: FOUNDATION Fieldbus Function Blocks
On execution of the block, the device checks for correct configuration. Block errors are indicated in the BLOCK_ERR parameter.
Condition
Block Configuration Error
Reason
• Invalid parameter setting, e.g. Bypass or SHED_OPT
• Not all required parameters have a value
Link Configuration Error
Local Override
Device Fault State Set
• Missing link, e.g. for secondary loop, BKCAL_IN not connected
• Parameter link mismatch
• The current OUT value is forced (TRK_VAL or ROUT_IN operative)
• The IFS option is active in STATUS_OPS and the input is "Bad"
Input Failure/ process variable has BAD status • Input module or device failure, device initiating etc.
Output Failure • Output module or device failure, device initiating etc.
Out-of-Service • MODE_BLK.Target currently set to OOS
Tab. 6-1: Possible PID Control block errors
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
PV
SP
OUT
PV_SCALE
OUT_SCALE
GRANT_DENY
CONTROL_OPTS
STATUS_OPTS
IN
PV_FTIME
BYPASS
CAS_IN
SP_RATE_DN
SP_RATE_UP
SP_HI_LIM
SP_LO_LIM
GAIN
RESET
BAL_TIME
RATE
BKCAL_IN
OUT_HI_LIM
OUT_LO_LIM
BKCAL_HYS
BKCAL_OUT
RCAS_IN
ROUT_IN
SHED_OPT
RCAS_OUT
ROUT_OUT
TRK_SCALE
6.1.9
Block parameters
Parameter Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
RO
Description
See Chapter 2.3.4
Block mode, set MODE_BLK.Target to AUTO, CAS or RCAS
Block errors, see Chapter 6.1.9
Process value used in executing the block
Setpoint used by the block in AUTO mode (PV_SCALE ± 10%)
Output value calculated as a result of executing the block
(OUT_SCALE ± 10%).
0-100% PV and SP value scaling to required engineering units
Positive
Positive
Positive
Positive
Positive
0
0
0
0
0-100% OUT value scaling to required engineering units
0 Access options, see Chapter 2.8.1
Control options, see Chapter 2.8.4 and Chapter 6.1.1
Status options, see Chapter 2.8.4 and Chapter 6.1.9
Process value
Time constant of a single exponential filter for process value
Off/On toggle for CONTROL_OPS option "Bypass"
Setpoint used by the block in CAS mode
Ramp rate for positive setpoint change in PV units/s +INF
+INF
100
0
Ramp rate for negative setpoint change in PV units/s
High limit for setpoint limiting (PV_SCALE ± 10%)
Low limit for setpoint limiting (PV_SCALE ± 10%)
Proportional term of the PID (Kp value) 0
+INF
0
0
Integral term of the PID (Tr value)
Time allowed to balance OUT changes as a result of a change from Auto, Cas or Rcas to Man
Derivative term of the PID (Td value)
100
0
0 to 50% 0.5%
Feedback from BKCAL_OUT of a downstream block
Maximum allowable output value (OUT_SCALE ± 10%)
Minimum allowable output value (OUT_SCALE ± 10%)
Output limit hysteresis in % of OUT_SCALE
1 - 8 0
Feedback for BKCAL_IN of an upstream block.
Setpoint used by the block in RCAS mode (from host)
Output of the block in ROUT mode (from host)
Mode shedding options, see Chapter 6.1.6
Setpoint and status for host back calculation in RCAS mode
Setpoint and status for host back calculation in ROUT mode
TRK_VAL value scaling to required engineering units
Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 6 Control Blocks
Parameter
TRK_IN_D
TRK_VAL
FF_VAL
FF_SCALE
FF_GAIN
UPDATE_EVT
BLOCK_ALM
ALARM_SUM
ACK_OPTION
ALARM_HYS
HI_HI_PRI
HI_HI_LIM
HI_PRI
HI_LIM
LO_PRI
LO_LIM
LO_LO_PRI
LO_LO_LIM
DV_HI_PRI
DV_HI_LIM
DV_LO_PRI
DV_LO_LIM
HI_HI_ALM
HI_ALM
LO_ALM
LO_LO_ALM
DV_HI_ALM
DV_LO_ALM
Legend: RO = Read Only
Valid range/
Options
Default value
Description
0, 1 0
0 to 50 % 0.5%
0 to 15
+INF
0 to 15
+INF
0 to 15
-INF
0 to 15
0 to 15
0 to 15
-INF
0
+INF
0
-INF
Discrete input for output track, see Chapter 6.1.5
Analog input for output track, see Chapter 6.1.5
Feedforward value and status, see Chapter 6.1.3.
FF_VAL scaling to required engineering units
Gain for feedforward input, see Chapter 6.1.3
This alert is generated by any change to the static data.
Block alarms, see Chapter 2.9
Alarm summary, see Chapter 2.9
See Chapter 2.9
• 0: Auto ACK Disable
• 1: Auto ACK Enable
Alarm hysteresis in % of OUT_SCALE, see Chapter 2.9
Priority of the HI_HI alarm, see Chapter 2.9
Setting of HI_HI alarm in engineering units, see Chapter 2.9.
Priority of the HI alarm, see Chapter 2.9
Setting of HI alarm in engineering units, see Chapter 2.9.
Priority of the LO alarm, see Chapter 2.9.
Setting of LO alarm in engineering units, see Chapter 2.9.
Priority of the LO_LO alarm, see Chapter 2.9
Setting of LO_LO alarm in engineering units, see Chapter 2.9
Priority of the control deviation HI alarm, see Chapter 2.9
Setting of control deviation HI in engineering units
Priority of the control deviation LO alarm, see Chapter 2.9
Setting of control deviation LO in engineering units
Status of HI_HI alarm and its associated time stamp.
Status of HI alarm and its associated time stamp.
Status of LO alarm and its associated time stamp.
Status of LO_LO alarm and its associated time stamp.
Status of deviation HI alarm and its associated time stamp.
Status for deviation LO alarm and its associated time stamp.
Endress+Hauser 83
6 Control Blocks Guideline: FOUNDATION Fieldbus Function Blocks
6.2
Enhanced PID Control
The Enhanced PID Control block provides following enhancements with respect to the standard
PID Control block:
• Additional mechanisms to ensure bumpless transfer from manual to automatic mode
• Additional options for output tracking
When the default values of these enhanced parameters are used, the block exhibits identical behaviour to the PID Control block, see Fig. 6-15.
CAS_IN
RCAS_IN
SP
LIMITS
RCAS_OUT
SP
SELECTOR
IN
OPERATOR ENTRY
PV_TIME
FF_VAL
FF_SCALE
FF_GAIN
TRK_VAL
TRK_IN_D
BKCAL_IN
TRK_SCALE
OUT_SCALE
SP
ROUT_IN
PID +
FF
OUT_SCALE
OUT
SELECTOR
OUT
LIMITS
ROUT_OUT
SP
PV
CONTROL_OPTS
OUT
BKCAL_OUT
Fig. 6-15: Schematic diagram of EPID Control block
6.2.1
Bumpless transfer
One of four options for transfer from a "manual" mode, e.g. MAN to an "automatic" mode, e.g.
AUTO, CAS or RCAS must be selected from the parameter BUMPLESS_TYPE :
BUMPLESS_TYPE option
Bumpless (default)
Last + proportional
Bias
Bias + proportional
Meaning block behaves as standard PID Control block and using the last value for "manual" mode to start the PID calculation block uses the last value for "manual" mode plus the proportional term to start the
PID calculation block uses the BIAS parameter to start the PID calculation block uses the BIAS parameter plus the proportional term to start the PID calculation
When options 3 and 4 are used, a bias must be entered as % of PV_SCALE in the BIAS parameter during off-line configuration. The BIAS parameter is an additional parameter used in the PID algorithm: y = GAIN e +
1
RESET
e t +
+
84 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 6 Control Blocks
Fig. 6-16 shows the effect of the various options on the transfer from "manual" to "automatic" mode.
Unless OUT has been set by hand, it takes the value of SP in manual mode and the PID algorithm is bypassed. Assuming the the setpoint value SP is 50% of OUT_SCALE and the process value PV is 40% of OUT_SCALE, then when the block mode changes from manual to automatic, the PID algorithm will try to reduce the control deviation between SP and PV by increasing the OUT value.
Default behaviour ( BUMPLESS_TYPE = "Bumpless") may produce too steep a rise in OUT , causing problems with overshoot. For some control-loops, overshoot must be avoided at all costs, since it may lead to dangerous situations. The other BUMPLESS_TYPE options cause a more gradual rise in OUT with the starting points for calculation offset to a greater or lesser degree.
50
40
MANUAL AUTOMATIC
SP
PV
OUT
SP
50
BUMPLESS_TYPE = “Bumpless” t t
OUT
SP 60
50 t
BUMPLESS_TYPE = “Bumpless+Proportional”
50
40
MANUAL AUTOMATIC
SP
PV
OUT
BIAS = 20
SP
50
20
BUMPLESS_TYPE = “Bias” t t
OUT
BIAS = 20
SP
50
30 t
BUMPLESS_TYPE = “Bias+Proportional”
Fig. 6-16: Effect of BUMPLESS_TYPE option on OUT value
6.2.2
Enhanced output tracking
The parameter PID_OPTS provides additional options to deal with "Bad" input for TRK_IN_D or
TRK_VAL. These cause:
• an IFS status to be generated, see Chapter 2.7
• the actual mode to be set to MAN
• the target mode to be changed to MAN
In addition the target mode can be set to MAN on power up or when tracking is active. The effect of the various options is summarized in the following ables, whereby "Auto" signifies AUTO, CAS or RCAS modes. If no selection is made in PID_OPTS, the block behaves as per the PID Control block.
Endress+Hauser 85
6 Control Blocks
Bad TRK_IN_D
Bad TRK_VAL
Good TRK_IN_D
Good TRK_VAL
Guideline: FOUNDATION Fieldbus Function Blocks
PID_OPTS
IFS if Bad TRK_IN_D
Man if Bad TRK_IN_D
Target to Man if Bad TRK_IN_D
Mode
Target Actual
Man
Algorithm Action
"auto" ->
Iman
• Output tracking is disabled
• The PID algorithm continues the normal calculation.
• OUT.Status is GoodC-IFS.
• When the output block goes to fault state, the upstream blocks are forced to Iman.
Man
Man
• Output tracking is disabled; the mode is forced to Man
• The PID algorithm stops the calculation
• SP is passed to OUT unless the operator enters an OUT value
• Output tracking is disabled; the target mode changes to Man
• The PID algorithm stops the calculation
• SP is passed to OUT unless the operator enters an OUT value
PID_OPTS
IFS if Bad TRK_VAL
Man if Bad TRK_VAL
Target to Man if Bad TRK_VAL
Mode
Target Actual
Man
Algorithm Action
"auto" ->
Iman
• Output tracking is disabled
• The PID algorithm continues the normal calculation.
• OUT.Status is GoodC-IFS.
• When the output block goes to fault state, the upstream blocks are forced to Iman.
Man
Man
• Output tracking is disabled; the mode is forced to Man
• The PID algorithm stops the calculation
• SP is passed to OUT unless the operator enters an OUT value
• Output tracking is disabled; the target mode changes to Man
• The PID algorithm stops the calculation
• SP is passed to OUT unless the operator enters an OUT value
PID_OPTS
All options
Target to Man if Tracking Active Man
Target to Man on Power Up
Mode
Target Actual
Man
LO
Man
Man
Algorithm Action
Output Tracking is active, mode is LO (local override)
Output Tracking is active, mode is Man
Target mode set to Man on power up
6.2.3
Additional parameters
In addition to those listed in Chapter 6.1.10, the Enhanced PID Control block has the following parameters:
Parameter
BUMPLESS_TYPE
BIAS
PID_OPTS
Legend: RO = Read Only
Valid range/
Options
Default value
Description
0
0
0
Algorithm action to start the output when the block transfers from a "manual" to an "automatic" mode
• 0: Bumpless
• 1: Last+Proportional
• 2: Bias
• 3: Bias+Proportional
Bias value used in BUMPLESS_TYPE options Bias and
Bias+Proprtional
Output tracking options
86 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 6 Control Blocks
6.3
Advanced PID Control
The Advanced PID Control block provides following enhancements with respect to the standard
PID Control and Enhanced PID Control blocks:
• PID algorithm selection
• PI Sampling algorithm
• Adaptive gain
• Configurable limits for anti reset wind-up
• Special treatment of the error (control deviation)
• Discrete output to indicate the actual mode
When the default values of these enhanced parameters are used, the block exhibits identical behaviour to the PID Control block, see Fig. 6-17.
CAS_IN
IN
AD_GAIN_IN
FF_VAL
TRK_VAL
TRK_IN_D
BKCAL_IN
SETPOINT
SELECTION
PV
FILTERS
PV
SP
ERROR TYPE
SELECTION
RCAS_OUT
PID
ALGORITHM
ADAPTIVE
GAIN
FF SCALING
+ GAIN
TRACK
SCALING
ROUT_OUT
ROUT_IN
OUTPUT
SELECTION
SCALING
+ LIMIT
BKCAL_OUT
MODE_OUT
OUT
Fig. 6-17: Schematic diagram of APID Control block
Endress+Hauser 87
6 Control Blocks
88
Guideline: FOUNDATION Fieldbus Function Blocks
6.3.1
PID algorithm
The algorithm to be used by the block when it calculates the OUT parameter is selected with the
PID_TYPE parameter. The options are summarized in the table below:
PID_TYPE options Description
PI.D + ISA P and I terms are calculated based on the error and the D term on the PV (as PID Control block) y = GAIN e +
1
RESET
e t +
+ F
PI.D + Parallel P and I terms are calculated based on the error and the D term on the PV y = GAIN e +
1
RESET
e t +
+ F
PI Sampling + ISA P and I terms are calculated based on the error and the D term on the PV; the output is ramped according to the settings in PI Sampling) y = GAIN e +
1
RESET
e t +
+ F
PI Sampling + Parallel P and I terms are calculated based on the error and the D term on the PV the output is ramped according to the settings in PI Sampling y = GAIN e +
1
RESET
e t +
+ F
PID + ISA
PID + Parallel
P, I and D terms are calculated based on the error y = GAIN e +
1
RESET
e t +
-----t
+ F
P, I and D terms are calculated based on the error y = GAIN e +
1
RESET
e t +
RATE
1 0.13xRATE
+ F
I.PD + ISA
I.PD + Parallel
I is calculated based on the error and the P and D terms on the PV y = GAIN PV +
1
RESET
e t +
+
I is calculated based on the error and the P and D terms on the PV y = GAIN e +
1
RESET
e t +
+ F
+ F
6.3.2
PI sampling
If the PI Sampling options are chosen, the output is ramped as illustrated in Fig. 6-18. The output is calculated based on the PI algorithm during time t
0
. After that, the algorithm stops calculating and it holds the last value during time t
1
.
PV
SP STEP
SP
PV
OUT
SAMP_PER
SAMP_ON
0 t 0 t
0 t
1 t
Fig. 6-18: Effect of step rise in SP on output when PI Sampling is active
Set the following parameters:
• Enter the calculation time t
0
in SAMP_ON
• Set sampling period for the ramp in SAMP_PER ; t
1
= SAMP_PER - SAMP_ON .
If the sampling period SAMP_PER is less than the calculation time SAMP_ON or the latter is zero, then the algorithm works as an ordinary PI controller.
Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Configuration
Error handling
6 Control Blocks
6.3.3
Adaptive gain
The adaptive gain option allows the PID terms in the algoritm to be modified according to function determined by the CURVE_X and CURVE_Y parameters. Depending upon the configuration, one or more of the PID constants GAIN, RESET and RATE are acted upon as follows:
• GAIN'= G * GAIN
• RESET' = RESET / G
• RATE' = G * RATE
The function is configured with the following parameters:
Parameter
AD_GAIN_ACTION
AD_GAIN_IN_SEL
CURVE_X
CURVE_Y
Action Option/Value
Define the PID parameter(s) on which the adaptive gain acts
I
P
Disable
D
PI
PID
Select the input value to be used for the adaptive gain calculation
• If the AD_GAIN_IN option is selected the input value is supplied an upstream block
• If the error option is selected, the ERROR_TYPE parameter must be set to "Normal" (default setting)
SP
PV
Error
OUT
AD_GAIN_IN
Enter up to twenty input points in the same engineering units as the selected variable
–
Enter the adaptive gain corresponding to each input point
• If the curve has less than 20 configured points, the non-configured points are automatically set to +INF.
–
If the input/adaptive gain curve has a configuration error, it is indicated in BLOCK_ALM and the adaptive gain value assumes the CURVE_Y value corresponding to the highest CURVE_X point.
If the A D_GAIN_IN option is selected as the input value and this has bad status, the algorithm uses the last usable value to provide bumpless transfer.
6.3.4
Anti-reset wind-up
In order to prevent reset wind-up, LO and HI saturation limits can be imposed on the integral term by using the ARW_LOW and ARW_UP parameters respectively. When the output signal reaches the limits, the control algorithm stops the integral calculation. The proportional and derivative calculations are not affected.
The integral calculation is not stopped when OUT reaches the OUT_LO_LIM and OUT_HI_LIM values. For this reason, set ARW_LOW equal to or more than OUT_LO_LIM and ARW_UP equal to or less than OUT_HI_LIM .
Endress+Hauser 89
6 Control Blocks
Special gain
Guideline: FOUNDATION Fieldbus Function Blocks
6.3.5
Special treatment for error
Provided the option "error" has not been selected in AD_GAIN_IN_SEL , the ERROR_TYPE parameter provides various options for treatment of the error (or control deviation):
ERROR_TYPE option
Normal (default)
Quadratic (all terms)
Quadratic (Integral)
Special gain
Meaning
Error type function is disabled
Error term is applied to all PID calculations is a quadratic function of the input value
Error term is applied to the integral calculation is a quadratic function of the input value
Gain entered in the GAIN_BAND term is applied to the error when it lies within the range entered in ERROR_BAND, see Special gain
When a quadratic error option is chosen, the error is calculated as follows:
ê = e · | e |/100 %
Fig 6-16 shows the effect of using this option.
Output error ê
100% linear (normal)
0% quadratic
100%
Input error e
Fig. 6-19: Effect of quadratic error option in ERROR_TYPE parameter
The special gain option allows adaptive control to be used in cases it would be normally unstable around the setpoint SP due the dead band of the actuator, noise or other factors. The option ramps the error over the band defined in ERROR_BAND according to the function:
ê = G · e
Where G is the gain value entered in GAIN_BAND . Fig 6-20 shows the effects of this function.
ERROR_BAND = 10%
GAIN_BAND = 0
ê [%]
ERROR_BAND = 10%
GAIN_BAND = 0.6
ê [%]
ERROR_BAND = 10%
GAIN_BAND = 2.0
ê [%]
20
-30 -20 -10 10 20 30 e [%]
-30 -20
Error band
10 20 30 e [%]
Error band
-30 -20 -10
-20
10 20 30 e [%]
Error band
Fig. 6-20: Effect of ERROR_BAND and GAIN_BAND on error
90 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 6 Control Blocks
6.3.6
Mode indication
The MODE_OUT parameter provides a discrete output that can be used to indicate the actual mode of the block. It outputs the value TRUE (=1) when block is operating in the the mode selected in the MODE_IND parameter. If more than one mode type is chosen in MODE_IND, OR logic is applied.
Parameter
MODE_IND
Action
Determines the actual block modes that will force the
MODE_OUT parameter into TRUE status
Option/Value
OOS,
IMAN
LO
MAN
AUTO
CAS
RCAS
ROUT
6.3.7
Additional parameters
In addition to those listed in Chapters 6.1.10 and 6.2.3, the Advanced PID Control block has the following parameters:
Parameter
MODE_OUT
MODE_IND
AD_GAIN_ACTION
AD_GAIN_IN_SEL
AD_GAIN_IN
CURVE_X
CURVE_Y
ERROR_TYPE
ERROR_BAND
GAIN_BAND
PID_TYPE
SAMP_ON
SAMP_PER
BUMPLESS_TYPE
BIAS
ARW_UP
ARW_LOW
Legend: RO = Read Only
Valid range/
Options
Default value
Description
All modes
–
–
Max. 20
Max. 20
0-300
0-10
RO
OOS
Disable
SP
–
0
0
Normal
Discrete output indicating whether one of the modes selected in MODE_IND is the actual mode (TRUE/"1")
Mode to be used by MODE_OUT, multiple selection supported
PID parameter(s) on which the adaptive gain acts
• Options: Disable, D, I, P, PI, PID
Input value to be used for the adaptive gain calculation
• Options: SP, PV, Error, OUT, AD_GAIN_IN
Input value provided by another block for adaptive gain when option "AD_GAIN_IN" is chosen in AD_GAIN_IN_SEL
Input values of the adaptive gain characteristic
• Engineering units as variable selected in AD_GAIN_IN_SEL
Output values of the adaptive gain characteristic
• No. of output points must correspond to no. of input points
Type of error used by PID algorithm
• Options: Normal, quadratic (all terms), quadratic (Integral), special gain
0 s
0 s
0
0
0
Error band applicable to "special gain" option in ERROR_TYPE
Gain band applicable to "special gain" option in ERROR_TYPE
PI.D+ISA PID algorithm used by the block
• Options: PI.D+ISA, PID+ISA, I.PD+ISA, PI Sampling+ISA,
PI.D+Parallel, PID+Parallel, I.PD+Parallel,
PI Sampling+Parallel
Active sampling time for "PI Sampling" options in PID_TYPE
Sampling period of "PI Sampling" options in PID_TYPE
Type of transfer from “manual” mode to “automatic” mode
• Options: Bumpless, Last+Proportional, Bias,
Bias+Proportional
0
+INF
–INF
Bias value for "Bias" options in BUMPLESS_TYPE
High limit for anti reset windup
Low limit for anti reset windup
Endress+Hauser 91
6 Control Blocks
92
Guideline: FOUNDATION Fieldbus Function Blocks
6.4
Step Output PID
The Step Output PID block is used to manipulate final control elements that have an actuator driven by an electric motor. In addition to providing PID control, the block acts as transducer output for a discrete output module connected to the fieldbus actuator or switch gear, see Fig. 6-21. Depending upon the value of the PID output, signals are provided at the output that drive the motor clockwise or anticlockwise to position the final control element. When the required position is reached, the motor is stopped.
CAS_IN
IN
RCAS_IN
SP
LIMITS
SP
PV_FTIME
PV
PID
ALGORITHM
STEP OUTPUT
OUT_D
TRANSDUCER
ALARM
PROCESSING
SP
PV
CONTROL_OPTS
BKCAL_OUT
Fig. 6-21: Schematic diagram of Step Output PID block
6.4.1
Functional description
The Step Output PID block combines two basic functions:
• Basic PID control as described in Section 6.1, without feedforward, tracking and bypass functions, providing a manupulating signal for an electric motor
• Discrete output with valve actuator transducer block functions
It can be used as a positioner within a cascade loop or as a step controller.
a) Function within cascade control loop
Setpoint e
PID
OUT
Process variable
PROCESS b) Function as step controller
Setpoint e
Process variable
OPEN
STEP
CLOSE
LOGIC
Valve position
OPEN
STEP
CLOSE
LOGIC
POWER
M
POWER
M
PROCESS
Fig. 6-22: Functional diagram of step control
Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
PID control
Gap deviation
6 Control Blocks
The PID control uses the travel time of the actuator, TRAVEL_TIME , i.e. the time it takes to drive the final control element from one end limit to another, as the basis for signal output. The proportional action will actuate the final control element in the required direction for a time t
P proportional to: t
P
= GAIN * (ê /100)* TRAVEL_TIME .....(s) where ê is the difference between the setpoint SP and the process value PV. If the proportional action is not enough force ê to zero, the integral action moves the final control element at a speed of:
V = GAIN * ê / RESET ......(% / s) where the RESET is the integral time constant in seconds.
As most actuators work at a constant and fixed speed, they cannot move faster than:
Maximum speed = 100% / TRAVEL TIME .......(% / s)
Slower reponses required by the integral action are therefore obtained by generating pulses of a specified duration PULSE_DUR . Each pulse will move the final control element a distance
x % in the required direction.
x % = PULSE_DUR * 100% / TRAVEL_TIME ..........(%)
The pulse frequency f is given by: f = V /
x %..........(pulses / s)
The derivative or rate action is given by: t
D
= GAIN * (dê/dt) * RATE
Where RATE is the derivative time constant in seconds.
The Step Output PID activates the OPEN or CLOSE signals according to the modified deviation, ê, the PID parameters and the other parameters as follows:
• The signal is activated during a time equivalent to = t
P
+ t
D
• If the modified deviation is not equal to zero, the integral or reset action will give pulses with a duration defined by PULSE_DUR and a frequency calculated by “f."
• t and f are dynamically modified by ê.
In order to avoid reset wind-up, the actuation time in one direction is integrated and limited. If the actuation time in one direction is larger than the TRAVEL_TIME , the output signal is not pulsed, but is continuously activated.
The block provides a full PV and deviation alarm support as described in Chapter 6.1.
In order to prevent jitter around the desired valve position, the Step Output PID block also offers the possibility of gap deviation action, see Fig. 6-23. When DEAD_BAND is greater than zero, a zone
±
0.5 of its value is defined around the point of zero deviation, in which a change in the actual deviation e produces no effect on the modified deviation ê and thus no corrective action by the motor. The transition from either end of the dead band is via a HYSTERESIS .
modified
deviation (ê)
–0.5 DB
0
HYSTERESIS
+0.5 DB actual deviation (e)
DEAD_BAND (DB)
Fig. 6-23: Gap deviation using the DEAD:_BAND and HYSTERESIS parameters
Endress+Hauser 93
6 Control Blocks
Discrete output
Status propagation
Guideline: FOUNDATION Fieldbus Function Blocks
The CHANNEL parameter selects the output channel of the connected ControlCare module to be used by the open signal. The adjacent output, i.e. " CHANNEL + 1" is automatically reserved for the close signal. OUT_D provides an indication of the current signal being provided to the actuator:
1
2
OUT_D.value
0
Action
Stop
Close
Open
0
1
Signal at CHANNEL
0
Signal at CHANNEL + 1
0
1
0
The initial value of the output signal is zero, i.e. there is no action in either direction and the integral action value is also zero.
Normally, the BKCAL_OUT parameter of the Step Output PID block carries the value and status of SP . Depending on the CONTROL_OPTS parameter, it may be forced to a different condition.
When the block operates in RCAS, RCAS_OUT (= SP) provides the back calculation for the host, allowing action to be taken under limiting conditions or mode change.
CONTROL_OPS option
None
None, but RCAS mode
Use PV for BKCAL_OUT
BKCAL_OUT value and status
SP value and status
PV value and status after limiting
PV value and status
The status of the output reflects the worst quality of the status of any connected input. The behaviour can be changed by selecting an appropriate option in the STATUS_OPTS parameter:
Option
Uncertain as Good
Propagate Fail Backward
Target to Manual if BAD IN
Target to next permitted mode if
BAD CAS_IN
Description
If the status of the IN parameter is Uncertain, treat it as Good.
If the status from the actuator is Bad "Device failure" or "Fault State Active", or Local
Override is active, propagates this as Bad "Device Failure" or Good Cascade "Fault
State Active", or Local Override to BKCAL_OUT respectively without generating an alarm.
Sets the target mode to Man if the status of the IN parameter is BAD.
Sets the target mode to next permitted mode if the target mode is CAS and the status of CAS_IN is BAD.
The SHED_OPT parameter provides options which govern the recovery of the block after a change in mode e.g. due to a timeout.
The block also supports fault state handling as described in Chapter 6.5. When used in a cascade loop, it can be configured to respond to the IFS status by setting FSTATE_TIME , in units of 1/32 ms, to the time the output block can normally wait before responding to a fault state in or loss of communication with the upstream block. FSTATE_VAL_D is set to the set point value (SP_D =
OUT_D) that causes the output device to assume fail-safe position.
The IO_OPTS parameter determines the block response to a fault state, whereby multiple choices are allowed. The option is set by ticking the selection box:
Option
Fault State to value
Target to Man if IFS
Set
On fault state, FSTATE_VAL_D substitutes
SP_D
On fault state, the block mode is forced to
Man. In this mode, parameters can be changed
Clear)
On fault state, the last valid SP_D value is used
On fault state, the block mode is forced to
Local Override, parameters cannot be changed until the fault state is cleared
A third option, "Use Fault State value on restart" causes the value of FSTATE_VAL_D to be used on device restart. In this case, the value is used, although no fault state exists.
94 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 6 Control Blocks
6.4.2
Block configuration
Fig. 6-24 shows a typical application for the Step Output PID block. The block is connected to the actuator switchgear via a ControlCare I/O module, in this example the SFC428 high density NO relay module, which supplies "Open" and "Close" signals according to the demand of the control loop. The switchgear powers and reverses the electric motor accordingly.
In addition, to the "Open" and "Close" signals, most of the electric actuators require an interlock circuit to prevent the motor from overheating when the actuator reaches one of its travel limits or when something blocks its movement, increasing the torque beyond an established limit. Such protection is normally provided by torque switches and limit switches. Other inputs might be a local override control and an enabling signal. These signals are not considered in the applications described here, but could be realized by the appropriate ControlCare module and strategy. channel
STEP channel+1
DO-1
DO-2
INTERLOCK
SIGNALS*
LOCAL
CONTROL*
ENABLING*
O
C
O
C
O
C
E
ACTUATOR
LOGIC
OPEN
CLOSE
POWERING
AND
REVERSING
Closed-loop control
Torque switch “Open”
Limit switch “Open”
Torque switch “Closed”
Limit switch “Closed”
M
*Signals not considered in this description
Fig. 6-24: Use of STEP PID Output block with motor switchgear
Fig. 6-25 shows a control strategy that uses the Step Output PID block for the simple closed-loop control example described in Fig. 6-2 of Chapter 6.1.2.
*
SP
OUT IN channel DO-1 OPEN
AI STEP channel+1 DO-2 CLOSED
Motor switchgear
FT100 FCV101
Fig. 6-25: Links required for basic closed-loop control with Step Output PID
Endress+Hauser 95
6 Control Blocks Guideline: FOUNDATION Fieldbus Function Blocks
Block configuration for closed-loop control
Cascade control
The block is configured for operation without gap deviation as follows:
Parameter
MODE_BLK.Target
SP
STATUS_OPTS
PV_SCALE.EU_100
PV_SCALE.EU_0
PV_SCALE.UNITS_INDEX
SP_RATE_DN
SP_RATE_UP
GAIN
RESET
BAL_TIME
RATE
CHANNEL
SHED_OPTS
TRAVEL_TIME
Function
Normal operating mode of block
Setpoint for ideal process control
Options for handling IN status
Upper range limit for process variable
Lower range limit for process variable
Unit of process variable
Rate of change from old to new, higher SP
Rate of change from old to new, lower SP
Tuning constants for the P, I and D terms of the PID block respectively.
Rack+Slot+Group+I/O point for OPEN signal
• CLOSE signal at CHANNEL+1, e.g. 2101
Mode shedding recovery options
Time (s) to drive from one end position to the outer
Example value
Auto
60%
Uncertain as Good
5
5
100
0
%
1.5
0.1 s
5 s
0.5 s e.g. 2100
Normal Shed, Normal
Return
3 s
Tab. 6-2: Basic parameters for closed-loop control
Fig. 6-26 shows a control strategy that uses the Step Output PID block for the cascade control example described in Fig. 6-4 of Chapter 6.1.4.
Block configuration for cascade control
96
OUT IN
AI PID
BKCAL_IN
TT100
AI
OUT
TC101 OUT
CAS_IN
IN
STEP channel channel+1
BKCAL_OUT
DO-1
DO-2
FCV103
OPEN
CLOSED
Motor switchgear
FT102
Fig. 6-26: Links required for cascade control with Step Output PID
The blocks are configured with gap deviation as follows:)
Parameter
PID Block
MODE_BLK.Target
SP
PV_SCALE.EU_100
PV_SCALE.EU_0
PV_SCALE.UNITS_INDEX
OUT_SCALE/EU_100
OUT_SCALE/EU_0
OUT_SCALE/UNITS_INDEX
CONTROL_OPTS
SP_RATE_DN
SP_RATE_UP
GAIN
RESET
RATE
SHED_OPT
Function
Normal operating mode of block
Setpoint for ideal process control
Upper range limit for process variable
Lower range limit for process variable
Unit of process variable
Upper range limit for output variable
Lower range limit for output variable
Unit of output variable
Sets control options for bad input
Rate of change from old to new, higher SP
Rate of change from old to new, lower SP
Tuning constants for the P, I and D terms of the PID block respectively.
Behaviour when shedding from remote mode
Example value
AUTO
60%
100
0
%
100
0
%
Bypass Enable
3
3
1.5
0.1 s
0.5 s
Normal shed, normal return
Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Mode
Status
Block errors
6 Control Blocks
Parameter
STEP block
MODE_BLK.Target
STATUS_OPTS
PV_SCALE.EU_100
PV_SCALE.EU_0
PV_SCALE.UNITS_INDEX
SP_RATE_DN
SP_RATE_UP
GAIN
RESET
BAL_TIME
RATE
CHANNEL
SHED_OPTS
TRAVEL_TIME
DEAD_BAND
HYSTERESIS
Function Example value
Normal operating mode of block
Options for handling IN status
Cas
Target to Manual if
BAD IN
Upper range limit for process variable
Lower range limit for process variable
Unit of process variable
Rate of change from old to new, higher SP
Rate of change from old to new, lower SP
Tuning constants for the P, I and D terms of the PID block respectively.
100
0
%
0
0
1.5
0.1 s
5 s
0.5 s e.g. 2100 Rack+Slot+Group+I/O point for OPEN signal
• CLOSE signal at CHANNEL+1, e.g. 2101
Mode shedding recovery options Normal Shed, Normal
Return
3 s Time (s) to drive from one end position to the outer
Interval, within which a change in input will not change the output
2%
Difference between the switching points dependent on direction of action
1%
6.4.3
Block operation
The block supports the modes Out-of-service, Manual, Auto, Cas and Rcas.
In Rcas mode the block setpoint is set by a control application running on a computer, DCS or PLC,
In Cas (cascade) mode, the by another function block through the CAS_IN parameter.
In Auto mode the setpoint value SP is provided by the operator and can be changed and downloaded while the block is operating.
When MODE_BLK.Target
is set to "Man", the block stops output calculation. OUT_D can be set by the operator. In addition, the parameter JOG_TIME allows the operator to determine how long the selected OUT_D action is to be active.
If parameters other than SP are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
Operation can be checked on-line by viewing a number of parameters:
IN Value and status of the process value
SP, CAS_IN, RCAS_IN Value and status of setpoint used to execute the block in Auto, Cas and RCas modes
PV
OUT_D
Value and status of the process value used top execute the block
Value and status of the current output action (0 = stop, 1 = open, 2 = close)
The significance of the output status is indicated below.
OUT_D status
Good
Bad
Meaning
• Normal operation as configured
• Input uncertain but option "Uncertain as Good" selected in STATUS_OPTS
• Block out of service
• Input bad
Block errors are indicated in the BLOCK_ERR parameter
Condition
Out-of-Service
Reason
• MODE_BLK.Target currently set to OOS
Endress+Hauser 97
6 Control Blocks
98
Guideline: FOUNDATION Fieldbus Function Blocks
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
PV
SP
OUT_D
PV_SCALE
XD_STATE
GRANT_DENY
CONTROL_OPTS
STATUS_OPTS
IN
PV_FTIME
JOG_TIME
CAS_IN
SP_RATE_DN
SP_RATE_UP
SP_HI_LIM
SP_LO_LIM
GAIN
RESET
BAL_TIME
RATE
IO_OPTS
CHANNEL
FSTATE_TIME
FSTATE_VAL_D
BKCAL_OUT
RCAS_IN
SHED_OPT
RCAS_OUT
TRAVEL_TIME
PULSE_DUR
DEAD_BAND
HYSTERESIS
UPDATE_EVT
BLOCK_ALM
ALARM_SUM
ACK_OPTION
6.4.4
Block parameters
Parameter
ALARM_HYS
HI_HI_PRI
HI_HI_LIM
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
RO
Description
See Chapter 2.3.4
Block mode, set MODE_BLK.Target to AUTO, CAS or RCAS
Block errors, see Chapter 6.1.9
Process value used in executing the block
Setpoint used by the block in AUTO mode (PV_SCALE ± 10%)
Discrete output value calculated as a result of executing the block
Positive
Positive
Positive
Positive
Positive
1 - 8
0, 1
0
0
0
60
1
0
0
0
0
0
0-100% PV and SP value scaling to required engineering units
0-100% Discrete state of the value obtained from the transducer.
0
Access options, see Chapter 2.8.1
Control options, see Chapter 2.8.4 and Chapter 6.1.1
Status options, see Chapter 2.8.4 and Chapter 6.1.9
Process value
Time constant of a single exponential filter for process value
Duration of OUT_D in the active state when commanded by the operator to jog open or jog closed
Setpoint used by the block in CAS mode
Ramp rate for positive setpoint change in PV units/s +INF
+INF
100
0
Ramp rate for negative setpoint change in PV units/s
High limit for setpoint limiting (PV_SCALE ± 10%)
Low limit for setpoint limiting (PV_SCALE ± 10%)
Proportional term of the PID (Kp value) 0
+INF
0
0
Integral term of the PID (Tr value)
Time allowed to balance OUT changes as a result of a change from Auto, Cas or Rcas to Man
Derivative term of the PID (Td value)
See Chapter 2.8.2
0
0
0 to 50 % 0.5%
0 to 15
+INF
Index of transducer block logical channel used by the block
Time in seconds from detection of a fault in the output block remote setpoint to the output action of the block output, if the condition still exists
Preset discrete SP_D value to be used when fault occurs, provided I/O option "Fault State to value" is selected.
Feedback for BKCAL_IN of an upstream block.
Setpoint used by the block in RCAS mode (from host)
Mode shedding options, see Chapter 6.1.6
Setpoint and status for host back calculation in RCAS mode
Time in seconds required by the actuator to drive the final control element from one end position to the other
Width, in seconds, of the pulses given due to the integral action
Interval, within which a change in input will not change the output
Difference between the switching points dependent on direction of action
This alert is generated by any change to the static data.
Block alarms, see Chapter 2.9
Alarm summary, see Chapter 2.9
See Chapter 2.9
• 0: Auto ACK Disable
• 1: Auto ACK Enable
Alarm hysteresis in % of OUT_SCALE, see Chapter 2.9
Priority of the HI_HI alarm, see Chapter 2.9
Setting of HI_HI alarm in engineering units, see Chapter 2.9.
Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 6 Control Blocks
Parameter
HI_PRI
HI_LIM
LO_PRI
LO_LIM
LO_LO_PRI
LO_LO_LIM
DV_HI_PRI
DV_HI_LIM
DV_LO_PRI
DV_LO_LIM
HI_HI_ALM
HI_ALM
LO_ALM
LO_LO_ALM
DV_HI_ALM
DV_LO_ALM
Legend: RO = Read Only
Valid range/
Options
0 to 15
Default value
Description
0 to 15
0 to 15
0 to 15
0 to 15
+INF
-INF
-INF
0
+INF
0
-INF
Priority of the HI alarm, see Chapter 2.9
Setting of HI alarm in engineering units, see Chapter 2.9.
Priority of the LO alarm, see Chapter 2.9.
Setting of LO alarm in engineering units, see Chapter 2.9.
Priority of the LO_LO alarm, see Chapter 2.9
Setting of LO_LO alarm in engineering units, see Chapter 2.9
Priority of the control deviation HI alarm, see Chapter 2.9
Setting of control deviation HI in engineering units
Priority of the control deviation LO alarm, see Chapter 2.9
Setting of control deviation LO in engineering units
Status of HI_HI alarm and its associated time stamp.
Status of HI alarm and its associated time stamp.
Status of LO alarm and its associated time stamp.
Status of LO_LO alarm and its associated time stamp.
Status of deviation HI alarm and its associated time stamp.
Status for deviation LO alarm and its associated time stamp.
Endress+Hauser 99
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
7 Calculation and Logic Blocks
7.1
Arithmetic
The arithmetic block allows process values from two or more Analog Input blocks to be combined mathematically to produce a calculated output, see Fig. 7-1. It supports two basic functions:
• Range extension, by combining the outputs of a high-range and low-range measuring device
• Calculated variable, by combining the process variable with the outputs of up to three auxiliary measuring devices. Nine different calculated variables can be selected.
The block also allows the calculation of a variable from an input with an extended range.
The arithmetic block is not intended to be used in a control path, so that it does not support control status propagation or back calculation. It has no process alarms.
IN
IN_LO
IN_1
IN_2
IN_3
RANGE_LO
RANGE_HI
RANGE
EXTENSION
FUNCTION
PV_SCALE
PV
(IN_1 + BIAS_IN_1) x GAIN_IN_1
(IN_2 + BIAS_IN_2) x GAIN_IN_2
(IN_3 + BIAS_IN_3) x GAIN_IN_3 t_1 t_2 t_3
ARITH_TYPE
BAL_TIME
ALGORITHM
TYPE
OUT_HI_LIM func x GAIN
+ BIAS
OUT_LO_LIM
GAIN_IN_i BIAS_IN_i
COMP_LO_LIM
COMP_HI_LIM
OUT_RANGE
OUT
Fig. 7-1: Schematic diagram of ARTH block (AR Block).
100 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
7.1.1
Range extension
The range extension function ensures a gradual transfer between e.g. a standard measuring device connected to IN and low range measuring device connected to IN_LO . The function is controlled by two constants referenced to IN according to the following equation, see also Fig. 7-2:
PV = g · IN + (1-g) · IN_LO where g is: zero when IN is less or equal to RANGE_LO one when IN is greater or equal to RANGE_HI
IN - RANGE_LO/(RANGE_HI - RANGE_LO) in the transistion zone
PV, g g = 1 PV = g · IN_LO + (1 - g) · IN PV = IN
Status propagation
PV = IN_LO
IN = RANGE_LO g = 0
IN = RANGE_HI
IN
Fig. 7-2: Transition function for range extension
After combination, the extended range is scaled in PV_SCALE before being passed on to the arithmetic algorithm. If no option has been selected in ARITH_TYPE (=default), PV is passed on unchanged to the output calculation:
• OUT = GAIN · PV + BIAS
If GAIN is set to one and the BIAS to zero (default), PV is again passed unchanged to OUT .
OUT_RANGE determines the range and units of OUT . The output may be limited by using the
OUT_HI_LIM and OUT_LO_LIM parameters.
The status of PV is handled according to the following table. Provided one input value is good in the transistion zone, PV will always have the status good.
IN_LO status IN status
Bad, Uncertain Good
Bad, Uncertain Good
Good Good
Good
Good
IN value
IN < RANGE_LO
Bad, Uncertain IN_LO > RANGE_HI
Bad, Uncertain IN_LO < RANGE_HI
PV value
PV = IN_LO
IN > RANGE_LO PV = IN
RANGE_LO < IN < RANGE_HI PV = g · IN + (1-g) · IN_LO
PV = IN
PV = IN_LO
PV status
Bad, Uncertain
Good
Good
Bad, Uncertain
Good
If the options "IN_LO Use uncertain" and "IN Use uncertain" are selected in the INPUT_OPTS parameter, then the status "Uncertain" will not force PV to IN or IN_LO within the transition zone, but the transition equation will be used. The status of PV will be "Good".
Endress+Hauser 101
7 Calculation and Logic Blocks
Control strategy
Guideline: FOUNDATION Fieldbus Function Blocks
Fig. 7-3 shows the control strategy together with the links that must be made between the blocks:
Device 1
AI_1
OUT e.g. 1000 – 3000 (units)
Device 2
AI_2
OUT e.g. 0 – 1200 (units)
IN
IN_LO
ARTH OUT
Block configuration
Fig. 7-3: Links required for range extension
The inputs IN and IN_LO must be linked to OUT signals that have the same engineering units.
The arithmetic block is configured for range extension as follows:
Parameter
MODE_BLK.Target
PV_SCALE.EU_100
PV_SCALE.EU_0
PV_SCALE.UNITS_INDEX
OUT_RANGE.EU_100
OUT_RANGE.EU_0
OUT_RANGE.UNITS_INDEX
INPUT_OPTS
RANGE_LO
Action
Set the target mode of the block to Auto
Option/Value
Auto
Enter upper range limit of extended range
Enter lower range limit for extended range
Enter unit of process variable
Enter upper range limit for output variable
Enter lower range limit for output variable
Enter unit of output variable
If required, select the input options by ticking the box
• Multiple selections are allowed
• See status handling for more information e.g. 3000 units e.g. 0 units units e.g. 3000 units* e.g. 0 units* units*
IN Use uncertain
IN_LO Use uncertain
Enter the PV value at which transition from IN_LO to IN begins e.g. 1050 units
RANGE_HI
BIAS
GAIN
ARITH_TYPE
Enter the PV value at which transition from IN_LO to IN ends e.g. 1150 units
If required, enter a constant to be used in the calculation of OUT
• e.g. 273 for conversion °C to K
0 units (default)*
1* Enter the scaling value to be used in the calculation of
OUT
Do not make an entry here (= default) unless PV is to used to produce a calculated value, see Chapter 7.1.2
0 (default)
OUT_HI_ LIM
OUT_LO_LIM
If required, enter upper limit to be placed on OUT value –
If required, enter lower limit to be placed on OUT value –
*If BIAS is other than 0 or the GAIN is other than 1, the OUT_RANGE parameters must be adjusted accordingly
102 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Process value
7 Calculation and Logic Blocks
7.1.2
Calculated variables
The Arithmetic Block contains nine algorithms that find frequent use in process engineering. The functions together with examples of use are to be found in Table 7-1 below. All algorithms use the
.
process value PV supplied by IN as well as up to three auxiliary inputs, IN_1 , IN_2 and IN_3
Function
Flow compensation, linear.
Flow compensation, square root.
Flow compensation, approximate
BTU flow
Function/Example IN (PV) IN_1 (t_1) IN_2 (t_2) IN_3 (t_3) func = (t_1 / t_2), limited* e.g. Q b
= Q f
· K· P/T func =
t_1 /( t_2· t_3), limited* e.g. Q b
= Q f
· K·
P/T · Z) func =
(t_1 + t_2 + t_3
2
), limited*
Q
Q f f in m in m
3
3
/h
/h
P in MPa
P in MPa
T in K
T in K
–
Compress. Z
The square root of the third power is avaialble by connecting input to IN and IN_1.
The square root of the fifth power is available by connecting the input to IN, IN_1 and IN_3.
e.g. Q b
= Q f
· K e.g. Q b
= Q f
· K
1
·
K
1
·
K
2
+ K
3
T + K
4
T
2
) Q f in m
3
/h K
2
2
+ K
3
P) Q f in m
3
/h K
2 func = t_1 - t_2
T in K
P in MPa
T in K
– e.g. Q heat
= K · Q vol
· (T
2
- T
1
) func = (t_1 / t_2) + t_3, limited*
Q v
in m
3
/h T
2
T
1
–
Traditional Multiply
Divide
Average
Q sp
= Q f
· Ratio func = (PV + t_1 + t_2 + t_3)/n where n = number of inputs used e.g. T a
= (T
1
+ T
2
+ T
3
+ T
4
)/4
Traditional Summer.
func = PV + t_1 + t_2 + t_3
Q
T f
1
Quotient
T
2
Devisor
T
3
–
T
4
Fourth order polynomial e.g. P diff
= P
1
- P
2 func = PV + t_1
2
+ t_2
3
+ t_3
4 e.g.
T
= A + K
1
T + K
2
T
2
+ K
3
T
3 func = (PV -t_1) / (PV - t_2)
P
1
T in K
P
1
T in K
–
T in K
–
–
Simple HTG compensated level, l bt
= 1 bm
· (P b
- P where t
)/(P b
- P m
) P b
P t
P m
–
P b
is the tank base pressure,
P t
is the top pressure,
P m
is the density correction pressure,
1 bm
is the GAIN ( height of density tap)
*limited: the compensation function must be limited by the COMP_LO_LIM and COM P_HI_LIM parameters
Tab. 7-1: Algorithms and examples of use (units may differ from those shown here)
The process value PV supplied by IN is scaled in PV_SCALE before being passed on to the arithmetic algorithm. PV_SCALE will normally reflect the OUT_SCALE of the upstream block, and must be in the units required for calculation. If a range extension has been enforced, the extended range limits must be entered.
Depending upon the algorithm chosen in ARITH_TYPE , the output is generated by multiplying PV by the result of the function calculation, f, or PV is itself part of the function. The OUT value is therefore calculated either as:
OUT = PV · f · GAIN + BIAS or
OUT = f · GAIN + BIAS
(1)
(2)
The GAIN parameter can be used to simulate factors, e.g. the first order coefficient in the polynomial or height of the density tap, see Table 7-1. The BIAS parameter can be used to add or subtract constants from the final result. The result of the calculation function is always displayed in
PRE_OUT .
For compensated outputs of type (1) the algorithm itself must be limited by entering appropriate values in COMP_LO_LIM and COMP_HI_LIM .The parameter BAL_TIME is used to provide bumpless transfer from Auto to Man mode, the output being ramped from the last OUT value to the new value in the time entered. OUT itself may also be limited by the use of OUT_LO_LIM and OUT_HI_LIM .
Endress+Hauser 103
7 Calculation and Logic Blocks
Auxiliary inputs
Status propagation
Control strategy
Guideline: FOUNDATION Fieldbus Function Blocks
Three inputs IN_1, IN_2 and IN_3 , connected to the OUT parameter of an upstream block, are available for the calculation. Ideally, OUT has the engineering units required for the calculation.
Each input has a BIAS_IN_i and a GAIN_IN_i parameter. BIAS is added to the input and GAIN is applied to the sum. The result is an internal value called t_i in the function equations: t_i = (IN_i + BIAS_IN_i) · GAIN_IN_i
BIAS is used to correct for absolute temperature, pressure etc.. GAIN can be used to represent a coefficient. The internal values t_i are used in the calculations as shown in Table 7-1.
The table below summarizes the status, which will normally follow that of PV, unless one or more of the auxiliary inputs is "Bad" or "Uncertain" . The status of unused inputs ignored.
IN_i status
Good
IN status
Good
OUT status
Good
Good Bad, Uncertain Bad, Uncertain
Bad, Uncertain Good Uncertain
If the options "IN_i Use uncertain" and/or "IN_i Use bad" are selected in the INPUT_OPTS parameter, then the corresponding input status will not force OUT to "Uncertain". Instead the status of OUT will be "Good". Simularly, The option "IN Use uncertain" will force OUT to "Good" if the status of PV is "Uncertain".
The links to the block inputs depend on the selected function. Fig. 7-4 shows those for a third order polynomial, for which all inputs come from the same source: e.g. Temperature
AI
OUT
OUT
OUT
IN
IN_1
IN_2 fourth order polynomial
ARTH OUT
Fig. 7-4: Links for third order polynomial (an additional link to IN_3 is required for fourth order polynomial)
Fig. 7-5 shows the links for linear flow compensatioin. In this case each of the inputs comes from a separate analog input block that has been scaled to provide the correct engineering units for the selected algorithm.
Flow
AI_1
OUT
Pressure
AI_2
OUT
Temperature
OUT
AI_2
Compensated flow, linear
IN
IN_1
IN_2
ARTH OUT
Fig. 7-5: Links required for linear flow compensation
104 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Block configuration
7 Calculation and Logic Blocks
The block is configured as follows:
Parameter
MODE_BLK.Target
PV_SCALE.EU_100
PV_SCALE.EU_0
PV_SCALE.UNITS_INDEX
OUT_RANGE.EU_100
OUT_RANGE.EU_0
OUT_RANGE.UNITS_INDEX
INPUT_OPTS
BIAS_IN_1
GAIN_IN_1
BIAS_IN_2
GAIN_IN_2
BIAS_IN_3
GAIN_IN_3
COMP_HI_LIM
COMP_LO_LIM
ARITH_TYPE
BAL_TIME
BIAS
GAIN
OUT_HI_ LIM
OUT_LO_LIM
Action
Set the target mode of the block to Auto
Enter upper range limit of PV
Enter lower range limit of PV
Enter unit of process variable
Enter upper range limit for output variable
Enter lower range limit for output variable
Enter unit of output variable
Option/Value
Auto e.g. 2000 units e.g. 0 units units e.g. 3000 units e.g. 0 units units
If required, select the input options by ticking the box
• Multiple selections are allowed
• See status handling for more information
Enter bias to be applied to first auxiliary input
Enter gain to be applied to first auxiliary input
IN Use uncertain
IN_i Use uncertain
IN_i Use bad
0, see below
>0, see below
Enter bias to be applied to second auxiliary input, if used 0, see below
Enter gain to be applied to second auxiliary input, if used >0, see below
Enter bias to be applied to third auxiliary input, if used 0, see below
Enter gain to be applied to third auxiliary input, if used >0, see below e.g. 2000 units Enter upper limit to which compensation applies
• Applies to the first five ARITH_TYPE functions
Enter upper limit to which compensation applies
– Applies to the first five functions in Table 7-1 only e.g. 0 units
Tick the function to be executed by the arithmetic block Flow, linear
Flow, sq root
Flow, approx
BTU flow
Multiply/Divide
Average
Summer
4th order polynomial
Compensated level
Enter the time in seconds for OUT to adjust to a new value if the block mode changes from Man to Auto
10 s
If required, enter a constant to be used in the calculation of OUT
0 units (default), see below
Enter the scaling value to be used in the calculation of
OUT
>0, see below
If required, enter upper limit to be placed on OUT value –
If required, enter lower limit to be placed on OUT value –
The GAIN and BIAS values to be entered depend upon the application selected. The table below offers suggestions for each of the functions shown in the table above
Function/Example OUT
GAIN BIAS
IN_1
GAIN BIAS
IN_2
GAIN BIAS
IN_3
GAIN
Q b
= Q f
· K· P/T
Q b
= Q f
· K·
P/T · Z)
K
K
Q b
= Q f
· K
Q b
= Q f
· K
1
·
K
2
+ K
3
T + K
4
T
2
) K
1
1
·
K
2
+ K
3
P) K
1
Q heat
= K · Q vol
· (T
2
- T
1
) K
0
0
0
0
0
1*
1*
1*
1*
1
0
0
0
0
0
1*
1*
1*
1*
1
(273)
(273)
(273)
0
0
N/A
1
1
N/A
N/A
Q sp
= Q f
· Ratio
T a
= (T
1
+ T
2
+ T
3
+ T
4
)/4
1
1
0
0
1*
1
0
0
1*
1
0
0
N/A
1
P diff
= P
1
- P
2
T
= A + K
1
T + K
2
T
2
+ K
3
T
3 l bt
= 1 bm
· (P b
- P t
)/(P b
- P m
)
1
K
1
1
0
A
0
1
K
1
2
0
(273)
0
N/A
K
1
3
N/A
(273)
0
N/A
–
1
*Assuming that input is already in the required units, otherwise GAIN must be used as conversion factor
BIAS
N/A
0
273
N/A
N/A
N/A
0
N/A
–
0
Endress+Hauser 105
7 Calculation and Logic Blocks
Operating mode
Status
Block Errors
Guideline: FOUNDATION Fieldbus Function Blocks
7.1.3
Block operation
The block normally operates in AUTO mode. The algorithm never changes the mode, even when inputs go bad. Difficulties with a function, such as division by zero and roots of negative numbers, are handled such that they do not disturb the status of OUT or the mode. Division by zero produces a large number of the proper sign. Infinity is not used, as it has a special meaning for unused limits.
Roots of negative numbers produce the root of the absolute value, with a negative sign.
When MODE_BLK.Target
is set to MAN, the block output can be manipulated by entering the desired status and value in the OUT parameter. An internal value is set to the difference between
OUT and the output of the selected function, so that bumpless transfer is possible when the block is returns to AUTO. The difference decays to zero over the time period entered in BAL_TIME .
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
Operation can be checked on-line by viewing a number of parameters:
Parameter
IN
IN_LO
IN_1
IN_2
IN_3
PV
PRE_OUT
OUT
Meaning
Value and status of primary input from upstream block
Value and status of low range input from upstream block
Value and status of first auxiliary input from upstream block
Value and status of second auxiliary input from upstream block
Value and status of third auxiliary input from upstream block
Value and status of process value after scaling
Value and status of selected algorithm
Value and status of block output
The Arithmetic block supports standard status handling as described in Chapter 2.6 with the additions detailed in Chapter 7.1.1.
Output status
Good NonCascade
Uncertain
Bad NonCascade
Meaning
Normal operation as configured
• IN input status "Uncertain", IN_x status "Good"
• IN_x input status "Bad" or Uncertain, IN input status good
• IN input status "Bad" , IN_x input status "Good", "Uncertain" or "Bad"
• Block configuration error
On execution of the block, the device checks for correct configuration. Block errors are indicated in the BLOCK_ERR parameter.
Condition
Block Configuration Error
Out-of-Service
Reason
• Invalid parameter setting in ARITH_TYPE
• MODE_BLK.Target currently set to OOS
106 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Arithmetic block
7 Calculation and Logic Blocks
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
PV
OUT
PRE_OUT
PV_SCALE
OUT_RANGE
GRANT_DENY
INPUT_OPTS
IN
IN_LO
IN_1
IN_2
IN_3
RANGE_HI
RANGE_LO
BIAS_IN_1
GAIN_IN_1
BIAS_IN_2
GAIN_IN_2
BIAS_IN_3
GAIN_IN_3
COMP_HI_LIM
COMP_LO_LIM
ARITH_TYPE
7.1.4
Block parameters
Parameter
BAL_TIME
BIAS
GAIN
OUT_HI_LIM
OUT_LO_LIM
UPDATE_EVT
BLOCK_ALM
Legend: RO = Read Only
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
RO
RO
Positive
Description
See Chapter 2.3.4
Block mode, set MODE_BLK.Target to AUTO, CAS or RCAS
Block errors, see Chapter 6.1.9
Process value used in executing the block
Output value calculated as a result of executing the block
(OUT_RANGE ± 10%)
Output value of calculation.
0
0
0
100
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0-100% PV scaling to required engineering units
0-100% OUT value scaling to required engineering units
Access options, see Chapter 2.8.1
Input options for handling block input status.
Primary input value of the block
Input for low range device in a range extension application.
Auxiliary input 1
Auxiliary input 2
Auxiliary input 3
PV value at which transition from IN_LO to IN begins
PV value at which transition from IN_LO to IN ends
Bias to be applied to first auxiliary input
Gain to be applied to first auxiliary input
Bias to be applied to second auxiliary input, if used
Gain to be applied to second auxiliary input, if used
Bias to be applied to third auxiliary input, if used
Gain to be applied to third auxiliary input, if used
High limit imposed on the PV compensation term.
Low limit imposed on the PV compensation term.
Function to be executed by the block
• 1= Flow comp. linear
• 2= Flow comp. square root
• 3= Flow comp. approx.
• 4= BTU flow
• 5= Traditional mult. div.
• 6= Average
• 7= Traditional summer
• 8= Fourth order polynomial
• 9= HTG comp. level
Decay time for OUT value for change from man to Auto mode
Constant to be used in the calculation of OUT
Scaling value to be used in the calculation of OUT
Upper limit to be placed on OUT value
Lower limit to be placed on OUT value
This alert is generated by any change to the static data.
Block alarms, see Chapter 2.9
Endress+Hauser 107
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
7.2
Output Splitter
The Output Splitter block allows two control outputs to be driven from a single input, whereby each output is a linear function of some portion of the input, see Fig. 7-6. The block is intended for use in split ranging or sequencing of multiple valve applications.
• Split range application:
– Normally both valves are closed when the splitter input is 50%.
– One valve opens fully as the input drops to 0%.
– The other valve opens as the input rises above 50%.
• Sequencing application
– Normally both valves are closed at 0% input.
– One valve opens fully as the input rises to 50%, and the other stays shut.
– The second valve opens as the input rises above 50%; the first valve may remain open or shut off quickly.
The block provides back calculation support by using the same linear function in reverse. Cascade initialization is supported by a decision table for combinations of input and output conditions. As this block is in the control path, it is able to pass limit and cascade initialization information back to the upstream block.
IN_ARRAY
OUT_ARRAY
LOCKVAL
CAS_IN
Auto
OUTPUT
SPLITTER
OUT_1
OUT_2
BKCAL_IN_1
BKCAL_IN_2 BKCAL_OUT
Fig. 7-6: Schematic diagram of Output Splitter block (OS Block)
108 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
7.2.1
Functional description
The CAS_IN input is connected to an upstream PID block which supplies the setpoint value SP in percentage of span to the block. The splitter outputs OUT_1 and OUT_2 are generated from SP by means of two linear functions.
Each function is defined by two end points, (X11, Y11) and (X12, Y12) for OUT_1 and (X21, Y21) and (X22, Y22) for OUT_2 . These parameters are configured by means of two arrays IN_ARRAY for the setpoint values (X) and OUT_ARRAY for the corresponding OUT values (Y).
Split range
100%
(X11, Y11)
OUT_1
OUT
(X22, Y22)
OUT_2
0%
0%
(X12, Y12)
50%
(X21, Y21)
100% SP
100%
Sequencing
(X12, Y12) (X22, Y22)
OUT
OUT_1 OUT_2
0%
0%
(X11, Y11)
50%
(X21, Y21)
100% SP
Fig. 7-7: Split range and sequencing operations
Fig. 7-7 shows the applications split range and sequencing. The corresponding array for these applications might be as follows:
Split range
IN_ARRAY OUT_ARRAY
[1] 0
[2] 50
100
0
[3] 50
[4] 100
0
100
Sequencing
IN_ARRAY OUT_ARRAY
[1] 0
[2] 50
0
100
[3] 50
[4] 100
0
100
Other configurations are possible. If the array is configured such that a region of the input range is not specified, then the block will interpolate to the endpoint of the input value (0% or 100%).
In sequencing, the decision whether valve 1 remains open when the endpoint of OUT_1 is reached is made in the parameter LOCKVAL .
• If LOCKVAL is true, OUT_1 remains at its current value when OUT_2 is non-zero
• If LOCKVAL is false, then as soon as the OUT_2 becomes non-zero then OUT_1 goes to zero
100%
LOCKVAL = TRUE
OUT_1 = 100%
100%
LOCKVAL = FALSE
OUT
0%
0%
OUT_1
50%
OUT
OUT_2
100% SP
0%
0%
Fig. 7-8: Effect of LOCKVAL on OUT_1
OUT_1 OUT_2
50%
OUT_1 = 0%
100% SP
Endress+Hauser 109
7 Calculation and Logic Blocks
Status propagation
Guideline: FOUNDATION Fieldbus Function Blocks
The parameter HYSTVAL provides hysteresis in % of span for the switching point as follows:
Condition
X < X12 - HYSTVAL
X12 - HYSTVAL < X < X12 and
X
X12 since it was less than X12 - HYSTVAL
X12 - HYSTVAL < X < X12 and
X
X12 since it was less than X12 - HYSTVAL
X12 < X
Action
OUT_1 = calculated Y value
OUT_1 = calculated Y value
OUT_1 = as determined by LOCKVAL
OUT_1 = as determined by LOCKVAL
After splitting of the output, the values can be scaled in the OUT_1_RANGE and
OUT_2_RANGE respectively before they are passed to the downstream application as OUT_1 and
OUT_2 .
BKCAL_OUT normally provides the current SP to the upstream block . BKCAL_IN_1 and
BACK_IN_2 provide the back calculation from the downstream blocks.
Substatus values received at CAS_IN are passed to both outputs when the cascade is closed. The back calculation status originates from an active output only. An output held by LOCKVAL is not considered to be active. If neither output is active, no limits are sent back on BKCAL_OUT . An IFS is passed on to both the active and the inactive outputs.
Since the splitter has two independent outputs, cascade initialization is handled slightly differently than is described in Chapter 2.6.4. When a downstream block sends an initialization request to the splitter, one of two things can happen:
• The request can be passed on by the splitter to its upstream block, so that all three blocks balance for bumpless transfer to cascade mode.
• The request cannot be passed on and splitter output moves to the requested value by calculating the offset between the requested and actual value. The offset is ramped to zero in
BAL_TIME seconds immediately after the cascade closed.
Table 7-2 indicates the possible back caculation statuses together with the actions invoked by the
Output Splitter block..
BKCAL _IN_1 BKCAL _IN_2 BKCAL _OUT Action
NotInvited NotInvited NotInvited Not specified
NotInvited
OK
OK
NotInvited
OK BKCAL_OUT limited to X21 low and X22 high
Initial.Request
NotInvited
Initial.Request
OK
NotInvited
OK
Initial.Request
Initial.Request
Initial.Request
OK
Initial.Request
OK
OK = cascade is closed with status other than NI or IR
Initialize cascade to value given by curve X1 vs Y1
Initialize OUT_1 using internal offset from Y1
Initialize cascade to value given by curve X2 vs Y2
Initialize OUT_2 using internal offset from Y2
Tab. 7-2: Splitter bock actions as a funtion of back calcuilation status of the connected blocks
Cascade initialization is also required when the block moves from Auto to Cas mode. This action is identical to that described in Chapter 2.6.4.
The option "IFS if Bad CAS_IN" in STATUS_OPS causes the fault status to be propagated to the downstream blocks without causing the block mode to change.
110 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Control strategy
Block configuration
7 Calculation and Logic Blocks
7.2.2
Block configuration
Fig. 7-9 shows the control strategy together with the links that must be made between the blocks.
In this example the splitter receives its input from the OUT parameter of an upstream PID Control block. The split output is then passed on to a downstream Analog Output block and a second
Control PID block, however, the two outputs can be connected to any combination of blocks that operate in cascade mode.
PID_1
OUT
CAS_IN
BKCAL_IN
BKCAL_OUT
BKCAL_IN_1
BKCAL_OUT
AO
OUT
OUT_1
OS
CAS_IN
OUT_2
BKCAL_IN_2
CAS_IN
PID_2
BKCAL_OUT
OUT
Fig. 7-9: Links to be made for Output Splitter block
The block is configured as follows:
Parameter
MODE_BLK.Target
OUT_1_RANGE.EU_100
OUT_1_RANGE.EU_0
OUT_1_RANGE.UNITS_INDEX
OUT_2_RANGE.EU_100
OUT_2_RANGE.EU_0
OUT_2_RANGE.UNITS_INDEX
STATUS_OPTS
IN_ARRAY.[1]
IN_ARRAY.[2]
IN_ARRAY.[3]
IN_ARRAY.[4]
OUT_ARRAY.[1]
OUT_ARRAY.[2]
OUT_ARRAY.[3]
OUT_ARRAY.[4]
LOCKVAL
BAL_TIME
HYSTVAL
Action
Set the target mode of the block to Cas
Enter upper range limit for OUT_1 output variable
Enter lower range limit for OUT_1 output variable
Enter unit of OUT_1 output variable
Enter upper range limit for OUT_2 output variable
Enter lower range limit for OUT_2 output variable
Enter unit of OUT_2 output variable
Option/Value
Cas default 100 default 0 default % default 100 default 0 default %
IFS if Bad CAS_IN If required, select the status option by ticking the box
• If selected, the block continues to operate with bad input and the downstream blocks handle the fault
Enter setpoint values in upstream block units:
• Corresponding to lower range value of OUT_1
• Corresponding to upper range value of OUT_1
• Corresponding to lower range value of OUT_2
• Corresponding to upper range value of OUT_2 e.g. 0 e.g. 50 e.g. 50 e.g.100
Enter setpoint values in OUT_RANGE units:
• Lower range value of OUT_1
• Upper range value of OUT_1
• Lower range value of OUT_2
• Upper range value of OUT_2
For sequencing operation, select OUT_1 position
Enter the time in seconds for OUT to adjust to a new value if the block mode changes from Cas
If required, enter a switching point hysteresis for OUT_1 in percentage of output span e.g. 1 e.g. 0 e.g. 100 e.g. 0 e.g.100
e.g. Lock (= 100%) e.g. 10 s
Endress+Hauser 111
7 Calculation and Logic Blocks
Operating mode
Status
Block Errors
Guideline: FOUNDATION Fieldbus Function Blocks
7.2.3
Block operation
The block normally operates in CAS mode and takes its setpoint SP from the CAS_IN parameter. If
BKCAL_IN_1 or BKCAL_IN_2 indicate that the cascade is broken, see Chapter 7.1.2, Status propagation, the block will be forced to IMan.
When MODE_BLK.Target
is set to AUTO, the block output can be manipulated on-line by entering the desired status and value in the SP parameter. An internal value is set to the difference between OUT and the output of the selected function, so that bumpless transfer is possible when the block is returns to CAS. The difference decays to zero over the time period entered in
BAL_TIME .
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
Operation can be checked on-line by viewing a number of parameters:
Parameter
CAS_IN
OUT_1
OUT_2
Meaning
Value and status of setpoint value from upstream block
Value and status of output 1
Value and status of output 2
The Output Splitter block supports standard status handling as described in Chapter 2.6 with the additions detailed in Chapter 7.2.1.
Output status
Good NonCascade
Good Cascade
Uncertain
Bad NonCascade
Bad Cascade
Meaning
Normal operation as configured - not operating in control loop
Normal operation as configured - operating in contrtol loop"
Input "Uncertain" - not operating in control loop
• Input "Bad" - not operating in control loop
• Block configuration error
• Input "Bad" - operating in control loop
• Block configuration error
On execution of the block, the device checks for correct configuration. Block errors are indicated in the BLOCK_ERR parameter.
Condition
Block Configuration Error
Out-of-Service
Reason
• IN_ARRAY configuration error
– Value [1]
Value [2],
– Value [3]
Value [4],
– Value [1] > Value [4]
• MODE_BLK.Target currently set to OOS
112 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Output Splitter block
7 Calculation and Logic Blocks
7.2.4
Block parameters
Parameter
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
SP
OUT_1
OUT_2
OUT_1_RANGE
OUT_2_RANGE
GRANT_DENY
STATUS_OPTS
CAS_IN
BKCAL_OUT
IN_ARRAY
OUT_ARRAY
LOCKVAL
BKCAL_IN_1
BKCAL_IN_2
BAL_TIME
HYSTVAL
UPDATE_EVT
BLOCK_ALM
Legend: RO = Read Only
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
Positive
Description
See Chapter 2.3.4
Block mode, set MODE_BLK.Target to AUTO, CAS or RCAS
Block errors, see Chapter 6.1.9
Setpoint used by the block in AUTO mode (PV_SCALE ± 10%)
1 st
output value calculated as a result of executing the block
2 nd
output value calculated as a result of executing the block
0
0
0
0
0-100% OUT_1 value scaling to required engineering units
0-100% OUT_2 value scaling to required engineering units
Access options, see Chapter 2.8.1
Status options, see Chapter 2.8.4 and Chapter 6.1.9
Setpoint used by the block in CAS mode
Feedback for BKCAL_IN of an upstream block.
0, 0, 0, 0 2x 2 SP range-end values for OUT_1 and OUT_2
0, 0, 0, 0 2x 2 output range-end values for OUT_1 and OUT_2
No Lock Boolean value for controlling OUT_1 value when OUT_2 >0
• Lock = OUT_1 = 100%
• No Lock = OUT_1 = 0%
Feedback from BKCAL_OUT of downstream block connected to OUT_1
Feedback from BKCAL_OUT of downstream block connected to OUT_2
Decay time for OUT value for change from Auto to Cas mode
Switch point hysteresis for OUT_1
This alert is generated by any change to the static data.
Block alarms, see Chapter 2.9
Endress+Hauser 113
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
7.3
Signal Characterizer
The Signal Characterizer block is used to enter of a strapping table, comprising up to 21 pivot points, that allows the mapping of a non-linear relationship between input and output values. The block has two paths, which use a single look-up table, see Fig. 7-10. The second path allows an optional swapping of the x and y axes, allowing its use in a backward control path.
The status of an input is copied to the corresponding output, so that the block can be used in the control or process signal path.
IN_1
IN_2
LOOK_UP TABLE
CALCULATION
OUTPUT y21 y1 x1 x21
INPUT
OUT_1
OUT_2
Standard operation
SWAP_2
(TRUE, IN_2 = Y, OUT_2 =X)
Fig. 7-10: Schematic diagram of Signal Characterizer block (SC Block)
7.3.1
Functional Description
In standard operating mode, IN_1 and IN_2 comprise a value and status from an upstream function block. The block calculates OUT_1 from IN_1 and OUT_2 from IN_2 using the same look-up table. The curve used is defined by up to 21 points:
[x
1
; y
1
], [x
2
; y
2
]...[x
21
; y
21
] in the parameters CURVE_X ; CURVE_Y where x corresponds to the input and y to the output. The x-coordinates are entered in the units of
IN and the y-coordinates in the units of OUT. The units and range limits can be made visible to an external application by using the parameters X_RANGE (= IN) and Y_RANGE (= OUT).
The output value is calculated by linear interpolation between the two table values bracketing the input value. For this reason, the values of x must rise monotonically. If this is not the case, a configuration error is set in BLOCK_ERR and the block switches to OOS mode.
If the look-up table has m points, where m is less than 21, all non-configured points [x m+1
; y m+1
],
[x m+2
; y m+2
] etc. will be set to +INFINITY to mark them as unused. Since x for the input and x m
the largest value, the output is set to y
1
1
is the smallest value
when the input value is smaller than x
1
, and to y m
when the input value is larger than x m
. When the input value is out of the limits, set by x
1
and x m
, the OUT status indicates the condition.
114 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
Use in backward control path
Status propagation
If the parameter SWAP_2 is set to "Swap", then the x and y axes of the look-up table are swapped on the IN_2 to OUT_2 path. This means that IN_2 must be connected to a downstream block and
OUT_2 to an upstream block, building a backward control path. In this case IN_2 must be in the units of OUT_1 (Y_RANGE ) and OUT_2 in the units of IN_1 (X_RANGE) .
In this case, the y values must also be monotonic, i.e. the y values must always increase or always decrease when the x values increase. If this is not the case, a configuration error is set in
BLOCK_ERR and the block switches to OOS mode.
The output values OUT_1 and OUT_2 replicate the status of the corresponding IN values or are generated by the block. If the BLOCK_ERR parameter indicates a block error, the status of the output is set to "Bad"
The sub-status is also passed to the outputs. If one of the CURVE_X/CURVE_Y limits is reached or the input is limited, "High Limited" or "Low Limited" will be indicated in the output limit status.
The limits are reversed if the curve slope is negative.
When the block is operating in a control loop, i.e. SWAP_2 = "Swap", cascade initialization is controlled by the lower block, see Chapter 2.6. When the block is out of service, the cascade to both the lower and upper blocks is broken by setting "Bad" at the outputs. When the block moves back to Auto mode, the lower block begins cascade initialization with status values that pass along the backward control path (IN_2 => OUT_2) to the upper block. The answering status signals from the upper block pass through this block to the lower block via IN_1 => OUT_1.
Control strategy
7.3.2
Block configuration
Fig. 7-11 shows the control strategy together with the links that must be made between the blocks for the standard mode of operation. In this example, the characterizer receives its inputs from the
OUT parameters of two upstream Analog Input blocks. The application requires that both signals are characterized in exactly the same way. The output of the characterizer is then passed on to two independent Control PID blocks.
Endress+Hauser
AI
OUT
OUT
AI
IN_1
IN_2
OUT_1
CHAR
OUT_2
PID_1 OUT
IN
IN
PID_2
OUT
Fig. 7-11: Links to be made for Signal Characterizer block in standard operation
Fig. 7-12 shows the characterizer operating in a backward control path, i.e. SWAP_2 = Swap. In this case it is used to characterize the OUT value of a Control PID block before this is used by the downstream analog output block. In order that the back calculation can be used by the upstream
PID block it must be reconverted by the characterizer, by connecting BKCAL_OUT of the output block to IN_2 and OUT_2 to BKCAL_IN of the Control PID block.
AI
OUT
IN
PID
OUT
IN_1
SWAP_2 = TRUE
CHAR
OUT_1
CAS_IN
OUT_2
IN_2
AO
BKCAL_OUT
BKCAL_IN
OUT
Fig. 7-12: Links to be made for Signal Characterizer block in a backward control path
115
7 Calculation and Logic Blocks
Block configuration
Operating mode
Status
Guideline: FOUNDATION Fieldbus Function Blocks
The block is configured as follows:
Parameter
MODE_BLK.Target
X_RANGE.EU_100
X_RANGE.EU_0
X_RANGE.UNITS_INDEX
Y_RANGE.EU_100
Y_RANGE.EU_0
Y_RANGE.UNITS_INDEX
SWAP_2
CURVE_X.[1]
...
CURVE_X.[21]
CURVE_Y.[1]
...
CURVE_Y.[21]
Action
Set the target mode of the block to Auto
Enter upper range limit for the input variables
Enter lower range limit for input variables
Enter unit of the input variables
Enter upper range limit for the output variables
Enter lower range limit for output variables
Enter unit of the output variables
Option/Value
Auto e.g. 1000 e.g. 0 e.g. kg/hr e.g. 100 e.g. 0 e.g. %
Set to "Swap" if characterizer is to be used in a backward control path.
e.g. No Swap (default)
Enter X values (input variable) of strapping table
• Values must rise or fall monotonically
• Values must be within the range defined by
X_RANGE
• Unedited values are automatically set to infinity, which means they are not used
0 (kg/hr)
...
1000 (kg/hr)
Enter Y values (output variable) of strapping table^
• Exacly the same number of values must be entered as for the X_CURVE.
• Values must be within the range defined by
Y_RANGE
• If SWAP_2 = TRUE, values must rise or fall monotonically
• Unedited values are automatically set to infinity, which means they are not used
0 (%)
...
100 (%)
7.3.3
Block operation
The block normally operates in Auto mode and takes its input from the IN_1 and IN_2 .
If there is a block configuration error, the block switches to OOS (Out of Service).
When MODE_BLK.Target
is set to Man, the block output can be manipulated on-line by entering the desired status and value in the OUT_1 and/or OUT_2 parameter.
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
Operation can be checked on-line by viewing a number of parameters:
IN_1
IN_2
OUT_1
OUT_2
Input value and status used by the characterizer for path 1
Input value and status used by the characterizer for path 2.
Block output value and status for path 1
Block output value and status for path 2
The Signal Characterizer block supports the qualities Bad, Uncertain and Good NonCascade together with the associated sub- and limit statuses, see Chapter 2.3.2. When SWAP_2 = "Swap", the qualities Good Cascade and Bad Cascade are also supported. "
Status
Good NonCascade
Good Cascade
Uncertain
Bad NonCascade
Bad Cascade
Meaning
Block operating in standard mode; input and block execution "Good"
Block operating in control loop (SWAP_2 = "Swap"); input and block execution "Good"
Block operating in standard mode; input "Uncertain"
Block operating in standard mode; input "Bad" or block configuation error
Block operating in control loop (SWAP_2 = "Swap"); input "Bad" or block configuation error
116 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Block Errors
7 Calculation and Logic Blocks
On execution of the block, the device checks for correct configuration. Block errors are indicated in the BLOCK_ERR parameter.
Condition
Block Configuration Error
Reason
• Values in CURVE_X are not monotonic
• SWAP_2 is true and values in CURVE_Y are not monotonic
Input Failure/ process variable has BAD status • Upstream transducer block has status "Uncertain" or "Bad"
• Upstream Analog Output block is out of service
Out-of-Service • MODE_BLK.Target currently set to OOS
Signal Characterizer block
7.3.4
Block parameters
Parameter
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
OUT_1
OUT_2
X_RANGE
Y_RANGE
GRANT_DENY
IN_1
IN_2
SWAP_2
CURVE_X
CURVE_Y
UPDATE_EVT
BLOCK_ALM
Legend: RO = Read Only
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
Description
See Chapter 2.3.4
Block mode, set MODE_BLK.Target to AUTO, CAS or RCAS
Block errors, see Chapter 6.1.9
Block output value and status for path 1
Block output value and status for path 2
0
0
0-100% IN value scaling to required engineering units, for HMI
0-100% OUT value scaling to required engineering units, for HMI
Access options, see Chapter 2.8.1
Input value and status used by the characterizer for path 1
No Swap Toggle to invert characteristic curve in path 2 when the block is linked to the back control path
INF
INF
Input value and status used by the characterizer for path 2.
X values (input variable) of characteristic in units of X_RANGE
Y values (output variable) of characteristic in units of
Y_RANGE
This alert is generated by any change to the static data.
Block alarms, see Chapter 2.9
Endress+Hauser 117
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
7.4
Cascade Signal Characterizer
The Cascade Signal Characterizer block is a customized block and differs from the signal characterizer in that:
• up to 51 pivot points can be entered for the strapping table
• several blocks can be used in cascade to map strapping tables with more than 51 values
Like the Signal Characterizer, the block has two paths, which use a single look-up table, see
Fig. 7-13. The second path allows an optional swapping of the x and y axes, allowing its use in a backward control path.
The status of an input is copied to the corresponding output, so that the block can be used in the control or process signal path.
IN_1
IN_2
SWAP_2
(TRUE, IN_2 = Y, OUT_2 =X) y51
LOOK_UP TABLE
CALCULATION
E_CURVE_Y
MAN
AUTO
MAN
AUTO y1 x1 x51
E_CURVE_X
X_RANGE
Y_RANGE
CAS_CONTROL
Xmin
Xmax
Xmin
FB1
Xmax
Xmin
Xmax
FBN-1
Xmin
Xmax
FBN
None First Intermediate Last
OUT_1
OUT_2
Fig. 7-13: Schematic diagram of Cascade Signal Characterizer block
118 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
Standard operation
Use in backward control path
Status propagation
7.4.1
Functional Description
The Cascade Signal Characterizer block is identical in parameters and function to the Signal
Characterizer, see Chapter 7.3.1, with two exceptions:
• The strapping table of up to 51 pivot points is entered in the parameters E_CURVE_X and
E_CURVE_Y
• The cascading of the blocks is controlled by the parameter CAS_CONTROL
CAS_CONTROL determines whether the block is cascaded and what position it has in the chain.
It can be set to one of four values
• None: the block is used on its own
• First: the block is the first block in the cascade
• Intermediate: the block is at a position between the ends of the cascade
• Last: the block is the last block in the cascade
When cascaded, the units of E_CURVE_X and E_CURVE_Y must be consistent throughout the cascade. The controller sees the complete characteristic curve, and generates an OUT_1 and/or
OUT_2 value at the final block according to the corresponding value of IN_1 and/or IN_2 at the first block. The x-coordinates are entered in the units of IN and the y-coordinates in the units of
OUT. The units and range limits can be made visible to an external application by using the parameters X_RANGE (= IN) and Y_RANGE (= OUT), whereby these must be set individually for each block.
If the parameter SWAP_2 is set to "Swap", then the x and y axes of the look-up table are swapped on the IN_2 to OUT_2 path. This means that IN_2 must be connected to a downstream block and
OUT_2 to an upstream block, building a backward control path. In this case IN_2 must be in the units of OUT_1 (Y_RANGE ) and OUT_2 in the units of IN_1 (X_RANGE) .
In this case, the y values must also be monotonic, i.e. the y values must always increase or always decrease when the x values increase. When blocks are cascaded, this applies to all values in the cascade. If this is not the case, a configuration error is set in BLOCK_ERR and the block switches to
OOS mode.
The output values OUT_1 and OUT_2 replicate the status of the corresponding IN values or are generated by the block. If the BLOCK_ERR indicates a block error, the status of the output is set to "Bad"
The sub-status is also passed to the outputs. If one of the E_CURVE_X/E_CURVE_Y limits is reached or the input is limited, "High Limited" or "Low Limited" will be indicated in the output limit status. The limits are reversed if the curve slope is negative.
When the block is operating in a control loop, i.e. SWAP_2 = "Swap", cascade initialization is controlled by the lower block, see Chapter 2.6. When the block is out of service, the cascade to both the lower and upper blocks is broken by setting "Bad" at the outputs. When the block moves back to Auto mode, the lower block begins cascade initialization with status values that pass along the backward control path (IN_2 => OUT_2) to the upper block. The answering status signals from the upper block pass through this block to the lower block via IN_1 => OUT_1.
Endress+Hauser 119
7 Calculation and Logic Blocks
Control strategy
Guideline: FOUNDATION Fieldbus Function Blocks
7.4.2
Block configuration
Fig. 7-14 shows the control strategy together with the links that must be made between the blocks for the standard mode of operation. In this example the cascade signal characterizer receives its inputs from the OUT parameters of upstream Analog Input blocks. The application requires that both signals are characterized in exactly the same way. The output of the characterizer is then passed on to two independent Control PID blocks.
AI
AI
CAS_CONTROL = First
OUT
IN_1
OUT
IN_2
CHAR
OUT_1
IN_1
OUT_2
IN_2
CAS_CONTROL = Last
PID_1 OUT
CHAR
OUT_1
IN
OUT_2
IN
PID_2
OUT
Fig. 7-14: Links to be made for Cascade Signal Characterizer block in standard operation (2 blocks cascaded)
Fig. 7-15 shows the cascade characterizer operating in a backward control path, i.e. SWAP_2 =
Swap. In this case it is used to characterize the OUT value of a Control PID block before this is used by the downstream analog output block. In order that the back calculation can be used by the upstream PID block it must be reconverted by the characterizer, by connecting BKCAL_OUT of the output block to IN_2 of the last characterizer block, OUT_2 of the last characterizer block to
IN_2 of the first characterizer block and OUT_2 of the first characterizer block to BKCAL_IN of the Control PID block.
AI
OUT
IN
PID
OUT
IN_1
IN_2
CAS_CONTROL = First
SWAP_2 = TRUE
CHAR
OUT_1
IN_1
OUT_2
IN_2
CAS_CONTROL = Last
SWAP_2 = TRUE
CHAR
OUT_1
IN
OUT_2
BKCAL_IN
AO
BKCAL_OUT
OUT
Fig. 7-15: Links to be made forCascade Signal Characterizer block in a backward control path (2 blocks cascaded)
120 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Block configuration
7 Calculation and Logic Blocks
The blocks are configured as follows:
Parameter
CCHAR Block 1
MODE_BLK.Target
X_RANGE.EU_100
X_RANGE.EU_0
X_RANGE.UNITS_INDEX
Y_RANGE.EU_100
Y_RANGE.EU_0
Y_RANGE.UNITS_INDEX
SWAP_2
CAS_CONTROL
Action Option/Value
Set the target mode of the block to Auto
Enter upper range limit for the input variables
Enter lower range limit for input variables
Enter unit of the input variables
Auto e.g. 500 e.g. 0 e.g. kg/hr
Enter upper range limit for the output variables
Enter lower range limit for output variables
Enter unit of the output variables e.g. 50 e.g. 0 e.g. %
Set to "Swap" if characterizer is to be used in a backward control path.
e.g. No Swap (default)
E_CURVE_X.[1]
...
E_CURVE_X.[51]
E_CURVE_Y.[1]
...
E_CURVE_Y.[51]
CAS_CONTROL
Enter X values (input variable) of strapping table
• Values must rise or fall monotonically
• Values must be within the range defined by
X_RANGE
• For use in cascade, all 51 values must be entered
• If not used in cascade, unedited values are automatically set to infinity, which means they are not used
0 (kg/hr)
...
500 (kg/hr)
Enter Y values (output variable) of strapping table^
• Exacly the same number of values must be entered as for the X_CURVE.
• Values must be within the range defined by
Y_RANGE
• If SWAP_2 = TRUE, values must rise or fall monotonically
0 (%)
...
50 (%)
Set to "First" if to be cascaded, otherwise "None"
CCHAR Block 2... (when used in cascade)
First
MODE_BLK.Target
X_RANGE.EU_100
X_RANGE.EU_0
X_RANGE.UNITS_INDEX
Y_RANGE.EU_100
Y_RANGE.EU_0
Y_RANGE.UNITS_INDEX
SWAP_2
E_CURVE_X.[1]
...
E_CURVE_X.[51]
Set the target mode of the block to Auto
Enter upper range limit for the input variables
Enter lower range limit for input variables
Enter unit of the input variables
Auto e.g. 1000 e.g. 510 e.g. kg/hr
Enter upper range limit for the output variables
Enter lower range limit for output variables
Enter unit of the output variables
Enter X values (input variable) of strapping table
• Values must rise or fall monotonically
• Values must be within the range defined by
X_RANGE
• For use in intermdiate cascade, all 51 values must be entered
• If last in cascade, unedited values are automatically set to infinity, which means they are not used e.g. 100 e.g. 51 e.g. %
Set to "Swap" if characterizer is to be used in a backward control path.
e.g. No Swap (default)
510 (kg/hr)
...
1000 (kg/hr)
E_CURVE_Y.[1]
...
E_CURVE_Y.[51]
Enter Y values (output variable) of strapping table^
• Exacly the same number of values must be entered as for the X_CURVE.
• Values must be within the range defined by
Y_RANGE
• If SWAP_2 = TRUE, values must rise or fall monotonically
• Unedited values are automatically set to infinity, which means they are not used
51 (%)
...
100 (%)
Set to "Last" if last in cascade, otherwise "Intermediate" Last
Endress+Hauser 121
7 Calculation and Logic Blocks
Operating mode
Status
Guideline: FOUNDATION Fieldbus Function Blocks
7.4.3
Block operation
The block normally operates in Auto mode and takes its input from the IN_1 and IN_2 .
If there is a block configuration error, the block switches to OOS (Out of Service).
When MODE_BLK.Target
is set to Man, the block output can be manipulated on-line by entering the desired status and value in the OUT_1 and/or OUT_2 parameter.
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
Operation can be checked on-line by viewing a number of parameters:
IN_1
IN_2
OUT_1
OUT_2
Input value and status used by the characterizer for path 1
Input value and status used by the characterizer for path 2.
Block output value and status for path 1
Block output value and status for path 2
The Signal Characterizer block supports the qualities Bad, Uncertain and Good NonCascade together with the associated sub- and limit statuses, see Chapter 2.3.2. When SWAP_2 = "Swap", the qualities Good Cascade and Bad Cascade are also supported.
" Status
Good NonCascade
Good Cascade
Uncertain
Bad NonCascade
Bad Cascade
Meaning
Block operating in standard mode; input and block execution "Good"
Block operating in control loop (SWAP_2 = "Swap"); input and block execution "Good"
Block operating in standard mode; input "Uncertain"
Block operating in standard mode; input "Bad" or block configuation error
Block operating in control loop (SWAP_2 = "Swap"); input "Bad" or block configuation error
7.4.4
Block Errors
On execution of the block, the device checks for correct configuration. Block errors are indicated in the BLOCK_ERR parameter.
Condition
Block Configuration Error
Reason
• Values in CURVE_X are not monotonic (throughout cascade)
• SWAP_2 is true and values in CURVE_Y are not monotonic
(throughout cascade)
• Less than 51 values in E_CURVE_X/E_CURVE_Y when
CAS_CONTROL options "First" or "Intermediate" selected
Input Failure/ process variable has BAD status • Upstream transducer block has status "Uncertain" or "Bad"
• Upstream Analog Output block is out of service
Out-of-Service • MODE_BLK.Target currently set to OOS
122 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Cascade Signal
Characterizer block
7 Calculation and Logic Blocks
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
OUT_1
OUT_2
X_RANGE
Y_RANGE
GRANT_DENY
IN_1
IN_2
SWAP_2
E_CURVE_X
E_CURVE_Y
UPDATE_EVT
BLOCK_ALM
CAS_CONTROL
7.4.5
Block parameters
Parameter Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
Description
See Chapter 2.3.4
Block mode, set MODE_BLK.Target to AUTO, CAS or RCAS
Block errors, see Chapter 6.1.9
Block output value and status for path 1
Block output value and status for path 2
0
0
0-100% IN value scaling to required engineering units, for HMI
0-100% OUT value scaling to required engineering units, for HMI
Access options, see Chapter 2.8.1
Input value and status used by the characterizer for path 1
No Swap Toggle to invert characteristic curve in path 2 when the block is linked to the back control path
INF
INF
Input value and status used by the characterizer for path 2.
X values (input variable) of characteristic in units of X_RANGE
Y values (output variable) of characteristic in units of
Y_RANGE
None
This alert is generated by any change to the static data.
Block alarms, see Chapter 2.9
Determines whether the block is cascaded with others and what position it has in the chain
• None: the block is used on its own
• First: the block is the first block in the cascade
• Intermediate: the block is at a position between the ends of the cascade
• Last: the block is the last block in the cascade
Legend: RO = Read Only
Endress+Hauser 123
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
7.5
Integrator
The Integrator function block is normally used to totalise flow, giving total mass or volume over a given time, or to totalise power, providing the total energy. It:
• integrates an analog rate value over time or
• accumulates pulses originating from pulse input blocks or other integrator blocks
The block may be used as a totalizer that counts up until reset or as a batch totalizer that has a setpoint, where the integrated or accumulated value is compared to pre-trip and trip settings, generating discrete signals when these settings are reached, see Fig. 7-16.
The integrated value may counted up, starting from zero, or down, starting from the trip value. The block has two flow inputs so that it can calculate and integrate net flow. This can be used to calculate volume or mass variation in vessels or as an optimizing tool for flow ratio control.
In order to determine the amount of uncertain or bad readings, the block integrates the variables with bad or bad and uncertain status separately. The values used in this second integration are the values with good status just before they went from good to bad or uncertain. The ratio of good to total counts determines the output status. Absolute values are used to avoid problems with changing signs.
REV_FLOW1
IN_1
REV_FLOW2
IN_2
RESET_
CONFIRM
RESET_IN
TIME_UNIT1
CONVERT RATE
TO UNITS/EXEC
CONVERT RATE
IN ACCUMULATION
TO UNITS/EXEC
PULSE_VAL1
TIME_UNIT2
CONVERT RATE
TO UNITS/EXEC
CONVERT RATE
IN ACCUMULATION
TO UNITS/EXEC
PULSE_VAL2
INTEG_OPTS
INPUT
TYPE
-1
INTEG_OPTS
INPUT
TYPE
-1
INTEG_TYPE
INTEG_OPTS (QUALITY)
PCT_GOOD_LIM
PCT_UNCERT_LIM
CLOCK_PER
UNIT_CONV
INTEG_OPTS
FLOW TYPE
ADD
INTEGRATE
TOTAL
RTOTAL
M_RESET
MANUAL
PRE_TRIP
COMPARE
SP MANUAL
COMPARE
INTEG_OPTS
CARRY
MANUAL
OP_CMD_INT
RESET
OUT
OUT_PTRIP
OUT_TRIP
Fig. 7-16: Schematic diagram of Integrator block
7.5.1
Functional description
The integrator block has two dual purpose inputs IN_1 and IN_2 that may receive a measurement per unit time (rate) or an accumulated number of pulses (accumulation). If IN_2 is not connected, no calculations are made along this path.
By default, the input type is rate. It can be changed to accumulation by selecting the integration options "Input 1 accumulate" and if used "Input 2 accumulate" in INTEG_OPTS .
Rate
Accum
Used when the variable connected to the input is e.g. kg/s, gal/h etc. The input may originate from the OUT value of a pulse input block or from the OUT value of an analog input block.
Used when the input originates from the OUT_ACCUM output of a pulse input block, which represents the accumulated number of pulse counts from a transducer, or from the output of another integrator block.
124 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
Input type: Rate (default) When the inputs are connected to rate outputs, the parameters TIME_UNIT1 and if required
TIME_UNIT2 are used to define the rate time unit. This allows the rate to be converted to units of mass, volume or energy per second. When the second input is in use, it may be necessary to convert it into the same units as the first. This is done by entering the conversion factor in
UNIT_CONV .
When multiplied by the block execution time each rate gives the mass, volume or energy increment per block execution, see Fig. 7-17.
Input type: Accum
Net flow
Endress+Hauser
IN_1 kg/h
TIME_UNIT1 sec: +1 min: +60 hour: +3600 day: +86400 kg/s x (block execution time) kg
Increment 1
IN_2 lb/min
TIME_UNIT2 sec: +1 min: +60 hour: +3600 day: +86400 lb/s
UNIT_CONV x conversion factor for units 2 to units 1
0.453 kg/lb kg/s x (block execution time) kg
Increment 2
Fig. 7-17: Increment calculation with rate input
When operating in "Accum" mode the input may be connected to the OUT_ACCUM parameter of an pulse input block or a the OUT parameter of another Integrator block. The connected block must count to 999,999 and have a maximum increment/decrement of 499,999 per cycle. The integrator block then determines the number of additional counts since the last execution of the block.
The variation of each input is then multiplied by the value, in engineering units, of each pulse as given by the parameters PULS_VAL1 and PULSE_VAL2 respectively. If necessary, a unit conversion factor can be entered in UNIT_CONV . The result is the increment in engineering units of e.g. mass ,volume or energy per block execution, see Fig. 7-18.
IN_1 counts
IN_2 counts
(Reading i) -
(Reading i-1) no. of pulses
PULS_VAL1 x (puls_val1) kg/pulse
Increment 1 kg
(Reading i) -
(Reading i-1) no. of pulses
PULS_VAL2 x (puls_val2) lb/pulse lb
UNIT_CONV x (conv. factor)
Increment 2 kg
Fig. 7-18: Increment calculation with accumulated input
The integrator considers a positive sign to be an indication of forward flow and negative sign to be an indication of reverse flow. Some flowmeters already indicate the forward and reverse flows by adding a sign to their output, others use a separate binary output. A binary signal can be connected to the inputs REV_FLOW1 and REV_FLOW2 , whereby a true status indicates a reverse flow condition.
The net flow over two inputs is obtained by adding the two increments. The net increment has a positive or negative sign to indicate the net flow direction. If the flow into and out of a tank is being monitored, for example, the inflow should be assigned a positive sign and the outflow a negative sign. This can be done, e.g. by connecting the outflow to IN_2 and assigning a negative value to the unit conversion parameter.
125
7 Calculation and Logic Blocks
Integration of inputs
Types of integration
Resetting the totals
Guideline: FOUNDATION Fieldbus Function Blocks
The net flow direction to be considered in the totalization is set with the the INTEG_OPTS parameters "Flow forward" and "Flow reverse". The following totalizing options are available and apply after application of REV_FLOW1 or REV_FLOW2 .
Flow forware
Flow reverse
Any
Positive flows are totalized. The negative values are treated as zero.
• Select the option "Flow forward" in INTEG_OPTS only
Only negative flows are totalized. The positive values are treated as zero.
• Select the option "Flow reverse" in INTEG_OPTS only
Both positive and negative values are totalized.
• Select the both options "Flow forward" and "Flow reverse" in INTEG_OPTS
Three internal registers are used for the totalization.
Total
Atotal
Rtotal
The net increment is added every cycle, dependent on status.
• Total provides the value that can be read in the output OUT
The absolute value of the net increment is added every cycle, regardless of status.
• This value is used in the calculation of the percentage of good counts PCT_INCL.
The absolute value of the net increments with bad status (rejects) are added to this register.
• RTotal provides the value that can be read in the output RTOTAL and is used in the calculation of the percentage of good counts PCT_INCL
A further value, OUT_RANGE is used only for display of the totals by a host. The high and low range values of OUT_RANGE have no effect on the block.
The integration can start from zero and increase or it can start from a setpoint value (TOTAL_SP) and decrease. Reset may be automatic, periodic, or on demand. This is defined by the enumerated parameter INTEG_TYPE:
UP_AUTO
UP_DEM
DN_AUTO
DN_DEM
PERIODIC
DEMAND
PER&DEM
Counts up with automatic reset when TOTAL_SP is reached.
– Uses the TOTAL_SP, OUT_TRIP and OUT_PTRIP parameters
Counts up with demand reset.
Counts down with automatic reset when zero is reached
– Uses the TOTAL_SP, OUT_TRIP and OUT_PTRIP parameters
Counts down with demand reset
Counts up and is reset periodically according to CLOCK_PER.
– Disables the operator reset OP_CMD_INT
Counts up and is reset on demand
Counts up and is reset periodically or on demand
The block uses a discrete input RESET_IN to reset the internal integration registers. The operator can also send an operator command to reset the same registers by making OP_CMD_INT = RESET.
This is a momentary switch, which is turned off when the block is evaluated. Either method causes a reset of the registers.
A reset occurs at the end of the block execution after the totals have been adjusted. The block takes a snapshot of Total, Rtotal and TOTAL_SP prior to the reset and moves the values to the registers
STOTAL , SRTOTAL and SSP , respectively. This information is kept until the next reset.
The integrator rejects renewed reset requests for at least 5 seconds after a reset. This allows time for other devices to read the snapshot values before they are overwritten. If the option "Confirm Reset" in INTEG_OPTS is set, another reset is prevented from occuring until the value 1 has been written to RESET_CONFIRM . This procedure provides a guarantee that a host has recorded the snapshot values before the next reset occurs.
The number of resets is counted in the register N_RESET . This counter can not be written or reset.
It provides verification that the total has not been reset since N_RESET was last checked. The counter rolls over from 999999 to 0.
126 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Batch totalizer outputs
Status propagation
Percentage bad counts
7 Calculation and Logic Blocks
Reset always clears the internal registers Total, Atotal and Rtotal. If the option "UP_AUTO" or
"DN_AUTO" is selected in INTEG_TYPE and the option "Carry" is selected in INTEG_OPTS , however, a residual value beyond the trip value may be carried to the next integration. In this case,
TOTAL_SP is subtracted from Total, leaving the residual value.
The option "Generate reset event" in INTEG_OPTS causes an analog event to be generated at each reset. This provides a timestamp, the value of Total prior to the reset in units of OUT_RANGE and the substatus of OUT.
When the integration is counting up, it starts from zero and counts to TOTAL_SP ; When counting down, it starts from TOTAL_SP and counts to zero.
The discrete output OUT_TRIP indicates when the target count is reached.
The parameter PRE_TRIP allows a warning to be output in the form of the discrete signal
OUT_PTRIP . The conditions are summarized in the table below.
INTEG_TYPE OUT OUT_PTRIP
"UP_AUTO" or "UP_DEM" < TOTAL_SP - PRE_TRIP
TOTAL_SP - PRE_TRIP and
<TOTAL_SP
TOTAL_SP
"DOWN_AUTO" or
"DOWN_DEM"
> PRE_TRIP
PRE_TRIP and >0
= 0
"0" (False)
"1" (True)
"1" (True)
"0" (False)
"1" (True)
"0" (False)
OUT_TRIP
0" (False)
0" (False)
"1" (True)
0" (False)
0" (False)
0" (False)
OUT_TRIP remains set for five seconds after an automatic reset ( INTEG_TYPE options
"UP_AUTO" or "DOWN_AUTO"). If "Confirm Reset" has been selected in INTEG_OPTS and or
RESET_CONFIRM is connected, it remains set until the reset has been confirmed.
The input status is checked and handled as described below, whereby when two inputs are in use, the resulting status is the worst of the two. The limit status of the inputs is ignored..
–
–
INTEG_OPTS
–
Use Uncertain
–
Use Bad
Add zero if Bad
Input status Output status Remarks
Good NonCascade Good NonCascade Normal operation
Good Cascade
Uncertain
Good Cascade
Bad
Normal operation
Last good value is used as increment
Uncertain
Bad
Bad
Bad
Good
Bad
Good
Good
New value is used as increment
Last good value is used as increment
New value is used as increment
Zero is used as increment
If the block mode is Man, then the status of OUT , OUT_PTRIP , and OUT_TRIP will be Good
(NC) constant. If the option "Uncertain if Man" is selected in the STATUS_OPTS parameter, then the status of these three outputs will be Uncertain constant. No limits are applied to the output.
The parameter PCT_INCL indicates the percentage of good counts in the current total. This parameter can be limited by entering an allowable level of rejects in percent in the parameters
GOOD_LIM and UNCERT_LIM . These parameters influence the OUT status when the block is in Auto according to the table below:
Condition Output status
PCT_INCL
GOOD_LIM Good NonCascade
GOOD_LIM > PCT_INCL
UNCERT_LIM Uncertain
PCT_INCL < UNCERT_LIM Bad
Endress+Hauser 127
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
Control strategy: Rate
7.5.2
Block configuration
Fig. 7-19 shows a control strategy example together with the links that must be made between the blocks. Here, a vessel is filled with a quantity of Liquid 1 determined by PRE_TRIP , with the flowrate being measured by Flowmeter 1. Afterwards, Liquid 2 is added until TOTAL_SP is reached, the flowrate being measured by Flowmeter 2. The flowmeters indicate reverse flow by a discrete signal (DI links are omitted if flowmeter sends positive and negative flow values). The OUT value is used to record the filling of the vessel. The discrete outputs OUT_PTRIP amd OUT_TRIP are used e.g. to switch off pumps and close valves (can be connected to more than one DO block).
AI_1
Flowmeter 1
DI_1
OUT_D OUT
OUT_D
OUT
REV_FLOW1
IN_1
REV_FLOW2
IN_2
DI_2 AI_2 e.g. recorder or display
AO
INTG
OUT
IN
OUT_PTRIP
OUT_TRIP
OUT
IN_D IN_D
DO_1 DO_2
Flowmeter 2 e.g. pump or valve
Block configuration: Rate
Fig. 7-19: Links to be made for Integrator block for control strategy described above
The integration block is configured for the strategy in Fig 7-19 as follows:
Parameter
MODE_BLK.Target
TOTAL_SP
OUT_RANGE.EU_100
OUT_RANGE.EU_0
OUT_RANGE.UNITS_INDEX
TIME_UNIT1
TIME_UNIT2
UNIT_CONV
INTEG_TYPE
INTEG_OPTS
PRE_TRIP
Action
Set the target mode of the block to Auto
For batching, enter target quantity
Enter upper range limit for the input variables (HMI)
Enter lower range limit for input variables (HMI)
Enter unit of the input variables (HMI)
Select time units in which the rate 1 is measured:
• Select "days", "hours", "minutes" or "seconds"
Select time units in which the rate 2 is measured:
• Select "days", "hours", "minutes" or "seconds"
Enter conversion top match input 2 to input 1
• Default 1, in our case no entry required
Select type of integration and reset
• UP_AUTO: counts up, automatic reset
Select flow totalization type
• FORWARD: forward flow is counted
For batching, enter target quantity at which discrete output OUT_PTRIP is to switch
Option/Value
Auto e.g. 10 000 e.g. 10 000 e.g. 0 e.g. l e.g. min (for l/min) e.g. min (for l/min)
1
UP_AUTO
FORWARD e.g. 6 000
The block will totalize all sampled rates with a good status. Rates with bad and uncertain status can also be totalized if the appropriate option is set in INTEG_OPTS, see Chapter 7.5.3, Block operation.
128 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
Control strategy: Accum Fig. 7-20 shows a control strategy in which the Integrator block operates with the OUT_ACCUM parameter of a pulse input block. In this case, the Integrator is to count for a period determined by the clock or until stopped on demand. The demand reset signal is provided by a separate Discrete
Input block. The OUT value is e.g. used by an Analog Output block connected to a recorder or display. It is desired that both negative and positive flows (=TOTAL) as well as flows with uncertain and bad status (= ANY) should be counted.
PULS
OUT_ACCUM
IN_1
RESET_IN
INTG
OUT
AO e.g. recorder or display
DI
OUT_D
Fig. 7-20: Links to be made for the Integrator block for the control strategy described above
Block configuration: Accum The integration block is configured for the strategy in Fig 7-19 as follows:
Parameter
MODE_BLK.Target
OUT_RANGE.EU_100
OUT_RANGE.EU_0
OUT_RANGE.UNITS_INDEX
PULS_VAL1
INTEG_TYPE
INTEG_OPTS
CLOCK_PER
Action
Set the target mode of the block to Auto
Enter upper range limit for the input variables (HMI)
Enter lower range limit for input variables (HMI)
Enter unit of the input variables (HMI)
Enter value associated with each pulse
Option/Value
Auto e.g. 10 000 e.g. 0 e.g. l e.g. 100 (l)
Select type of integration and reset
• PER&DEM: counts up until reset at CLOCK per or by externally, whichever comes first
PER&DEM
Select flow totalization type
• FORWARD: forward flow is counted
• REVERSE: reverse flow is counted
• Use Uncertain: counts when input status "Uncertain"
• Use Bad: uses last "Good" or "Uncertain" value when status is "Bad"
Enter period of count until reset in seconds
FORWARD
REVERSE
Use Uncertain
Use Bad e.g. 3 600
Mode
7.5.3
Block operation
The block normally operates in Auto mode and takes its input from IN_1 and IN_2 .
If there is a block configuration error, the block switches to OOS (Out of Service).
When MODE_BLK.Target
is set to Man, the block output can be manipulated on-line by entering the desired status and value in OUT , RTOTAL , OUT_TRIP and OUT_PTRIP . No integration takes place. Each write to OUT or RTOTAL increments the N_RESET counter. When the block is switched to Auto again, the integration starts from the value set manually.
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller. An exception to this rule is the parameter OP_CMD_INT which can be used to reset the totalizer when the block is in Auto mode.
Endress+Hauser 129
7 Calculation and Logic Blocks
Status
Block errors
Integrator block
130
Guideline: FOUNDATION Fieldbus Function Blocks
Operation can be checked on-line by viewing a number of parameters:
REV_FLOW1/
REV_FLOW2
IN_1/IN_2
OUT
OUT_PTRIP
OUT_TRIP
Value and status of reverse flow input: false = forward flow, true = reverse flow
Value and status of inputs 1 and 2
Value and status of totalizer
Value and status of pre-trip indicator: see batch totalizer outputs
Value and status of trip indicator: see batch totalizer outputs
When two inputs are in use, the worst status of the two is propagated to the output. The significance of the output status is indicated below.
Output status
Good NonCascade
Good Cascade
Uncertain
Bad
Meaning
Normal operation as configured
Normal operation as configured
• Block is in Man mode and "Uncertain if Man" selected in STATUS_OPTS
• PCT_INCL is limited and GOOD_LIM > PCT_INCL
UNCERT_LIM
• Block out of service
• One or both inputs have "Bad" or "Uncertain" status
• PCT_INCL is limited and PCT_INCL < UNCERT_LIM
Block errors are indicated in the BLOCK_ERR parameter
Condition
Block configuration error
Out-of-Service
Reason
• No option selected in INTEG_TYPE
• For rate input, no time unit entered in TIME_UNITx
• For batching, PRE_TRIP > TOTAL_SP
• MODE_BLK.Target currently set to OOS
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
TOTAL_SP
OUT
OUT_RANGE
GRANT_DENY
STATUS_OPTS
IN_1
IN_2
OUT_TRIP
OUT_PTRIP
TIME_UNIT1
TIME_UNIT2
UNIT_CONV
PULS_VAL1
PULS_VAL2
7.5.4
Block parameters
Parameter Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
0 -
999999
0
0/1
0
0
0
0
RO
RO
0
Description
See Chapter 2.3.4
0/1 0
–
–
1
0
0
Block mode, set MODE_BLK.Target to AUTO, CAS or RCAS
Block errors, see Chapter 6.1.9
Target count for batching
– For INTEG_TYPE options "UP_AUTO" or "DN_AUTO"
Block output value and status
Block output range and units for HMI
Access options, see Chapter 2.8.1
Status options, see Chapter 2.8.4 and Chapter 6.1.9
Value and status of input 1
Value and status of input 2
Value and status of trip (TOTAL_SP) indicator
– For INTEG_TYPE options "UP_AUTO" or "DN_AUTO"
Value and status of PRE_TRIP indicator
– For INTEG_TYPE options "UP_AUTO" or "DN_AUTO"
Rate units of input 1 (Days, hours, minutes, seconds)
– For INTEG_OPTS "Flow forward" and "Flow reverse"
Rate units of input 2 (Days, hours, minutes, seconds)
– For INTEG_OPTS "Flow forward" and "Flow reverse"
Conversion factor for input 2 to input 1 units
Pulse value for input 1
– For INTEG_OPTS "Input 1 accumulate"
Pulse value for input 2
– For INTEG_OPTS "Input 2 accumulate"
Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
Parameter
REV_FLOW1
REV_FLOW2
RESET_IN
STOTAL
RTOTAL
SRTOTAL
SSP
INTEG_TYPE
INTEG_OPTS
CLOCK_PER
PRE_TRIP
N_RESET
PCT_INCL
GOOD_LIM
UNCERT_LIM
OP_CMD_INT
OUTAGE_LIM
RESET_CONFIRM
UPDATE_EVT
BLOCK_ALM
Legend: RO = Read Only
Valid range/
Options
0/1
Default value
Description
0/1
0/1
0 -
999999
0 - 100
0 - 100
RO
RO
RO
–
0 s
0
RO
RO
Value and status of reverse flow indicator input 1
– 0 = foward, 1 = reverse
Value and status of reverse flow indicator input 2
– 0 = foward, 1 = reverse
Value and status of external reset input 1
Snapshot of OUT value immediately prior to reset
Current total including bad and uncertain counts
– See 7.5.1, Status handling
Snapshot of RTOTAL immediately prior to reset
Snapshot of TOTAL_SP immediately prior to reset
– For INTEG_TYPE options "UP_AUTO" or "DN_AUTO"
Type of integration and reset
• UP_AUTO: counts up, automatic reset
• UP_DEM: counts up, external reset
• DN_AUTO: counts down, automatic reset
• DN_DEM: counts down, external reset
• PERIODIC: counts up until reset at CLOCK_PER
• DEMAND: counts up until externally reset
• PER&DEM: counts up until reset at CLOCK per or by externally, whichever comes first
Integration options, multiple selections possible
• Input 1 accumulate: accumulated value at input 1
• Input 2 accumulate: accumulated value at input 2
• Flow forward: forward flow values counted
• Flow reverse: reverse flow values counted
• Use Uncertain: values counted when status Uncertain
• Use Bad: last good value counted when status Bad
• Carry: residual value carried over to next count cycle
(For INTEG_TYPE options "UP_AUTO" or "DN_AUTO")
• Add zero if bad: zero counted when status Bad
• Confirm reset: next count cycle begins only after reset has been confirmed
• Generate reset event: event generated on reset
Period of count in seconds
– For INTEG_TYPE options "PERIODIC" and "PER&DEM"
Intermediate target count for batching
– For INTEG_TYPE options "UP_AUTO" or "DN_AUTO"
Number of resets made since commissioning of project
Percentage of good counts in total
Limit value for PLC_INCL, see 7.5.1, Percentage bad counts
Limit value for PLC_INCL, see 7.5.1, Percentage bad counts
Internal command reset command
• Select "Reset" in Auto mode
Maximum tolerated duration of power failure
• Not supported
Value and status of external reset confirmation input
This alert is generated by any change to the static data.
Block alarms, see Chapter 2.9
Endress+Hauser 131
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
7.6
Analog Alarm
The Analog Alarm block provides alarm condition reporting on an analog output of any block. Alarm conditions include high-high, high, low, and low-low alarms. The associated limits may be userentered or computed based on gains and biases from a process setpoint input, thus providing dynamic deviation alarming. A discrete output is provided which indicates the existence of one or more (configurable) alarm conditions, see Fig. 7-21.
An option to temporarily expand alarm limits after a setpoint change is provided. In addition, a new alarm condition may be ignored for a specified period of time after detection to avoid nuisance alarm reporting. The block can also be used as a comparator by comparing the input value to the process setpoint.
User-entered limits
IN
PSP
PV_FTIME
CONDITIONING
PV
MANUAL
AUTO
ALARM
TEST
SUMMARY
LOGIC
PRE_OUT_ALM
OUT_ALM_SUM
HI_GAIN
LO_GAIN
HI_HI_BIAS
HI_BIAS
LO_BIAS
LO_LO_BIAS
EXPAND_UP
EXPAND_DN
ALM_RATE_UP
ALM_RATE_DN
IGNORE_TIME
MANUAL
AUTO
HI_HI_LIM/X
HI_LIM/X
LO_LIM/X
LO_LO_LIM/X
OUT
OUT_ALM
Fig. 7-21: Schematic diagram of Analog Alarm block
7.6.1
Functional description
The Analog Alarm block has two inputs, IN , which is connected to an analog output of an upstream block and PSP , which may be connected to a process setpoint input. The latter is used to compute alarm limits which may also be dynamically adjusted on a change in process setpoint. After conditioning with a time filter PV_FTIME , the analog input value becomes the process value PV , which is made available to downstream blocks at the analog output OUT . The parameter
OUT_RANGE is used make the range and engineering units of OUT to a HMI.
In Auto mode, the process value PV is also alarmed, whereby the current value is compared to userentered or computed limits. OUT_ALM_SUM determines which alarm conditions are to be signalled and a discrete signal PRE_OUT_ALM is generated for output as OUT_ALM . This has the value "0" (false) when no alarms are present and "1" (true) when one or more limits have been violated.
When used as a standard alarm block, the user may enter up to four limits in the engineering units of the incoming IN signal, LO_LO_LIM , LO_LIM , HI_LIM and HI_HI_LIM, together with an alarm hysteresis ALARM_HYS as a percentage of the input span. Each alarm can be assigned a priority in the parameters LO_LO_PRI , LO_PRI , HI_PRI and HI_HI_PRI. The parameter
ACK_OPTION enables automatic acknowledgement of the alarms, which must otherwise be individually acknowledged in the associated LO_LO_ALM , LO_ALM , HI_ALM and
HI_HI_ALM parameters. A full description of alert handling is to be found in Chapter 2.9.
132 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Computed limits
Alarm limit expansion
7 Calculation and Logic Blocks
When the process setpoint PSP is connected to the block, alarm limits may be dynamically calculated. The operating limits (with suffix "X") are calculated from specified gains and biases as follows:
• HI_HI_LIMX = PSP * HI_GAIN + HI_HI_BIAS + EXPAND_UP
• HI_LIMX = PSP * HI_GAIN + HI_BIAS + EXPAND_UP
• LO_LIMX = PSP * LO_GAIN - LO_BIAS - EXPAND_DN
• LO_LO_LIMX = PSP * LO_GAIN - LO_LO_BIAS - EXPAND_DN
The operating limits default to HI_HI_LIM , HI_LIM , LO_LIM and LO_LO_LIM respectively if any parameter is undefined.
In order to avoid nuisance alarms, the effective alarm limits are temporarily expanded on step setpoint change. High alarm limits are increased by a calculated term, EXPAND_UP and low alarm limits are decreased by a calculated term, EXPAND_DN . The expansion terms correspond to the absolute value of the step change.
In order to avoid alarms on the initial change in normal and over-damped process responses and on overshooting or ringing in under-damped process, the expansions decay toward the base limits at a rate determined by ALM_RATE_UP and ALM_RATE_DN . Fig. 7-22 illustrates the function.
Ignoring alarm conditions
ALM_RATE_DN
HI_HI_LIMX
HI_LIMX
PSP
LO_LIMX
LO_LO_LIMX
PV
ALM_RATE_UP
HI_HI_LIMX
HI_LIMX
PSP
LO_LIMX
LO_LO_LIMX
Time
Fig. 7-22: Alarm limit expansion on step change in process setpoint
The expansion feature may be suppressed in the upwards or downwards direction by either not entering a value in the parameters ALM_RATE_UP and ALM_RATE_DN or setting them to zero.
The existence of a new alarm condition may be temporarily ignored by setting the IGNORE_TIME parameter to the number of seconds to disregard the alarm. Both the reporting of the alarm and the possible change to PRE_OUT_ALM will be ignored during this time. This parameter does not delay the clearing of the existence of the alarm on return-to-normal. If the alarm condition does not persist for IGNORE_TIME seconds, it will not be reported.
Endress+Hauser 133
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
Alarm summary
Alarm acknowledgement
Status propagation
The OUT_ALM_SUM parameter specifies the alarm conditions to be signalled at the OUT_ALM output. The following options can be selected:
Option
OUT_ALM_SUM
ANY
LOWs
HIGHs
LEVEL1
LEVEL2
LO_LO
LO
HI
HI_HI
NONE
HI_HI_ALM
X
X
X
X
Alarm conditions included
HI_ALM LO_ALM
X X
X
X
X X
X
X
LO_LO_ALM
X
X
X
X
Current alarms are summarized in the ALARM_SUM parameter. If the user has opted to acknowledge individual alarms, this must be done in the corresponding parameter xxx_ALM. The structure of the alarm parameter is as shown below:
Parameter
ALARM_SUM
HI_HI_ALM
HI_ALM
LO_ALM
LO_LO_ALM
Attribute Value
UNACKNOWLEDGED As read or entered
ALARM_STATE As read
TIME_STAMP
SUB_CODE
VALUE
As read
As read
As read
Description
Indicates acknowledgement of current alert state: i.e.
Undefined, Acknowledged, Unacknowledged
• User can acknowledge via this parameter
Indicates of whether the alert is active and reported.
The alarm state is cleared when the block goes to
Out of Service mode. Possible values are:
• Clear-Reported, Clear-Not Reported,
Active-Reported, Active-Not Reported
Indicates time when the alarm state was detected.
The value is maintained until alert confirmation has been received.
Displays number specifying the cause of the alert
The value of the associated parameter at the time the alert was detected
The status of the OUT value is checked and handled as described below..
STATUS_OPTS
–
IN status
Good
OUT status
Good
Remarks
IN filtered and used as PV => OUT
Use Uncertain as Good Uncertain
– Bad, Uncertain
Uncertain
Bad, Uncertain
IN filtered and used as PV => OUT
IN not filtered, last usable PV => OUT
The status of the OUT_ALM depends upon the status of both IN and PSP , see below:
STATUS_OPTS
–
–
IN status
– Good
Use Uncertain as Good Good
Use Uncertain as Good Uncertain
– Good
PSP status
Good
Uncertain
OUT_ALM status
Good
Uncertain
Good Uncertain
Bad, Uncertain Bad
Bad, Uncertain Good Bad
Bad, Uncertain Bad, Uncertain Bad
Remarks
Alarm test performed
Alarm test performed
Alarm test performed
Alarm test not performed
Alarm test not performed
Alarm test not performed
While the alarm test is not being performed, existing alarms will not be cleared and new alarms will not be generated. Alarm conditions existing prior to the unusable status may still be acknowledged.
When operating in manual mode, the limit status of OUT_ALM is set to double-limited.
134 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Control strategy: user limits
7 Calculation and Logic Blocks
7.6.2
Block configuration
Fig. 7-23 shows a control strategy example together with the links that must be made between the blocks. Here, an analog value, e.g. the level of liquid in a vessel, is monitored for two limits. When the level reaches the high limit, the inlet valve is to be closed and the outlet valve opened. The outlet valve is to be closed and the inlet valve opened when the level reaches the low limit. Alarms are to be automatically acknowledged. The control logic is done in a discrete hybrid block, which outputs to a Multiple Discrete Output block connected to the valves via e.g. a relay module. An Analog
Output block connects the analog value to a display or recorder which displays the current level in the tank.
e.g. level measuring device
OUT
AI
IN
HI_LIM
OUT
AALM_1
IN
LO_LIM
OUT
AALM_2
IN e.g. recorder or display
OUT
AO
OUT_ALM OUT_ALM
IN_D1 IN_D2
OUT_D1
HY_MD_IO IN_D1
OUT_D2
IN_D2
MDO e.g. to I/O module and valve
Block configuration: user limits
Fig. 7-23: Links to be made for Analog Alarm block for control strategy described above
The two Analog Alarm blocks are configured for the strategy in Fig 7-23 as follows:
Parameter
Block AALM_1
MODE_BLK.Target
OUT_RANGE.EU_100
OUT_RANGE.EU_0
OUT_RANGE.UNITS_INDEX
PV_FTIME
ALARM_HYS
HI_LIM
Block AALM_2
MODE_BLK.Target
OUT_RANGE.EU_100
OUT_RANGE.EU_0
OUT_RANGE.UNITS_INDEX
PV_FTIME
ALARM_HYS
LO_LIM
Action Option/Value
Set the target mode of the block to Auto
Enter upper range limit for the input variables (HMI)
Enter lower range limit for input variables (HMI)
Enter unit of the input variables (HMI)
Auto e.g. 100 e.g. 0 e.g. %
Enter time constant in seconds for 1st. order damping e.g. 3
Enter alarm hysteresis in % of OUT_RANGE e.g. 1
Enter limit of HI alarm in engineering units e.g. 90
Set the target mode of the block to Auto
Enter upper range limit for the input variables (HMI)
Enter lower range limit for input variables (HMI)
Enter unit of the input variables (HMI)
Auto e.g. 100 e.g. 0 e.g. %
Enter time constant in seconds for 1st. order damping e.g. 0
Enter alarm hysteresis in % of OUT_RANGE e.g. 1
Enter limit of LO alarm in engineering unit e.g. 10
Endress+Hauser 135
7 Calculation and Logic Blocks
Control strategy: computed limits
Guideline: FOUNDATION Fieldbus Function Blocks
Fig. 7-24 shows a control strategy example together with the links that must be made between the blocks. Here, a liquid is to be heated and maintained with a set temperature band (Setpoint
5°C) by an immersion heater. Control is by simply switching on and off the heater when the temperature leaves the set band, the logic being done in a discrete hybrid block. The setpoint is set remotely, in this case by a constant block and can change, hence the limits must be dynamic. The temperature is measured by a RTD thermometer and monitored by a recorder or display. temperature measuring device
AI
OUT
IN
HI_LIM
OUT
AALM_1 temperature setpoint
CT
IN
LO_LIM
OUT
AALM_2
PSP
OUT_ALM OUT_ALM
IN_D1 IN_D2
HY_MD_IO
OUT_D1
IN_D1 MDO
IN e.g. recorder or display
OUT
AO e.g. to I/O module and heater
Block configuration: computed limits
Fig. 7-24: Links to be made for Analog Alarm block for control strategy described above
The two Analog Alarm blocks are configured for the strategy in Fig 7-24 as follows:
Parameter
Block AALM_1
MODE_BLK.Target
OUT_RANGE.EU_100
OUT_RANGE.EU_0
OUT_RANGE.UNITS_INDEX
PV_FTIME
HI_GAIN
HI_BIAS
ALM_RATE_UP
Block AALM_2
MODE_BLK.Target
OUT_RANGE.EU_100
OUT_RANGE.EU_0
OUT_RANGE.UNITS_INDEX
PV_FTIME
LO_GAIN
LO_BIAS
ALM_RATE_DN
Action Option/Value
Set the target mode of the block to Auto
Enter upper range limit for the input variables (HMI)
Enter lower range limit for input variables (HMI)
Enter unit of the input variables (HMI)
Auto e.g. 200 e.g. 0 e.g. °C
Enter time constant in seconds for 1st. order damping e.g. 3
Enter gain value for HI limit 1
Enter bias value for HI limit
Enter ramp rate for HI limits in engineering units/s
5 e.g. 2
Set the target mode of the block to Auto
Enter upper range limit for the input variables (HMI)
Enter lower range limit for input variables (HMI)
Enter unit of the input variables (HMI)
Auto e.g. 200 e.g. 0 e.g. °C
Enter time constant in seconds for 1st. order damping e.g. 0
Enter gain value for HI limit 1
Enter bias value for HI limit
Enter ramp rate for HI limits in engineering units/s
5 e.g. 2
The configured blocks maintain the temperature within band of
5°C on a change of setpoint.
136 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Mode
Status
Block errors
7 Calculation and Logic Blocks
7.6.3
Block operation
The block normally operates in Auto mode and takes its input from IN and, if connected, PSP .
When MODE_BLK.Target
is set to Man, the block output can be manipulated on-line by entering the desired status and value in OUT and OUT_ALM .
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
Operation can be checked on-line by viewing a number of parameters:
IN
PSP
HI_HI_LIMX
HI_LIMX
LO_LIMX
LO_LO_LIMX
OUT
OUT_ALM
OUT_TRIP
Value and status of input
Value and status of process setpoint, if connected
Value and status of dynamic HI_HI limit, if used
Value and status of dynamic HI limit, if used
Value and status of dynamic LO limit, if used
Value and status of dynamic LO_LO limit, if used
Value and status of analog output
Value and status of discrete alarm output
Value and status of trip indicator: see batch totalizer outputs
When two inputs are in use, the worst status of the two is propagated to the output. The significance of the output status is indicated below.
OUT/OUT_ALM status
Good
Uncertain
Bad
Meaning
Normal operation as configured
Block has an "Uncertain" input and "Use Uncertain as Good " selected in STATUS_OPTS
• Block out of service
• One or both inputs have "Bad" or "Uncertain" status
Block errors are indicated in the BLOCK_ERR parameter
Condition
Out-of-Service
Reason
• MODE_BLK.Target currently set to OOS
Endress+Hauser 137
7 Calculation and Logic Blocks
Analog Alarm block
Guideline: FOUNDATION Fieldbus Function Blocks
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
OUT
OUT_RANGE
GRANT_DENY
STATUS_OPTS
PV_FTIME
IN
PSP
HI_GAIN
LO_GAIN
HI_HI_BIAS
HI_BIAS
LO_BIAS
LO_LO_BIAS
PRE_OUT_ALM
OUT_ALM
OUT_ALM_SUM
ALM_RATE_UP
ALM_RATE_DN
EXPAND_UP
EXPAND_DN
IGNORE_TIME
UPDATE_EVT
BLOCK_ALM
ALARM_SUM
ACK_OPTION
7.6.4
Block parameters
Parameter
ALARM_HYS
HI_HI_PRI
HI_HI_LIM
HI_HI_LIMX
HI_PRI
HI_LIM
HI_LIMX
LO_PRI
LO_LIM
LO_LIMX
LO_LO_PRI
LO_LO_LIM
LO_LO_LIMX
HI_HI_ALM
HI_ALM
LO_ALM
LO_LO_ALM
Legend: RO = Read Only
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
0
0
0
0
0 s
RO
RO
Positive
Positive
Positive
Positive
RO
INF
INF
INF
INF
INF
INF
Description
See Chapter 2.3.4
RO
RO
Positive
0, 1
0 to 50 % 0.5%
0 to 15
+INF
0 to 15
0 to 15
0 to 15
0
0
0
0
+INF
-INF
-INF
Block mode, set MODE_BLK.Target to AUTO, CAS or RCAS
Block errors, see Chapter 6.1.9
Block output value and status
Block output range and units for HMI
Access options, see Chapter 2.8.1
Status options, see Chapter 2.8.4 and Chapter 7.6.1
Time constant (s) of a single exponential filter for process value
Value and status of input
Value and status of process set point
Gain value for calculation of dynamic HI and HI_HI limits
Gain value for calculation of dynamic LO and LO_LO limits
Bias value for calculation of dynamic HI_HI limit
Bias value for calculation of dynamic HI limit
Bias value for calculation of dynamic LO limit"
Bias value for calculation of dynamic LO_LO limit"
Display value for OUT_ALM value and status in Auto mode
Display value for actual OUT_ALM value and status
Selection parameter for OUT_ALM signal conditions
Ramp rate for HI limits in engineering units/s
Ramp rate for HI limits in engineering units/s
Calculated shift of HI and HI_HI limits on PSP step
Calculated shift of LO and LO_LO limits on PSP step
Time delay between detection and reporting of limit violation
Alert generated by any change to the static data.
Block alarms, see Chapter 2.9
Alarm summary, see Chapter 2.9
See Chapter 2.9
• 0: Auto ACK Disable
• 1: Auto ACK Enable
Alarm hysteresis in % of OUT_SCALE, see Chapter 2.9
Priority of the HI_HI alarm, see Chapter 2.9
Setting of HI_HI alarm in engineering units, see Chapter 2.9.
Computed HI_HI operating limit
Priority of the HI alarm, see Chapter 2.9
Setting of HI alarm in engineering units, see Chapter 2.9.
Computed HI operating limit
Priority of the LO alarm, see Chapter 2.9.
Setting of LO alarm in engineering units, see Chapter 2.9.
Computed LO operating limit
Priority of the LO_LO alarm, see Chapter 2.9
Setting of LO_LO alarm in engineering units, see Chapter 2.9
Computed LO_LO operating limit
Status of HI_HI alarm and its associated time stamp.
Status of HI alarm and its associated time stamp.
Status of LO alarm and its associated time stamp.
Status of LO_LO alarm and its associated time stamp.
138 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
7.7
Enhanced Analog Alarm
The Enhanced Analog Alarm block differs from the Analog Alarm block in one aspect only. It has an additional discrete output OUT_D which maps the OUT_ALM output, see Fig. 7-25. The
OUT_D signals can be inverted, however, when the INVERT_OPTS parameter is set to "4".
Additional parameters
IN
PSP
PV_FTIME
CONDITIONING
PV
MANUAL
AUTO
ALARM
TEST
HI_HI_LIM/X
HI_LIM/X
LO_LIM/X
LO_LO_LIM/X
Summary
Logic
HI_GAIN
LO_GAIN
HI_HI_BIAS
HI_BIAS
LO_BIAS
LO_LO_BIAS
EXPAND_UP
EXPAND_DN
ALM_RATE_UP
ALM_RATE_DN
IGNORE_TIME
PRE_OUT_ALM
OUT_ALM_SUM
Status
Check
MANUAL
AUTO
INV_S
OUT
Parameter
OUT_D
INVERT_OPTS
Legend: RO = Read Only
Fig. 7-25: Schematic diagram of Enhanced Analog Alarm block
Valid range/
Options
Default value
Description
Display value for actual OUT_D value and status
Inverts OUT_D signals when set to "4" (=Invert)
OUT_D
OUT_ALM
Endress+Hauser 139
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
7.8
Input Selector
The Input Selector block provides selection of four inputs, normally from analog input blocks, and generates an output based on the configured action, see Fig. 726. It supports two actions:
• Internal signal selection, based on maximum, minimum, middle, average and ‘first good’ algortithms
• External signal selection using the the DISABLE_n parameter.
The DISABLE_N parameter can also be used in Case 1 to generate a validated priority selection.
The block supports the concept of a middle selection. Although the normal configuration for this feature would be with three signals, the block will generate an average of the middle two if four signals are configured or the average of two if three are configured and a bad status is passed to one of the inputs. Logic is provided for handling uncertain and bad signals in conjunction with configured actions.
The intended application of this block is to provide control signal selection in the forward path only, therefore, no back calculation support is provided.
IN_1
DISABLE_1
IN_2
DISABLE_2
IN_3
DISABLE_3
IN_4
DISABLE_4
OP_SELECT
SELECTOR OUT
SELECTED
Fig. 7-26: Schematic diagram of Input Selector block
7.8.1
Functional description
The Analog Alarm block has four inputs, IN_1 to IN_4 , which may be connected to the OUT outputs of upstream Analog Input blocks. Four discrete inputs DISABLE_1 to DISABLE_4 , which may be connected to discrete signals, control the signal processing of the associated analog input. If
DISABLE_n is true, the corresponding signal is not used in the execution of the block.
After execution of the chosen selection algorithm, the result is made available at the OUT output.
The parameter OUT_RANGE is used make the range and engineering units of OUT known to a
HMI.
The analog input OP_SELECT allows the selection algorithm to be selected externally.
SELECTED outputs an integer that normally corresponds to the number of the input used.
The block is not intended for use with controller outputs and has no back calculation support or propagation of control status values.
140 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Selection algorithm
Status propagation
7 Calculation and Logic Blocks
The selection process is controlled by the external parameter OP_SELECT or the internal parameter SELECT_TYPE .
• If OP_SELECT is zero or no signal is connected, the selection is made in SELECT_TYPE
• If OP_SELECT is greater than zero, then this value is used to select the Input (1 to 4) to be used as output by the block. The selection made by the SELECT_TYPE algorithm is then ignored.
The options available in SELECT_TYPE / OP_SELECT are shown below. MIN_GOOD allows the operator to set a limit on the number of bad signals allowed for a particular algorithm.
Meaning SELECT_TYPE when
OP_SELECT = 0
No Selection
First Good
Minimum
Maximum
Middle
Average
All inputs bad, or number of Good inputs < MIN_GOOD
– If OP_SELECT = 0, the selection is always made with SELECT_TYPE
The value of the first usable input is transferred to the output of the block.
– SELECTED is set to the number of the input used
The usable inputs are sorted by value and the lowest value is transferred to the output of the block.
– SELECTED is set to the number of the input used
The usable inputs are sorted by value and the highest value is transferred to the output of the block.
– SELECTED is set to the number of the input used
The usable inputs inputs are sorted by value and the highest and lowest values discarded. If two values are remaining or there were only two values originally, their average is computed. The value is transferred to the output of the block.
– SELECTED is set to zero if an average was used, otherwise it contains the number of the input with the middle value.
The average of the usable inputs is calculated and the value is transferred to the output of the block.
– SELECTED is set to the number of inputs used in the average.
The block checks the status of the inputs before processing them. Inputs with status Good or
Uncertain are processed, those with status Bad are ignored. The table below summarizes the status of OUT under various conditions. The SELECTED output always has Good(NC) status, unless the block is out of service..
–
–
STATUS_OPTS
–
IN status
Good
Good
Uncertain
Usable inputs OUT status
>MINGOOD Good
<MINGOOD Bad
>MINGOOD Uncertain
–
–
Use Uncertain as Good Uncertain
– Uncertain
–
Bad
All Bad
Non connected
>MINGOOD Good
<MINGOOD Bad
<MINGOOD
–
–
Bad
Bad
Bad
Remarks
Block executed
Block not executed
Block executed
Block executed
Block not executed
Block not executed
Block not executed, SELECTED = 0
Block not executed, SELECTED = 0
When the block is operating in Man mode, the block is not executed and the following applies:
STATUS_OPTS
–
OUT status
As entered
Use Uncertain if Man Uncertain
Remarks
Block not executed
Block not executed
Endress+Hauser 141
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
Control strategy: internal priority selection
7.8.2
Block configuration
Fig. 7-27 shows a control strategy example for internal priority selection together with the links that must be made between the blocks. Here, a critical temperature measuring point has two redundant temperature transmitters. The first valid reading is taken for the subsequent control task.
The application can be upgraded to a validated priority selection, in that the disable signals
DISABLE_1 and DISABLE_2 are used to control the status of the associated inputs. When
DISABLE_n is true, the IN_n is disabled and will not be considered by the "First Good" algorithm.
temperature transmitter 1
OUT
AI_1
IN_1
IN_2
ISEL
OUT
IN e.g. to PID Block temperature transmitter 2
OUT
AI_2
Block configuration: internal priority selection
Control strategy: externally switched input
Fig. 7-27: Links to be made for Input Selector block for control strategy described above
The Input Selector block is configured for the strategy in Fig 7-27 as follows:
Parameter
MODE_BLK.Target
OUT_RANGE.EU_100
OUT_RANGE.EU_0
OUT_RANGE.UNITS_INDEX
SELECT_TYPE
Action
Set the target mode of the block to Auto
Enter upper range limit for the input variables (HMI)
Enter lower range limit for input variables (HMI)
Enter unit of the input variables (HMI)
Enter block algorithm, here "First Good"
Option/Value
Auto e.g. 200 e.g. 0 e.g. °C
First Good
Fig. 7-28 shows a control strategy example for switched input together with the links that must be made between the blocks. Here, a process is fed by two tanks which are used alternatively, i.e. first one is emptied then the other. The temperature of the fluid in each tank is to be used in a feedforward control loop. The stream selection is made in the HMI, which uses a hybrid discrete
I/O block to generate the switching signals. The outputs OUT_D1 and OUT_D2 indicate which tank is being used (= 0 when in use).
temperature transmitter 1
AI_1
OUT temperature transmitter 2
AI_2
OUT
IN_1
DISABLE_1
IN_2
DISABLE_2
ISEL
OUT
FF_VAL to PID Block
HMI
OUT_D1
HY_MD_IO
OUT_D2
Fig. 7-28: Links to be made for Input Selector block for control strategy described above
142 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
Block configuration: externally switched input
The Input Selector block is configured for the strategy in Fig 7-20 as follows:
Parameter
MODE_BLK.Target
OUT_RANGE.EU_100
OUT_RANGE.EU_0
OUT_RANGE.UNITS_INDEX
SELECT_TYPE
Action
Set the target mode of the block to Auto
Enter upper range limit for the input variables (HMI)
Enter lower range limit for input variables (HMI)
Enter unit of the input variables (HMI)
Make no selection in this parameter
Option/Value
Auto e.g. 200 e.g. 0 e.g. °C
Not Selected
Mode
Status propagation
Block errors
7.8.3
Block operation
The block normally operates in Auto mode and, depending on configuration, takes its input from one or more inputs IN_n .
When MODE_BLK.Target
is set to Man, the block output can be manipulated on-line by entering the desired status and value in OUT . The status will be automatically set to Man if "Use Uncertain if Man" has been selected in STATUS_OPTS
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
Operation can be checked on-line by viewing a number of parameters:
IN_n
DISABLE_n
OP_SELECT
OUT
SELECTED
Value and status of input value 1 to 4
Value and status of input disabling signal 1 to 4.
Value and status of external selection parament
Value and status of block output
Integer indicating which input has been selected
When two inputs are in use, the worst status of the two is propagated to the output. The significance of the output status is indicated below.
OUT status
Good
Uncertain
Bad
Meaning
Normal operation as configured
• Block has an "Uncertain" input and "Use Uncertain as Good " selected in STATUS_OPTS
• Block in Man mode and "Use Uncertain if Man" selected in STATUS_OPTS
• Block out of service
• One or both inputs have "Bad" or "Uncertain" status
• Number of usuable inputs < MINGOOD
Block errors are indicated in the BLOCK_ERR parameter
Condition
Out-of-Service
Block Configuration Error
Reason
• MODE_BLK.Target currently set to OOS
• SELECT_TYPE parameter has an invalid value
Endress+Hauser 143
7 Calculation and Logic Blocks
Input Selector block
Guideline: FOUNDATION Fieldbus Function Blocks
7.8.4
Block parameters
Parameter
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
OUT
OUT_RANGE
GRANT_DENY
STATUS_OPTS
PV_FTIME
IN_1
IN_2
IN_3
IN_4
DISABLE_1
DISABLE_2
DISABLE_3
DISABLE_4
SELECT_TYPE
MIN_GOOD
OP_SELECT
UPDATE_EVT
BLOCK_ALM
Legend: RO = Read Only
RO
RO
RO
RO
RO
RO
RO
RO
0 - 5
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
0
0
0
0
0 s
Description
See Chapter 2.3.4
Block mode, set MODE_BLK.Target to AUTO, CAS or RCAS
Block errors, see Chapter 6.1.9
Block output value and status
Block output range and units for HMI
Access options, see Chapter 2.8.1
Status options, see Chapter 2.8.4 and Chapter 7.6.1
Time constant (s) of a single exponential filter for process value
Value and status of input 1
Value and status of input 2
Value and status of input 3
Value and status of input 4
Value and status of discrete disable signal for input 1
Value and status of discrete disable signal for input 2
Value and status of discrete disable signal for input 3
Value and status of discrete disable signal for input 4
Selection parameter for block algorithm
• 0: No Selection
• 1: First Good
• 2: Minimum
• 3: Maximum
• 4: Middle
• 5: Average
Minimum number of good outputs allowed by user for selected algorithm
Value and status of external selection parameter for block algorithm:
– When >0, this parameter overrides SELECT_TYPE
Alert generated by any change to the static data.
Block alarms, see Chapter 2.9
144 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
7.9
Setpoint Ramp Generator (SPG)
The Setpoint Ramp Generator block generates an output value that changes with time, see
Fig. 7-29. It is normally used to generate a setpoint for a PID block in applications such as temperature control, batch reactors, etc., where controlled temperature ramps are required during the process.
The block provides a “guaranteed soak” function that stops the timer when the deviation between the generated setpoint and an external variable is larger than a configured value. When operating in manual mode, the operator can pause the timer, select one point on the profile, advance or return the position in time. The first point of the profile can be balanced to the BKCAL_OUT value of a control block.
Ramp generator
PAUSE
BKCAL_IN
START
RESET_IN
DV_HI_LIM
DV_LO_LIM
Compare
OP_CMD_SPG
PAUSE
Setpoint
Time
AUTOCYCLE
DURATION
START_VAL
START_TYPE
SETPOINT
Man
Man
Man
Man
OUT
STEP_POSN
TIME_POSN
TIME_POSN_T
Fig. 7-29: Schematic diagram of Setpoint Ramp Generator block
7.9.1
Functional description
The core element of the Setpoint Ramp Generator block is the ramp generator, which maps the desired the setpoint movement. Up to ten periods can be defined, each characterized by:
• a start value, START_VAL [x] ,
• an end value START_VAL [x+1] that is also the starting value of the next time period
• and a time duration, TIME_DURATION [x] – set to zero for the true "end value"
The parameter TIME_UNITS specifies the time units for display. Fig. 7-30 illustrates the concept:
SP
(°C)
100
START_VAL[3] START_VAL[4]
50
25
START_VAL[6]
DURATION [6] = 0
600 600 1200
DURATION [3]
600 600 t (seconds)
Fig. 7-30: Example of setpoint ramp generation based on five time periods
Endress+Hauser 145
7 Calculation and Logic Blocks
Timer
Timer interruption
Operational status
Guideline: FOUNDATION Fieldbus Function Blocks
The position in the time axis of the curve defining the setpoint ramp is determined by an internal timer. The timer is started automatically by a transition from false to true at the START discrete input or manually by the operator by setting Status true in the START parameter. The timer normally runs for the sum of the TIME_DURATION values and then stops. It must then be reset before it can be restarted.
The operator can reset the timer independent of block mode by selecting the RESET option in the
OP_CMD_SPG parameter. The timer is set to zero, i.e. to the beginning of the ramp. The timer is restarted manually by selecting the START option in the OP_CMD_SPG parameter.
The timer may also be reset automatically by a discrete signal at the RESET_IN input. The block will remain in reset while this input parameter has value TRUE. It can be restarted only after
RESET_IN changes from TRUE to FALSE.
When the parameter AUTO_CYCLE is set to "Autocycle", the timer will return to zero (RESET) and restart (START) automatically when the time reaches the last point of the profile.
The timer runs only when the block mode is Auto: a change to Man stops it. When the mode returns to Auto mode, the timer will reinitialize from the point that it stopped. If BK_CAL_IN is connected to BK_CAL_OUT of a PID block and START_TYPE option "Cascade” is selected, the time will stop and the block be forced to IMan should cascade initialization be in progress.
The timer may be interrupted at any time by changing the discrete signal PAUSE from false to true.
It resumes running when PAUSE is set to false. The block remains in Auto mode throughout the pause.
The timer will also be paused automatically when the deviation between BKCAL_IN and the generated setpoint exceeds the limit DV_HI_LIM or DV_LO_LIM . This allows the user to implement a temperature driven ramping, i.e. the time will pause until the temperature is within the set tolerance, see Fig- 7-31. If the deviation is out of limits, an alarm is indicated in
DV_HI_ALM or DV_LO_ALM respectively and the timer is stopped. It resumes normal operation when the deviation returns to a value within the prescribed limits.
Timer pauses
Timer restarts
DV_HI_LIM
START_VAL [x+1]
DV_LO_LIM
Setpoint
Hold band
START_VAL [x]
Process Value = BKCAL_IN
Timer restarts
Timer pauses
DURATION [x]
Fig. 7-31: Automatic extensiion of the duration when the setpoint is out of limits
The parameter SPG_STATE indicates the status of setpoint ramp generator:
• READY: the ramp generator is initialized and waiting for the starting signal
• ACTIVE: the timer is running
• PAUSE: the PAUSE signal stopped the timer
• DONE: the setpoint generator has reached the last point of the ramp
146 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
OUT value
BKCAL_IN
Status propagation
7 Calculation and Logic Blocks
The parameter PAUSE_CAUSE displays the cause of the PAUSE state:
• 1 = Operator Pause
• 2 = Logic Pause
• 3 = Operator & Logic
• 4 = Deviation pause
• 5 = Operator & Deviation
• 6 = Logic & Deviation
• 7 = Operator & Logic & Deviation
A logic pause may be due to the violation of deviation limits or a downstream PID block not operating in Cascade mode.
After execution of the block, the calculated setpoint value is made available at the OUT output. The calculated setpoint value is also to be found in PRE_OUT , even when the block is in Man mode.
The parameter OUT_RANGE is used make the range and engineering units of OUT known to a
HMI.
Three parameters provide information on the point reached within the ramp:
• STEP_POSN : indicates the current segment or step
• TIME_POSN : indicates the time elapsed since the beginning of the current step
• TIME_POSN_T : indicates the time elapsed since the beginning of the profile
Depending upon application, the input BKCAL_IN may be unconnected, connected to the
BKCAL_OUT output of a downstream PID control block or connected to the OUT output of an upstream Analog Input block.
If there is no BKCAL_IN input, the timer will start at zero and the ramp will be generated as programmed. When there is an input, it is possible to start the curve from the BKCAL_IN value by selecting the appropriate option in the START_TYPE parameter. This ensures that the timer can always be started and/or the control starts without a large upset: :
START_TYPE option
Cascade
BKCAL_IN connection
PID block
Use Duration AI block
Use Rate AI block
Action
The time value is calculated from BKCAL_IN (= last valid OUT) using the curve. If no value can be calculated (BKCAL_IN not in curve range) the time starts at zero and BAL_TIME is used to bring the value of OUT to match PRE_OUT.
Time starts at zero. The START_VAL for the first segment is temporarily made equal to BKCAL_IN (= OUT from e.g. temperature transmitter)
The time starts at zero. The curve starts from the BKCAL_IN value (= OUT from e.g. temperature transmitter) and uses the rate specified by the first values of
START_VAL and the first value of TIME_DURATION.
If a PID is connected, the CONTROL_OPTS parameter of the PID block should be configured to use PV for BKCAL_OUT and be set to operate in Cas mode.
The status of the OUT value is checked and handled as described below..
STATUS_OPTS
–
–
START_TYPE BKCAL_IN status
Cascade
Not "Cascade"
Good
Good
– Not "Cascade" Uncertain
Use Uncertain as Good Not "Cascade" Uncertain
–
-
Cascade Bad
Not "Cascade" Bad
Use Uncertain as Good Not "Cascade" Bad
Target to Manual if
BAD IN
Any Bad
OUT status
GoodCascade
GoodNC
Bad
GoodNC
Bad
Bad
GoodNC
Bad
Remarks
Block in Auto
Block in Auto
Block forced to Man
Block in Auto
Block forced to Man
Block forced to Man
Block in Auto, deviation limits ignored
Block forced to Man
Endress+Hauser 147
7 Calculation and Logic Blocks
Control strategy: time driven ramp
Guideline: FOUNDATION Fieldbus Function Blocks
7.9.2
Block configuration
Fig. 7-32 shows a control strategy example for the time driven generation of a temperature ramp.
This might be required to quickly bring an annealing furnace to its operating temperature, the temperature of the workpieces being secondary at this point. The SPG block is to connected a PID control block and provides its setpoint. The temperature measuring device monitors the generated temperature. The PID block generates the control output for e.g. a heater and sends the current SP as feedback to the SPG block. In this configuration, the ramp will be executed according to the time durations set. If the control loop is broken, the SPG block will reset to the last valid SP.
Block configuration: time driven ramp
Temperature transmitter
OUT
AI
Target Mode = Cas
SPG
BKCAL_IN
OUT
OUT
IN
PID
CAS_IN
BKCAL_IN
BKCAL_OUT
CAS_IN AO
BKCAL_OUT
Fig. 7-32: Links to be made for Setpoint Ramp Generator block for control strategy described above
The Setpoint ramp generator is configured for the strategy in Fig 7-32 as follows, whereby it is assumed that the ramp has the profile in Fig. 7-30:
Index/Parameter
START_VAL
DURATION
[1]
25
600
[2]
50
600
[3]
50
1200
[4]
100
600
[5]
100
600
[6]
25
–
Parameter
MODE_BLK.Target
OUT_RANGE.EU_100
OUT_RANGE.EU_0
OUT_RANGE.UNITS_INDEX
START_VAL.[1]
START_VAL.[2]
START_VAL.[3]
START_VAL.[4]
START_VAL.[5]
START_VAL.[6]
TIME_DURATION.[1]
TIME_DURATION.[2]
TIME_DURATION.[3]
TIME_DURATION.[4]
TIME_DURATION.[5]
TIME_UNITS
Action
Set the target mode of the block to Auto
Enter upper range limit for the input variables (HMI)
Enter lower range limit for input variables (HMI)
Enter unit of the input variables (HMI)
Enter the start values for each segment and the "end marker"
Enter the duration for each segment
(empty parameters are = 0 by default)
Display units for TIME_POSN and TIME_POSN_T
Option/Value
Auto e.g. 200 e.g. 0 e.g. °C
25
50
50
100
100
25 (end marker)
600
600
1200
600
600 seconds
148 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
Control strategy: temperature driven ramp
Fig. 7-33 shows a control strategy example for the temperature driven generation of a temperature ramp. This might be required, e.g. to ensure that a workpiece is held at a specific temperature for a minimum period of time, e.g. during annealing. The SPG block is connected a PID control block and provides its setpoint. The temperature measuring device monitors the generated temperature.
By selecting the CONTROL_OPTS option "Use PV as BKCAL_OUT", the SPG receives feedback on the current temperature. This is used to set tolerances on the setpoint, and to pause the timer if the temperature leaves the hold band, see Fig. 7-31. The current setpoint will be held until the temperature returns to the hold band. In order to be able to start the counter again when the ramp cycle is completed, the START_TYPE option "Cascade" is selected.
Note
• Temperature feedback may also be provided by a direct connection from an AI block to
BKCAL_IN , in which case, the START_TYPE option "Use Duration" or "Use Rate" must be selected. In this case, no CONTROL_OPTS options are required in the PID block
Block configuration: temperature driven ramp
Temperature transmitter
OUT
AI
Target Mode = Cas
CONTROL_OPS “Use PV as BKCAL_OUT”
START_TYPE
“Cascade”
SPG
OUT
BKCAL_IN
OUT
IN
PID
CAS_IN
BKCAL_IN
BKCAL_OUT
CAS_IN AO
BKCAL_OUT
Fig. 7-33: Links to be made for Setpoint Ramp Generator block for control strategy described above
The Setpoint Ramp Generator block is configured for the strategy in Fig 7-33 as follows:
Parameter
MODE_BLK.Target
OUT_RANGE.EU_100
OUT_RANGE.EU_0
OUT_RANGE.UNITS_INDEX
START_VAL.[1]
START_VAL.[2]
START_VAL.[3]
START_VAL.[4]
START_VAL.[5]
START_VAL.[6]
TIME_DURATION.[1]
TIME_DURATION.[2]
TIME_DURATION.[3]
TIME_DURATION.[4]
TIME_DURATION.[5]
TIME_UNITS
START_TYPE
BAL_TIME
ALARM_HYS
DV_HI_LIM
DV_LO_LIM
PID block
MODE_BLK.Target
CONTROL_OPTS
Action
Set the target mode of the block to Auto
Enter upper range limit for the input variables (HMI)
Enter lower range limit for input variables (HMI)
Enter unit of the input variables (HMI)
Enter the start values for each segment and the "end marker"
Enter the duration for each segment
(empty parameters are = 0 by default)
Display units for TIME_POSN and TIME_POSN_T
Determines the start value for a new rampo cycle
Sets time to balance the OUT value to the PRE_OUT value on cascade initialization
Alarm hysteresis in % of OUT_RANGE
Max. deviation between setpoint and measured value
Max. deviation between setpoint and measured value
Option/Value
Auto e.g. 200 e.g. 0 e.g. °C
25
50
50
100
100
25 (end marker)
600
600
1200
600
600 seconds
Cascade
60
1
2 (°C)
2 (°C
Set the target mode of the block to Cas
Select option
Cas
Use PV as
BKCAL_OUT
Endress+Hauser 149
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
Mode
Status
Block errors
7.9.3
Block operation
The block normally operates in Auto mode.
When MODE_BLK.Target
is set to Man, the block output can be manipulated on-line. The operator can write on the outputs STEP_POSN , TIME_POSN and TIME_POSN_T in order to select a particular point of the profile. When the block is switched back to Auto, the ramp will start from that point. The timer is restarted by activating the input START.
The operator can also write to OUT . As the adjusted value may correspond to more than one point on the profile or to none, if the operator adjusts a value beyond the profile limits, the OUT value goes from the last adjusted value to the point before mode switching following a ramp defined by
BAL_TIME . it is also possible to advance or return the time through the following operator commands
(OP_CMD_SPG):
• ADVANCE: sets the time to the beginning of the next step
• REPEAT: sets the time to the beginning of the current step
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
Operation can be checked on-line by viewing a number of parameters:
START
RESET_IN
PAUSE_CAUSE
SPG_STATE
STEP_POSN
TIME_POSN
TIME_POS_T
OUT
Value and status of start input signal
Value and status of reset input signal.
Reason for timer pause
Current state of the Sepoint Ramp Generator
Current position in ramp generator profile
Time elapsed since beginning of ramp step
Time elapsed since beginning of ramp cycle
Value and status of block output
When two inputs are in use, the worst status of the two is propagated to the output. The significance of the output status is indicated below.
OUT status
Good
Bad
Meaning
Normal operation as configured
• Block out of service
• One or both inputs have "Bad" or "Uncertain" status
Block errors are indicated in the BLOCK_ERR parameter
Condition
Out-of-Service
Block Configuration Error
Reason
• MODE_BLK.Target currently set to OOS
• START_TYPE parameter has an invalid value
Setpoint Ramp Generator block
7.9.4
Block parameters
Parameter
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
OUT
OUT_RANGE
GRANT_DENY
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
0
0
Description
See Chapter 2.3.4
Block mode, set MODE_BLK.Target to AUTO, CAS or RCAS
Block errors, see Chapter 6.1.9
Output value calculated as a result of executing the block.
Block output range and units for HMI
Access options, see Chapter 2.8.1
150 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
TIME_UNITS
BKCAL_IN
START
START_TYPE
PAUSE
PAUSE_CAUSE
AUTO_CYCLE
STEP_POSN
TIME_POSN
TIME_POS_T
OP_CMD_SPG
Parameter
STATUS_OPTS
START_VAL
TIME_DURATION
SPG_STATE
PRE_OUT
RESET_IN
BAL_TIME
OUTAGE_LIM
UPDATE_EVT
BLOCK_ALM
ALARM_SUM
ACK_OPTION
ALARM_HYS
DV_HI_PRI
DV_HI_LIM
DV_LO_PRI
DV_LO_LIM
DV_HI_ALM
DV_LO_ALM
Legend: RO = Read Only
Valid range/
Options
Default value
Description
Positive
0, 1
0
0
0
0
0
0 to 50 % 0.5%
0 to 15
0 to 15
0
+INF
0
-INF
Status options, see Chapter 2.8.4 and Chapter 6.1.9
Up to 11 values defining the start value of each time period
• If ten time periods are in use, an eleventh value must be entered as end marker
Up to 10 values defining the duration in seconds of each time period
• If less than ten time periods are in use, the "end value" must be paired with "0"
Display units for TIME_POSN and TIME_POSN_T
Feedback from BKCAL_OUT of a downstream block or OUT value of a Analog Input block
Value and status of start input, if connected
• In Man, a change from false to true starts the timer, provided it is READY
Initialization type for ramp start when BKCAL_IN connected
Value and status of pause input, if connected
Reason for current pause, see Chapter 7.9.1
When set, causes ramp to autmatically reset and start
Displays current position in ramp generator profile
• In Man, adjusts ramp generator to entered position
Displays time elapsed since beginning of step
• In Man, adjusts time to entered value
Displays time elapsed since beginning of ramp cycle
• In Man, adjusts time to entered value
Operator commands for setpoint ramp generator
• ADVANCE: advances to next step
• No action
• REPEAT: repeats current step
• RESET: resets setpoint ramp generator
Displays the current state of the Sepoint Ramp Generator
• READY: the ramp generator is initialized and waiting for the starting signal
• ACTIVE: the timer is running
• PAUSE: the PAUSE signal stopped the timer
• DONE: the setpoint generator has reached the last point of the ramp
Displays the OUT value resulting from block execution
Value and status of reset input, if connected
Time allowed to balance OUT changes as a result of a change from Auto, Cas or Rcas to Man
Not used
This alert is generated by any change to the static data.
Block alarms, see Chapter 2.9
Alarm summary, see Chapter 2.9
See Chapter 2.9
• 0: Auto ACK Disable
• 1: Auto ACK Enable
Alarm hysteresis in % of OUT_SCALE, see Chapter 2.9
Priority of the control deviation HI alarm, see Chapter 2.9
Setting of control deviation HI in engineering units
Priority of the control deviation LO alarm, see Chapter 2.9
Setting of control deviation LO in engineering units
Status of deviation HI alarm and its associated time stamp.
Status for deviation LO alarm and its associated time stamp.
Endress+Hauser 151
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
7.10 Enhanced Setpoint Ramp Generator
The Enhanced Setpoint Ramp Generator has all parameters of the SPG block, and an additional output parameter, OUT_1, that indicates the current step or segment of profile., see Fig. 7-34This is the same information as is carried by the parameter STEP_POSN , but value is transmitted in floating point format.
PAUSE
BKCAL_IN
START
RESET_IN
DV_HI_LIM
DV_LO_LIM
Compare
OP_CMD_SPG
PAUSE
Setpoint
Time
AUTOCYCLE
DURATION
START_VAL
START_TYPE
SETPOINT
Man
Man
Man
Man
Fig. 7-34: Schematic diagram of Enhanced Setpoint Ramp Generator block
OUT
STEP_POSN
TIME_POSN
TIME_POSN_T
OUT_1
Block parameters Parameter
OUT_1
Legend: RO = Read Only
Valid range/
Options
0–4
Default value
RO
Description
Displays current position in ramp generator profile in floating point format
• 0=None
• 1= Step1
• 2= Step2
• 3= Step 3
• 4= Step 4
152 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
7.11 Timer and Logic
The Timer and Logic function block provides logic combination and timing functions, see
Fig. 7-35, e.g.:
• Combine multiple inputs as OR, AND, vote, or EXACTLY count.
• Measure the duration of a combined discrete input signal
• Accumulate, until reset, the duration of a combined input signal
• Count changes of a combined discrete input signal
• Set a discrete output if the duration of a combined input signal exceeds a limit
• Extend, Delay, Pulse, or Debounce a combined input as an output
• Provide outputs indicating amount of time expired and amount of time remaining
• Selectively invert any connected discrete input or output
• Reset timer
Input combination
IN_D1
IN_D2
IN_D3
IN_D4
NV_5
Comb.
Logic
PV_D
TIMER_SP
TIMER_TYPE
QUIES_OPT
Timer
Processing
INV_5
Man
PRE_OUT_D
Auto
N_START
COMB_TYPE
RESET_IN
OUT_D
OUT_EXP
OUT_REM
Fig. 7-35: Schematic diagram of Timer and Logic block
7.11.1 Functional description
Depending upon the option set in COMB_TYPE , see table below, up to four inputs may be
• logically combined (AND, OR),
• voted (any 2 or more true, any 3 or more true),
• or counted (exactly 1 true, exactly 2 true, exactly 3 true, odd count or even count).
Connected inputs may have the values of true (1) or false (0). If a connected input is undefined, it is treated as "Bad" (Out-of service). Non-connected inputs (operator entries) may have the values of true (1) or false (0). If a non-connected input is undefined, it is ignored.
COMB_TYPE
OR
ANY2
ANY3
AND
EXACTLY1
EXACTLY2
EXACTLY3
EVEN
ODD
PV_D value true if one or more used inputs are true true if two or more used inputs are true true if three or more used inputs are true true if all used inputs are true true if exactly 1 used input is true true if exactly 2 used inputs are true true if exactly 3 used inputs are true true if exactly 0, 2 or 4 used inputs are true (OR non exclusive) true if exactly 1 or 3 used inputs are true (OR exclusive)
Endress+Hauser 153
7 Calculation and Logic Blocks
Timer Processing
Timer type
Guideline: FOUNDATION Fieldbus Function Blocks
The timer processing type is specified by TIMER_TYPE , see below. The timer may operate to produce a measurement, delay, extension, pulse (non-re-triggerable or re-triggerable) or debounce of the combined input signal.
TIMER_SP specifies the time duration of the delay, extension, pulse, debounce filter or comparison limit. The result of block execution is PRE_OUT_D which is made avaílable at OUT_D when the block is in Auto mode. OUT_EXP indicates the time elapsed and OUT_REM indicates the remaining time when TIME_TYPE option is measurement, comparison, delay, extension, debounce, or pulse.
QUIES_OPT allows the user to select the behavior for OUT_EXP and OUT_REM when the timer is quiescent-- that is, the timer is stopped, waiting to start. The following table indicates the definition of quiescent state for each option of TIMER_TYPE :
Definition of quiescent state start and end as a function of TIMER_TYPE
TIMER_TYPE Quiescence state starts when combined input
(PV_D):
Quiescence state ends when combined input
(PV_D):
MEASURE
ACCUM
COMPARE
DELAY returns to false
[QUIES_OPT does not apply] returns to false returns to false changes from false-to-true
[QUIES_OPT does not apply] changes from false-to-true changes from false-to-true
EXTEND
DEBOUNCE
PULSE
RT_PULSE returns to true has changed and timer has expired as returned to false and timer has expired has returned to false and timer has expired changes from true-to-false changes changes from false-to-true changes from false-to-true
QUIES_OPT has two options, CLEAR and LAST:
• CLEAR causes both OUT_EXP and OUT_REM to be set to zero during quiescence.
• LAST causes both OUT_EXP and OUT_REM to hold their last values when the block becomes quiescent. That is, the time expired and time remaining will remain available until the quiescence ends with the start of the next activation.
Note that a false-to-true transition on RESET_IN will also reset OUT_EXP and OUT_REM .
N_START is a count of the number of starts (false-to-true) transitions of the combined input,
PV_D , since the last false-to-true change seen on RESET_IN .
TIMER_TYPE may be one of the following, operating on the combined input signal:
TIMER_TYPE
MEASURE
ACCUM
COMPARE
DELAY
EXTEND
DEBOUNCE
PULSE
RT_PULSE
Quiescence state starts when combined input (PV_D):
Indicates the duration of the most recent true signal
Accumulates the durations of a true signal
Compares a true signal duration to specified duration
Delays a false-to-true transition, eliminating it if short
Extends a true-to-false transition, eliminating it if short
Delays any transition, eliminating it if short
Generates a true pulse on a false-to-true transition, non-retriggerable
Generates a true pulse on a false-to-true transition, retriggerable
154 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
MEASURE
7 Calculation and Logic Blocks
If TIMER_TYPE is MEASURE, PRE_OUT_D will be the same as the combined input, PV_D .
OUT_EXP indicates the length of time, in seconds, that the combined signal is true. OUT_REM is set to 0. Fig. 7-36 shows an example, whereby QUIES_OPT has been set to CLEAR. If
QUIES_OPT were set to LAST, OUT_EXT would accumlate and not return to zero, see
"ACCUM".
ACCUM true false
PV_D true false
PRE_OUT_D see note 1 see note 1
OUT_EXP
0
OUT_REM
0 see note 1
Note 1: Returns to zero if QUIES_OPT = CLEAR Time
Fig. 7-36: Timer example for TIMER_TYPE = MEASURE
If TIMER_TYPE is ACCUM, PRE_OUT_D will be the same as the combined input, PV_D .
OUT_EXP indicates the accumulated length of time, in seconds, that the combined signal has been true. Unlike TIMER_TYPE = MEASURE, it will not be automatically reset by the time of the next occurrence of a false-to-true change of PV_D . Instead, it will continue to accumulate "on" time or
"run" time until reset to 0 by a false-to-true change on RESET_IN . OUT_REM is unused (set to
0.0) for this timer type. QUIES_OPT is disabled for this option.
true false
PV_D true false
PRE_OUT_D
OUT_EXP
0
OUT_REM
0
Fig. 7-37: Timer example for TIMER_TYPE = ACCUM
Time
Endress+Hauser 155
7 Calculation and Logic Blocks
COMPARE
Guideline: FOUNDATION Fieldbus Function Blocks
If TIMER_TYPE is COMPARE, the block will measure the time since a false-to-true change on the combined input, PV_D . The current duration will be indicated by OUT_EXP . OUT_REM will indicate the time remaining between the current expired duration, OUT_EXP , and current limit,
TIMER_SP . If OUT_EXP does not exceed TIMER_SP , PRE_OUT_D will be set to false. If
OUT_EXP equals or exceeds TIMER_SP , PRE_OUT_D will be set to true and OUT_REM will be set to zero. When the combined input returns to false, either with or without exceeding the limits specified by TIMER_SP , OUT_D will be set to false. (Note that this type of behavior is the same as
TIMER_TYPE = DELAY. The difference is merely in the application perspective).
DELAY
156 true false
PV_D true false
PRE_OUT_D
TIMER_SP
OUT_EXP
0
TIMER_SP
OUT_REM
0 see note 1 see note 1 see note 1
Time
TIMER_SP
Note 1: Returns to zero if QUIES_OPT = CLEAR
TIMER_SP
Fig. 7-38: Timer example for TIMER_TYPE = COMPARE
If TIMER_TYPE is DELAY, a false-to-true change on the combined input, PV_D , will be delayed at the output, PRE_OUT_D , until the amount of time specified by TIMER_SP has been expired.
If the combined input returns to false before the time expires, the output will remain as false, concealing the input transitions. If the PRE_OUT_D output has been set to true because the time has expired, a true-to-false transition in the combined input will be presented to PRE_OUT_D immediately. [Note that this type of behavior is the same as TIMER_TYPE = COMPARE. The difference is merely in the application perspective.] true false
PV_D true false
PRE_OUT_D see note 1
TIMER_SP
OUT_EXP
0
TIMER_SP
OUT_REM
0 see note 1
TIMER_SP
Note 1: Returns to zero if QUIES_OPT = CLEAR
TIMER_SP
Time
Fig. 7-39: Timer example for TIMER_TYPE = DELAY
Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
EXTEND
DEBOUNCE
7 Calculation and Logic Blocks
If TIMER_TYPE is EXTEND, a true-to-false change on the combined input, PV_D , will be delayed at the output, PRE_OUT_D , until the amount of time specified by TIMER_SP has expired. If the combined input returns to true before the time expires, the output will remain as true, concealing the input transitions. If the PRE_OUT_D output has been set to false because the time has expired, a false-to-true transition in the combined input will be presented to PRE_OUT_D immediately.
true false
PV_D true false
PRE_OUT_D see note 1
TIMER_SP
OUT_EXP
0
TIMER_SP
OUT_REM
0 see note 1 see note 1
TIMER_SP
Note 1: Returns to zero if QUIES_OPT = CLEAR
TIMER_SP
Time
Fig. 7-40: Timer example for TIMER_TYPE = EXTEND
If TIMER_TYPE is DEBOUNCE, and if PRE_OUT_D is false, a false-to-true change on the combined input, PV_D , will be delayed at the output, PRE_OUT_D , until the amount of time specified by TIMER_SP has expired. If the combined input returns to false before the time expires, the output will remain as false, concealing the input transitions. If PRE_OUT_D is true, a true-tofalse change on the combined input, PV_D , will be delayed at the output, PRE_OUT_D , until the amount of time specified by TIMER_SP has expired. If the combined input returns to true before the time expires, the output will remain as true, concealing the input transitions. This both delays true initiations and extends true terminations, acting as a filter for intermittent state changes.
true false
PV_D true false
PRE_OUT_D
*see note 1
TIMER_SP
OUT_EXP
0
TIMER_SP
OUT_REM
0
* *
TIMER_SP
TIMER_SP
TIMER_SP
*Note 1: Returns to zero if QUIES_OPT = CLEAR
*
TIMER_SP
Time
*see note 1
TIMER_SP
Fig. 7-41: Timer example for TIMER_TYPE = DEBOUNCE
Endress+Hauser 157
7 Calculation and Logic Blocks
PULSE
RT_PULSE
Guideline: FOUNDATION Fieldbus Function Blocks
If TIMER_TYPE is PULSE, a false-to-true change on the combined input, PV_D , will initiate a true pulse at PRE_OUT_D whose duration is determined by the TIMER_SP value. At the end of the time duration, the output, will return to false. Further false-to-true transitions of the combined input while PRE_OUT_D is true will be ignored. true false
PV_D true false
PRE_OUT_D
*see note 1
TIMER_SP
OUT_EXP
0
TIMER_SP
OUT_REM
0
*see note 1
TIMER_SP
*Note 1: Returns to zero if QUIES_OPT = CLEAR
TIMER_SP
Time
Fig. 7-42: Timer example for TIMER_TYPE = PULSE
If TIMER_TYPE is RT_PULSE, (Re-Triggerable pulse type) a false-to-true change on the combined input, PV_D , will initiate a true pulse at PRE_OUT_D whose duration is determined by the
TIMER_SP value. At the end of that time duration PRE_OUT_D will return to false. If the combined input returns to false and presents a subsequent false-to-true transition while the timer is timing, the timer willl be reinitialized and PRE_OUT_D continues to be true.
true false
PV_D true false
PRE_OUT_D
TIMER_SP
OUT_EXP
0
TIMER_SP
OUT_REM
0
*see note 1
TIMER_SP
TIMER_SP
*Note 1: Returns to zero if QUIES_OPT = CLEAR
TIMER_SP
Time
*see note 1
Fig. 7-43: Timer example for TIMER_TYPE = RT_PULSE
158 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
Timer reset
Status propagation
Initialization Treatment
RESET_IN is a discrete input which, on a false-to-true transition, resets the timer. OUT_EXP output is set to 0, and then the timer follows processing described in "Initialization Treatment" for the values PRE_OUT_D and OUT_REM.
INVERT_OPTS allows the discrete input or output values to be inverted. Each input or output can be set individually.
The block checks the status of the inputs before processing them. The table below summarizes the status of OUT under various conditions. ..
STATUS_OPTS
–
–
Use Uncertain as Good
–
IN_Dx status
Good
Uncertain
Uncertain
Bad
OUT status
Good
Bad
Good
Bad
Remarks
Block executed
Block not executed, timer stops
Block executed
Block not executed, timer stops
When the outputs return to usable status, the timer returns to the measurement and the OUT_EXP and OUT_REM status is set to Uncertain while they are in quiescent state or a Reset occurs.
The following table summarizes the values of PRE_OUT_D, OUT_EXP and OUT_REM after the initial execution, as a function of TIMER_TYPE and the initial value of the combined input, PV_D:
TIMER_TYPE
MEASURE
MEASURE
ACCUM
ACCUM
COMPARE
COMPARE
DELAY
PV_D
False
True
False
True
False
True
False
PRE_OUT_D
False
True
False
True
False
False
False
OUT_EXP
0.0
0.0
0.0
0.0
TIMER_SP*
0.0
TIMER_SP*
OUT_REM
0.0
0.0
0.0
0.0
0.0
TIMER_SP*
0.0
DELAY
EXTEND
EXTEND
DEBOUNCE
DEBOUNCE
PULSE
PULSE
RT_PULSE
True
False
True
False
True
False
True
False
False
True
True
False
True
False
False
False
0.0
0.0
TIMER_SP*
TIMER_SP*
TIMER_SP*
0.0
TIMER_SP*
0.0
TIMER_SP*
TIMER_SP*
0.0
0.0
0.0
0.0
0.0
0.0
RT_PULSE True False TIMER_SP* 0.0
* Initialize to TIMER_SP value if QUIES_OPT = LAST, initialize to 0.0 if QUIES_OPT = CLEAR.
Active
Active
Inactive
Inactive
Inactive
Inactive
Inactive
Inactive
Inactive
Timer Status
Inactive
Inactive
Inactive
Inactive
Inactive
Active
Inactive
Endress+Hauser 159
7 Calculation and Logic Blocks
Control strategy: safety interlock
Block configuration: safety interlock
Control strategy: timed sequence
Block configuration: timed sequence
Guideline: FOUNDATION Fieldbus Function Blocks
7.11.2 Block configuration
Fig. 7-44 shows a control strategy example for the use of the TMR block as a safety interlock. A motor can be started manally only when a key switch in the controlroom is turned on and a local pushbutton is latched. The motor is to run as long as the button is latched. The inputs are connected to a relay input module and made available to the control strategy via a multiple digital input block.
The AND function of the timer block is used to check the true condition of both inputs and the
MEASURE function is used to give a defined signal to a multiple discrete output block, to which the motor is connected via a output relay module.
COMB_TYPE = AND
TIMER_TYPE = MEASURE
Key switch
Pushbutton
MDI
OUT_D1
OUT_D2
IN_D1
IN_D2
TMR
OUT_D
IN_D1 MDO
Motor
Fig. 7-44: Links to be made for Timer and Logic block for control strategy described above
The Timer and Logic block is configured for the strategy in Fig 7-44 as follows:
Parameter
MODE_BLK.Target
COMB_TYPE
TIMER_TYPE
Action
Set the target mode of the block to Auto
Logic to be used by block
Timer to be used by block
Option/Value
Auto
AND
MEASURE
Fig. 7-45 shows a control strategy example for the use of the TMR block for a timed output. One of two silos is used to feed solid material to a reactor filled with water. After feeding is completed, the mixture must be stirred for a period of fifteen minutes. The signals used to close the silo valves, fed in via a MDI block, are used to start the timer, the OR function to detect the closing of either valve.
The PULSE function ensures a motor signal of duration 15 minutes is generated.
Note
• In this application, the outputs OUT_EXP and OUT_REM provide an analog timer output that may be used, e.g. in a hybrid function block, to time logic sequences.
Valve 1
Valve 2
MDI
OUT_D1
OUT_D2
IN_D1
IN_D2
COMB_TYPE = OR
TIMER_TYPE = PULSE
TIMER_SP = 900 s
OUT_D
TMR
IN_D1 MDO
Stirrer
Fig. 7-45: Links to be made for Timer and Logic block for control strategy described above
The Timer and Logic block is configured for the strategy in Fig 7-44 as follows:
Parameter
MODE_BLK.Target
TIMER_SP
COMB_TYPE
TIMER_TYPE
Action
Set the target mode of the block to Auto
Option/Value
Auto
Length of pulse, in seconds, generated after detection of closed valve
900
Logic to be used by block
Timer to be used by block
OR
PULSE
160 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Mode
Status
Block errors
Timer block
Endress+Hauser
7 Calculation and Logic Blocks
7.11.3 Block operation
The block normally operates in Auto mode, whereby PRE_OUT_D is passed to the OUT_D output.
When MODE_BLK.Target
is set to Man, the block output can be manipulated on-line. The operator can write on the output OUT_D outputs. The calculations continue and can be read in
PRE_OUT_D .
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
Operation can be checked on-line by viewing a number of parameters:
IN_Dx
RESET_IN
PRE_OUT_D
OUT_D
OUT_EXP
OUT_REM
Value and status of discrete input signal 1 to 4
Value and status of reset input signal.
Result of block execution, irrespective of operating mode
Value and status of discrete output signal
Time expired sing timer started
Time remaining until timer stops
When two inputs are in use, the worst status of the two is propagated to the output. The significance of the output status is indicated below.
OUT status
Good
Bad
Meaning
• Normal operation as configured
• Block out of service
• One or more inputs have "Uncertain" status and STATUS_OPTS "Use Uncertain as Good" is not set
• One or more input have "Bad" status
Block errors are indicated in the BLOCK_ERR parameter
Condition
Out-of-Service
Block Configuration Error
Reason
• MODE_BLK.Target currently set to OOS
• TIME_UNITS or QUIES_OPT parameter has an invalid value
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
PV_D
OUT_D
TIMER_SP
PV_STATE
OUT_STATE
GRANT_DENY
INVERT_OPTS
STATUS_OPTS
IN_D1
IN_D2
7.11.4 Block parameters
Parameter Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
Description
See Chapter 2.3.4
0
0
0
0
0
0
Block mode, set MODE_BLK.Target to AUTO, CAS or RCAS
Block errors, see Chapter 6.1.9
Either the primary discrete value for use in executing the function, or a process value associated with it
Primary discrete value calculated as a result of executing the function
Time used by the TMR block to set the delay, extend, debouncing and processing the pulse time.
Index to the text describing the states of a discrete PV.
Index to the text describing the states of a discrete output.
Access options, see Chapter 2.8.1
Signal inversion options
Status options, see Chapter 2.8.4 and Chapter 6.1.9
Value and status of discrete input 1
Value and status of discrete input 2
161
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
Parameter
IN_D3
IN_D4
COMB_TYPE
TIMER_TYPE
PRE_OUT_D
N_START
OUT_EXP
OUT_REM
RESET_IN
QUIES_OPTS
TIME_UNITS
UPDATE_EVT
BLOCK_ALM
ALARM_SUM
Legend: RO = Read Only
Valid range/
Options
Default value
Description
Value and status of discrete input 3
Value and status of discrete input 4
Or Determines how the inputs IN_D[i] are combined
• AND
• OR
• ANY2
• ANY3
• EXACTLY1
• EXACTLY2
• EXACTLY3
• EVEN
• ODD
Measure Type of processing applied to PV_D to determine PRE_OUT_D.
• MEASURE
• ACCUM
• COMPARE
• DELAY
• EXTEND
• DEBOUNCE
• PULSE
• RT_PULSE
RO
RO
RO
RO
Combined and time-processed output of the timer block
Count of false-to-true transitions of the combined input, PV_D.
– Reset by false-to-true transition of RESET_IN.
Time expired.
– Stops when TIMER_SP is reached.
– Reset to zero (1) by RESET_IN, (2) at start of next timer event if QUIES_OPT = LAST, or (3) when block becomes quiescent if QUIES_OPT = CLEAR.
Time remaining if the timer is active.
– Stops when event ceases (block becomes quiescent).
– Reset to 0.0 if QUIES_OPT = CLEAR, and the timer is inactive.
Resets the timer
Behavior option for OUT_EXP and OUT_REM during quiescence.
• CLEAR resets them to zero.
• LAST causes last values to be held
Not used: This parameter has fixed unit: seconds
This alert is generated by any change to the static data.
Block alarms, see Chapter 2.9
Alarm summary, see Chapter 2.9
162 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
7.12 Lead-Lag
The Lead-Lag block provides dynamic compensation of an input signal, see Fig. 7-46. Its primary use is in feedforward control when the dynamic response of the manipulated variable differs significantly from that of a disturbance variable, e.g. as would be the case for flow and temperature measurement. Depending upon configuration, the block can function as a lead, lag, or both.
The block may also be used to implement some special initialization functions required by a control scheme.
IN
T
1 s + 1
G(s) =
T
2 s + 1
Man
Auto
OUT
LEAD_TIME LAG_TIME
FOLLOW
Fig. 7-46: Schematic diagram of Lead-Lag block
7.12.1 Functional description
The LEAD_TIME and LAG_TIME parameters are configured to obtain the desired input/output relationship.
• LAG_TIME specifies the time constant for the block. Based on a step change to the input this is the time to reach 63.2% of the final value. As a rule of thumb, it requires five time constants to reach the final value based on a first order function applied to the input.
• LEAD_TIME specifies the gain or impulse applied to the input parameter.
• FOLLOW causes the block to perform tracking functions.
When FOLLOW is true, it forces OUT to track IN .
The generalized form of the equation describing the action is as follows:
=
T
-------------------
T
2
Where: G(s) Gain
T
1
= Lead time constant
T
2
= Lag time constant
Endress+Hauser 163
7 Calculation and Logic Blocks
Application examples
Guideline: FOUNDATION Fieldbus Function Blocks
In the following applications, the initial input signal is IN = 10. This input receives a positive step change equal to 10% at a time of t = 5s. At t = 20s, the input receives a negative step change equal to 10%. Depending upon the lead lag settings, the action is as follows :
1) LEAD_TIME = 0 and LAG_TIME = 5
%
IN
OUT
20
10
63.2%
5 10 15 20 25 30 T (s)
Fig. 7-47: Example with Lead_TIME = 0 and LAG_TIME = 5
2) LEAD_TIME = 5 and LAG_TIME = 0
%
70
IN
Momentary peak (Gain = 5 x 10%)
OUT
20
10
–10
–40
5 10 15 20 25 30 T (s)
Momentary valley (Gain = 5 x –10%)
Fig. 7-48: Example with Lead_TIME = 5 and LAG_TIME = 0
164 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
3) LEAD_TIME = 5 and LAG_TIME = 10
%
7 Calculation and Logic Blocks
IN
OUT
20
10
63.2%
5 10 15 20 25 30 T (s)
Fig. 7-49: Example with Lead_TIME = 5 and LAG_TIME = 10
4) LEAD_TIME = 10, LAG_TIME = 5
%
IN
OUT
20
10
5 10 15 20 25 30 T (s)
Fig. 7-50: Example with Lead_TIME = 10 and LAG_TIME = 5
5) LEAD_TIME = 10, LAG_TIME = 5, FOLLOW = TRUE
%
Gain = 11/6 x 10% OUT
IN
20
10
Gain = 11/6 x –10%
5 10 15 20 25 30 T (s)
Fig. 7-51: Example with Lead_TIME = 10 and LAG_TIME = 5, FOLLOW = TRUE
Endress+Hauser 165
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
Control strategy: feedforward with lead/lag
7.12.2 Block configuration
Fig. 7-52 shows an example for feedforward control. The temperature of product leaving a reactor vessel is controlled using a temperature measurement to manipulate the control valve in the heating stream. The temperature of the feed is a disturbance variable, which is fed forward to the control loop. Lead/lag is used to compensate for a change in feed temperature.
Feed
TT
100
Product
TT
101
CV
103
TCV
102
Feedforward
Heating stream
Fig. 7-52: Feedforward control application for product temperature
Fig. 7-53 shows the control strategy together with the links that must be made for the application shown in Fig. 7-52.
TT100
AI
TT101
AI
OUT
IN
OUT
OUT
LL
FF_VAL
IN
BKCAL_IN
PID
OUT CAS_IN
TCV102
AO
OUT
BKCAL_OUT
CV103
Block configuration: safety interlock
Fig. 7-53: Links to be made for Lead/Lag block for control strategy described above
The Lead/Lag block is configured for the strategy in Fig 7-53 as follows:
Parameter
MODE_BLK.Target
LAG_TIME
LEAD_TIME
BAL_TIME
Action
Set the target mode of the block to Auto
Lag time constant for the block
Lead time constant for the block
Time in seconds allowed to balance OUT changes as a result of a change from Auto to Man
Option/Value
Auto e.g. 5 e.g.10
10 (s)
Note
• The values for LAG_TIME and LEAD_TIME in the table should not be taken as being realistic for the application above. The user must determine these by calculating the dynamic compensation and tune them be observing the effects on the loop.
166 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Mode
Status
Block errors
Lead-Lag block
7 Calculation and Logic Blocks
7.12.3 Block operation
The block normally operates in Auto mode.
When MODE_BLK.Target
is set to Man, the block output OUT can be manipulated on-line. If the
BAL_TIME parameter is not configured (=0), the transition from the written value (Man) to the calculated value (Auto) will be done with bump. A bumpless transfer can be made by entering an appropriate value, in seconds, in BAL_TIME .
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
Operation can be checked on-line by viewing a number of parameters:
IN
OUT
Value and status of analog input signal
Value and status of output signal
The significance of the output status is indicated below.
OUT status
Good
Uncertain
Bad
Meaning
• Normal operation as configured
• Input has "Uncertain" status and STATUS_OPTS "Use Uncertian as Good" is not set
• Block in Man and STATUS_OPTS "Uncertain if Man" set
• Block out of service
• Inputs has "Bad" status
Block errors are indicated in the BLOCK_ERR parameter
Condition
Out-of-Service
Reason
• MODE_BLK.Target currently set to OOS
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
OUT
OUT_RANGE
GRANT_DENY
STATUS_OPTS
IN
FOLLOW
LAG_TIME
7.12.4 Block parameters
Parameter
LEAD_TIME
BAL_TIME
OUTAGE_LIM
UPDATE_EVT
BLOCK_ALM
Legend: RO = Read Only
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
Positive
0
0
Description
See Chapter 2.3.4
Block mode, set MODE_BLK.Target to AUTO, CAS or RCAS
Block errors, see Chapter 6.1.9
Primary analog value calculated as a result of executing the function
Output range and units for HMI application
Access options, see Chapter 2.8.1
Status options, see Chapter 2.8.4 and Chapter 6.1.9
Value and status of analog input
Or Tracking input
• TRUE causes OUT to follow IN
Measure Specifies the lag time constant for the block.
– Based on a step change to the input this is the time to reach
63.2% of the final value.
RO
0
Specifies the lead time constant for the block.
Time in seconds allowed to balance OUT changes as a result of a change from Auto to Man
Not used
This alert is generated by any change to the static data.
Block alarms, see Chapter 2.9
Endress+Hauser 167
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
7.13 Output Signal Selector and Dynamic Limiter
The OSDL block, see Fig. 7-54, can be used as either an output signal selector or dynamic limiter.
• As output selector, the cascade input may be routed to one of two outputs
• As dynamic limiter, the cascade input is transferred to both outputs, but is limited by the secondary input multiplied by a gain and a bias.
It is a customized block that is extremely useful for combustion control applications with double cross limits.
Output Signal Selector
CAS_IN
OP_SELECT
IN
SETPOINT
OPERATOR ENTRY
HI_GAIN
HI_BIAS
LO_GAIN
LO_BIAS
SP
NOT_SEL_VAL NOT_SEL_VAL_1
OUT_TYPE
OUTPUT
SELECTOR
ALGORITHM
OSDL_OPTS
OUTPUT SELECTOR TYPE
GAIN
DYNAMIC
LIMITER
ALGORITHM
GAIN_1
IN_1
BKCAL_IN
BKCAL_IN_1
BACK
CALCULATING
BKCAL_OUT
OUT
OUT_1
Fig. 7-54: Schematic diagram of Output Signal Selector and Dynamic Limiter block
7.13.1 Functional description
The output signal selector and dynamic limiter block provides two different algorithms which are selected through the OSDL_TYPE parameter.
• As Output Selector the cascade input may be routed for one of two outputs based on the value of the OP_SELECT input parameter. The output not selected may be treated in two ways: it retains the last value when not selected or receives a internal value.
• As Dynamic Limiter the cascade input is transferred to both outputs, but it is limited by the secondary inputs multiplied by a gain and offset by a bias.
When the "Output Selector" option is selected in OSDL_TYPE , the setpoint value SP may be entered by an operator (Auto mode) or provided by a another function block through the CAS_IN parameter (Cas mode). The inputs IN and IN_1 are not used in this algorithm and their value and status is ignored.
OP_SELECT is a discrete input parameter that selects one of two outputs to receive the SP value:
• If OP_SELECT = "0", SP is passed on to the output OUT .
• If OP_SELECT = "1", SP is passed on to the output OUT_1 .
If the OP_SELECT status is not usable, the block changes to Auto, but the algorithm goes on working with the unusable value. Normally, SP is transferred to the selected output no matter what status it has. Therefore, an unusable value and status in the CAS_IN will be reflected to the selected output. The status of upper cascade initialization, however, is not copied to the selected output.
The non-selected output is handled in one of two ways. By default, the values contained in
NOT_SEL_VAL or NOT_SEL_VAL_1 are transferred to the outputs OUT and OUT_1 respectively. If the option “Keep last value if not selected” is selected in OSDL_OPTS , however, the non-selected output will retain the last value.
168 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
OS status propagation
Dynamic Limiter
DL status propagation
Endress+Hauser
7 Calculation and Logic Blocks
Normally, the status of CAS_IN is propagated to the selected output. The status of the non-selected output is always "Uncertain" indicating to the downstream block that it is currently not selected.
The STATUS_OPTS parameter in the downstream block must be configured to deal with it.
If the block is in "Cas" mode and the input is "Bad" the block will be forced to "Auto" mode unless one of the IFS options in OSDL_OPTS has been set:
OSDL_OPS
Uncertain as Good
IFS if Bad CAS_IN
IFS only for selected value
Input status
Uncertain
Bad
Bad
Output status Remarks
Good Uncertain input status is treated as "Good"
Good IFS
Good IFS
IFS propagated to both outputs
IFS propagated to selected output only
By default, the status "GoodCascade, IFS" is propagated to both outputs when "IFS if Bad CAS_IN" is selected. If the “IFS only for selected output” option is selected in OSDL_OPTS , however, the fault state status will be propagated to selected output only.
If the downstream block of the selected output is not operating in cascade mode, the OSDL block will go to "Iman" mode and the status of BKCAL_OUT will change to "GoodCascade, Not Invited".
This forces the upstream block into "Iman" mode as well. The OSDL ignores the status of the downstream block connected to the non-selected output.
When the "Dynamic Limiter" option is selected in OSDL_TYPE , the outputs are the value of the
CAS_IN parameter limited by the following values:
• OUT :
High limit = HI_GAIN_1 * IN_1 + HI_BIAS_1
Low limit = LO_GAIN_1 * IN_1 - LO_BIAS_1
• OUT_1 :
High limit = HI_GAIN * IN + HI_BIAS
Low limit = LO_GAIN * IN - LO_BIAS
After limitation, the parameters GAIN and GAIN_1 are applied as gain to the outputs OUT and
OUT_1 respectively.
The normal mode of operation for the OSDL block as well the two downstream blocks is "Cas". If an input is "Bad" the block will be forced to "Auto" mode unless the IFS options in OSDL_OPTS have been set (multiple choices allowed).
OSDL_OPS
Uncertain as Good
IFS if Bad CAS_IN
IFS if Bad IN
IFS if Bad IN_1
Input status
Uncertain
Bad
Bad
Bad
Output status Remarks
Good Uncertain input status is treated as "Good"
Good IFS
Good IFS
Good IFS
IFS propagated to both outputs
IFS propagated to both outputs
IFS propagated to both outputs
The setpoint value SP is returned to the upper block through BKCAL_OUT by default. One of two alternatives can also be set in OSDL_OPTS :
OSDL_OPS
Use OUT for BKCAL_OUT
Remarks
The OUT value is returned to the upper block
Use OUT_1 for BKCAL_OUT The OUT_1 value is returned to the upper block
If one downstream block is not in cascade mode, indicated by not invited status (NI) on its
BKCAL_OUT , the OSDL block still continues in cascade mode. Only if both downstream blocks are not in cascade, does the block change to "Iman" mode. Its BKCAL_OUT output then changes to Not Invited (NI).
If the OSDL block is in "Iman" mode and the cascade is initialized with a Initialization Request (IR) by a downstream block, Initialization Acknowledge (IA) is transmitted to the downstream block via the appropriate output ( OUT or OUT_1 ). depending on the path initializing, the value BKCAL_IN or BKCAL_IN_1 is then passed on to BKCAL_OUT . The OSDL block remains in "Iman" mode until the downstream cascade is initialized. At this point OSDL block goes to "Auto" mode and sends an Initialization Request to the upstream block to initialize the cascade.
169
7 Calculation and Logic Blocks
Output Selector
Guideline: FOUNDATION Fieldbus Function Blocks
After a downstream cascade initialization, the corresponding output must ramp from the last
BKCAL_IN value to the calculated value in BAL_TIME seconds. The required actions as a dynamic limiter algorithm are summarized in the following table:
Mode Target/Actual BKCAL_IN
Cas/Iman NI or IR
Cas/Cas
Cas/Cas
NI or IR
OK
BKCAL_IN1
NI or IR
OK
NI or IR
BKCAL_OUT Action
NI
OK
OK
BKCAL_OUT receives the CAS_IN value
BKCAL_OUT receives the CAS_IN value
Cas/Cas OK OK OK BKCAL_OUT receives the CAS_IN value
Legend: NI = .Not Invited, IR = Initialization Request, OK = Working in Cascade
7.13.2 Block configuration
Fig. 7-55 shows an application for the use of the OSDL block as an output selector. The application requires an equal percentage valve with a rangeability considerably in excess of that available with a standard control valve. To achieve this, two valves are chosen, a smaller one which has a Cv range of 2 to 60 and a large one with a Cv range of 20 to 500. Calculations show that the small valve should operate in the range 0% to 60% and the large valve in the range 40% to 100%.
At any value of the controller output only one valve should be open. As the controller output rises from 0%, the smaller value should open until just below 60%. At this point the large valve should open to approximately 33% and the smaller one close. As the controller output falls from 100%, the small valve should be closed and large valve should gradually close until the controller output is just above 40%. At this point the small valve opens to approx. 66% and the large valve closes.
FT
100
FC
101
CV
103
SMALL VALVE
LARGE VALVE
CV
104
1000
Only one valve open in this range
500
100
60
20
10
Operating range of small valve
Operating range of large valve
1
0
2
20 40 60
PID output %
80 100
Fig. 7-55: Increasing valve rangeability
This strategy is implemented using the OSDL Block as shown in Fig. 7-56. The valves CV103 and
CV104 are controlled by the flow rate measured at FT100 and the PID block. The AALM block monitors the output of the PID block against a HI limit of 60%. If the output value exceeds 60%, the OUT_D digital signal changes from false = "0" to true = "1". OP_SELECT follows, switching the control from AO_1 to AO_2, causing the small valve to close and the large valve to open.
If the ALARM_HYS parameter in the AALM block is set to 20%, OUT_D will remain true until the output falls below 60% - 20% = 40%. At this point the large valve closes and the small valve opens.
170 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
FT100
OUT
AI
PID
IN
OUT
FCV101
BKCAL_IN
Small valve
CAS_IN
BKCAL_OUT
AO_1
CV103
OUT
AALM
OUT
CAS_IN
OUT_D
OP_SELECT
OSDL
OUT_1
BKCAL_IN
BKCAL_IN_1
CV104
BKCAL_OUT
BKCAL_OUT
CAS_IN
AO_2
Large valve
Block configuration: output selector
Fig. 7-56: Links to be made for Output Selector and Dynamic Limiter block for control strategy described above
The AALM, ODSL and AO blocks are configured for the strategy in Fig 7-56 as follows:
Parameter Action Option/
Value
AALM block
MODE_BLK.Target
OUT_RANGE.EU_100
OUT_RANGE.EU_0
OUT_RANGE.UNITS_INDEX
PV_FTIME
ALARM_HYS
HI_LIM
ODSL block
MODE_BLK.Target
OUT_TYPE
OSDL_OPTS
BAL_TIME
Set the target mode of the block to Auto
Enter upper range limit for the input variables (HMI)
Enter lower range limit for input variables (HMI)
Enter unit of the input variables (HMI)
Auto e.g. 100 e.g. 0 e.g. %
Enter time constant in seconds for 1st. order damping e.g. 3
Enter alarm hysteresis in % of OUT_RANGE e.g. 20
Enter limit of HI alarm in engineering units e.g. 60
Set the target mode of the block to Auto
Mode in which the block operates
If required, block options for IFS,
Time in seconds allowed to balance OUT changes as a result of a change from Cas or Auto to Man
Value of OUT when not selected (= valve closed)
Value of OUT_1 when not selected (= valve closed)
Cas
Output Selector
IFS if Bad CAS_IN
10 (s)
NOT_VAL_SEL
NOT_VAL_SEL_1
AO blocks
MODE_BLK.Target
PV_SCALE.EU_100
PV_SCALE.EU_0
PV_SCALE.UNITS_INDEX
XD_SCALE.EU_100
XD_SCALE.EU_0
XD_SCALE.UNITS_INDEX
CHANNEL
Set the target mode of the block to Cas
Set PID output value equivalent to 100% valve travel
Set PID output value equivalent to 0% valve travel
Set units to %
Set transducer value equivalent to 100% valve travel
Set transducer value equivalent to 0% valve travel
Set units to %
Enter transducer channel number connected to block
0
%
1
60
0
%
100
0
0
AO_1
Cas
0
%
%
100
1
AO_2
Cas
100
40
Endress+Hauser 171
7 Calculation and Logic Blocks
Dynamic Limiter
Guideline: FOUNDATION Fieldbus Function Blocks
Fig. 7-57 shows an application for the use of the OSDL block as a dynamic limiter. The control strategy is designed to keep the air-fuel ratio to a furnace burner strictly within predetermined limits.
A sudden change in load would require a corresponding change in air and fuel.
The master controller supplies setpoint values to the air and fuel flow controllers while it is stabilized. During a transition, the air flow determines the maximum upper and lower limits that the fuel flow cannot exceed. The same occurs for the air flow, whose limits are fixed by those of the fuel flow. In this way, even when there is a large shift in the master signal, the air/fuel ratio is maintained very close to the desired value. The “double cross limits” prevent that the fastest variable unbalances the desired ratio.
OIL
AIR
FT
100
TC
106
TT
105
CV
103
FT
101
CV
104
Furnace
Fig. 7-57: Double cross limits control of a furnace burner
This strategy is implemented using the OSDL Block as shown in Fig. 7-58. This generates the setpoint for the air and fuel controllers based on:
• the output of the master controller,
• air flow (Qa –> IN parameter)
• and fuel flow (Qc –> IN_1 parameter).
This configuration allows the:
• air flow setpoint to vary between (Qc-LO_BIAS) and (Qc+HI_BIAS)
• fuel flow setpoint to vary just between (Qa-LO_BIAS_1) and (Qa+HI_BIAS_1).
When the double crossed limit is interferred, an unexpected change in the consumption upsets the desired ratio. Similarly when there is a transient in the master signal of the air/fuel flow, the block it is able to maintain a value very close to the desired ratio.
172 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Block configuration: dynamic limiter
7 Calculation and Logic Blocks
AI_1
FT100 (Air flow)
AI_2
TT105
OUT
OUT
AI_3
OUT
FT101 (Oil Flow)
CAS_IN
IN
BKCAL_IN
PID_1
BKCAL_OUT
OUT
CAS_IN
BKCAL_OUT
AO_1
FCV107 CV103 (Air valve)
IN
PID_2
TC106
IN OUT
OUT
CAS_IN
BKCAL_OUT
BKCAL_IN
IN_1
OSDL
OUT_1
BKCAL_IN
BKCAL_IN_1
CAS_IN
FCV108 CV104 (Oil valve)
IN
PID_3
BKCAL_OUT
OUT
CAS_IN
AO_2
BKCAL_OUT
BKCAL_IN
Fig. 7-58: Links to be made for Output Selector and Dynamic Limiter block for control strategy described above
The ODSL block is configured for the strategy in Fig 7-58 as follows:
Parameter
MODE_BLK.Target
OUT_TYPE
OSDL_OPTS
HI_GAIN
HI_BIAS
LO_GAIN
LO_BIAS
HI_GAIN_1
HI_BIAS_1
LO_GAIN_1
LO_BIAS_1
GAIN
GAIN_1
BAL_TIME
Action
Set the target mode of the block to Cas
Mode in which the block operates
If required, block options for IFS,
Gain on OUT_1 high limit
Bias on OUT_1 high limit
Gain on OUT_1 low limit
Bias on OUT_1 low limit
Gain on OUT high limit
Bias on OUT high limit
Gain on OUT low limit
Bias on OUT low limit
Gain on OUT value
Gain on OUT_1 value
Time in seconds allowed to balance OUT changes as a result of a change from Cas or Auto to Man
1
2%
1
5%
1
5%
1
2%
Option/Value
Cas
Dynamic Limiter
IFS if Bad CAS_IN
IFS if Bad IN
IFS if Bad IN_1
1
1
10 (s)
Endress+Hauser 173
7 Calculation and Logic Blocks
Mode
Status
Block errors
Guideline: FOUNDATION Fieldbus Function Blocks
7.13.3 Block operation
The block normally operates in "Cas" mode.
When the "Output Selector" option is selected in OSDL_TYPE the block may also operate in "Auto" mode. In this case the operator must set MODE_BLK.Target
to "Auto" and enter a setpoint SP .
The setpoint can be changed during operatioin without changing the block mode to OOS.
When MODE_BLK.Target
is set to "Man", the block outputs OUT and OUT_1 can be manipulated. If the BAL_TIME parameter is not configured (=0), the transition from the written value (Man) to SP (Auto) or CAS_IN value (Cas) will be done with bump. A bumpless transfer can be made by entering an appropriate value, in seconds, in BAL_TIME .
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
Operation can be checked on-line by viewing a number of parameters:
CAS_IN
SP
IN
IN_1
OUT
OUT_1
Value and status of setpoint supplied by upstream block
Value and status of operator entered setpoint
Value and status of analog input signal
Value and status of analog input signal 1
Value and status of output signal
Value and status of output signal 1
The significance of the output status is indicated below.
OUT/OUT_1 status
Good
Uncertain
Bad
Meaning
• Normal operation as configured
• Uncertain input but OSDL_OPTS "Uncertain as Good" set
• Bad input but IFS options set
• Block operating normally as Output Selector, but output currently not selected
• Block out of service
• One or more inputs has "Bad" status and IFS not set (block goes to Auto)
Block errors are indicated in the BLOCK_ERR parameter
Condition
Out-of-Service
Block configuration error
Reason
• MODE_BLK.Target currently set to OOS
• OUT_TYPE has an invalid value
174 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Output Selector and
Dynamic Limiter block
7 Calculation and Logic Blocks
7.13.4 Block parameters
Parameter
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
CAS_IN
SP
IN
IN_1
OP_SELECT
OUT
OUT_1
GRANT_DENY
OSDL_TYPE
OSDL_OPTS
HI_GAIN
HI_BIAS
LO_GAIN
LO_BIAS
HI_GAIN_1
HI_BIAS_1
LO_GAIN_1
LO_BIAS_1
GAIN
GAIN_1
BKCAL_IN
BKCAL_IN_1
BKCAL_OUT
BAL_TIME
NOT_SEL_VAL
NOT_SEL_VAL_1
UPDATE_EVT
BLOCK_ALM
Legend: RO = Read Only
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
RO
Description
See Chapter 2.3.4
0 - 4
Positive
Positive
Positive
Positive
Positive
0
0
0
0
1.1
0
0.9
0
1.1
0
0.9
1
1
0
Block mode, set MODE_BLK.Target to AUTO, CAS or RCAS
Block errors, see Chapter 6.1.9
Setpoint used by block on CAS mode
Setpoint used by the block in AUTO mode
Primary input value of the block
Secondary input value of block
Operator adjustable parameter to force a given input to be used
Primary output value as a result of executing the block
Secondary output value as a result of executing the block
Access options, see Chapter 2.8.1
Algorithm to be used by the block
• Invalid value (default)
• Output Selector
• Dynamic Limiter
Status options for block, see also Chapter 2.8.4
Gain used for high limit of OUT_1 (Dynamic Limiter)
Bias used for high limit of OUT_1 (Dynamic Limiter)
Gain used for low limit of OUT_1 (Dynamic Limiter)
Bias used for low limit of OUT_1 (Dynamic Limiter)
Gain used for high limit of OUT (Dynamic Limiter)
Bias used for high limit of OUT (Dynamic Limiter)
Gain used for low limit of OUT (Dynamic Limiter)
Bias used for low limit of OUT (Dynamic Limiter)
Gain applied to OUT after limiting (Dynamic Limiter)
Gain applied to OUT after limiting (Dynamic Limiter)
Feedback from BKCAL_OUT of a downstream block
Feedback from BKCAL_OUT of a downstream block
Feedback for BKCAL_IN of an upstream block.
Time allowed to balance OUT changes as a result of a change from Auto, Cas or Rcas to Man
Value of OUT when not selected (Output Selector)
Value of OUT_1 when not selected (Output Selector)
This alert is generated by any change to the static data.
Block alarms, see Chapter 2.9
Endress+Hauser 175
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
7.14 Constant
The Constant block generates constant values for use as inputs parameters to other blocks, see Fig
7-59. Each Constant block allows up to six analog values (floating point) and two discrete values
(0, 1) to be simulated.
CT_VAL_1
CT_VAL_2
CT_VAL_3
CT_VAL_4
CT_VAL_5
CT_VAL_6
CT_VAL_D1
CT_VAL_D2
MANUAL
AUTO
MANUAL
AUTO
MANUAL
AUTO
MANUAL
AUTO
MANUAL
AUTO
MANUAL
AUTO
MANUAL
AUTO
MANUAL
AUTO
MODE
Fig. 7-59: Schematic diagram of Constant block
7.14.1 Functional description
The Constant block allows the entry of
• up to six analogue values in CT_VAL_1 to CT_VAL_6
• as well as two discrete values in CT_VAL_D1 and CT_VAL_D2 .
The inputs are connected to the
• outputs OUT_1 to OUT_6
• and OUT_D1 and OUT_D2 respectively.
The outputs are connected to other downstream blocks as required.
OUT_1
OUT_2
OUT_3
OUT_4
OUT_5
OUT_6
OUT_D1
OUT_D2
7.14.2 Block configuration
The constant block may be used for a number of purposes, e.g. for providing setpoints and tracking values to PID Control or Analog Alarm blocks. Fig. 7-23 in Chapter 7.6.2 shows an example of its use in a simple temperature control application. Similarly, it may be used to supply a digital switching signal, e.g. to stop or control the execution of a a variety of function blocks.
The block is configured by simply entering the desired value into one of the constant parameters, e.g. for a setpoint temperature of 300°C at OUT_1 and a discrete signal "1" at OUT_D1 the following entries are made. Default value for unconfigured inputs is "0":
Parameter
MODE BLOCK/TARGET
CT_VAL_1
CT_VAL_D1
Function
Normal operating mode of block
Value to be output as OUT_1 by the constant block
Value to be output as OUT_D1 by the constant block
Value
Auto
300
1
176 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Mode
Status
Block errors
Constant block
7 Calculation and Logic Blocks
7.14.3 Block operation
The block normally operates in "Auto" mode.
When MODE_BLK.Target
is set to "Man", the block outputs OUT_1 to OUT_6 as well as
OUT_D1 and OUT_D2 can be manipulated.
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
Operation can be checked on-line by viewing a number of parameters:
OUT_1 to OUT_6
OUT_D1, OUT_D2
Value and status of corresponding analog output signal
Value and status of corresponding discrete signal
The significance of the output status is indicated below.
OUT/OUT_1 status
Good
Bad
Meaning
• Normal operation as configured
• Block out of service
Block errors are indicated in the BLOCK_ERR parameter
Condition
Out-of-Service
Reason
• MODE_BLK.Target currently set to OOS
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
OUT_1
OUT_2
OUT_3
OUT_4
OUT_5
OUT_6
OUT_D1
OUT_D2
CT_VAL_1
CT_VAL_2
CT_VAL_3
CT_VAL_4
CT_VAL_5
CT_VAL_6
CT_VAL_D1
CT_VAL_D2
UPDATE_EVT
BLOCK_ALM
Legend: RO = Read Only
7.14.4 Block parameters
Parameter Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
Description
See Chapter 2.3.4
0
0
0
0
0
0
0
0
Block mode, set MODE_BLK.Target to AUTO, CAS or RCAS
Block errors, see Chapter 6.1.9
Output value generated from CT_VAL_1
Output value generated from CT_VAL_2
Output value generated from CT_VAL_3
Output value generated from CT_VAL_4
Output value generated from CT_VAL_5
Output value generated from CT_VAL_6
Output value generated from CT_VAL_D1
Output value generated from CT_VAL_D2
Constant value connected to OUT_1
Constant value connected to OUT_2
Constant value connected to OUT_3
Constant value connected to OUT_4
Constant value connected to OUT_5
Constant value connected to OUT_6
Constant value connected to OUT_D1
Constant value connected to OUT_D2
This alert is generated by any change to the static data.
Block alarms, see Chapter 2.9
Endress+Hauser 177
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
7.15 Constant and Contained RW
The Constant and Contained Read/Write block is a custom block with two functions:
• generating constant values to use as inputs parameters to other blocks. In this case, it has exactly the same function as the constant block, see Chapter 7.14.
• reading from or writing to contained parameters of blocks being executed within the device from which it originates.
Constant generator
Contained Read/Write
IN_1
DISABLE_1
IN_2
DISABLE_2
IN_D1
DISABLE_D1
IN_D2
DISABLE_D2
CONSTANT
VALUE &
STATUS
CONTAINED
PARAMETER
LOC_OUT
LOC_OUT_D
Fig. 7-60: Schematic diagram of Constant and Contained RW block
OUT_1
OUT_2
OUT_3
OUT_4
OUT_5
OUT_6
OUT_D1
OUT_D2
OUT_D3
OUT_D4
OUT_D5
OUT_D6
7.15.1 Functional description
The Constant block allows the entry of
• up to four analogue values in CT_VAL_1 to CT_VAL_4
• as well as up to four discrete values in CT_VAL_D1 to CT_VAL_D4 .
The inputs are connected to the
• outputs OUT_1 to OUT_4
• and OUT_D1 to OUT_D4 respectively.
The outputs are connected to other downstream blocks as required.
If the outputs OUT_5 , OUT_6 , OUT_D5 and OUT_D6 are not configured for read/write operation, they are also linked to the values in CT_VAL_5 , CT_VAL_6 , CT_VAL_D5 and
CT_VAL_D6 .
Contained parameters of other blocks can be overwritten or read when the block is in Auto mode.
The contained parameter is addressed through the LOC_xxx parameter which comprises the elements below (index and subindex can be read from the Offline Characterization window):
Element name
BLOCK_TAG_xxx
INDEX_:RELATIVE_xxx
SUB_INDEX_xxx
Data type
VisibleString (32)
Unsigned16
Unsigned8
2
1
Size Description
32 Tag of the block containing the contained parameter
(case sensitive!)
Relative index of contained parameter (= offset)
Subindex of structured parameter, counted from 1.
• Simple parameters: no entry is required
• Structured parameters: number of structure element
• Bitstrings: byte of the parameter to be considered.
For example, to address IN_1 , the parameters BLOCK_TAG_IN1 , INDEX_RELATIVE_IN1 and for a structured parameter or bit string SUB_INDEX_IN1 must be configured.
178 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
The input/output is considered to be not configured when:
• the parameter BLOCK_TAG_xxx is blank or
• INDEX_RELATIVE_xxx and SUB_INDEX_xxx are equal to zero.
In this case, the constant value CT_VAL_xxx is routed to the corresponding output.
If there is a configuration error in the contained parameter, the correspondent bit of the input/ output in CONFIG_STATUS will be set and the BLOCK_ERR will indicate “Configuration Error”.
Reading or writing is not supported in all parameter types. The table below summarizes the operations supported by the block:
Parameter
Input/Output
IN_1,
IN_2
IN_D1,
IN_D2
OUT_5,
OUT_6
OUT_D5,
OUT_D6
Data type
Float
Unsigned8
Float
Unsigned8*
Direction
From
IN_1,
IN_2
IN_D1,
IN_D2
Block parameter
Block parameter
To
Any other block parameter
Any other block parameter
OUT_5,
OUT_6
OUT_D5,
OUT_D6
Data type of contained parameter
Note 1: For data types with "*" the block cuts the values out of the range of the correspondent type:
• Unsigned8/Bitstring: 0 to 255
• Integer8:
• Boolean:
-127 to +127
0 or 1
• Unsigned16:
• Integer16:
0 to 65535
-32767 to +32767
Note 2: For the BitString type, the Subindex identifies the correspondent Byte.
Note 3: The reading or writing in contained parameters are not supported in the same block Constant.
Boolean
Float
Integer8
Integer16
Integer32
Unsigned8
Unsigned16
Unsigned32
Bitstring
Boolean
Float
Integer8
Integer16
Integer32
Unsigned8
Unsigned16
Unsigned32
Bitstring
Boolean*
Float
Integer8*
Integer16*
Integer32
Unsigned8*
Unsigned16*
Unsigned32
Bitstring*
Boolean
Float
Integer8
Integer16
Integer32
Unsigned8
Unsigned16
Unsigned32
Bitstring*
Endress+Hauser 179
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
Writing to contained parameters
Reading from contained parameters
Constant generator
When the block is in Auto mode, the value of the IN_xx parameter is written into the contained parameter addressed by the LOC_xxx parameters according to the following table:
Parameter Value
IN_x >DEAD_BAND_x or
< DEAD_BAND_x
IN_x,
IN_x
>DEAD_BAND_x or
< DEAD_BAND_x
–
IN_x
IN_Dx
IN_Dx,
IN_Dx
IN_Dx
Status
Good
Uncertain
–
Changes from 0 to 1 or changes from 1 to 0
Changes from 0 to 1 or changes from 1 to 0
Remains the same
–
Good,
Uncertain
Bad
Good
Uncertain
Good,
Uncertain
Bad
DISABLE_xx Action
FALSE (= "0") Value written to contained parameter
FALSE (= "0") If STATUS_OPTS "Use Uncertain as Good" is set, value written to contained parameter
TRUE (="1") No write
– No write
FALSE (= "0") Value written to contained parameter
FALSE (= "0") If STATUS_OPTS "Use Uncertain as Good" is set, value written to contained parameter
TRUE (="1") No write
– No write
To avoid cyclical writing in static parameters with the resulting cyclical increment of the ST_REV and generation of an event by UPDATE_EVT two mechanisms are provided:
• For the IN_x inputs, DEAD_BAND_x allows a band either side of the current value of the contained parameter to be defined for which there shall be no change of the parameter. If
DEAD_BAND_X is set to zero, the contained value will be overwritten every time the block executes, provided the other conditions are met.
• For the IN_Dx inputs, a value is written to the contained parameter only when there is a change in condition from FALSE (= "0") to TRUE (="1") or vica versa.
If the write to the desired contained parameter block fails, the input concerned appears in the
BAD_STATUS parameter.
When the block is in Auto mode, the value of the contained parameter addressed by the LOC_xxx parameters is read to the OUT_xx parameter according to the following table.
Parameter Value
OUT_x
OUT_x,
OUT_x
OUT_Dx
OUT_Dx,
Contained value
Contained value
CT_VAL_x
Contained value
Contained value
Status
GoodNonCascade
BadNoComm
CT_STATUS_x
GoodNonCascade
BadNoComm
Action
Value read from contained parameter
Value could not be read from contained parameter
No read: BLOCK_TAG_OUT_x not configured or
INDEX_RELATIVE_x and SUB_INDEX_x = zero
Value read from contained parameter
Value could not be read from contained parameter
OUT_Dx CT_VAL_x CT_STATUS_x No read: BLOCK_TAG_OUT_x not configured or
INDEX_RELATIVE_x and SUB_INDEX_x = zero
Note: the outputs concerned are OUT_ 5, OUT_6, OUT_D5 and OUT_D6
If the read from the desired contained parameter block fails, the output concerned appears in the
BAD_STATUS parameter.
7.15.2 Block configuration
The constant block may be used for a number of purposes, e.g. for providing setpoints and tracking values to PID Control or Analog Alarm blocks. Fig. 7-23 in Chapter 7.6.2 shows an example of its use in a simple temperature control application. Similarly, it may be used to supply a digital switching signal, e.g. to stop or control the execution of a a variety of function blocks. Chapter
7.14.2 contains an example of the block configuration for this example.
180 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Writing to contained parameters
7 Calculation and Logic Blocks
A write to a contained parameter might be the necessary to automatically override the output of a
PID block during start-up. For example, it might be desirable to heat quickly until a certain temperature is reached and then control normally. The conditions for this might be:
• PID block: PV_SCALE.EU_100 = 100; PV_SCALE:EU_0 = 0; PV_SCALE.UNIT_INDEX = °C
• Setpoint temperature for start up 100°C
• Setpoint temperature for normal operation 70°C
• Start of normal operation T > 60°C
• Dead band ±15°C
The output from the temperature AI block is checked for HI_LIM = 60°C and LO_LIM = 60°C by two analog alarm blocks. When the heating is started up, the temperature is less than 60°C, so that
AALM_1.OUT_ALM = FALSE and AALM_2.OUT_ALM = TRUE. Under these conditions, the setpoint provided by OUT_1 (= 100°C) of the CTRW block is used in the PID block. When the temperature reaches 60°C, AALM_1.OUT_ALM = TRUE and AALM_2.OUT_ALM = FALSE.
Under these conditions, the setpoint provided by OUT_2 (= 70°C) of the CTRW block is used in the PID block. The dead band ensures that the setpoint is only changed once, and that there is no jitter around the switching point. Please note that this example does not consider what happens on shut down.
temperature measuring device
AI e.g.
TT100-AI-1
OUT
IN
HI_LIM
OUT
AALM_1
OUT_ALM
DISABLE_1 DISABLE_2
IN
OUT_ALM
LO_LIM
OUT
AALM_2
IN e.g.
PID
TC101-PID-1
SP
OUT
IN_1
IN_2
CTRW
OUT_1
OUT_2
OUT_1 = 100°C
OUT_2 = 70°C
Block configuration
Endress+Hauser
Fig. 7-61: Links to be made in the Constant and Contained RW block for the strategy above
The Analog Alarm and CTRW blocks are configured as follows for the above applications:
Parameter
Block AALM_1
MODE_BLK.Target
PV_FTIME
ALARM_HYS
HI_LIM
Block AALM_2
MODE_BLK.Target
PV_FTIME
ALARM_HYS
LO_LIM
Block CTRW
MODE_BLK.Target
CT_VAL_1
CT_VAL_2
BLK_TAG_IN1
INDEX_RELATIVE_IN1
DEAD_BAND_1
BLK_TAG_IN2
INDEX_RELATIVE_IN2
DEAD_BAND_2
Action
Set the target mode of the block to Auto Auto
Enter time constant in seconds for 1st. order damping e.g. 3
Enter alarm hysteresis in % of OUT_RANGE
Enter limit of HI alarm in engineering units e.g. 0 e.g. 60
Set the target mode of the block to Auto Auto
Enter time constant in seconds for 1st. order damping e.g. 3
Enter alarm hysteresis in % of OUT_RANGE
Enter limit of LO alarm in engineering unit e.g. 0 e.g. 60
Set the target mode of the block to Auto
Value output at OUT_1 in Auto mode
Value output at OUT_2 in Auto mode
Block tag of PID block as found in control strategy
The offset of the SP parameter in the PID block
Dead band associatted with IN_1 in same units
Block tag of PID block as found in control strategy
The offset of the SP parameter in the PID block
Dead band associated with IN_2 in same units
Option/Value
Auto
100
60 e.g. TC101-PID-1
8
15 e.g. TC101-PID-1
8
15
181
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
Reading from contained parameters
A possible application for reading a contained parameter would be to read the value of the
TIME_POS_T (TIME_POS_T.VALUE) parameter in the Setpoint Ramp Generator block and use this to initiate another control action at a specific time in the ramp cycle. Fig 7-62 shows the links to be made for such an application.
e.g.
FC101-SPG-1
SPG
TIME_POS_T
CTRW
OUT_5 (= TIME_POS_T)
IN_1
HY_MD_IO
Block configuration
Mode
Status
Block errors
Fig. 7-62: Links to be made in the Constant and Contained RW block for the strategy above
The CTRW block is configured as follows for the above application:
Parameter
MODE_BLK.Target
BLK_TAG_OUT_5
INDEX_RELATIVE_OUT_5
SUB_INDEX_OUT_5
Action
Set the target mode of the block to Auto
Option/Value
Auto
Block tag of PID block as found in control strategy e.g. FC101-SPG-1
Offset of the TIME_POS_T parameter in the SPG block 22
Subindex of the VALUE part of TIME_POS_T 2
7.15.3 Block operation
The block normally operates in "Auto" mode.
When MODE_BLK.Target
is set to "Man", the block outputs OUT_1 to OUT_6 as well as
OUT_D1 to OUT_D6 can be manipulated.
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
Operation can be checked on-line by viewing a number of parameters:
IN_1 to IN_4
OUT_1 to OUT_6
Value and status of corresponding contained parameter
Value and status of corresponding analog output signal or contained parameter
OUT_D1 to OUT_D6 Value and status of corresponding discrete signal or contained parameter
The significance of the output status is indicated below.
OUT/OUT_1 status
Good
Bad
Meaning
• Normal operation as configured; where appropriate, contained parameter could be read
• Block out of service or where appropriate, contained parameter could not be read
Block errors are indicated in the BLOCK_ERR parameter
Condition
Out-of-Service
Block configuration error
Reason
• MODE_BLK.Target currently set to OOS
• BLOCK_TAG_xxx has an invalid value
• INDEX_RELATIVE_xxx has an invalid value
• SUB_INDEX-xxx has an invalid value
• DEAD_BAND_xxx has an invalid value
182 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Constant and
Contained RW block
Endress+Hauser
7 Calculation and Logic Blocks
CT_STATUS_5
CT_STATUS_6
CT_STATUS_D1
CT_STATUS_D2
CT_STATUS_D3
CT_STATUS_D4
CT_STATUS_D5
CT_STATUS_D6
OUT_D3
OUT_D4
OUT_D5
OUT_D6
IN_1
DISABLE_1
BLK_TAG_IN1
INDEX_RELATIVE_IN1
SUB_INDEX_IN1
DEAD_BAND_1
IN_1
DISABLE_2
BLK_TAG_IN2
INDEX_RELATIVE_IN2
CT_VAL_3
CT_VAL_4
CT_VAL_5
CT_VAL_6
CT_VAL_D1
CT_VAL_D2
UPDATE_EVT
BLOCK_ALM
CT_VAL_D3
CT_VAL_D4
CT_VAL_D5
CT_VAL_D6
CT_STATUS_1
CT_STATUS_2
CT_STATUS_3
CT_STATUS_4
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
OUT_1
OUT_2
OUT_3
OUT_4
OUT_5
OUT_6
OUT_D1
OUT_D2
CT_VAL_1
CT_VAL_2
7.15.4 Block parameters
Parameter Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
Description
See Chapter 2.3.4
Block mode, set MODE_BLK.Target to AUTO, CAS or RCAS
Block errors, see Chapter 6.1.9
Output value generated from CT_VAL_1
Output value generated from CT_VAL_2
Output value generated from CT_VAL_3
Output value generated from CT_VAL_4
Output value generated from CT_VAL_5/contained parameter
Output value generated from CT_VAL_6/contained parameter
0
0
0
0
0
0
0
0
Output value generated from CT_VAL_D1
Output value generated from CT_VAL_D2
Constant value connected to OUT_1
Constant value connected to OUT_2
Constant value connected to OUT_3
Constant value connected to OUT_4
Constant value connected to OUT_5
Constant value connected to OUT_6
0
0
0
0
Constant value connected to OUT_D1
Constant value connected to OUT_D2
This alert is generated by any change to the static data.
Block alarms, see Chapter 2.9
Constant value connected to OUT_D3
Constant value connected to OUT_D5
Constant value connected to OUT_D5
Constant value connected to OUT_D6
GoodNC Status of constant value connected to OUT_1, default "Good"
GoodNC Status of constant value connected to OUT_2, default "Good"
GoodNC Status of constant value connected to OUT_3, default "Good"
GoodNC Status of constant value connected to OUT_4, default "Good"
GoodNC Status of constant value connected to OUT_5, default "Good"
GoodNC Status of constant value connected to OUT_6, default "Good"
GoodNC Status of constant value connected to OUT_D1, default "Good"
GoodNC Status of constant value connected to OUT_D2, default "Good"
GoodNC Status of constant value connected to OUT_D3, default "Good"
GoodNC Status of constant value connected to OUT_D4, default "Good"
GoodNC Status of constant value connected to OUT_D5, default "Good"
GoodNC Status of constant value connected to OUT_D6, default "Good" blank
0
0
1.0
Output value generated from CT_VAL_D3
Output value generated from CT_VAL_D4
Output value generated from CT_VAL_D5/contnd parameter
Output value generated from CT_VAL_D6/contnd parameter
Input value and status to be written to contained parameter
Discrete signal controlling IN_1 write to contained parameter
Tag of block with contained parameter (case sensitive!)
Offset of contained parameter (see Offline Configuration) blank
0
Subindex of contained parameter (see Offline Configuration)
Dead band associated with IN_1 in same units
Input value and status to be written to contained parameter
Discrete signal controlling IN_2 write to contained parameter
Tag of block with contained parameter (case sensitive!)
Offset of contained parameter (see Offline Configuration)
183
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
Parameter
SUB_INDEX_IN2
DEAD_BAND_2
IN_D1
DISABLE_D1
BLK_TAG_IND11
INDEX_RELATIVE_IN_D1
SUB_INDEX_IN_D1
IN_D2
DISABLE_D2
BLK_TAG_IN_D2
INDEX_RELATIVE_IN_D2
SUB_INDEX_IN_D2
OUT_5
BLK_TAG_OUT_5
INDEX_RELATIVE_OUT_5
SUB_INDEX_OUT_5
OUT_6
BLK_TAG_OUT_6
INDEX_RELATIVE_OUT_6
SUB_INDEX_OUT_6
OUT_D5
BLK_TAG_OUT_D5
INDEX_RELATIVE_OUT_D5
SUB_INDEX_OUT_D5
OUT_D6
BLK_TAG_OUT_D6
INDEX_RELATIVE_OUT_D6
SUB_INDEX_OUT_D6
BAD_OPTS
CONFIG_STATUS
STATUS_OPTS
Legend: RO = Read Only
Valid range/
Options
Default value
Description
0
1.0
blank
0
0 blank
0
0 blank
0
0 blank
0
0 blank
0
0 blank
0
0
0
Subindex of contained parameter (see Offline Configuration)
Dead band associated with IN_2 in same units
Discrete value and status to be written to contained parameter
Discrete signal controlling IN_D1 write to contained parameter
Tag of block with contained parameter (case sensitive!)
Offset of contained parameter (see Offline Configuration)
Subindex of contained parameter (see Offline Configuration)
Discrete value and status to be written to contained parameter
Discrete signal controlling IN_D2 write to contained parameter
Tag of block with contained parameter (case sensitive!)
Offset of contained parameter (see Offline Configuration)
Subindex of contained parameter (see Offline Configuration)
Value and status read from contained parameter
Tag of block with contained parameter (case sensitive!)
Offset of contained parameter (see Offline Configuration)
Subindex of contained parameter (see Offline Configuration)
Value and status read from contained parameter
Tag of block with contained parameter (case sensitive!)
Offset of contained parameter (see Offline Configuration)
Subindex of contained parameter (see Offline Configuration)
Discrete value and status read from contained parameter
Tag of block with contained parameter (case sensitive!)
Offset of contained parameter (see Offline Configuration)
Subindex of contained parameter (see Offline Configuration)
Discrete value and status read from contained parameter
Tag of block with contained parameter (case sensitive!)
Offset of contained parameter (see Offline Configuration)
Subindex of contained parameter (see Offline Configuration)
Indicates contained parameter that cannot be read
• 0: IN_1
• 1: IN_2
• 2: IN_D1
• 3: IN_D2
• 4: OUT_5
• 5: OUT_6
• 6: OUT_D5
• 7: OUT_D6
Indicates contained parameter input with configuration error
• 0: IN_1
• 1: IN_2
• 2: IN_D1
• 3: IN_D2
• 4: OUT_5
• 5: OUT_6
• 6: OUT_D5
• 7: OUT_D6
Status options, see Chapter 2.8.4
184 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
7.16 Flip-flop and Edge Trigger
The Flip-flop and Edge Trigger block acts as a logic element within a control strategy, passing on a discrete signal to downstream blocks, the value of which is dependent upon the discrete signals at two or more block inputs, see Fig. 7-63. It can be configured to work as a:
• SR flip-flop
• RS flip-flop
• D-latch
• Rising edge trigger
• Falling edge trigger
• Bi-directional edge trigger
DISC_OP = SR flip-flop
RESET_IN
SET_IN
IN_D1
IN_D2
L
H
L
H
R
L
L
H
H
SR RS
Qn-1
H
L
H
Qn-1
H
L
L
SR_FLIP_FLOP
IN_D1
L
H
X
IN_D2
H, L,
Q
L
H
Qn-1
D_LATCH
IN_D1
RISING
FALLING
BI-DIRECTIONAL
EDGE TRIGGER
DISC_OP
OUT_D
Fig. 7-63: Schematic diagram of Flip-flop and Edge Trigger block
7.16.1 Functional description
The operating mode of the Flip-flp and Edge Trigger block is determined by the option selected in the parameter DISC_OP . There are six possible modes of operation which are described below.
The SR flip-flop (or latch) generates a discrete output value OUT_D based on the NAND logic of the SET_IN (S) and RESET_IN (R) discrete inputs.
• If the S and R inputs are both low, OUT_D is maintained at a constant state.
• If S is pulsed high while R is held low, then OUT_D is forced high, and stays high when S returns to low.
• Similarly, if R is pulsed high while S is held low, then OUT_D is forced low, and stays low when R returns to low.
• The combination R high and S high forces OUT_D to high.
SET_IN
FALSE (= 0)
FALSE (= 0)
TRUE (=1)
TRUE (=1)
RESET_IN
FALSE (= 0)
TRUE (=1)
FALSE (= 0)
TRUE (=1)
OUT_D
Keep last state
FALSE (= 0)
TRUE (=1)
TRUE (=1)
Endress+Hauser 185
7 Calculation and Logic Blocks
DISC_OP = RS flip-flop
Guideline: FOUNDATION Fieldbus Function Blocks
The SR flip-flop can be used in applications requiring a continuous TRUE condition that is to be activated by a momentary switch and where a set always produces a TRUE signal.
macrocycle
SET_IN
OUT_D
TRUE
FALSE
RESET_IN
TRUE
FALSE
TRUE
FALSE time
Fig. 7-64: Output of SR flip-flop as a function of SET_IN and RESET_IN inputs
The RS flip-flop (or latch) generates a discrete output value OUT_D based on the NOR logic of the
SET_IN (S) and RESET_IN (R) discrete inputs.
• If the S and R inputs are both low, OUT_D is maintained at the last state.
• If S is pulsed high while R is held low, then OUT_D is forced high, and stays high when S returns to low.
• Similarly, if R is pulsed high while S is held low, then OUT_D is forced low, and stays low when R returns to low.
• The combination R high and S high forces OUT_D to low.
SET_IN
FALSE (= 0)
FALSE (= 0)
TRUE (=1)
TRUE (=1)
RESET_IN
FALSE (= 0)
TRUE (=1)
FALSE (= 0)
TRUE (=1)
OUT_D (RS flip-flop
Keep last state
State = FALSE (= 0)
State = TRUE (=1)
State = FALSE (= 0)
The RS flip-flop can be used in applications requiring a continuous TRUE condition that is to be activated by a momentary switch and where a reset always produces a FALSE signal.
macrocycle
SET_IN
OUT_D
TRUE
FALSE
RESET_IN
TRUE
FALSE
TRUE
FALSE time
Fig. 7-65: Output of RS flip-flop as a function of SET_IN and RESET_IN inputs
186 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
DISC_OP = D-latch
DISC_OP = Rising edge
The D-latch option uses the two discrete inputs IN_D1 and IN_D2 .
• When IN_D1 rises, IN_D 2 inverts.
• When IN_D1 is steady or falls, IN_D2 keeps the last state (latches)
IN_D1
Rising (0 to 1)
Rising (0 to 1)
0, 1 or Falling (1 to 0)
IN_D2
1
0
0 or 1
OUT_D (D-latch)
0
1
Keep state
The D-latch can be used in applications where a momentary switch or timing pulse is to be used to start and stop the equipment: macrocycle
IN_D1
IN_D2
OUT_D
TRUE
FALSE
TRUE
FALSE
TRUE
FALSE time
Fig. 7-66: Output of D-latch as a function of IN_D1 and IN_D2 inputs
The rising or positive edge trigger uses the discrete input IN_D1 . When there is a change of IN_D1 from 0 to 1, the output at OUT_D is set high. OUT_D is set low on the next execution of the block.
IN_D1
Rising
Falling
No transition
0
0
OUT_D (rising edge)
1
The positive edge trigger can be used, e.g. to activaate a machine starter when a valve opens.
macrocycle
IN_D1
OUT_D
TRUE
FALSE
TRUE
FALSE time
Fig. 7-67: Output of positive edge trigger as a function of IN_D1
Endress+Hauser 187
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
DISC_OP = Falling edge The falling of negative edge trigger uses the discrete input IN_D1 . When there is a change of IN_D1 from 1 to 0, the output at OUT_D is set high. OUT_D is set low on the next execution of the block.
IN_D1
Rising
Falling
No transition
1
0
OUT_D (falling edge)
0
The negative edge trigger can be used, e.g. to start actions associated with the shutdown of a machine.
DISC_OP = Bi-directional macrocycle
IN_D1
OUT_D
TRUE
FALSE
TRUE
FALSE time
Fig. 7-68: Output of negative edge trigger as a function of IN_D1
The bidirectional edge trigger functions uses the discrete input IN_D1 . When there is a change of
IN_D1 from 0 to 1 or from 1 to 0, OUT_D is set high. If there is no transition on the next execution of the block, OUT_D is set low..
IN_D1
Rising
Falling
No transition
1
0
OUT_D (bidirectional)
1
The bi-directional edge trigger can be used, e.g. to start actions associated with both the start-up and the shutdown of a machine.
Status propagation macrocycle
IN_D1
OUT_D
TRUE
FALSE
TRUE
FALSE time
Fig. 7-69: Output of bi-directional edge trigger as a function of IN_D1
The block checks the status of the inputs before processing them. The table below summarizes the status of OUT under various conditions. ..
STATUS_OPTS
–
–
Use Uncertain as Good
–
IN status
Good
Uncertain
Uncertain
Bad
OUT status
Good
Bad
Good
Bad
Remarks
Block executed
Block not executed
Block executed
Block not executed
188 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
RS Flip-flop
Block configuration
D-latch
7 Calculation and Logic Blocks
7.16.2 Block configuration
Note
• When using momentary switches and pushbuttons in connection with digital input modules, the period for which the change in state exists must exceed the macrocycle of the control strategy, otherwise it is possible that the change will not be sensed by the controller.
• The same applies to momentary clicks on HMI pushbuttons
The SR flip-flop and RS flip-flop can be used in applications requiring a continuous TRUE condition that is to be activated by a momentary switch. They differ only in their behaviour when both
SET_IN and RESET_IN inputs are true. For the SR flip-flop the output is forced to TRUE, for the
RS flip-flop it is forced to FALSE.
Fig. 7-70 shows a control strategy for a simple pump control application. The SET_IN and
RESET_IN signals are connected to pushbuttons at the DI-1 and DI-2 inputs of a SFC432 voltage input/relay output module via a Multiple Discrete Input block. OUT_D is connected to the pump motor the at the DO-1 output via a Multiple Discrete Output block. For this example it is assumed that the SFC432 module is located at Slot 0 of the rack with address 1.
SET
RESET
DI-1
DI-2
MDI
Channel = 1009
OUT_D1
SET_IN
OUT_D2
RESET_IN
FFET
OUT_D
DISC_OP = RS flip-flop
IN_D1 MDO
Channel = 1019
DO-1 Pump motor
Fig. 7-70: Links to be made to the Flip-flop and Edge Trigger block for the above strategy.
The MDO, FFET and MDI blocks are configured as follows for the above applications:
Parameter
Block MDI
MODE_BLK.Target
CHANNEL
Block FFET
MODE_BLK.Target
DISC_OP
Block CTRW
MODE_BLK.Target
CHANNEL
Action
Set the target mode of the block to Auto
Rack + Slot + Group + 9
Set the target mode of the block to Auto
Block execution mode
Set the target mode of the block to Auto
Rack + Slot + Group + 9
Option/Value
Auto
1009
Auto
RS flip-flop
Auto
1019
The D-latch can be used in applications where a momentary switch or timing pulse is to be used to start and stop the equipment. Since the output is the inverse of the signal IN_D2, it also offers itself as an interlock solution.
Fig. 7-71 shows a control strategy for a pump start-up with interlock for dry running. The IN_D1 signal is connected to pushbuttons at the DI-1 input of a SFC432 voltage input/relay output module via a Multiple Discrete Input block. IN_D2 is connected to a level limit switch at DI-2 that is set to signal TRUE when it is uncovered and FALSE when it is covered. OUT_D is connected to the pump motor the at the DO-1 output via a Multiple Discrete Output block. For this example it is assumed that the SFC432 module is located at Slot 0 of the rack with address 1.
When the pushbutton is pressed and the level limit switch is covered, the FALSE state of the switch results in a TRUE state for the pump motor, which starts up. If the switch is not covered, i.e. there is a danger of dry running, the TRUE state of the switch results in a FALSE state for the motor, which cannot be started.
This interlock works on start up only. Should the liquid level fall below the limit switch during operation of the motor, this will not be signalled.
Endress+Hauser 189
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
PB1
LSL
DI-1
DI-2
MDI
Channel = 1009
OUT_D1
IN_D1
OUT_D2
IN_D2
FFET
OUT_D
DISC_OP = D-latch
IN_D1 MDO
Channel = 1019
DO-1 Pump motor
Block configuration
Fig. 7-71: Links to be made to the Flip-flop and Edge Trigger block for the above strategy
The MDO, FFET and MDI blocks are configured as follows for the above application:
Parameter
Block MDI
MODE_BLK.Target
CHANNEL
Block FFET
MODE_BLK.Target
DISC_OP
Block CTRW
MODE_BLK.Target
CHANNEL
Action
Set the target mode of the block to Auto
Rack + Slot + Group + 9
Set the target mode of the block to Auto
Block execution mode
Set the target mode of the block to Auto
Rack + Slot + Group + 9
Option/Value
Auto
1009
Auto
D-latch
Auto
1019
Bi-directional edge trigger In the case of the bi-directional edge trigger, a change from both FALSE to TRUE and TRUE to
FALSE at IN_D triggers a change from FALSE to TRUE at OUT_D . This signal can be used to trigger a actions required at the start and the shutdown of plant equipment.
Fig. 7-72 shows a control strategy for the start-up and shutdown of a conveyor based on the starting and shutdown of an upstream conveyor. The checkback signal from the motor starter of the upstream conveyor is used start and stop the downstream conveyor, which requires a continuous
TRUE signal to start and a FALSE signal to stop. This is produced by the output of the bi-directional trigger acting on the checkback signal from the second motor in a second FFET block operating as a D-latch. The checkback signals are wired to inputs DI-3 and DI-4 of the SFC432, the motor starter to output DO-4. The interfaces between the input signals and output signals are provided by the
MDI and MDO blocks respectively.
Checkback MO1
DI-3
Checkback MO2
DI-4
MDI
Channel = 1009
OUT_D3
OUT_D4
IN_D1 FFET_1
OUT_D
DISC_OP = Bi-directional edge
OUT_D
IN_D1 FFET_2
IN_D2
DISC_OP = D-latch
IN_D4 MDO
Channel = 1019
DO-4
Motor starter
Fig. 7-72: Links to be made to the Flip-flop and Edge Trigger block for the above strategy
190 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Block configuration
Mode
Status
Block errors
7 Calculation and Logic Blocks
The MDO, FFET and MDI blocks are configured as follows for the above application:
Action Option/Value Parameter
Block MDI
MODE_BLK.Target
CHANNEL
Block FFET1
MODE_BLK.Target
DISC_OP
Block FFET2
MODE_BLK.Target
DISC_OP
Block MDO
MODE_BLK.Target
CHANNEL
Set the target mode of the block to Auto
Rack + Slot + Group + 9
Set the target mode of the block to Auto
Block execution mode
Set the target mode of the block to Auto
Block execution mode
Set the target mode of the block to Auto
Rack + Slot + Group + 9
Auto
1009
Auto
Bi-directional edge
Auto
D-latch
Auto
1019
7.16.3 Block operation
The block normally operates in "Auto" mode.
When MODE_BLK.Target
is set to "Man", the OUT_D can be manipulated.
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
Operation can be checked on-line by viewing a number of parameters:
IN_D1
IN_D2
SET_IN
RESET_IN
OUT_D
Value and status of input 1 supplied by upstream block
Value and status of input 2 supplied by upstream block
Value and status of set input of RS flip-flop or SR flip-flop supplied by upstream block
Value and status of reset input of RS flip-flop or SR flip-flop supplied by upstream block
Value and status of corresponding discrete output signal
The significance of the output status is indicated below.
OUT/OUT_1 status
Good
Uncertain
Bad
Meaning
• Normal operation as configured
• Uncertain input but STATUS_OPTS "Use Uncertain as Good" selected
• Block operating in Man mode
• Block out of service
Block errors are indicated in the BLOCK_ERR parameter
Condition
Out-of-Service
Reason
• MODE_BLK.Target currently set to OOS
Endress+Hauser 191
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
Flip-flop and Edge Trigger block
7.16.4 Block parameters
Parameter
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
DISC_OP
STATUS_OPTS
IN_D1
IN_D2
SET_IN
RESET_IN
OUT_D
UPDATE_EVT
BLOCK_ALM
Legend: RO = Read Only
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
0 - 5
Description
See Chapter 2.3.4
Block mode, set MODE_BLK.Target to AUTO, CAS or RCAS
Block errors, see Chapter 6.1.9
Discrete operation selector
• 0: SR flip-flop
• 1: RS flip-flop
• 2: D-.latch
• 3: rising edge
• 4: falling edge
• 5: bi-diectional edge
Status options
• Use Uncertain as Good
Input value and status of discrete input 1
Input value and status of discrete input 2
Input value and status of set discrete input
Input value and status of reset discrete input
Discrete value and status as a result of executing the block
This alert is generated by any change to the static data.
Block alarms, see Chapter 2.9
192 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
7.17 Advanced Equations
The Advanced Equations block has been designed to support specific calculations relevant to process engineering, see Fig 7-73.
IN_1
IN_2
IN_3
IN_4
IN_D1
IN_D2
EQUATION
CALCULATION
EQ_TYPE
OUT
OUT_1
OUT_2
OUT_D1
Fig. 7-73: Schematic diagram of Advanced Equations block
7.17.1 Functional description
The Advanced Equations block provides calculation of the following functions based on the value of the IN_1 and in the case of dew point temperature IN_2 :
• Natural logaritm, ln x
• Logarithm to the base 10, log x
• e to the power x, Exp x
• Dew point temperature
The type of equation used is selected by the parameter EQ_TYPE . The result of the calculation is published at OUT and in case of dew point temperature, OUT_1 and OUT_2 . All other input parameters in the block are not used, with the exception of OUT_HI_LIM and OUT_LO_LIM , which may be used to limit the output. The table below summarizes the configuration for the various options.
1
2
EQ_TYPE Parameter Description
0 ln x Natural logarithm
3 log x exp x
Dew point temperature
Logarithm to the base 10 e to the power x
Dewpoint temperature °F
Inputs
IN_1 = x
IN_1 = x
IN_1 = x
IN_1 = dry bulb temperature °F
IN_2 = relative humidity %
Outputs
OUT = ln x
OUT = log x
OUT = exp x
OUT = dewpoint temperature
OUT_1 = water vapour saturation pressure (psia)
OUT_2 = water vapour pressure (pw)
255 Special
7.17.2 Block configuration
The parameter MODE_BLK.Target must be set to Auto. If required, limits can be set on the OUT value with the parameters OUT_HI_LIM and OUT_LO_LIM .
Endress+Hauser 193
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
Mode
Status
Block errors
7.17.3 Block operation
The block normally operates in "Auto" mode.
When MODE_BLK.Target
is set to "Man", the block outputs OUT , OUT_1 and OUT_2 can be manipulated depending upon EQ_TYPE .
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
Operation can be checked on-line by viewing a number of parameters:
IN_1, IN_1 Value and status of corresponding input signal
OUT, OUT_1, OUT_2 Value and status of corresponding analog output signal
The significance of the output status is indicated below.
Output status
Good
Bad
Meaning
• Normal operation as configured
• Block out of service
Block errors are indicated in the BLOCK_ERR parameter
Condition
Out-of-Service
Block Configuration Error
Reason
• MODE_BLK.Target currently set to OOS
• Abnormal result of calculation (+/- INF, NaN)
Advanced Equations block
7.17.4 Block parameters
Parameter
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
EQ_TYPE
IN_1
IN_2
IN_3, IN_4
IN_D1, IN_D2
OUT_1
OUT_D1
OUT_2
OUT_3
CT_VAL_1 - CT_VAL_6
CT_VAL_D1, CT_VAL_D2
OUT_HI_LIM
OUT_LO_LIM
BLOCK_ALM
Legend: RO = Read Only
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
0-3, 255 0
Description
See Chapter 2.3.4
0
Block mode, set MODE_BLK.Target to AUTO, CAS or RCAS
Block errors, see Chapter 6.1.9
Selection of equation to be used:
• 0: ln x
• 1: log x
• 2: exp x
• 3: dew point
• 255: reserved (currently no function)
• EQ_TYPE = 0, 1, 2: input value for equation;
• EQ_TYPE = 3: dry bulb temperature °F
• EQ_TYPE = 3: relative humidity %
Input values, not used
Discrete input values, not used
• EQ_TYPE = 0, 1, 2: result of executing block;
• EQ_TYPE = 3: dewpoint temperature °F
Discrete output value, not used
• EQ_TYPE = 3: saturation pressure water vapour (psia)
• EQ_TYPE = 3: pressure water vapour (pw)
Not used
Not used
HI limit for OUT value
LO limit for OUT value
Block alarms, see Chapter 2.9
194 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 7 Calculation and Logic Blocks
7.18 Density
The Density block, see Fig. 7-74, has an algorithm to calculate density in various engineering units, e.g. °Plato, °Brix, TC and °INPM.
IN_1
PRESSURE
UNITS
HEIGHT
GRAVITY
F1
F2
DENSITY
CALCULATION
NUM_SAMPLES
TEMPERATURE
COMPENSATION
NUM_AVERAGE
MAN
DENS_UNITS
AVERAGE
CALCULATION
AUTO
IN_2
IN_3
RESET_IN
T
MAN
UNITS
CONVERSION
AUTO
OUT_HI_LIM
OUT_LO_LIM
MAN
OUT_SCALE
ALARM
HI/LO
AUTO
DENS_OUT
OUT
OUT_D1
Fig. 7-74: Schematic diagram of Density block
7.18.1 Functional description
The Density block calculates the density of a liquid based on the pressure measured at two points within the tank with a known difference in height, DEN_HEIGHT .
DEN_HEIGHT
LH RESET_IN: e.g. limit switch
P2 IN_2: Pressure transmitter 2
T IN_3: Temperature transmitter
P1 IN_1: Pressure transmitter 1
Fig. 7-75: Arrangement of pressure and temperature transmitters for density measurement
The input parameters are as follows:
• IN_1 is the pressure measured by the lower transmitter
• IN_2 is the pressure measured by the higher transmitter
• IN_3 is the temperature in °C measured by the temperature transmitter
The calculation is made using the average from several pressure transmitter samples, whereby the number of the samples is determined by the NUM_SAMPLES parameter. When RESET_IN is true
(= 1), the average calculation is reset. This allows the calculation to be automatically reset by a level limit switch when the vessel is filled and pressure transmitter is covered or by operator intervention from the HMI.
Endress+Hauser 195
7 Calculation and Logic Blocks
Valid pressure units
Guideline: FOUNDATION Fieldbus Function Blocks
The density is in g/cm
3
is calculated as follows:
D = f P1 P2 where: f is a conversion factor to transform the formula coefficients to the same units
P1 is the average pressure measured at IN_1
P2 is the average pressure measured at IN_2
DEN_HEIGHT is the distance between the two measuring points in the same units as the pressure measurement
GRAVITY is the acceleration due to gravity in m/s
2
The average pressure is calculated in a rolling buffer as follows:
Pi = n
INi j = 1 n where: Pi is the average pressure
INi is the pressure measured at IN_i at sample j n is the number of samples NUM_SAMPLES
The temperature is compensated as part of the the density calculation. The output DENS_OUT is the compensated density in units of g/cm
3
. The OUT parameter is the compensated density in the engineering units selected by EU_SEL parameter.
The density block allows limits to be placed on the OUT ouput. If the density exceeds HI_LIM or drops below LO_LIM an alarm is indicated in HI_ALM or LO_ALM and the output OUT_D is set to true. The alarm is disabled when one or both of the limit parameters are set to
±
INF
When RESET_IN changes from false to true, the density block, including the previous density, the rolling buffer and all outputs of the block, is reset. The status is taken from the last cycle.
The following units can be selected for use by the block
1141
1144
1145
1148
1147
1151
1150
1154
1156
1158
Index
1130
1133
1132
1137
1138
1139
1140
Pressure unit
Pa
KPa
MPa bar millibar torr atm psi g/cm
2 kg/cm
2 in H
2
O in H
2
0 at 4 °C mm H
2
O mm H
2
0 at 4 °C ft H
2
O in Hg mm Hg in mm mm ft in cm cm in in mm cm cm mm cm
HEIGHT unit m m m
For an accurate density measurement, the distance between the two pressure transmitters must be measured with an accuracy of
±
1 mm. The corresponding number of decimal places must be used when entering the HEIGHT parameter in metres, centimetres, feet or inches.
196 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Status propagation
Control strategy
Block configuration
Endress+Hauser
7 Calculation and Logic Blocks
The primary input status of IN_1 and IN_2 is propagated to the outputs. If the status becomes bad or it becomes uncertain and option “Use Uncertain as Good” in STATUS_OPTS is not set, the block mode will be forced to Man and the algorithm stops the calculation.
If the secondary input IN_3 is unusable, the algorithm uses the last usable value and the output status will be Uncertain. A bad status in RESET_IN input does not stop the algorithm.
If target mode is Man then the output status is Good.Block configuration
The parameter MODE_BLK.Target must be set to Auto. If required, limits can be set on the OUT value with the parameters OUT_HI_LIM and OUT_LO_LIM .
7.18.2 Block configuration
Fig. 7-76 shows a control strategy for an extract measurement in a beer tank. The input to the block is provided by three analog input blocks for the continuous temperature and pressure measurements and a multiple discrete input block connected to the level switch. A matched pair of pressure transmitters with a measuring range of 0 - 5000 mbar is to be used, the distance between the mounting points being 1750 mm.
The density is to be measured in °Plato, and a signal is to be given to the operator when the measured value drops below 3.00. To this end, the OUT value is limited, and the OUT_D signal is used to actuate a visual alert via a multiple discrete output block.
The connection to both the limit switch and the visual alarm is made with a ControlCare SFC432
I/O module located in Rack 1, Slot 0.
pressure transmitter 1
AI_1
OUT pressure transmitter 2
AI_2
OUT
IN_1
IN_2
IN_3
RESET_IN
DENS_OUT
DENS
OUT
OUT_D
HI_LIM
LOW_LIM g/cm3
°Plato
HMI
IN_D1 MDO DO-1 Lamp temperature transmitter
AI_3
OUT
Channel = 1019
LH limit switch
DI-1
MDI
OUT_D1
Channel = 1009
Fig. 7-76: Control strategy for extract measurement in beeer
The MDO, AI, DENS and MDI blocks are configured as follows for the above application:
Parameter
Block AI_1
Block AI_2
MODE_BLK.Target
XD_SCALE.EU_100
XD_SCALE.EU_0
XD_SCALE.UNIT_INDEX
OUT_SCALE.EU_100
OUT_SCALE.EU_0
OUT_SCALE.UNIT_INDEX
Action
Set the target mode of the block to Auto
Input scaling, upper range value
Input scaling, lower range value
Input scaling, engineering units
Input scaling, upper range value
Input scaling, lower range value
Input scaling, engineering units
Option/Value
Auto
0
5000 mbar
0
5000 mbar
197
7 Calculation and Logic Blocks
Mode
Status
Block errors
Guideline: FOUNDATION Fieldbus Function Blocks
Parameter
Block AI_3
MODE_BLK.Target
XD_SCALE.EU_100
XD_SCALE.EU_0
XD_SCALE.UNIT_INDEX
OUT_SCALE.EU_100
OUT_SCALE.EU_0
OUT_SCALE.UNIT_INDEX
Block MDI
MODE_BLK.Target
CHANNEL
Block DENS
MODE_BLK.Target
OUT_SCALE.EU_100
OUT_SCALE.EU_0
OUT_SCALE.UNIT_INDEX
EU_SEL
PRESSURE_UNITS
DEN_HEIGHT
LO_PRI
LO_LIM
Block MDO
MODE_BLK.Target
CHANNEL
Action
Set the target mode of the block to Auto
Input scaling, upper range value
Input scaling, lower range value
Input scaling, engineering units
Input scaling, upper range value
Input scaling, lower range value
Input scaling, engineering units
Set the target mode of the block to Auto
Rack + Slot + Group + 9
Set the target mode of the block to Auto
Input scaling, upper range value
Input scaling, lower range value
Input scaling, engineering units (for HMI)
Select engineering units for OUT value
Select pressure unit output by trnsmitters
Distance between the pressure transmitters in the same units as the pressure measurement
Prioritiy of LO_LIM alarm
Value of lower limit in units of OUT
1
3
Auto
20
0
Plato Degree
Plato Degree mbar
175.0 (cm)
Set the target mode of the block to Auto
Rack + Slot + Group + 9
Auto
1019
Option/Value
Auto
-200
600
°C
-200
600
°C
Auto
1009
7.18.3 Block operation
The block normally operates in "Auto" mode.
When MODE_BLK.Target
is set to "Man", the block outputs OUT , OUT_1 and OUT_2 can be manipulated depending upon EQ_TYPE .
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
Operation can be checked on-line by viewing a number of parameters:
IN_1, IN_1 Value and status of corresponding input signal
OUT, OUT_1, OUT_2 Value and status of corresponding analog output signal
The significance of the output status is indicated below.
Output status
Good
Bad
Meaning
• Normal operation as configured
• Block out of service
Block errors are indicated in the BLOCK_ERR parameter
Condition
Out-of-Service
Reason
• MODE_BLK.Target currently set to OOS
198 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Density block
7 Calculation and Logic Blocks
GRANT_DENY
STATUS_OPTS
IN_1
IN_2
IN_3
PRESSURE_UNITS
DEN_HEIGHT
GRAVITY
NUM_SAMPLES
NUM_AVERAGES
DENS_OUT
DENS_UN ITS
OUT_D
RESET_IN
OUT_HI_LIM
OUT_LO_LIM
UPDATE_EVT
BLOCK_ALM
ALARM_SUM
ACK_OPTION
7.18.4 Block parameters
Parameter
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
OUT
OUT_SCALE
EU_SEL
ALARM_HYS
HI_PRI
HI_LIM
LO_PRI
LO_LIM
HI_ALM
LO_ALM
Legend: RO = Read Only
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
0 - 3
0, 1
0
0
0
0
Description
See Chapter 2.3.4
Block mode, set MODE_BLK.Target to AUTO, CAS or RCAS
Block errors, see Chapter 6.1.9
Value output after execution of the block
Scaling of output value
Select engineering units for OUT value
• 0: Plato Degree
• 1: Brix
• 2: TC
• 3: INPM
Access options, see Chapter 2.8.1
Status options
• Use Uncertain as Good
Input value and status of pressure transmitter 1
Input value and status of pressure transmitter 2
Input value and status of temperature transmitter (°C)
Selection of pressure unit used by pressure transmitters 1 and 2 see table g/cm
2 positive positive
1000
9.80665
1 - 1000 10
Distance between the pressure transmitters in the same units as the pressure measurement, see table
Acceleration due to gravity in m/s
Number of samples per average
2
1 - 30
RO
10 g/cm
2
Number of averages in rolling buffer
Density in g/cm
2
compensated for temperature
Units of DENS_OUT for HMI (always g/cm
2
)
RO
100
0
Discrete output indicating limit alarm
Discrete input for resetting the density calculation and buffer
Upper limit for OUT value, above which the status is "Limited"
Lower limit for OUT value, below which the status is "Limited"
Alert generated by any change to the static data.
Block alarms, see Chapter 2.9
Alarm summary, see Chapter 2.9
See Chapter 2.9
• 0: Auto ACK Disable
• 1: Auto ACK Enable
0 to 50 % 0.5%
0 to 15
0 to 15
+INF
-INF
Alarm hysteresis in % of OUT_SCALE, see Chapter 2.9
Priority of the HI alarm, see Chapter 2.9
Setting of HI alarm in engineering units, see Chapter 2.9.
Priority of the LO alarm, see Chapter 2.9.
Setting of LO alarm in engineering units, see Chapter 2.9.
Status of HI alarm and its associated time stamp.
Status of LO alarm and its associated time stamp.
Endress+Hauser 199
7 Calculation and Logic Blocks Guideline: FOUNDATION Fieldbus Function Blocks
7.19 Flexible function blocks
Flexible function blocks allow freely programmable logical seqences and calculations to be performed with in a strategy based on analog and/or discrete input values. After execution of the block, the results are presented as analog and/or discrete output values. Fig. 7-77 shows an example of a flexible function block with analog I/O.
IN_5
IN_6
IN_7
IN_8
IN_1
IN_2
IN_3
IN_4
IN_9
IN_10
IN_11
IN_12
IN_13
IN_14
IN_15
IN_16
LF
analog I/Os
LP
IO
LD
IF Q=F THEN
ST
ELSEIF
S2
FILL
S1
SFC
EMPTY
S5
STIR
LD PStart
IL
CAL Tseq
IEC 61131-3
custom
OUT_1
OUT_2
OUT_3
OUT_4
OUT_5
OUT_6
OUT_7
OUT_8
OUT_9
OUT_10
OUT_11
OUT_12
OUT_13
OUT_14
OUT_15
OUT_16
EXEC_ALM
Fig. 7-77: Schematic diagram of Analog I/O hybrid block
Endress+Hauser’s ControlCare SFC162 and SFC173 Field Controllers support three types of flexible function block:
• Hybrid with Analog I/O
• Hybrid with Discrete I/O
• Hybrid with Embedded I/O
The programming can be done in any IEC 61131-3 language, e.g. ladder logic, structured text etc.
In the case of the "embedded" block, local I/O, Profibus I/O and Modbus I/O can be directly integrated into the block.
A description of the flexible functioin blocks is to be found in the ControlCare Function Block manual, BA022S/04/en as well as the associated tutorials. There is a also an application note from the Fieldbus Foundation (AG-170) which describes the capabilities of the flexible function block using real examples.
200 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Setpoint
Scaling
8 Output Blocks
8 Output Blocks
8.1
Analog Output
The Analog Output block receives a setpoint value from an upstream function block or higher level process control system and, after scaling, outputs a signal to a downstream transducer block through an internal channel reference, see Fig. 8-1. It is used by instruments that act as output elements in a control loop such as valves, actuators, positioners and analog output modules.
CAS_IN
SE
RCAS_IN
SP
SELECTOR
SP
FAILSAFE
ACTIVE
PV_SCALE
XD_SCALE
MANUAL
AUTO
FSTATE_VAL
PV
SP
SIMULATE
CHANNEL
SP LIMITS
OPERATOR
ENTRY
XD_SCALE
PV_SCALE
IO_OPTS
READ_BACK
OUT
BKCAL_OUT
To output module or actuator
Fig. 8-1: Schematic diagram of Analog Output block
8.1.1
Functional description
Depending upon the setting of the MODE_BLK.Target parameter, the Analog Output block receives its setpoint value from the operator, an upstream block or a remote process control system.
MODE_BLK.Target
Auto
Cas
Rcas
Setpoint
SP
CAS_IN
RCAS_IN
Remarks
Sepoint value is constant and is entered manually by the operator.
Setpoint value originates from an upstream block
Setpoint valueoriginates from a supervisory host
On a change in setpoint, the parameters SP_RATE_DN and SP_RATE_UP determine the downward and upward ramp rate at which a change is made from the old to the new value. If the ramp rate is set to zero, there is a step change in the setpoint.
SP_HI_LIM and SP_LO_LIM determine the valid range of setpoint operator entries that can be used with the block. They apply in Auto only, unless the option "Obey SP limits if CAS or RCAS" is selected in CONTROL_OPTS . If the setpoint exceeds the limits, the corresponding value
SP_HI_LIM or SP_LO_LIM is used as setpoint and the output status quality becomes "Limited".
PV_SCALE is used to convert the input signal (setpoint) to percent of span.
• EU_100 is the upper range limit of the input signal, e.g. 100
• EU_0 is the lower range limit of the input signal, e.g. 0
• UNIT_INDEX is the unit of the input signal, e.g. %
• DECIMAL is the number of figures behind the decimal point for displays
Endress+Hauser 201
8 Output Blocks
Output
Fault state
Mode shedding
Setpoint tracking
Simulation
Status propagation
Guideline: FOUNDATION Fieldbus Function Blocks
XD_SCALE is used to convert percent of span to the engineering units used by the hardware.
• EU_100 is the upper range limit of the output signal, e.g. 20
• EU_0 is the lower range limit of the output signal, e.g. 4
• UNIT_INDEX is the unit of the output signal, e.g. mA
• DECIMAL is the number of figures behind the decimal point for displays
This allows portions of the setpoint span to cause full span movement of the output. If the "Increase to close" option is selected in IO_OPTS , the output signal is inverted and a rise in setpoint causes a fall in output value.
When the block is operating in Cas, Rcas or Auto mode, the value obtained after block execution is placed in OUT . The same value is transmitted to the transducer through an internal channel reference given by the CHANNEL parameter, see Chapter 5.1.
If the transducer hardware supports a readback value, such as valve position, that value is run backwards through the XD scaling to act as the PV for the block. If not supported, READBACK is generated from OUT .
The current setpoint value and status is communicated to an upstream block by the BKCAL_OUT parameter. If the option "PV for BKCAL_OUT" is selected in IO_OPTS , then the PV will be transmitted instead of the setpoint.
When the block is operating in Rcas mode, RCAS_OUT carries the block setpoint and status after ramping for output to a supervisory host as back calculation and to allow action to be taken under limiting conditions or mode change.
By default, the last valid value is held if a fault state is detected.
If the "Fault state to value" option is selected in IO_OPTS , OUT will assume the value entered in
FSTATE_VAL when a fault condition exists longer than defined in the parameter FSTATE_TIME or when the option "Fault State" is selected the the resource block parameter SET_FSTATE . This ensures that the hardware connected to the block fails to safe, see Chapter 2.7.
When the option "Fault state restart" in IO_OPTS is selected, FSTATE_VAL will also be used on restart.
SHED_OPT allows the behaviour of the block to be determined after a change in mode, e.g. forced by the system or through operator intervention. "Normal return" options allow the block to recover automatically to target mode, for "No return" options, the operator must enter the target mode manually.
IO_OPTS also allows the setpoint to track PV or an input value when the the target mode is Auto and this changes to Man or LO. Possible behaviour is "SP tracks PV when Man", "SP tracks PV when
LO", "SP tracks RCAS or CAS when Man or LO"
The block supports simulation, see Chapter 2.10. The parameter group SIMULATE is used to specify the output value (setpoint value and status), transducer value (PV value and status) and to enable/disable simulation, provided the associated jumper on the I/O board is set, see Chapter 3.2.
When simulation is active in the Analog Output block, BLOCK_ERROR flags "Simulation Active".
The status of OUT can assume the following values:
GoodCascade
Bad
The output value OUT is valid and can be used for further processing
The output value OUT is invalid.
• Operating mode OOS
• Input status bad
If the "Propagate Fault Bkwd" option in STATUS_OPTS is selected, the BKCAL_OUT and
RCAS_OUT status carries the current OUT status to an upstream block or supervisory system.
202 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 8 Output Blocks
8.1.2
Block configuration
Fig. 8-2 shows an example of basic closed-loop control which uses the Analog Output block. A measurement of flow upstream of a valve ensures a constant flow rate downstream of a valve, by causing the valve to open and close. The valve is operated by an analog electrical positioner which operates across a span of 4 mA to 20 mA, 4 mA being closed and 20 mA being fully open. The connection to the controller is made via output AO-0 (terminals 2A, 3A) of a SFC446 Analog Output module, which is to be found in Rack 2, Slot 2 of the controller backplane.
CV
102
FCV
101
PID control
FT
100
Block configuration
Fig. 8-2: Example of closed-loop control
Fig. 8-3 shows the control strategy together with links that must be made between the blocks.
AI
OUT IN
BKCAL_IN
PID
OUT CAS_IN
AO
CHANNEL AO-1
Positioner
FT100 FCV101 CV102
BKCAL_OUT
Fig. 8-3: Links required for basic closed-loop control
It is assumed that PID block has been configured as described in Chapter 6.1 to give an OUT value in the range 0% to 100%. This becomes the value of CAS_IN and must be scaled using XD_SCALE and PV_SCALE to provide a value between 4 mA and 20 mA to the transducer block.
Before the AO block is configured, however, the HC transducer block of the controller must be configured to recognise the SFC446 analog output module
Parameter
Controller HC block
MODE_BLK.Target
IO_TYPE_R2.SLOT_2
AO block
MODE_BLK.Target
PV_SCALE.EU_100
PV_SCALE.EU_0
PV_SCALE.UNITS_INDEX
XD_SCALE/EU_100
XD_SCALE/EU_0
XD_SCALE/UNITS_INDEX
SP_RATE_DN
SP_RATE_UP
CHANNEL
FSTATE_VAL
FSTATE_TIME
SHED_OPT
Function
Normal operating mode of block
Declaration of SFC446 module in HC block
Example value
Auto
4-Analog Output
Normal operating mode of block
Upper range limit for process variable
Lower range limit for process variable
Unit of process variable
Upper range limit for transducer variable
Lower range limit for transducer variable
Unit of transducer variable
Rate of change from old to new, higher SP
Rate of change from old to new, lower SP
Rack + Slot + Group + Point
Cas
100
0
%
20
4 mA
5
5
2200
Fail-to-safe value for OUT (= closed)
Time that elapses before fault state is activated
4
5 (s)
Target mode and recovery behaviour on change of mode NormalShed_
NormalReturn
Endress+Hauser 203
8 Output Blocks
Mode
Status
Block errors
Guideline: FOUNDATION Fieldbus Function Blocks
8.1.3
Block operation
The block normally operates in "Auto", "Cas" or "RCas" mode, depending on the origin of the setpoint, see Chapter 8.1.1.
When MODE_BLK.Target
is set to "Man", the block output OUT can be manipulated.
The setpoint value SP can be changed when the block is in Auto. If other parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of
Service). A parameter change is then downloaded directly to the controller.
The block assumes Local override (LO) when a fault state has been detected and the corresponding function has been configured. The OUT value then corresponds to FSTATE_VAL .
Iman is temporarily assumed during a cascade loop reset initiated by an upstream block.
Operation can be checked on-line by viewing a number of parameters:
SP, CAS_IN, RCAS_IN Value and status of setpoint set by operator, upstream block or supervisor system respectively
OUT The primary analog value calculated as a result of executing the function.
The block output and status provided to an upstream block or host for back calculation BKCAL_OUT
RCAS_OUT
READBACK Readback of the actual analog valve or other actuator position, in the transducer state.
The significance of the output status is indicated below.
Output status
GoodCascade
Bad
Meaning
• Normal operation as configured
• Input to block Bad
• Block out of service
Block errors are indicated in the BLOCK_ERR parameter
Condition
Block Configuration Error
Simulate Active
Device Fault State Set
Output Failure
Out-of-Service
Reason
• Invalid SHED_OPT value
• Invalid CHANNEL value
– value not supported by transducer block
– value not compatible with configuration in Controller HC block
• XD_SCALE range or value not supported by transducer block
• Transducer block out of service
• Simulation enabled in block
• FAULT_STATE is active (Local override)
• Associated I/O module has failed
• MODE_BLK.Target currently set to OOS
204 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 8 Output Blocks
8.1.4
Block parameters
Parameter
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
PV
SP
OUT
SIMULATE
PV_SCALE
XD_SCALE
GRANT_DENY
IO_OPTS
STATUS_OPTS
READBACK
CAS_IN
SP_RATE_DN
SP_RATE_UP
SP_HI_LIM
SP_LO_LIM
CHANNEL
FSTATE_TIME
FSAFE_VAL
BKCAL_OUT
RCAS_IN
SHED_OPT
RCAS_OUT
UPDATE_EVT
BLOCK_ALM
Legend: RO = Read Only
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
RO
Positive
Positive
1 - 8
Description/Action
See Chapter 2.3.4
Block mode, set to MODE_BLK.Target to Cas
Block errors, see Chapter 5.2.3
Process value used in executing the block
Setpoint used by the block in AUTO mode (PV_SCALE ± 10%)
Output value calculated as a result of executing the block
0
0
0
0
Disable See Chapter 5.2.2, Enable/Disable options:
• Disable
• Active
0-100% PV value scaling to to % of range
0-100% Transducer value scaling to required engineering units
Access options, see Chapter 2.8.1
I/O options, see Chapter 2.8.2 and Chapter 5.2.1
Status options, see Chapter 2.8.4 and Chapter 5.2.2
Value sent back by actuator indicating current position
Setpoint used by the block in CAS mode
Ramp rate for positive setpoint change in PV units/s +INF
+INF
100
0
0
Ramp rate for negative setpoint change in PV units/s
High limit for setpoint limiting (PV_SCALE ± 10%)
Low limit for setpoint limiting (PV_SCALE ± 10%)
The number of the logical hardware channel to the transducer that is connected to this I/O block, see Chapter 5.1.
0
0
Time iin seconds to ignore a new fault state conditioin
Sets value for IO_OPTS option Fault State to Value
Feedback for BKCAL_IN of an upstream block.
Setpoint used by the block in RCAS mode (from host)
Mode shedding options, see Chapter 6.1.6
Setpoint and status for host back calculation in RCAS mode
This alert is generated by any change to the static data.
Block alarms, see Chapter 2.9
Endress+Hauser 205
8 Output Blocks
Setpoint
Optional invert
Output
206
Guideline: FOUNDATION Fieldbus Function Blocks
8.2
Discrete Output
The Discrete Output block receives a discrete setpoint value from an upstream function block or higher level process control system and, after possible inversion, outputs a signal to a downstream transducer block through an internal channel reference, see Fig 8-2. It is used by instruments that act as discrete output elements in a control loop such as on-off valves or in connection with the local
I/O modules.
CAS_IN_D
SETPOINT OPTIONAL
INVERT
OUTPUT
BKCAL_OUT_D
To discrete output module or positioner
OUT_D
MODE
SHED_OPT
SP_D PV_D
OPTIONAL
INVERT
FSTATE_TIME
FSTATE_VAL_D
SIMULATE_D
READBACK_D
CHANNEL
Fig. 8-4: Schematic diagram of the Discrete Output block
8.2.1
Functional description
Depending upon the setting of the MODE_BLK.Target parameter, the Discrete Output block receives its setpoint value from the operator, an upstream block or a remote process control system.
MODE_BLK.Target
Auto
Cas
Rcas
Setpoint
SP_D
CAS_IN_D
RCAS_IN_D
Remarks
Sepoint value is constant and is entered manually by the operator.
Setpoint value originates from an upstream block
Setpoint valueoriginates from a supervisory host
The "Invert" option in the parameter group IO_OPTS inverts the input signal by placing a boolean
NOT between the setpoint ( SP_D , CAS_IN_D , RCAS_IN_D ) and the output OUT_D .
False
True
A discrete value of zero (0) is considered to be a logical zero (0), and a non-zero discrete value a logical one (1)
A discrete value of zero (0) is considered to be a logical one (1), and a non-zero discrete value a logical zero (0)
The XD_STATE value indicates the true on/off state of the connected hardware
When the block is operating in Cas, Rcas or Auto mode, the value obtained after block execution is placed in OUT_D . The same value is transmitted to the transducer through an internal channel reference given by the CHANNEL parameter, see Chapter 5.1.
If the transducer hardware supports a readback value, such as valve position, that value is run backwards through the inversion to act as the PV_D for the block. If not supported,
READBACK_D is generated from OUT_D .
The current setpoint value and status is communicated to an upstream block by the
BKCAL_OUT_D parameter. If the option "PV for BKCAL_OUT" is selected in IO_OPTS , then
PV_D will be transmitted instead of the setpoint.
When the block is operating in Rcas mode, RCAS_OUT_D carries the block setpoint and status after ramping for output to a supervisory host as back calculation and to allow action to be taken under limiting conditions or mode change.
Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Fault state
Mode shedding
Setpoint tracking
Simulation
Status propagation
8 Output Blocks
By default, the last valid value is held if a fault state is detected.
If the "Fault state to value" option is selected in IO_OPTS , OUT_D will assume the value entered in FSTATE_VAL_D when a fault condition exists longer than defined in the parameter
FSTATE_TIME or when the option "Fault State" is selected the the resource block parameter
SET_FSTATE . This ensures that the hardware connected to the block fails to safe, see Chapter 2.7.
When the option "Fault state restart" in IO_OPTS is selected, FSTATE_VAL_D will also be used on restart.
SHED_OPT allows the behaviour of the block to be determined after a change in mode, e.g. forced by the system or through operator intervention. "Normal return" options allow the block to recover automatically to target mode, for "No return" options, the operator must enter the target mode manually.
IO_OPTS also allows the setpoint to track PV_D or an input value when the the target mode is
Auto and this changes to Man or LO. Possible behaviour is "SP tracks PV when Man", "SP tracks PV when LO", "SP tracks RCAS or CAS when Man or LO"
The block supports simulation, see Chapter 2.10. The parameter group SIMULATE_D is used to specify the output value (setpoint value and status), transducer value (PV value and status) and to enable/disable simulation, provided the associated jumper on the I/O board is set, see Chapter 3.2.
When simulation is active in the Analog Output block, BLOCK_ERROR flags "Simulation Active".
The status of OUT can assume the following values:
GoodCascade
Bad
The output value OUT_D is valid and can be used for further processing
The output value OUT_D is invalid.
• Operating mode OOS
• Input status bad
If the "Propagate Fault Bkwd" option in STATUS_OPTS is selected, the BKCAL_OUT_D and
RCAS_OUT_D status carries the current OUT_D status to an upstream block or supervisory system.
Endress+Hauser 207
8 Output Blocks
Block configuration
Guideline: FOUNDATION Fieldbus Function Blocks
8.2.2
Block configuration
Fig. 8-5 shows an example of on-off control of process tank level that uses the Discrete Output block. The level in a process tank with random inflow is controlled by opening and closing the outlet valve (LV100) based on the level sensed in the tank by the level switch (LSH100). The level switch outputs a true signal when it is covered with liquid; the valve is operated by a solenoid and is open when this is activated. The connection to the controller is made via input DI-0 and output DO-1 of a SFC432 Voltage Input and NO Relay Output module, which is to be found in Rack 1, Slot 3 of the controller backplane.
Feed In
LSH
100
Process
Tank
LV
100
S
Feed Out
Fig. 8-5: Example of on-off control of process tank level
Fig. 8-6 shows the control strategy together with links that must be made between the blocks.
LSH100
DI-0 channel
DI
OUT_D
CAS_IN_D
DO channel DO-1
Solenoid
LSH100 LV100
Fig. 8-6: Links required for basic closed-loop control
Before the DI and DO blocks are configured, the HC transducer block of the controller must be configured to recognise the SFC432 Voltage Input and NO Relay Output module
Function Example value Parameter
Controller HC block
MODE_BLK.Target
IO_TYPE_R1.SLOT_3
DI block
MODE_BLK.Target
CHANNEL
DO block
MODE_BLK.Target
CHANNEL
FSTATE_VAL_D
FSTATE_TIME
SHED_OPT
Normal operating mode of block
Declaration of SFC432 module in HC block
Normal operating mode of block
Rack + Slot + Group + Point
Auto
8-DiscIn 4-DiscOut
Auto
1300
Normal operating mode of block
Rack + Slot + Group + Point
Cas
1310
Fail-to-safe value for OUT_D (= open, prevents overspill)
Time that elapses before fault state is activated
1
5 (s)
Target mode and recovery behaviour on change of mode NormalShed_
NormalReturn
208 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Mode
Status
Block errors
8 Output Blocks
8.2.3
Block operation
The block normally operates in "Auto", "Cas" or "RCas" mode, depending on the origin of the setpoint, see Chapter 8.2.1.
When MODE_BLK.Target
is set to "Man", the block output OUT can be manipulated.
The setpoint value SP_D can be changed when the block is in Auto. If other parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of
Service). A parameter change is then downloaded directly to the controller.
The block assumes Local override (LO) when a fault state has been detected and the corresponding function has been configured. The OUT_D value then corresponds to FSTATE_VAL_D .
Iman is assumed when there is no path to the final control element.
Operation can be checked on-line by viewing a number of parameters:
SP_D, CAS_IN_D,
RCAS_IN_D
OUT
BKCAL_OUT_D
RCAS_OUT_D
READBACK_D
Value and status of setpoint set by operator, upstream block or supervisor system respectively
The primary discrete value calculated as a result of executing the function.
The block output and status provided to an upstream block or host for back calculation
Readback of the actual valve or actuator position, in the transducer state.
The significance of the output status is indicated below.
Output status
GoodCascade
Bad
Meaning
• Normal operation as configured
• Input to block Bad
• Block out of service
Block errors are indicated in the BLOCK_ERR parameter
Condition
Block Configuration Error
Simulate Active
Device Fault State Set
Output Failure
Out-of-Service
Reason
• Invalid SHED_OPT value
• Invalid CHANNEL value
– value not supported by transducer block
– value not compatible with configuration in Controller HC block
• Simulation enabled in block
• FAULT_STATE is active (Local override)
• Associated I/O module has failed
• MODE_BLK.Target currently set to OOS
Endress+Hauser 209
8 Output Blocks Guideline: FOUNDATION Fieldbus Function Blocks
8.2.4
Block parameters
Parameter
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
PV_D
SP_D
OUT
SIMULATE_D
PV_STATE
XD_STATE
GRANT_DENY
IO_OPTS
STATUS_OPTS
READBACK_D
CAS_IN_D
CHANNEL
FSTATE_TIME
FSTATE_VAL_D
BKCAL_OUT_D
RCAS_IN_D
SHED_OPT
RCAS_OUT_D
UPDATE_EVT
BLOCK_ALM
Legend: RO = Read Only
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
RO
1 - 8
Description/Action
See Chapter 2.3.4
Block mode, set to MODE_BLK.Target to Cas
Block errors, see Chapter 5.2.3
Process value used in executing the block
Setpoint used by the block in AUTO mode (PV_SCALE ± 10%)
Output value calculated as a result of executing the block
0
0
0
0
Disable See Chapter 5.2.2, Enable/Disable options:
• Disable
• Active
0-100% Discrete PV value
0-100% Discrete transducer value
Access options, see Chapter 2.8.1
I/O options, see Chapter 2.8.2 and Chapter 5.2.1
Status options, see Chapter 2.8.4 and Chapter 5.2.2
Value sent back by actuator indicating current position
0
0
0
Setpoint used by the block in CAS mode
The number of the logical hardware channel to the transducer that is connected to this I/O block, see Chapter 5.1.
Time iin seconds to ignore a new fault state conditioin
Sets value for IO_OPTS option Fault State to Value
Feedback for BKCAL_IN of an upstream block.
Setpoint used by the block in RCAS mode (from host)
Mode shedding options, see Chapter 6.1.6
Setpoint and status for host back calculation in RCAS mode
This alert is generated by any change to the static data.
Block alarms, see Chapter 2.9
210 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Fault state
8 Output Blocks
8.3
Multiple Analog Output
The Multiple Analog Output block receives up to eight analog input values from upstream function blocks and outputs up to eight signals through an internal channel reference to an analog output module, see Fig. 8-7. This forces a voltage or current output signal proportional to the input value.
IN_x
FSTATE_VALx
FAILSAFE
ACTIVE
CHANNEL
To output module
IN_1
IN_2
IN_3
IN_4
IN_5
IN_6
IN_7
IN_8
SELECTOR
FSTATE_VAL 1/8
Fig. 8-7: Schematic diagram of the Multiple Analog Output block
8.3.1
Functional description
The Multipler Analog Output block forces up to eight electrical output signals between 0 mA and
20 mA, –5 VDC and 5 VDC or –10 VDC to 10 VDC, depending upon the wiring and configuration of the connected analog output module as well as the value range of the input signal. There are no scaling, limiting or tracking functions.
The output current or voltage of Point x is directly proportional to the IN_x value as shown in
Table 8-5, which uses the ControlCare SFC446 module as an example.)
IN_x
100 %
0 %
-25%
-150%
Current
20 mA
4 mA
0 mA
N/A
Voltage (DIP switch OFF) Voltage (DIP switch ON)
5 VDC 10 VDC
1 VDC
0 VDC
–5 VDC
2 VDC
0 VDC
–10 VDC
Tab. 8-1: Current and voltage output of SFC446 module as a function of configuration and input signal
When the block is operating in Auto mode, the value obtained after block execution is transmitted to the transducer through an internal channel reference given by the CHANNEL parameter, see
Chapter 5.1.
By default, the last valid value is held if a fault state is detected.
If the "Fault state to value x" option is selected in MO_OPTS , the output will force a signal proportional to the value entered in FSTATE_VALx when a fault condition exists longer than defined in the parameter FSTATE_TIME or when the option "Fault State" is selected the the resource block parameter SET_FSTATE . This ensures that the hardware connected to the block fails to safe, see Chapter 2.7.
When the option "Use fault state value on restart x" in MO_OPTS is selected, FSTATE_VALx will also be used on restart.
Endress+Hauser 211
8 Output Blocks
Output module
Block configuration
Guideline: FOUNDATION Fieldbus Function Blocks
8.3.2
Block configuration
Fig. 8-8 shows an example of a control strategy using the Multiple Analog Output block. Currently the only analog output module available, the SFC446, has four outputs which can be wired as current or voltage outputs depending on which terminals are used.
The four input values IN_1 to IN_4 are connected to the OUT outputs of upstream blocks. These are scaled to 0% to 100%, –25% to +100% or –150% to +100%, depending upon the output signal range required at the SFC446 module, see Table 8-5. The relationship between input signal to output in the SFC446 is as follows:
• IN_1 drives the AO-0 output
• IN_2 drives the AO-1 output
• IN_3 drives the AO-2 output
• IN_4 drives the AO-3 output
For the configuration example it is assumed that the SFC446 module is at Rack 2, Slot 0 of the controller backplane.
OUT
OUT_SCALE in percentage of span
OUT
OUT
OUT
IN_1
IN_2
IN_3
IN_4
MAO channel
4B
5B
6B
7B
2A
3A
8A
9A
AO-0 (mA)
AO-1 (V)
AO-2 (V)
AO-3 (mA)
Fig. 8-8: Example of links required for Multiple Analog Output block used with the SFC446
Before the MDO block is configured, the HC transducer block of the controller must be configured to recognise the SFC446 Analog Output module
Parameter
Controller HC block
MODE_BLK.Target
IO_TYPE_R2.SLOT_0
MDO block
MODE_BLK.Target
CHANNEL
FSTATE_TIME
FSTATE_VAL1
FSTATE_VAL2
FSTATE_VAL3
FSTATE_VAL4
Function
Normal operating mode of block
Declaration of SFC446 module in HC block
Normal operating mode of block
Rack + Slot + Group + 9
Time that elapses before fault state is activated
Fail-to-safe value for AO-0 (= IN_1)
Fail-to-safe value for AO-1 (= IN_2)
Fail-to-safe value for AO-2 (= IN_3)
Fail-to-safe value for AO-3 (= IN_4)
Example value
Auto
4-Analog Output
Auto
2009
5 (s) e.g.0
e.g.0
e.g.100
e.g.0
212 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Use in control loops
8 Output Blocks
Fig 8-9 shows the use of the Multiple Discrete Output block in a control loop. In order that the PID can work, it has to receive a BKCAL_IN signal, which is not provided by the MAO block. This is achieved by linking OUT signal of the PID block to the BKCAL_IN signal of the same block.
FT100
AI
OUT IN
BKCAL_IN
PID
OUT IN_1
FCV101
MAO
CV102
CHANNEL AO-1
Positioner
Block configuration
Mode
Status
Block errors
Fig. 8-9: Use of MAO block in control loops
Before the MDO block is configured, the HC transducer block of the controller must be configured to recognise the SFC446 Analog Output module
Function Example value Parameter
Controller HC block
MODE_BLK.Target
IO_TYPE_R2.SLOT_0
MDO block
MODE_BLK.Target
CHANNEL
FSTATE_TIME
FSTATE_VAL1
Normal operating mode of block
Declaration of SFC446 module in HC block
Normal operating mode of block
Rack + Slot + Group + 9
Time that elapses before fault state is activated
Fail-to-safe value for AO-0 (= IN_1)
Auto
4-Analog Output
Auto
2009
5 (s) e.g.0
8.3.3
Block operation
The block normally operates in "Auto" mode. Manual mode "Man" is implemented, but only for the recovery from OOS and LO to Auto.
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
The block assumes Local override (LO) when a fault state has been detected and the corresponding function has been configured. The output value then corresponds to FSTATE_VALx . The
FSTATE_STATUS parameter indicates which outputs are using fault state values.
Operation can be checked on-line by viewing the IN_x parameter
As there is no linkable output, there is also no status handling.
Block errors are indicated in the BLOCK_ERR parameter
Condition
Block Configuration Error
Device Fault State Set
Output Failure
Out-of-Service
Reason
• Invalid CHANNEL value
– value not supported by transducer block
– value not compatible with configuration in Controller HC block
• FAULT_STATE is active (Local override)
• Associated I/O module has failed
• MODE_BLK.Target currently set to OOS
Endress+Hauser 213
8 Output Blocks Guideline: FOUNDATION Fieldbus Function Blocks
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
CHANNEL
IN_1
IN_2
IN_3
IN_4
IN_5
IN_6
IN_7
IN_8
MO_OPTS
8.3.4
Block parameters
Parameter
FSTATE_TIME
FSTATE_VAL1
FSTATE_VAL2
FSTATE_VAL3
FSTATE_VAL4
FSTATE_VAL5
FSTATE_VAL6
FSTATE_VAL7
FSTATE_VAL8
FSTATE_STATUS
UPDATE_EVT
BLOCK_ALM
Legend: RO = Read Only
RO
RO
RO
RO
RO
RO
RO
RO
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
0
Description/Action
See Chapter 2.3.4
0
0
0
0
0
0
0
0
0
Block mode, set to MODE_BLK.Target to Cas
Block errors, see Chapter 5.2.3
The number of the logical hardware channel to the transducer that is connected to this I/O block, see Chapter 5.1.
Value and status of input signal 1
Value and status of input signal 2
Value and status of input signal 3
Value and status of input signal 4
Value and status of input signal 5
Value and status of input signal 6
Value and status of input signal 7
Value and status of input signal 8
Selects fail safe vlues and type to be output on block failure
• Faultstate to value x: block outputs FSAFE_VALx on fault
• Use fault state value on restart x: block outputs
FSAFE_VALx on restart
Time iin seconds to ignore a new fault state conditioin
Fail-to-safe value for IN_1
Fail-to-safe value for IN_2
Fail-to-safe value for IN_3
Fail-to-safe value for IN_4
Fail-to-safe value for IN_5
Fail-to-safe value for IN_6
Fail-to-safe value for IN_7
Fail-to-safe value for IN_8
Indicates which failsafe values are active
This alert is generated by any change to the static data.
Block alarms, see Chapter 2.9
214 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Fault state
8 Output Blocks
8.4
Multiple Discrete Output
The Multiple Discrete Output block receives up to eight discrete input values from upstream function blocks and outputs up to eight discrete ignals through an internal channel reference to a discrete output module, see Fig. 8-10. If signal inversion is required, the Discrete Output block must be used.
IN_D1
IN_D2
IN_D3
IN_D4
IN_D5
IN_D6
IN_D7
IN_D8
SELECTOR
IN_Dx
FSTATE_VAL_Dx
FAILSAFE
ACTIVE
CHANNEL
RRSG 9
To modules
SFC428
SFC432
SFC435
SFC438
FSTATE_VAL 1/8
Fig. 8-10: Schematic diagram of Multiple Discrete Output block
8.4.1
Functional description
The Multiple Discrete Output block forces the electrical outputs of the connected relay output module to "True/1" or "False/0" according to the value of IN_Dx , which must be "0" or "1".
The relay status is as shown in Table 8-6, which uses the ControlCare modules SFC428, SFC432,
SFC435 or SFC438 as examples. NO (Normally open) and NC (normally closed) is the state of the relay when no power is applied to the module.:
IN_Dx Signal
0
1
FALSE
TRUE
NO Relay
SFC428, SFC432, SFC438
Open
Closed
NC Relay
SFC435, SFC438
Closed
Open
Tab. 8-2: Relay status of the output module as a function of IN_Dx
When the block is operating in Auto mode, the value obtained after block execution is transmitted to the transducer through an internal channel reference given by the CHANNEL parameter, see
Chapter 5.1.
By default, the last valid value is held if a fault state is detected.
If the "Fault state to value x" option is selected in MO_OPTS , the output will force a signal proportional to the value entered in FSTATE_VALx when a fault condition exists longer than defined in the parameter FSTATE_TIME or when the option "Fault State" is selected the the resource block parameter SET_FSTATE . This ensures that the hardware connected to the block fails to safe, see Chapter 2.7.
When the option "Use fault state value on restart x" in MO_OPTS is selected, FSTATE_VALx will also be used on restart.
Endress+Hauser 215
8 Output Blocks
Output module
Block configuration
Mode
216
Guideline: FOUNDATION Fieldbus Function Blocks
8.4.2
Block configuration
Fig. 8-11 shows an example of a control strategy using the Multiple Discrete Output block and the
SFC438 module. This has eight voltage inputs and four output relays, two NO and two NC. In this case, and in the cases of the SFC432 (four NO relays) and SFC435 (four NC relays) only the first four inputs are used:
• IN_D1 drives the DO-1 output
• IN_D2 drives the DO-2 output
• IN_D3 drives the DO-3 output
• IN_D4 drives the DO-4 output
The SFC428 high density relay module has 16 NO relays and requires two MDO blocks, one for each relay group. All eight inputs can be used:
• IN_D1 drives the DO-0 output
• IN_D2 drives the DO-1 output
• ...
• IN_D8 drives the DO-7 output
For the configuration example it is assumed that the SFC438 module is at Rack 3, Slot 3 of the controller backplane.
OUT_D
False “0” or
True “1”
OUT_D
OUT_D
IN_D1
IN_D2
OUT_D
IN_D3
OUT_D
IN_D4
MDO channel
6B
7B
8B
9B
2B
3B
4B
5B
DO-1 (NO)
DO-2 (NO)
DO-3 (NC)
DO-4 (NC)
Fig. 8-11: Example of links required for Multiple Discrete Output block used with the SFC438
Before the MDO block is configured, the HC transducer block of the controller must be configured to recognise the SFC446 Analog Output module
Parameter
Controller HC block
MODE_BLK.Target
IO_TYPE_R3.SLOT_3
MDO block
MODE_BLK.Target
CHANNEL
FSTATE_TIME
FSTATE_VAL_D1
FSTATE_VAL_D2
FSTATE_VAL_D3
FSTATE_VAL_D4
Function
Normal operating mode of block
Declaration of SFC446 module in HC block
Normal operating mode of block
Rack + Slot + Group + 9
Time that elapses before fault state is activated
Fail-to-safe value for AO-0 (= IN_1)
Fail-to-safe value for AO-1 (= IN_2)
Fail-to-safe value for AO-2 (= IN_3)
Fail-to-safe value for AO-3 (= IN_4)
Example value
Auto
8-DiscIn 4-DiscOut
Auto
3319
5 (s) e.g.0
e.g.0
e.g.1
e.g.1
8.4.3
Block operation
The block normally operates in "Auto" mode. Manual mode "Man" is implemented, but only for the recovery from OOS and LO to Auto.
If parameters are to be changed while the block is online, MODE_BLK.Target
must be temporarily set to OOS (Out of Service). A parameter change is then downloaded directly to the controller.
The block assumes Local override (LO) when a fault state has been detected and the corresponding function has been configured. The output value then corresponds to FSTATE_VAL_Dx . The
FSTATE_STATUS parameter indicates which outputs are using fault state values.
Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Status
Block errors
8 Output Blocks
Operation can be checked on-line by viewing the IN_Dx parameter
As there is no linkable output, there is also no status handling.
Block errors are indicated in the BLOCK_ERR parameter
Condition
Block Configuration Error
Device Fault State Set
Output Failure
Out-of-Service
Reason
• Invalid CHANNEL value
– value not supported by transducer block
– value not compatible with configuration in Controller HC block
• FAULT_STATE is active (Local override)
• Associated I/O module has failed
• MODE_BLK.Target currently set to OOS
ST_REV
TAG_DESC
STRATEGY
ALERT_KEY
MODE_BLK
BLOCK_ERR
CHANNEL
IN_D1
IN_D2
IN_D3
IN_D4
IN_D5
IN_D6
IN_D7
IN_D8
MO_OPTS
8.4.4
Block parameters
Parameter
FSTATE_TIME
FSTATE_VAL_D1
FSTATE_VAL_D2
FSTATE_VAL_D3
FSTATE_VAL_D4
FSTATE_VAL_D5
FSTATE_VAL_D6
FSTATE_VAL_D7
FSTATE_VAL_D8
FSTATE_STATUS
UPDATE_EVT
BLOCK_ALM
Legend: RO = Read Only
RO
RO
RO
RO
RO
RO
RO
RO
Valid range/
Options
Default value
0
1 to 255 0
0 blanks
O/S
RO
0
Description/Action
See Chapter 2.3.4
0
0
0
0
0
0
0
0
0
Block mode, set to MODE_BLK.Target to Cas
Block errors, see Chapter 5.2.3
The number of the logical hardware channel to the transducer that is connected to this I/O block, see Chapter 5.1.
Value and status of input signal 1
Value and status of input signal 2
Value and status of input signal 3
Value and status of input signal 4
Value and status of input signal 5
Value and status of input signal 6
Value and status of input signal 7
Value and status of input signal 8
Selects fail safe vlues and type to be output on block failure
• Faultstate to value x: block outputs FSAFE_VALx on fault
• Use fault state value on restart x: block outputs
FSAFE_VALx on restart
Time iin seconds to ignore a new fault state conditioin
Fail-to-safe value for IN_1D
Fail-to-safe value for IN_D2
Fail-to-safe value for IN_D3
Fail-to-safe value for IN_D4
Fail-to-safe value for IN_D5
Fail-to-safe value for IN_D6
Fail-to-safe value for IN_D7
Fail-to-safe value for IN_D8
Indicates which failsafe values are active
This alert is generated by any change to the static data.
Block alarms, see Chapter 2.9
Endress+Hauser 217
8 Output Blocks
Substatus values
218
Guideline: FOUNDATION Fieldbus Function Blocks
Appendix A: Interpreting parameter status
The Status has the following composition:
MSB LSB
Quality Substatus Limits
Bad
Bad
Bad
Bad
Bad
Bad
Bad
Bad
Fig. 8-12: Composition of status byte
The quality, sub-status, and limit components of status are defined as follows:
Quality - The quality used is determined by the highest priority condition:
• 0 = Bad
• 1 = Uncertain
• 2 = Good (Non-cascade)
• 3 = Good (Cascade)
Substatus - Sub-status values in the status attribute are defined as shown in the table below.
Limit - The following limit conditions will be always available in the status attribute.
• 0 = Not limited
• 1 = Low limited
• 2 = High limited
• 3 = Constant
Examples:
• 0xC1 (in hexadecimal) is "Good-Cascade Non Specific and Low Limited " status
• 0xCF(in hexadecimal) is "Good-Cascade Not invited and Constant " status
• 0x4E(in hexadecimal) is "Uncertain Initial Value and High Limited" status
Substatus values as a function of quality
Quality Substatus
0 = Non-specific
1 = Configuration Error
2 = Not Connected
3 = Device Failure
4 = Sensor Failure
5 = No Communication
6 = No Communication
7 = Out of Service (highest priority)
Hex value
0x00
0x04
0x08
0x0c
0x10 last usable value no usable value
0x1c
Not in
X
X
Cascade path
Forward Backward
X
X
X
X
X
X
0x14
0x18
X
X
X
X
Quality Substatus
Uncertain 0 = Non-specific
Uncertain 1 = Last Usable Value
Uncertain 2 = Substitute
Uncertain 3 = Initial Value
Uncertain 4 = Sensor Conversion not Accurate
Uncertain 5 = Engineering Unit Range Violation
Uncertain 6 = Sub-normal
Hex value
0x40
0x44
0x48
0x4c
0x50
0x54
0x58
Not in
X
X
X
X
X
X
X
Cascade path
Forward Backward
Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 8 Output Blocks
Quality Substatus
Uncertain 0 = Non-specific
Uncertain 1 = Last Usable Value
Uncertain 2 = Substitute
Uncertain 3 = Initial Value
Uncertain 4 = Sensor Conversion not Accurate
Uncertain 5 = Engineering Unit Range Violation
Uncertain 6 = Sub-normal
Quality Sub-status
Quality
GoodC
GoodC
GoodC
GoodC
GoodC
GoodC
GoodC
GoodC
GoodNC
GoodNC
GoodNC
GoodNC
GoodNC
GoodNC
GoodNC
0 = Non-specific (lowest priority)
1 = Active Block Alarm
2 = Active Advisory Alarm
3 = Active Critical Alarm
4 = Unacknowledged Block Alarm
5 = Unacknowledged Advisory Alarm
6 = Unacknowledged Critical Alarm
Sub-status
0 = Non-specific 0xc0
1 = Initialization Acknowledge(IA) 0xc4
2 = Initialization Request(IR)
3 = Not Invited (NI)
0xc8
0xcc
4 = Not Selected(NS)
6 = Local Override(LO)
7 = Fault State Active(FSA)
8 = Initiate Fault State (IFS)
0xd0
0xd8
0xdc
0xe0
0x80
0x84
0x88
0x8c
0x90
0x94
0x98
Hex value
Hex value
0x40
0x44
0x48
0x4c
0x50
0x54
0x58
Hex value
Not in
X
X
X
X
X
X
X
Cascade path
Forward Backward
Not in
X
X
X
X
X
X
X
Cascade path
Forward Backward
Not in
Cascade path
Forward Backward
X
X
X
X
X
X
X
X
X
Conversion from index to number
Conversion from number to index
The following formula is used to obtain the enumeration number of a determinate status attribute:
• Decimal Value Status = 64*Quality + 4* Sub-Status + Limit
For example, considering the following status:
• "Uncertain - Initial Value - High Limited"
Quality = "uncertain" = 1, Sub-Status = "Initial Value" = 3, Limit = "High Limited " = 2.
Applying the formula:
• Decimal Value Status = 64 * 1 + 4 * 3 + 2 = 78 (in decimal) or 0x4E (in Hexadecimal) a) Expressing the number in binary.
• Hex Value Status = 78 = 0x4E = 01001110 (in binary)
Dividing this binary number in quality, sub-status and limit fields:
• Quality = 01 = 1 = "Uncertain", Sub-Status = 0011 = 3 = "Initial Value",
Limit = 10 = 2 = "High Limited"
The corresponding status is "Uncertain - Initial Value - High Limited".
b) Expressing the value of status in decimal format.
• Decimal Value Status = 78
Divide the number by 64. The quotient will be the duality and save the remainder:
Quality = 78 / 64 = 1
• Remainder = 14. Divide the remainder by 4. The quotient will be the substatus and the remainder will be the limit:
SubStatus = 14 / 4 = 3
Limit = 2
Endress+Hauser 219
8 Output Blocks Guideline: FOUNDATION Fieldbus Function Blocks
Appendix B: Standard data types and structures
This chapter contains definitions of every standard data type and structure used in the system.
Data Type
Boolean
Integer8
Integer16
Integer32
Unsigned8
Unsigned16
Unsigned32
FloatingPoint
VisibleString
OctetString
Date
TimeofDay
TimeDifference
BitString
DataTimeValue
Description
True or false they are one byte per character, and include the 7 bit ASCII character set.
Octet strings are binary.
Block
DS-64
Analog Value & Status
DS-65
Discrete Value & Status
DS-66
This data structure comprises the attributes of a block.
6
7
4
5
2
3
E
1
Element Name
Block Tag
DD MemberId
DD ItemId
DD Revision
Profile
Profile Revision
Execution Time
8
9
Period of Execution
Number of Parameters
10 Next FB to Execute
11 Starting Index of Views
12 NumberofVIEW_3
13 NumberofVIEW_4
Data Type Size
VisibleString 32
Unsigned32 4
Unsigned32 4
Unsigned16 2
Unsigned16 2
Unsigned16 2
Unsigned32 4
Unsigned32 4
Unsigned16 2
Unsigned16 2
Unsigned16 2
Unsigned8
Unsigned8
1
1
This data structure comprises the value and status of inputs and outputs that are floating point parameters.
E
1
2
Element Name
Status
Value
Data Type
Unsigned8
Float
Size
1
4
This data structure consists of the value and status of discrete value parameters.
E
1
2
Element Name
Status
Value
Data Type
Unsigned8
Unsigned8
Size
1
1
220 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Scaling
DS-68
8 Output Blocks
This data structure consists of the static data used to scale floating point values for display purposes.
Mode
DS-69
Access Permissions
DS-70
Alarm Float
DS-71
Alarm Discrete
DS-72
Event Update
DS-73
Alarm Summary
DS-74
2
3
E
1
4
Element Name
EU at 100%
EU at 100%
Units Index
Decimal Point
Data Type
Float
Float 4
Unsigned16 2
Integer8
Size
4
1
This data structure consists of bit strings for target, actual, permitted, and normal modes.
2
3
E
1
4
Element Name
Target
Actual
Permitted
Normal
Data Type
Bitstring
Bitstring
Bitstring
Bitstring
1
1
Size
1
1
This data structure consists of access control flags for access to block parameters.
E
1
2
Element Name
Grant
Deny
Data Type
Bitstring
Bitstring
Size
1
1
This data structure consists of data that describes floating point alarms.
2
3
E
1
4
5
Element Name
Unacknowledged
Alarm State
Time Stamp
Subcode
Value
Data Type
Unsigned8
Unsigned8
Time Value
Unsigned16 2
Float 4
1
8
Size
1
This data structure consists of data that describes discrete alarms.
2
3
E
1
4
5
Element Name
Unacknowledged
Alarm State
Time Stamp
Subcode
Value
Data Type
Unsigned8
Unsigned8
Time Value
Unsigned16 2
Unsigned8 1
1
8
Size
1
This data structure consists of data that describes a static revision alarm.
2
3
E
1
4
5
Element Name
Unacknowledged
Update State
Time Stamp
Static Revision
Relative Index
Data Type
Unsigned8
Unsigned8
Time Value
Unsigned16 2
Unsigned16 2
1
8
Size
1
This data structure consists of data that summarize 16 alerts.
2
3
E
1
4
Element Name
Current
Unacknowledged
Unreported
Disabled
Data Type
Bit String
Bit String
Bit String
Bit String
2
2
Size
2
2
Endress+Hauser 221
8 Output Blocks Guideline: FOUNDATION Fieldbus Function Blocks
Simulate Floating Point
DS-82
Simulate Discrete
DS-83
Test Read/Write
DS-85
Value And Status
Unsigned16
DS-145
Discrete Structure
DS-159
This data structure consists of a simulate and transducer floating point value and status and a simulate enable/disable discrete.
2
3
E
1
4
5
Element Name
Simulate Status
Simulate Value
Transducer Status
Transducer Value
Simulate En/Disable
Data Type
Unsigned8
Float
Unsigned8
Float
Unsigned8
4
1
4
1
Size
1
This data structure consists of a simulate and transducer discrete value and status and a simulate enable/disable discrete.
2
3
E
1
4
5
Element Name
Simulate Status
Simulate Value
Transducer Status
Transducer Value
Simulate En/Disable
Data Type
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
4
1
4
1
Size
1
This data structure consists of function block test read/write data.
6
7
4
5
2
3
E
1
ElementName
Value1
Value2
Value3
Value4
Value5
Value6
Value7
8
9
Value8
Value9
10 Value10
11 Value11
12 Value12
13 Value13
14 Value14
15 Value15
DataType
Boolean
Integer8
Integer16
Integer32
Unsigned8
Unsigned16 2
Unsigned32 4
4
1
1
2
Size
1
FloatingPoint 4
VisibleString 32
OctetString
Date
32
7
Time of Day 6
Time
Difference
6
Bitstring
Time Value
2
8
This data structure is used to transmit value and status of PROFIBUS device values.
E
1
2
Element Name
Status
Value
Data Type Size
Unsigned16 1
Unsigned16 2
This data structure consists of one status and eight discrete value parameters.
6
7
4
5
8
9
2
3
E
1
Element Name
Status
Value1
Value2
Value3
Value4
Value5
Value6
Value7
Value8
Data Type
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
1
1
1
1
1
1
1
1
Size
1
222 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks
Discrete Structure
DS-160
This data structure consists of one status and sixteen discrete value parameters.
6
7
4
5
2
3
E
1
8
9
Value7
Value8
10 Value9
11 Value10
12 Value11
13 Value12
14 Value13
15 Value14
16 Value15
17 Value16
Element Name
Status
Value1
Value2
Value3
Value4
Value5
Value6
Data Type
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Size
1
8 Output Blocks
Endress+Hauser 223
8 Output Blocks Guideline: FOUNDATION Fieldbus Function Blocks
Appendix C: Manufacturer-specific data structures
Scaling Conversion
DS-256
Scaling Conversion with
Status
DS-257
This appendix contains the manufacturer-specific data structures used in the system.
This data structure consists of data used to generate constants A and B in equation Y= A*X + B.
2
3
E
1
4
5
Element Name
From EU 100%
From EU 0%
To EU 100%
To EU 0%
Data Type
Data Type
Float
Float
Float
Float
Unsigned8
4
1
4
4
Size
4
This data structure consists of data used to generate constants A and B in equation Y= A*X + B plus the output status.
4
5
6
2
3
E
1
Element Name
From EU 100%
From EU 0%
To EU 100%
To EU 0%
Data Type
Output Status
Data Type
Float
Float
Float
Float
Unsigned8
Unsigned8
4
1
1
4
4
Size
4
Scaling Locator
DS-258
This data structure consists of data used to generate constants A and B in equation Y= A*X + B plus the addresses in a slave device.
6
7
4
5
2
3
E
1
Element Name
From EU 100%
From EU 0%
To EU 100%
To EU 0%
Data Type
Slave Address
Modbus Address of Value
Data Type
Float
Float
Float
Float
Unsigned8
Unsigned8 1
Unsigned16 2
4
1
4
4
Size
4
Scaling Locator with Status
DS-259
This data structure consists of data used to generate constants A and B in equation
Y= A*X + B plus the addresses in a slave device.
6
7
4
5
8
2
3
E
1
Element Name
From EU 100%
From EU 0%
To EU 100%
To EU 0%
Data Type
Slave Address
Modbus Address of Value
Modbus Address of Status
Data Type
Float
Float
Float
Float
Unsigned8
Unsigned8 1
Unsigned16 2
4
1
Unsigned16 2
4
4
Size
4
Modbus Variable Locator
DS-260
This data structure consists of data indicating the addresses in a slave device.
E
1
2
Element Name
Slave Address
Modbus Address of Value
Data Type
Unsigned8
Unsigned16 2
Size
1
224 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks 8 Output Blocks
Modbus Variable Locator with Status
DS-261
This data structure consists of data indicating the addresses in a slave device.
FF Parameter ID
DS-262
Slave Address
DS-263
2
3
E
1
Element Name
Slave Address
Modbus Address of Value
Modbus Address of Status
Data Type
Unsigned8
Unsigned16 2
Unsigned16 2
Size
1
This data structure consists of data informing the position of the FF parameter requested.
2
3
E
1
Element Name
Block Tag
Relative Index
Sub Index
Data Type Size
VisibleString(32) 32
Unsigned16
Unsigned8
2
1
This data structure consists of data informing the IP address and the Modbus address of the slaves.
6
7
4
5
2
3
E
1
Element Name
IP Slave1
IP Slave2
IP Slave3
IP Slave4
IP Slave5
IP Slave6
IP Slave7
8
9
IP Slave8
Slave Address1
10 Slave Address2
11 Slave Address3
12 Slave Address4
13 Slave Address5
14 Slave Address6
15 Slave Address7
16 Slave Address8
Data Type Size
VisibleString(16) 16
VisibleString(16) 16
VisibleString(16) 16
VisibleString(16) 16
VisibleString(16) 16
VisibleString(16) 16
VisibleString(16) 16
VisibleString(16) 16
Unsigned8 1
Unsigned8
Unsigned8
1
1
Unsigned8
Unsigned8
Unsigned8
Unsigned8
Unsigned8
1
1
1
1
1
Endress+Hauser 225
Table of Contents Guideline: FOUNDATION Fieldbus Function Blocks
Index
A
ACK_OPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Adaptive gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Advanced Equations block . . . . . . . . . . . . . . . . . . . . . . . 193
Advanced PID Control . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Alarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Alarm display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Alert handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Alert objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Analog Alarm block . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Analog Input block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Analog output block . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Anti-reset wind-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Arithmetic block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Automatic (Auto) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
B
Back calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 , 70
Backward path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Block modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Block objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Block parameters
AALM block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Advanced PID block . . . . . . . . . . . . . . . . . . . . . . . . . . 91
AEQU block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
AI block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
AO block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
ARTH block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
CCHAR block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
CHAR block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
CT block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
CTRW block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
DENS block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Device transducer block . . . . . . . . . . . . . . . . . . . . . . . 52
DI block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
DO block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
EAAL block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Enhanced PID control . . . . . . . . . . . . . . . . . . . . . . . . 86
ESPG block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
FFET block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
HY_MAD block . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
INTG block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
ISEL block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
LL block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
MAI block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
MAO block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
MDI block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
MDO block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
OS block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
OSDL block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
PID block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Resource block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
SPG block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
STEP block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
TMR block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
C
Calculated variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
CAS_IN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Cascade (Cas) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Cascade control . . . . . . . . . . . . . . . . . . . . . . . . . 28 , 74 , 96
Cascade initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Cascade Signal Characterizer block . . . . . . . . . . . . . . . . 118
Characterization dialog . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Closed-loop control . . . . . . . . . . . . . . . . . . . . . . . . . . 71 , 95
Commissioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Constant and Contained RW block . . . . . . . . . . . . . . . . . 178
Constant block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Contained parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Control Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Control loop integrit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Control strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
CONTROL_OPTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
D
Density block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Discrete Input block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Discrete output block . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Dynamic parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
E
Enhanced PID Control . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Enhanced Setpoint Ramp Generator block . . . . . . . . . . . 152
Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Events and alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
F
Fault state handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Feedforward control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Flexible function blocks . . . . . . . . . . . . . . . . . . . . . . . . . 200
Flip-flop and Edge Trigger block . . . . . . . . . . . . . . . . . . . 185
Forward path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Function block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Function block application process . . . . . . . . . . . . . . . . . . . 7
Function block options . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
G
Gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 , 90
H
Hybrid block with Analog I/O . . . . . . . . . . . . . . . . . . . . 200
Hybrid block with Discrete I/O . . . . . . . . . . . . . . . . . . . 200
Hybrid block with Mixed I/O . . . . . . . . . . . . . . . . . . . . 200
I
Initialization manual (Iman) . . . . . . . . . . . . . . . . . . . . . . . 14
Input parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Input Selector block . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Integrator block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
226 Endress+Hauser
Guideline: FOUNDATION Fieldbus Function Blocks Table of Contents
L
Lead-Lag block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Limit alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Linearization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Link objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Local override (LO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
M
Manual (Man) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Mode priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Mode shedding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Multiple Analog Input block . . . . . . . . . . . . . . . . . . . . . . . 63
Multiple Analog Output block . . . . . . . . . . . . . . . . . . . . 211
Multiple Discrete Input block . . . . . . . . . . . . . . . . . . . . . . 65
Multiple Discrete Output block . . . . . . . . . . . . . . . . . . . . 215
N
Non-volatile parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
O
Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Ouput limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Out of service (OOS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Output parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Output Signal Selector and Dynamic Limiter block . . . . . 168
Output Splitter block . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Output tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 , 76
P
Parameter
ACK_OPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
ALARM_HYS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
ALARM_SUM . . . . . . . . . . . . . . . . . . . . . . . . 38 , 58 , 61
ALERT_ KEY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
ARITH_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . 101 , 103
BIAS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
BKCAL_IN, BKCAL_OUT . . . . . . . . . . . . . . . . . . 23 , 70
BLOCK_ERR, BLOCK_ALM . . . . . . . . . . . . . . . . . . . . 38
CHANNEL . . . . . . . . . . . . . . . . . . . 51 , 55 , 60 , 63 , 65
CONTROL_OPTS . . . . . . . . . . . . . . . . . . . . . . . . 23 , 34
DISC_ALM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
DISC_PRI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
FEATURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
FEATURES, FEATURE_SEL . . . . . . . . . . . . . . . . 45 , 47
FF_VAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
FIELD_VAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 , 58
FSAFE_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
FSAFE_VAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
FSTATE_TIME, FSTATE_VAL, FSTATE_VAL_D . . . . . 30
GAIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 , 103
GRANT_DENY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
INPUT_OPTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
IO_OPTS . . . . . . . . . . . . . . . . . . . . . . . 23 , 30 , 33 , 56
L_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 , 55
MODE_BLK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
OSDL_OPTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
OUT . . . . . . . . . . . . . . . . . . . . . . . . 23 , 41 , 58 , 64 , 66
OUT_D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
OUT_RANGE . . . . . . . . . . . . . . . . . . . . . . . . . . 20 , 101
OUT_SCALE . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 , 56
Endress+Hauser
PRE_OUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
PV . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 , 58 , 68 , 81
PV_D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
PV_FTIME . . . . . . . . . . . . . . . . . . . . . . . . . . 19 , 56 , 60
RCAS_IN, RCAS_OUT . . . . . . . . . . . . . . . . . . . . . . . . 77
READBACK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
RESTART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
ROUT_IN, ROUT_OUT . . . . . . . . . . . . . . . . . . . . . . . 79
RS_STATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
SHED_OPT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
SIMULATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 , 58
SIMULATE_D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
SP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 , 69
ST_REV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
STATUS_OPTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
STRATEGY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
TAG_DESC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
TRK_VAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
UPDATE_EVT . . . . . . . . . . . . . . . . . . . . . . . . . . 11 , 38
WRITE_LOCK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
XD_ERROR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
XD_SCALE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 , 56
XD_STATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
XXX_ALM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
XXX_PRI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 xxx_PRI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Parameter identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Parameter status
Substatus values . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Parameter types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
PID algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 , 88
PID Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
PID control algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Process value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
PROFIBUS output block . . . . . . . . . . . . . . . . . . . . . . . . . . 15
PV_SCALE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
R
Ramp generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Range extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Remote cascade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Remote cascade (RCas) . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Remote output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Remote output (ROut) . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Reporting, priority and acknowledgement . . . . . . . . . . . . . 36
Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Resource block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
S
Safety conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Scaling parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Setpoint limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Setpoint Ramp Generator block . . . . . . . . . . . . . . . . . . . . 145
Setpoint rate limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Setpoint tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Setpoint value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Signal Characterizer block . . . . . . . . . . . . . . . . . . . . . . . . 114
Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
227
Table of Contents Guideline: FOUNDATION Fieldbus Function Blocks
ST_REV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Static parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Status propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Step Output PID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Substatus and limit propagation . . . . . . . . . . . . . . . . . . . . 26
Substatus values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
T
Time constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 , 154
Timer and Logic block . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Transducer block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 , 50
Trouble-shooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
U
Universal parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
UPDATE_EVT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
V
View and trend objects . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
W
Write lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
WRITE_LOCK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
228 Endress+Hauser
www.endress.com/worldwide
Scarica
Pubblicità