Download as pdf or txt
Download as pdf or txt
You are on page 1of 92

PPLib800xA 6.2

Functional Description
PP_ElementLib

PPLib800xA 6.2

Functional Description
PP_ElementLib

Document Number: 3BTG811796-3022


Document Revision: A
Release: May 2019

Notice
This document contains information about one or more ABB products and may include a description of or a
reference to one or more standards that may be generally relevant to the ABB products. The presence of any
such description of a standard or reference to a standard is not a representation that all of the ABB products
referenced in this document support all of the features of the described or referenced standard. In order to
determine the specific features supported by a particular ABB product, the reader should consult the product
specifications for the particular ABB product.
ABB may have one or more patents or pending patent applications protecting the intellectual property in the
ABB products described in this document.
The information in this document is subject to change without notice and should not be construed as a
commitment by ABB. ABB assumes no responsibility for any errors that may appear in this document.
Products described or referenced in this document are designed to be connected, and to communicate
information and data via a secure network. It is the sole responsibility of the system/product owner to provide
and continuously ensure a secure connection between the product and the system network and/or any other
networks that may be connected.
The system/product owners must establish and maintain appropriate measures, including, but not limited to,
the installation of firewalls, application of authentication measures, encryption of data, installation of antivirus
programs, and so on, to protect the system, its products and networks, against security breaches, unauthorized
access, interference, intrusion, leakage, and/or theft of data or information.
ABB verifies the function of released products and updates. However system/product owners are ultimately
responsible to ensure that any system update (including but not limited to code changes, configuration file
changes, third- party software updates or patches, hardware change out, and so on) is compatible with the
security measures implemented. The system/product owners must verify that the system and associated
products function as expected in the environment they are deployed.
In no event shall ABB be liable for direct, indirect, special, incidental or consequential damages of any nature or
kind arising from the use of this document, nor shall ABB be liable for incidental or consequential damages
arising from use of any software or hardware described in this document.
This document and parts thereof must not be reproduced or copied without written permission from ABB, and
the contents thereof must not be imparted to a third party nor used for any unauthorized purpose.
The software or hardware described in this document is furnished under a license and may be used, copied, or
disclosed only in accordance with the terms of such license. This product meets the requirements specified in
EMC Directive 2014/30/EU and in Low Voltage Directive 2014/35/EU.


Trademarks
All rights to copyrights, registered trademarks, and trademarks reside with their respective owners.
Copyright © 2019 by ABB.
All rights reserved.
Table of Contents

INTRODUCTION ............................................................................................................................... 7
General .............................................................................................................................................. 7

PROJECT CONSTANTS ................................................................................................................... 9


Project Constant ............................................................................................................................. 9

DATA TYPES ................................................................................................................................... 17


ACS600_Std ................................................................................................................................... 17
Alarm2Limit .................................................................................................................................... 17
Alarm2LimitCurr ............................................................................................................................ 18
Alarm4Limit .................................................................................................................................... 18
AlarmInd.......................................................................................................................................... 18
AlarmPar ......................................................................................................................................... 18
AlarmParCurr.................................................................................................................................. 19
Ctrl_Data ......................................................................................................................................... 19
Ctrl_GenCon ...................................................................................................................................20
Ext_Analog......................................................................................................................................20
Ext_Control..................................................................................................................................... 21
GroupStepTime ............................................................................................................................. 22
HSI_Analog ..................................................................................................................................... 22
HSI_Control .................................................................................................................................... 23
HSI_Digital ...................................................................................................................................... 23
HSI_Seq ........................................................................................................................................... 23
HSI_X ............................................................................................................................................... 25
IAConn ............................................................................................................................................. 25
IAInParType1................................................................................................................................... 25
IAInParType2 .................................................................................................................................. 25
IBConn ............................................................................................................................................. 25
IBInParType1................................................................................................................................... 26
IBInParType2 .................................................................................................................................. 26
IBInParType3 .................................................................................................................................. 26
IBInParType4 .................................................................................................................................. 26
ICConn ............................................................................................................................................. 27
ICInParType1 .................................................................................................................................. 27
ICInParType2 .................................................................................................................................. 27
PB_Status ....................................................................................................................................... 27
RangeCurr ....................................................................................................................................... 27
RangeDInt ....................................................................................................................................... 28
RangeLimit ..................................................................................................................................... 28
RangeReal ....................................................................................................................................... 28
Real16 .............................................................................................................................................. 28
ReportsConfig ............................................................................................................................... 29
ReportsPar...................................................................................................................................... 29
ReportsValue .................................................................................................................................. 29
TotalData ........................................................................................................................................30

FUNCTION BLOCK TYPES ............................................................................................................ 31


ADD_MR .......................................................................................................................................... 31
Alarm_Lim2 ..................................................................................................................................... 32
Alarm_Lim4 .................................................................................................................................... 33
AnalogDelay ................................................................................................................................... 34
Avg ................................................................................................................................................... 35
B16/B32SimpleEvent .................................................................................................................... 36
B16/B32ToDInt .............................................................................................................................. 37
B16/B32ToDword .......................................................................................................................... 38
COMP_I ............................................................................................................................................ 39
COMP_R ......................................................................................................................................... 40
CON_PU1 ......................................................................................................................................... 41
CONV_BI ......................................................................................................................................... 46
CONV_IB ......................................................................................................................................... 48
COUNT_L ....................................................................................................................................... 50
DeMux_MI ....................................................................................................................................... 51
DERivator ........................................................................................................................................ 52
DInt/DwordSimpleEvent .............................................................................................................54
DIntToB16/B32 .............................................................................................................................. 55
DwordToB16/B32 ..........................................................................................................................56
Div_R ................................................................................................................................................ 57
Filt_1P ..............................................................................................................................................58
Filt_2P ............................................................................................................................................. 60
Fung_1V ........................................................................................................................................... 62
GetBit ............................................................................................................................................. 64
INTegrator ...................................................................................................................................... 65
LIM ................................................................................................................................................... 67
LIM_N ...............................................................................................................................................68
Max_R .............................................................................................................................................. 70
Min_R ............................................................................................................................................... 71
Mono ................................................................................................................................................ 72
Move ................................................................................................................................................ 73
Mux_I ............................................................................................................................................... 74
Mux_MI ............................................................................................................................................ 75
Mux_MN .......................................................................................................................................... 76
Mux_N .............................................................................................................................................. 77
MuxA_I ............................................................................................................................................. 78
Osc_B............................................................................................................................................... 79
PI...................................................................................................................................................... 80
Ramp ............................................................................................................................................... 82
Reg .................................................................................................................................................. 84
SetBit ...............................................................................................................................................85
SR_D.................................................................................................................................................86
SW .................................................................................................................................................... 87
SW_C ................................................................................................................................................88
TimerPuls ........................................................................................................................................89
Tresh_L............................................................................................................................................ 91
INTRODUCTION

General
PP_ElementLib contains a set of function blocks that give additional functions for application
programming. Each function block has its own unique name. Some function blocks have call
parameters for determining the size.
All function blocks in PP_ElementLib are not configured as aspect object and alarm owner.
They have no graphical presentation or alarm handling. Most of them have no interaction
window for parameter configuration except for Fung-1V and ConPU1.

7
INTRODUCTION
General

8
PROJECT CONSTANTS

Project Constant
The following project constants are available in PP_ElementLib:
Name Data Type Initial Value
cBit.B00 'B00' string
cBit.B01 'B01' string
cBit.B02 'B02' string
cBit.B03 'B03' string
cBit.B04 'B04' string
cBit.B05 'B05' string
cBit.B06 'B06' string
cBit.B07 'B07' string
cBit.B08 'B08' string
cBit.B09 'B09' string
cBit.B10 'B10' string
cBit.B11 'B11' string
cBit.B12 'B12' string
cBit.B13 'B13' string
cBit.B14 'B14' string
cBit.B15 'B15' string
cBit.B16 'B16' string
cBit.B17 'B17' string
cBit.B18 'B18' string
cBit.B19 'B19' string
cBit.B20 'B20' string
cBit.B21 'B21' string
cBit.B22 'B22' string
cBit.B23 'B23' string
cBit.B24 'B24' string
cBit.B25 'B25' string
cBit.B26 'B26' string
cBit.B27 'B27' string
cBit.B28 'B28' string
cBit.B29 'B29' string
cBit.B30 'B30' string
cBit.B31 'B31' string
cEmptyString '' string
cPPCustom.AlcBlkBlockAll false bool
cPPInit.AlcBlkEvEnbl false bool
cPPInit.Class 500 dint
cPPInit.DevHystType false bool
cPPInit.EOLimEvEnbl false bool
9
PROJECT CONSTANTS
Project Constant

Name Data Type Initial Value


cPPInit.ExtModeEvEnbl false bool
cPPInit.IAEvEnbl false bool
cPPInit.IAOprBlk false bool
cPPInit.IBEvEnbl false bool
cPPInit.IBOprBlk false bool
cPPInit.ICEvEnbl false bool
cPPInit.MVHystType false bool
cPPInit.OprModeEvEnbl false bool
cPPInit.RunEvEnbl false bool
cPPInit.Severity 1000 dint
cPPInit.ShowCurrent 0 dint
cPPInit.ShowCurrentACS 1 dint
cPPInit.ShowCurrentUMC 1 dint
cPPLib.ACS.ACS550 '||ACS550_' string
cPPLib.ACS.ACS550AW1 '||ACS550_AW1_' string
cPPLib.ACS.ACS550AW2 '||ACS550_AW2_' string
cPPLib.ACS.ACS550FW1 '||ACS550_FW1_' string
cPPLib.ACS.ACS550FW2 '||ACS550_FW2_' string
cPPLib.ACS.ACS600 '||ACS600_' string
cPPLib.ACS.ACS600AW1 '||ACS600_AW1_' string
cPPLib.ACS.ACS600AW2 '||ACS600_AW2_' string
cPPLib.ACS.ACS600FW1 '||ACS600_FW1_' string
cPPLib.ACS.ACS600FW2 '||ACS600_FW2_' string
cPPLib.ACS.ACS800 '||ACS800_' string
cPPLib.ACS.ACS800AW1 '||ACS800_AW1_' string
cPPLib.ACS.ACS800AW2 '||ACS800_AW2_' string
cPPLib.ACS.ACS800FW1 '||ACS800_FW1_' string
cPPLib.ACS.ACS800FW2 '||ACS800_FW2_' string
cPPLib.ACS.ACS850 '||ACS850_' string
cPPLib.ACS.ACS880 '||ACS880_' string
cPPLib.ACS.Alarm.SW00 '||ACS_SW00' string
cPPLib.ACS.Alarm.SW03 '||ACS_SW03' string
cPPLib.ACS.Alarm.SW06 '||ACS_SW06' string
cPPLib.ACS.Alarm.SW07 '||ACS_SW07' string
cPPLib.ACS.Alarm.SW10 '||ACS_SW10' string
cPPLib.ACS.Alarm.SW12 '||ACS_SW12' string
cPPLib.ACS.AlarmMsg.SW00 'SWB00' string
cPPLib.ACS.AlarmMsg.SW03 'SWB03' string
cPPLib.ACS.AlarmMsg.SW06 'SWB06' string
cPPLib.ACS.AlarmMsg.SW07 'SWB07' string
cPPLib.ACS.AlarmMsg.SW10 'SWB10' string
cPPLib.ACS.AlarmMsg.SW12 'SWB12' string
cPPLib.Alarm.IO.AIErr '||PP_AIErr' string
cPPLib.Alarm.IO.AOErr '||PP_AOErr' string
cPPLib.Alarm.IO.DIErr '||PP_DIErr' string
cPPLib.Alarm.IO.DOErr '||PP_DOErr' string
cPPLib.Alarm.IO.PressErr '||PP_PressErr' string
10
PROJECT CONSTANTS
Project Constant

Name Data Type Initial Value


cPPLib.Alarm.IO.TempErr '||PP_TempErr' string
cPPLib.Alarm.Limit.LSErr '||PP_LSErr' string
cPPLib.Alarm.Limit.PosErrC '||PP_PosErrC' string
cPPLib.Alarm.Limit.PosErrO '||PP_PosErrO' string
cPPLib.Alarm.Limit.TorqErrC '||PP_TorqErrC' string
cPPLib.Alarm.Limit.TorqErrO '||PP_TorqErrO' string
cPPLib.Alarm.Status.BTemp '||PP_BTemp' string
cPPLib.Alarm.Status.CommErr '||PP_CommErr' string
cPPLib.Alarm.Status.FLT1 '||PP_FLT1' string
cPPLib.Alarm.Status.FLT2 '||PP_FLT2' string
cPPLib.Alarm.Status.MCErr '||PP_MCErr' string
cPPLib.Alarm.Status.MTemp '||PP_MTemp' string
cPPLib.Alarm.Status.RInt2 '||PP_RInt2' string
cPPLib.Alarm.Status.Status '||PP_Status' string
cPPLib.Alarm.Status.StopAlarm '||PP_StopAlarm' string
cPPLib.Alarm.TimeOut.PosErr '||PP_PosErr' string
cPPLib.Alarm.TimeOut.SeqA '||PP_SeqA' string
cPPLib.Alarm.TimeOut.StepA '||PP_StepA' string
cPPLib.Alarm.Value.ActDev '||PP_ActDev' string
cPPLib.Alarm.Value.ActPos '||PP_ActPos' string
cPPLib.Alarm.Value.Curr '||PP_Curr' string
cPPLib.Alarm.Value.DevH '||PP_DevH' string
cPPLib.Alarm.Value.DevL '||PP_DevL' string
cPPLib.Alarm.Value.MVH1 '||PP_MVH1' string
cPPLib.Alarm.Value.MVH2 '||PP_MVH2' string
cPPLib.Alarm.Value.MVL1 '||PP_MVL1' string
cPPLib.Alarm.Value.MVL2 '||PP_MVL2' string
cPPLib.AlarmMsg.IO.AIErr '||PP_AIErr1' string
cPPLib.AlarmMsg.IO.AOErr '||PP_AOErr1' string
cPPLib.AlarmMsg.IO.DIErr '||PP_DIErr1' string
cPPLib.AlarmMsg.IO.DOErr '||PP_DOErr1' string
cPPLib.AlarmMsg.IO.PressErr '||PP_PressErr1' string
cPPLib.AlarmMsg.IO.TempErr '||PP_TempErr1' string
cPPLib.AlarmMsg.Limit.LSErr1 '||PP_LSErr1' string
cPPLib.AlarmMsg.Limit.PosErrC1 '||PP_PosErrC1_{1}\' string
cPPLib.AlarmMsg.Limit.PosErrC2 '||PP_PosErrC2_{1}\' string
cPPLib.AlarmMsg.Limit.PosErrC3 '||PP_PosErrC3_{1}\' string
cPPLib.AlarmMsg.Limit.PosErrO1 '||PP_PosErrO1_{1}\' string
cPPLib.AlarmMsg.Limit.PosErrO2 '||PP_PosErrO2_{1}\' string
cPPLib.AlarmMsg.Limit.PosErrO3 '||PP_PosErrO3_{1}\' string
cPPLib.AlarmMsg.Limit.TorqErrC1 '||PP_TorqErrC1' string
cPPLib.AlarmMsg.Limit.TorqErrC2 '||PP_TorqErrC2' string
cPPLib.AlarmMsg.Limit.TorqErrO1 '||PP_TorqErrO1' string
cPPLib.AlarmMsg.Limit.TorqErrO2 '||PP_TorqErrO2' string
cPPLib.AlarmMsg.Status.Alarm '||PP_Alarm' string
cPPLib.AlarmMsg.Status.CommErr '||PP_CommErr1' string
cPPLib.AlarmMsg.Status.Fault '||PP_Fault' string
11
PROJECT CONSTANTS
Project Constant

Name Data Type Initial Value


cPPLib.AlarmMsg.Status.MCErr1 '||PP_MCErr1_{1}\' string
cPPLib.AlarmMsg.Status.MCErr2 '||PP_MCErr2' string
cPPLib.AlarmMsg.Status.MCErr3 '||PP_MCErr3_{1}\' string
cPPLib.AlarmMsg.Status.MCErr4 '||PP_MCErr4' string
cPPLib.AlarmMsg.Status.Status0 '||PP_Status0_{1}\' string
cPPLib.AlarmMsg.Status.Status1 '||PP_Status1_{1}\' string
cPPLib.AlarmMsg.TimeOut.PosErr1 '||PP_PosErr1_{1}\' string
cPPLib.AlarmMsg.TimeOut.PosErr2 '||PP_PosErr2_{1}\' string
cPPLib.AlarmMsg.TimeOut.PosErr3 '||PP_PosErr3_{1}\' string
cPPLib.AlarmMsg.TimeOut.PosErr4 '||PP_PosErr4_{1}\' string
cPPLib.AlarmMsg.TimeOut.SeqA '||PP_SeqTO_{1}\' string
cPPLib.AlarmMsg.TimeOut.StepA '||PP_StepTO_{1}\' string
cPPLib.AlarmMsg.Value.ActDev '||PP_ActDevGTH_{1}\' string
cPPLib.AlarmMsg.Value.ActPosH '||PP_ActPosGTH_{1}\' string
cPPLib.AlarmMsg.Value.ActPosL '||PP_ActPosLTL_{1}\' string
cPPLib.AlarmMsg.Value.CurrH '||PP_CurrGTH_{1}\' string
cPPLib.AlarmMsg.Value.CurrL '||PP_CurrLTL_{1}\' string
cPPLib.AlarmMsg.Value.DevH '||PP_DevGTH_{1}\' string
cPPLib.AlarmMsg.Value.DevL '||PP_DevLTL_{1}\' string
cPPLib.AlarmMsg.Value.MVH1 '||PP_MVGTH1_{1}\' string
cPPLib.AlarmMsg.Value.MVH2 '||PP_MVGTH2_{1}\' string
cPPLib.AlarmMsg.Value.MVL1 '||PP_MVLTL1_{1}\' string
cPPLib.AlarmMsg.Value.MVL2 '||PP_MVLTL2_{1}\' string
cPPLib.DateFormat 'dd-mm-yy' string
cPPLib.Event.Interlock.FIAs1 '_FwdIAs1' string
cPPLib.Event.Interlock.FIAs2 '_FwdIAs2' string
cPPLib.Event.Interlock.FIBs1 '_FwdIBs1' string
cPPLib.Event.Interlock.FIBs2 '_FwdIBs2' string
cPPLib.Event.Interlock.FIBs3 '_FwdIBs3' string
cPPLib.Event.Interlock.FIBs4 '_FwdIBs4' string
cPPLib.Event.Interlock.FIBs5 '_FwdIBs5' string
cPPLib.Event.Interlock.FIBs6 '_FwdIBs6' string
cPPLib.Event.Interlock.FIBs7 '_FwdIBs7' string
cPPLib.Event.Interlock.FIBs8 '_FwdIBs8' string
cPPLib.Event.Interlock.IA1 '_IA1' string
cPPLib.Event.Interlock.IA2 '_IA2' string
cPPLib.Event.Interlock.IAs1 '_IAs1' string
cPPLib.Event.Interlock.IAs2 '_IAs2' string
cPPLib.Event.Interlock.IB1 '_IB1' string
cPPLib.Event.Interlock.IB2 '_IB2' string
cPPLib.Event.Interlock.IB3 '_IB3' string
cPPLib.Event.Interlock.IB4 '_IB4' string
cPPLib.Event.Interlock.IBs1 '_IBs1' string
cPPLib.Event.Interlock.IBs2 '_IBs2' string
cPPLib.Event.Interlock.IBs3 '_IBs3' string
cPPLib.Event.Interlock.IBs4 '_IBs4' string
cPPLib.Event.Interlock.IBs5 '_IBs5' string
12
PROJECT CONSTANTS
Project Constant

Name Data Type Initial Value


cPPLib.Event.Interlock.IBs6 '_IBs6' string
cPPLib.Event.Interlock.IBs7 '_IBs7' string
cPPLib.Event.Interlock.IBs8 '_IBs8' string
cPPLib.Event.Interlock.IC1 '_IC1' string
cPPLib.Event.Interlock.IC2 '_IC2' string
cPPLib.Event.Interlock.ICs1 '_ICs1' string
cPPLib.Event.Interlock.ICs2 '_ICs2' string
cPPLib.Event.Interlock.RIAs1 '_RevIAs1' string
cPPLib.Event.Interlock.RIAs2 '_RevIAs2' string
cPPLib.Event.Interlock.RIBs1 '_RevIBs1' string
cPPLib.Event.Interlock.RIBs2 '_RevIBs2' string
cPPLib.Event.Interlock.RIBs3 '_RevIBs3' string
cPPLib.Event.Interlock.RIBs4 '_RevIBs4' string
cPPLib.Event.Interlock.RIBs5 '_RevIBs5' string
cPPLib.Event.Interlock.RIBs6 '_RevIBs6' string
cPPLib.Event.Interlock.RIBs7 '_RevIBs7' string
cPPLib.Event.Interlock.RIBs8 '_RevIBs8' string
cPPLib.Event.Interlock.RInt1 '_RInt1' string
cPPLib.Event.Interlock.RInt2 '_RInt2' string
cPPLib.Event.ModeSel.Mode1 '_Mode1' string
cPPLib.Event.ModeSel.Mode2 '_Mode2' string
cPPLib.Event.ModeSel.Mode3 '_Mode3' string
cPPLib.Event.ModeSel.Mode4 '_Mode4' string
cPPLib.Event.Status.xOff 'Off' string
cPPLib.Event.Status.xOn 'On' string
cPPLib.Event.Trip.FLT1 '_FLT1' string
cPPLib.Event.Trip.FLT2 '_FLT2' string
cPPLib.Event.Trip.M1 '_M1' string
cPPLib.Event.Trip.M2 '_M2' string
cPPLib.Event.Trip.M3 '_M3' string
cPPLib.Event.Trip.M4 '_M4' string
cPPLib.Event.Trip.M5 '_M5' string
cPPLib.EventMsg.Control.E1Close '||PP_E1Close' string
cPPLib.EventMsg.Control.E1Fwd '||PP_E1Fwd' string
cPPLib.EventMsg.Control.E1Open '||PP_E1Open' string
cPPLib.EventMsg.Control.E1Rev '||PP_E1Rev' string
cPPLib.EventMsg.Control.E1Start '||PP_E1Start' string
cPPLib.EventMsg.Control.E2Close '||PP_E2Close' string
cPPLib.EventMsg.Control.E2Fwd '||PP_E2Fwd' string
cPPLib.EventMsg.Control.E2Open '||PP_E2Open' string
cPPLib.EventMsg.Control.E2Rev '||PP_E2Rev' string
cPPLib.EventMsg.Control.E2Start '||PP_E2Start' string
cPPLib.EventMsg.Control.E3Close '||PP_E3Close' string
cPPLib.EventMsg.Control.E3Open '||PP_E3Open' string
cPPLib.EventMsg.Control.JogClose '||PP_JogClose' string
cPPLib.EventMsg.Control.JogFwd '||PP_JogFwd' string
cPPLib.EventMsg.Control.JogOpen '||PP_JogOpen' string
13
PROJECT CONSTANTS
Project Constant

Name Data Type Initial Value


cPPLib.EventMsg.Control.JogRev '||PP_JogRev' string
cPPLib.EventMsg.Control.JogStart '||PP_JogStart' string
cPPLib.EventMsg.Control.LClose '||PP_LClose' string
cPPLib.EventMsg.Control.LFwd '||PP_LFwd' string
cPPLib.EventMsg.Control.LHold '||PP_LHold' string
cPPLib.EventMsg.Control.LOpen '||PP_LOpen' string
cPPLib.EventMsg.Control.LRev '||PP_LRev' string
cPPLib.EventMsg.Control.LStart '||PP_LStart' string
cPPLib.EventMsg.Control.LStop '||PP_LStop' string
cPPLib.EventMsg.Control.Reset '||PP_Reset' string
cPPLib.EventMsg.Control.Stop '||PP_Stop' string
cPPLib.EventMsg.Mode.BalE1 '||PP_BalE1' string
cPPLib.EventMsg.Mode.BalInOff '||PP_BalInOff' string
cPPLib.EventMsg.Mode.BalInOn '||PP_BalInOn' string
cPPLib.EventMsg.Mode.BalOn '||PP_BalOn' string
cPPLib.EventMsg.Mode.ClampOff '||PP_ClampOff' string
cPPLib.EventMsg.Mode.ClampOn '||PP_ClampOn' string
cPPLib.EventMsg.Mode.JogAuto '||PP_JogAuto' string
cPPLib.EventMsg.Mode.JogE1 '||PP_JogE1' string
cPPLib.EventMsg.Mode.JogE2 '||PP_JogE2' string
cPPLib.EventMsg.Mode.JogE3 '||PP_JogE3' string
cPPLib.EventMsg.Mode.JogEnblOff '||PP_JogEnblOff' string
cPPLib.EventMsg.Mode.JogEnblOn '||PP_JogEnblOn' string
cPPLib.EventMsg.Mode.JogMan '||PP_JogMan' string
cPPLib.EventMsg.Mode.LEnblOff '||PP_LEnblOff' string
cPPLib.EventMsg.Mode.LEnblOn '||PP_LEnblOn' string
cPPLib.EventMsg.Mode.LocalOff '||PP_LocalOff' string
cPPLib.EventMsg.Mode.LocalOn '||PP_LocalOn' string
cPPLib.EventMsg.Mode.LocAuto '||PP_LocAuto' string
cPPLib.EventMsg.Mode.LocE1 '||PP_LocE1' string
cPPLib.EventMsg.Mode.LocE2 '||PP_LocE2' string
cPPLib.EventMsg.Mode.LocE3 '||PP_LocE3' string
cPPLib.EventMsg.Mode.LocExtSP '||PP_LocExtSP' string
cPPLib.EventMsg.Mode.LocMan '||PP_LocMan' string
cPPLib.EventMsg.Mode.LocManSP '||PP_LocManSP' string
cPPLib.EventMsg.Mode.MVLEnblOff '||PP_MVLEnblOff' string
cPPLib.EventMsg.Mode.MVLEnblOn '||PP_MVLEnblOn' string
cPPLib.EventMsg.Mode.OprAuto '||PP_OprAuto' string
cPPLib.EventMsg.Mode.OprE1 '||PP_OprE1' string
cPPLib.EventMsg.Mode.OprE2 '||PP_OprE2' string
cPPLib.EventMsg.Mode.OprE3 '||PP_OprE3' string
cPPLib.EventMsg.Mode.OprExtSP '||PP_OprExtSP' string
cPPLib.EventMsg.Mode.OprHold '||PP_OprHoldM' string
cPPLib.EventMsg.Mode.OprJog '||PP_OprJog' string
cPPLib.EventMsg.Mode.OprLoc '||PP_OprLoc' string
cPPLib.EventMsg.Mode.OprLocSP '||PP_OprLocSP' string
cPPLib.EventMsg.Mode.OprMan '||PP_OprMan' string
14
PROJECT CONSTANTS
Project Constant

Name Data Type Initial Value


cPPLib.EventMsg.Mode.OprManFd '||PP_OprManFd' string
cPPLib.EventMsg.Mode.OprManSP '||PP_OprManSP' string
cPPLib.EventMsg.Mode.PanelOff '||PP_PanelOff' string
cPPLib.EventMsg.Mode.PanelOn '||PP_PanelOn' string
cPPLib.EventMsg.Mode.SeqAuto '||PP_SeqAuto' string
cPPLib.EventMsg.Mode.SeqE1 '||PP_SeqE1' string
cPPLib.EventMsg.Mode.SeqE2 '||PP_SeqE2' string
cPPLib.EventMsg.Mode.SeqE3 '||PP_SeqE3' string
cPPLib.EventMsg.Mode.SeqExtSP '||PP_SeqExtSP' string
cPPLib.EventMsg.Mode.SeqHold '||PP_SeqHold' string
cPPLib.EventMsg.Mode.SeqLocal '||PP_SeqLocal' string
cPPLib.EventMsg.Mode.SeqMan '||PP_SeqMan' string
cPPLib.EventMsg.Mode.SeqManSP '||PP_SeqManSP' string
cPPLib.EventMsg.Status.AlarmAck '||PP_AlarmAck' string
cPPLib.EventMsg.Status.AlcBlk '||PP_AlcBlk' string
cPPLib.EventMsg.Status.EOLimOff '||PP_EOLimOff' string
cPPLib.EventMsg.Status.EOLimOn '||PP_EOLimOn' string
cPPLib.EventMsg.Status.LSClsOn '||PP_LSClsOn' string
cPPLib.EventMsg.Status.LSOpnOn '||PP_LSOpnOn' string
cPPLib.EventMsg.Status.RunOff '||PP_RunOff' string
cPPLib.EventMsg.Status.RunOn '||PP_RunOn' string
cPPLib.EventMsg.Status.SimOff '||PP_SimOff' string
cPPLib.EventMsg.Status.SimOn '||PP_SimOn' string
cPPLib.PID01A_CCSuffix '_CC' string
cPPLib.Prefix '||' string
cPPLib.Report.DayStartShift 1 dint
cPPLib.Report.NoOfShift 3 dint
cPPLib.Report.Shift1StartTime 7 dint
cPPLib.Report.Shift2StartTime 15 dint
cPPLib.Report.Shift3StartTime 1 dint
cPPLib.Report.Shift4StartTime 0 dint
cPPLib.TimerPuls.DayErr 'Day Err' string
cPPLib.TimerPuls.MonthErr 'Month Err' string
cPPLib.TimerPuls.TimeErr 'Time Err' string
cPPLib.TimerPuls.YearErr 'Year Err' string
cPPVersion.PPElement.CBMVersion '6.1.0-0' string
cPPVersion.PPElement.LibraryName 'PP_ElementLib' string
cPPVersion.PPElement.LibraryVersion '6.2-0' string
cPPVersion.PPElement.ReleasedBy 'Pulp And Paper' string
cPPVersion.PPElement.ReleasedDate '10 May 2019' string
cResetOrder 2 dint
cRPCtrl 3 dint
cSim.Motor.ByPassM1M5 false bool
cSim.Motor.FBTime 1s time
cSim.Motor.MCValue 75 real
cSim.Motor.MVTime 2s time
cSim.Valve.ByPassF1F2 false bool
15
PROJECT CONSTANTS
Project Constant

Name Data Type Initial Value


cSim.Valve.FBTime 5s time
cSim.Valve.MVTime 2s time
cTime.D1 1d time
cTime.H1 1h time
cTime.M1 1m time
cTime.Ms500 500ms time
cTime.S0 0s time
cTime.S1 1s time
cTime.S2 2s time
cTime.S5 5s time
cTime.S10 10s time

16
DATA TYPES

ACS600_Std
This data type is used for Dricon_S connection to the ACS drive. It contains variables which
need to be connected to the drive channel in hardware structure.
Name Data Type Initial Value Description
DrvStat dint 0 Main Status Word from Drive
Act1 dint 0 Actual Value Speed (From Drive)
Act2 dint 0 Actual Value Arbitrary (From Drive)
Act3 dint 0 Actual Value Fault Word 1 / 1st Active Fault (From Drive)
Act4 dint 0 Actual Value Alarm Word 1 / 1st Active Warning (From Drive)
Act5 dint 0 Actual Value Fault Word 2 / 2nd Active Fault (From Drive)
Act6 dint 0 Actual Value Alarm Word 2 / 2nd Active Warning (From Drive)
DigitalInput1 dint 0 Actual Value Digital Input 1 (From Drive)
DigitalInput2 dint 0 Actual Value Digital Input 2 (From Drive)
DrvCmd dint 0 Main Control Word to Drive
Ref1 dint 0 Reference value 1 (Rpm to Drive)
Ref2 dint 0 Reference value 2 (% to Drive)
Ref3 dint 0 Reference value 3 (To Drive)
Ref4 dint 0 Reference value 4 (To Drive)
Ref5 dint 0 Reference value 5 (To Drive)
InID dint 0
OutID dint 0
OutIND dint 0
OutVALHi dint 0
OutVALLo dint 0
Curr dint 0 Actual Value for Current (From Drive)
Torq dint 0 Actual Value for Torque (From Drive)
Temp dint 0 Actual Value for Temperature (From Drive)

Alarm2Limit
This data type is for configuration of 2 alarm limits, High and Low.
Name Data Type Initial Value Description
H AlarmPar High alarm limit
L AlarmPar Low alarm limit

17
DATA TYPES
Alarm2LimitCurr

Alarm2LimitCurr
This data type is for configuration of 2 alarm limits for motor current, High and Low.
Name Data Type Initial Value Description
H AlarmParCurr High alarm limit
L AlarmParCurr Low alarm limit

Alarm4Limit
This data type is for configuration of 2 upper alarm limits (High and High High) and 2 lower
alarm limits (Low and Low Low).
Name Data Type Initial Value Description
H2 AlarmPar High high alarm limit
H1 AlarmPar High alarm limit
L1 AlarmPar Low alarm limit
L2 AlarmPar Low low alarm limit

AlarmInd
This data type is for presenting alarm indication.
Name Data Type Initial Value Description
AUInd bool UnAcknowledged alarm indication
Ind bool Alarm indication

AlarmPar
This data type is for alarm limit configuration.
Name Data Type Initial Value Description
AEConfig dint 0 AE configuration
Severity dint cPPInit.Severity Severity
Limit real 100.0 Limit value
Hyst real 0.0 Hysterisis
AlarmDelay time 0s Alarm delay time
RPCtrl bool false Repeat Fail Control
Block bool Block alarm

18
DATA TYPES
AlarmParCurr

AlarmParCurr
This data type is for alarm limit configuration for current.
Name Data Type Initial Value Description
AEConfig dint 0 AE configuration
Severity dint cPPInit.Severity Severity
Limit real 100.0 Limit value
Hyst real 0.0 Hysterisis
AlarmDelay time 0s Alarm delay time
StartDelay time 5s Start delay time
Block bool Block alarm

Ctrl_Data
This data type is for passing the active parameter of PID01 or PID01A to other control.
Name Data Type Initial Value Description
Name string Object Tag Name
Description string Object Description
MV real Measured Value
WSP real Working Setpoint
OutP real Output signal
ActPos real Actuator Position
Max real Max Range, for MV and SP
Min real Min Range, for MV and SP
SPH real Setpoint High Limit
SPL real Setpoint Low Limit
OHL real Output High Limit
OLL real Output Low Limit
Gain real Gain (only for PID and PID01A)
TI real Integration Time (only for PID and PID01A)
TD real Derivative Time (only for PID and PID01A)
DeadZ real Deadzone (only for PID and PID01A)
RevAct dint Reverse Control Action (only for PID and PID01A)
NoInt bool No Interlock
SpEqLL bool Setpoint equal to low limit
SpEqHL bool Setpoint equal to high limit
OutEqLL bool Output equal to low limit
OutEqHL bool Output equal to high limit
Mode dint Control Mode, -1=Bal, 0=Man, 1=Auto, 2=E1, 3=E2, 4=E3,
5=ManFd
TopMode dint Highest Control Mode, 0=Man, 1=Auto, 2=E1, 3=E2 (only for PID
and PID01A)
Unit string[10] Unit, for MV and SP
P1 real Parameter P1 (only for GenCon01)
P2 real Parameter P2 (only for GenCon01)
P3 real Parameter P3 (only for GenCon01)

19
DATA TYPES
Ctrl_GenCon

Name Data Type Initial Value Description


P4 real Parameter P4 (only for GenCon01)
P5 real Parameter P5 (only for GenCon01)

Ctrl_GenCon
This data type is for passing the active parameter of GenCon01 to other control.
Name Data Type Initial Value Description
Name string Object Tag Name
Description string Object Description
MV real Measured Value
WSP real Working Setpoint
OutP real Output signal
ActPos real Actuator Position
Max real Max Range, MV
Min real Min Range, MV
SPH real Setpoint High Limit
SPL real Setpoint Low Limit
OHL real Output High Limit
OLL real Output Low Limit
P1 real Parameter P1
P2 real Parameter P2
P3 real Parameter P3
P4 real Parameter P4
P5 real Parameter P5
NoInt bool No Interlock
SpEqLL bool SP less than or equal to Low Limit
SpEqHL bool SP greater than or equal to High Limit
OutEqLL bool Output less than or equal to Low Limit
OutEqHL bool Output greater than or equal to High Limit
Mode dint Control Mode, -1=Bal, 0=Man, 1=Auto, 2=E1, 3=E2, 4=E3
NOTE: This data type is no longer been used.

Ext_Analog
This data type is for setting the alarm limit externally from logic. It’s only available in AIC01,
AIS01 and Flow01.
Name Data Type Initial Value Description
En_H2 bool Enable HH Limit
MVH2 real 100 High Limit 2
ALB_H2 bool Blocking of alarm limit H2
En_H1 bool Enable H Limit
MVH1 real 100 High Limit 1
ALB_H1 bool Blocking of alarm limit H1 and Dev High

20
DATA TYPES
Ext_Control

Name Data Type Initial Value Description


En_L1 bool Enable L Limit
MVL1 real 0 Low Limit 1
ALB_L1 bool Blocking of alarm limit L1 and Dev Low
En_L2 bool Enable LL Limit
MVL2 real 0 Low Limit 2
ALB_L2 bool Blocking of alarm limit L2

Ext_Control
This data type is for setting the configuration externally from logic.
Name Data Type Initial Value Description
GainEnbl bool External Gain Enable
Gain real 0.5 External Gain
TIEnbl bool External IntegrationTime Enable
TI real 30 External Integration Time
TDEnbl bool External DerivationTime Enable
TD real 0 External DerivationTime
TFEnbl bool External Filter Time Enable
TF real 0 External Filter Time
IntBlkEnbl bool External Integration Block Enable
IntBlk bool External Integration Block
DerBlkEnbl bool External Derivation Block Enable
DerBlk bool External Derivation Block
SPLimEnbl bool External Setpoint Limit Enable
SPH real 100 External Setpoint High Limit
SPL real 0 External Setpoint Low Limit
En_H2 bool Enable HH Limit
MVH2 real 100 High Limit 2
ALB_H2 bool Blocking of alarm limit H2
En_H1 bool Enable H Limit
MVH1 real 100 High Limit 1
ALB_H1 bool Blocking of alarm limit H1
En_L1 bool Enable L Limit
MVL1 real 0 Low Limit 1
ALB_L1 bool Blocking of alarm limit L1
En_L2 bool Enable LL Limit
MVL2 real 0 Low Limit 2
ALB_L2 bool Blocking of alarm limit L2
En_DevH bool Enable Dev High Limit
DevH real 100 Deviation High Limit
ALB_DevH bool Blocking of alarm Dev High limit
En_DevL bool Enable Dev Low Limit
DevL real -100 Deviation Low Limit
ALB_DevL bool Blocking of alarm Dev Low limit
En_ActDev bool Enable Actuator Deviation Limit

21
DATA TYPES
GroupStepTime

Name Data Type Initial Value Description


ActDev real Actuator Deviation Limit
ALB_ActDev bool Blocking of alarm Actuator Deviation Limit
SetpStationModeEnbl bool Enable QCS Setpoint Station Mode
Bal bool Balance Mode ( Used when SetpStationModeEnbl is True and PID
Enable is False )
Man bool Manual Mode ( Used when SetpStationModeEnbl is True and PID
Enable is False )
Auto bool Auto Mode ( Used when SetpStationModeEnbl is True and PID
Enable is False )
E1 bool E1 Mode ( Used when SetpStationModeEnbl is True and PID
Enable is False )
AI_Error_Override bool Bypass AI Error check ( used when SetpStationModeEnbl is True )
On_Off_Ctrl_Enbl bool Enable On Off Ctrl
On_Off_Ctrl bool On Off Ctrl
ManOut_Enbl bool External Entered Output Enable
ManOut real External Entered Output
SP_Enbl bool External Entered Setpoint Enable
SP real External Entered Setpoint
WSP_Enbl bool External Working Setpoint Enable
WSP real External Working Setpoint

GroupStepTime
This data type is for step configuration in GroupStart.
Name Data Type Initial Value Description
OnDelay time 1s Start delay time
OffDelay time 1s Stop delay time
Max time 5s Maximum step time

HSI_Analog
This data type was used for HMI connection of analog objects in older library versions. The
variables have been reduced to those variables normally used for trending only. It’s not
recommended to keep using this data type as this data type might be removed in later version.
Name Data Type Initial Value Description
MV real MV
Value real Value

22
DATA TYPES
HSI_Control

HSI_Control
This data type was used for HMI connection of control objects in older library versions. The
variables have been reduced to those variables normally used for trending only. It’s not
recommended to keep using this data type as this data type might be removed in later version.
Name Data Type Initial Value Description
MV real retain MV
WSP real retain WSP
POut real retain Out

HSI_Digital
This data type was used for HMI connection of digital objects in older library versions. The
variables have been reduced to those variables normally used for trending only. It’s not
recommended to keep using this data type as this data type might be removed in later version.
Name Data Type Initial Value Description
MV bool MV
Value bool Value

HSI_Seq
This data type was used for connecting Seq01 function block to SFC programming.
Name Data Type Initial Value Description
HSI_Start bool Operator order Start command
HSI_Reset bool Operator order Reset command
HSI_Man bool Operator order Manual mode
HSI_Auto bool Operator order Auto mode
HSI_E1 bool Operator order E1 mode
HSI_Hold bool Operator order Hold command
HSI_Step bool Operator order Step command
HSI_UnCond bool Unconditional step
HSI_Jump bool Operator order Jump command
HSI_JPos dint Operator enter Jump position
HSI_Interv_Time dint Interval time delay between turns (in seconds)
Interv_Time_El dint Interval time elapsed (in seconds)
Seq_RFS bool Ready for start
Run bool Running
PrePos dint Previous step number
PosN dint Current step number
NxtPos dint Next step number
Act_Turn dint Actual turn
SeqTD dint Max sequence time (in seconds)
SeqTE dint Sequence time elapsed (in seconds)
StepTD dint Max step time (in seconds)

23
DATA TYPES
HSI_Seq

Name Data Type Initial Value Description


StepTE dint Step time elapsed (in seconds)
CondSta1 bool Condition Status 1
CondSta2 bool Condition Status 2
CondSta3 bool Condition Status 3
CondSta4 bool Condition Status 4
CondSta5 bool Condition Status 5
CondSta6 bool Condition Status 6
CondSta7 bool Condition Status 7
CondSta8 bool Condition Status 8
NextCond bool Next step enabled
ActSta1 bool Activity Status 1
ActSta2 bool Activity Status 2
ActSta3 bool Activity Status 3
ActSta4 bool Activity Status 4
AllAct bool All activities finished
JCSta1 bool Jump Condition Status 1
JCSta2 bool Jump Condition Status 2
JCSta3 bool Jump Condition Status 3
JCSta4 bool Jump Condition Status 4
JPos1 dint Jump position 1
JPos2 dint Jump position 2
JPos3 dint Jump position 3
JPos4 dint Jump position 4
StepWaitTime time Waiting time before going to next step
WaitTime dint Waiting time before going to next step (in seconds)
Auto bool Auto mode
Man bool Man mode
E1 bool E1 mode
Hold bool Hold mode
StartC bool Start pulse
End bool End of Sequence
End_of_Seq bool End of Sequence (Set to "1" in <Last Step>_P1)
UnCondM bool UnConditional mode
JPosn_Outp dint
Next bool
StepStat dint Step Status
BlankInf bool Blank Information
InfVal real Information Value

24
DATA TYPES
HSI_X

HSI_X
This data type was used for HMI connection of motor objects in older library versions. The
variables have been reduced to those variables normally used for trending only. It’s not
recommended to keep using this data type as this data type might be removed in later version.
Name Data Type Initial Value Description
Real_B real Speed/Actuator SP
Real_C real Speed/Actuator MV
Real_Res real Current (%)

IAConn
This data type was used for connection additional IA interlocks.
Name Data Type Initial Value Description
IA1 bool true Sequence interlock 1
IA2 bool true Sequence interlock 2

IAInParType1
This data type is for IA interlock configuration in motor objects and on-off valve.
Name Data Type Initial Value Description
OprBlk bool cPPInit.IAOprBlk Operator Blockable
EvEnbl bool cPPInit.IAEvEnbl Enable event

IAInParType2
This data type is for IA interlock configuration in motorized valve objects.
Name Data Type Initial Value Description
OprBlk bool cPPInit.IAOprBlk Operator Blockable
Direction dint 0 Direction (0 = stay ; 1 = force open ; 2 = force close)
EvEnbl bool cPPInit.IAEvEnbl Enable event

IBConn
This data type was used for connection additional IB interlocks.
Name Data Type Initial Value Description
IB1 bool true Process interlock 1
IB2 bool true Process interlock 2
IB3 bool true Process interlock 3
IB4 bool true Process interlock 4

25
DATA TYPES
IBInParType1

Name Data Type Initial Value Description


IB5 bool true Process interlock 5
IB6 bool true Process interlock 6
IB7 bool true Process interlock 7
IB8 bool true Process interlock 8

IBInParType1
This data type is for IB interlock configuration in motor objects and on-off valve.
Name Data Type Initial Value Description
OprBlk bool cPPInit.IBOprBlk Operator Blockable
StartIntlk bool false Start Interlock
EvEnbl bool cPPInit.IBEvEnbl Enable event

IBInParType2
This data type is for IB interlock configuration in motorized valve objects.
Name Data Type Initial Value Description
OprBlk bool cPPInit.IBOprBlk Operator Blockable
Direction dint 0 Direction (0 = stay ; 1 = force open ; 2 = force close)
EvEnbl bool cPPInit.IBEvEnbl Enable event

IBInParType3
This data type is for IB interlock configuration in control objects.
Name Data Type Initial Value Description
OprBlk bool cPPInit.IBOprBlk Operator Blockable
EvEnbl bool cPPInit.IBEvEnbl Enable event

IBInParType4
This data type is for IB interlock configuration in sequence object.
Name Data Type Initial Value Description
OprBlk bool cPPInit.IBOprBlk Operator Blockable
StartIntlk bool false Start Interlock
SeqStatus dint 0 Seq status (0 = reset ; 1 = hold)
EvEnbl bool cPPInit.IBEvEnbl Enable event

26
DATA TYPES
ICConn

ICConn
This data type was used for connection additional IC interlocks.
Name Data Type Initial Value Description
IC1 bool true Safety interlock 1
IC2 bool true Safety interlock 2

ICInParType1
This data type is for IC interlock configuration in motor and valve objects except motorized
valve.
Name Data Type Initial Value Description
Dummy bool dummy variable
EvEnbl bool cPPInit.ICEvEnbl Enable event

ICInParType2
This data type is for IB interlock configuration in motorized valve objects.
Name Data Type Initial Value Description
Direction dint 0 Direction (0 = stay ; 1 = force open ; 2 = force close)
EvEnbl bool cPPInit.ICEvEnbl Enable event

PB_Status
This data type was used for connection of signal status from instrumentation device.
Name Data Type Initial Value Description
DeviceType string Type of Transmitter or Actuator
DeviceDescr string E.g. Manufacturer
TypeStrLength dint
Status dint StatusByte
Quality dint Quality
SubStatus dint SubStatus
Limits dint Limits
HWStatus HwStatus HardwareStatus

RangeCurr
This data type was for range configuration of current signal.
Name Data Type Initial Value Description
Max real 100.0 Maximum

27
DATA TYPES
RangeDInt

Name Data Type Initial Value Description


Dec dint 0 Decimal
Unit string[5] 'A' Unit
Rated real 100.0 Rated current

RangeDInt
This data type was for range configuration of integer signal.
Name Data Type Initial Value Description
Min dint 0 Minimum
Max dint 100 Maximum
Unit string[10] '%' Unit

RangeLimit
This data type is for configuration of range limits, High and Low.
Name Data Type Initial Value Description
L real 0.0 Low Limit
H real 100.0 High Limit

RangeReal
This data type was for range configuration of real signal.
Name Data Type Initial Value Description
Min real 0.0 Minimum
Max real 100.0 Maximum
Dec dint 1 Decimal
Unit string[10] '%' Unit

Real16
This data type was for Fung-1V configuration.
Name Data Type Initial Value Description
R1 real Input variable 1
R2 real Input variable 2
R3 real Input variable 3
R4 real Input variable 4
R5 real Input variable 5
R6 real Input variable 6
R7 real Input variable 7
R8 real Input variable 8

28
DATA TYPES
ReportsConfig

Name Data Type Initial Value Description


R9 real Input variable 9
R10 real Input variable 10
R11 real Input variable 11
R12 real Input variable 12
R13 real Input variable 13
R14 real Input variable 14
R15 real Input variable 15
R16 real Input variable 16

ReportsConfig
This data type was used for report configuration of each data.
Name Data Type Initial Value Description
Types dint Totalizer type (1 = Integrator ; 2 = Counter ; 3 = timer ; 4 = Control
utilization)
Scale real Scale factor for totalizer
TI time Integrating time for totalizer (Follow the time of MV, ie : 1h, 1m,
1s)

ReportsPar
This data type was used for connection between ReportConfig and ReportData01.
Name Data Type Initial Value Description
NoOfShift dint No of shift
D0Date date_and_time Date of today (D0)
D1Date date_and_time Date of yesterday (D-1)
D2Date date_and_time Date of previous day (D-2)
StartNewDay bool Start new production day
StartNewShift bool Start new shift
Shift1 bool Shift 1 active
Shift2 bool Shift 2 active
Shift3 bool Shift 3 active
Shift4 bool Shift 4 active

ReportsValue
This data type was used for storing the report value of each data.
Name Data Type Initial Value Description
D0Shift1 real Shift1 today
D0Shift2 real Shift2 today
D0Shift3 real Shift3 today
D0Shift4 real Shift4 today

29
DATA TYPES
TotalData

Name Data Type Initial Value Description


D0Total real Total today
D1Shift1 real Shift1 yesterday
D1Shift2 real Shift2 yesterday
D1Shift3 real Shift3 yesterday
D1Shift4 real Shift4 yesterday
D1Total real Total yesterday
D2Shift1 real Shift1 previous day
D2Shift2 real Shift2 previous day
D2Shift3 real Shift3 previous day
D2Shift4 real Shift4 previous day
D2Total real Total previous day

TotalData
This data type was used for total indication.
Name Data Type Initial Value Description
ProdDate date_and_time Date
Shift1 real Total Shift 1 production
Shift2 real Total Shift 2 production
Shift3 real Total Shift 3 production
Total real Total production

30
FUNCTION BLOCK TYPES

ADD_MR
ADD_MR (ADDer - with Multiplier Real numbers) is used for addition of optional number of real
numbers. The numbers are added in two groups, after which the second group is subtracted
from the first. The result is multiplied with a real number.
Call Name: ADD_MR[n]

Function Block
Name Data Type Direction Initial Value Description
Fact real in Multiplication factor
Out real out Output

The parameters below are extensible.


Name Data Type Direction Initial Value Description
Add real in Addition input [n]
Sub real in Substraction input [n]

Function
The sum of the real numbers at the inputs Sub[1]...Sub[n] is subtracted from the sum of the
inputs Add[1]...Add[n], after which the result is multiplied with the value at input Fact. The
result is stored at the output Out.

Overflow
If the maximum positive or negative real value is exceeded, the output is limited to the
greatest or lowest representable value respectively.

31
FUNCTION BLOCK TYPES
Alarm_Lim2

Alarm_Lim2
Alarm_Lim2 is used for supervision of two limits. The input is compared with the high limit
and low limit.
Call Name: Alarm_Lim2

Function Block
Name Data Type Direction Initial Value Description
I real in yes Input
H1 real in yes High Limit
L1 real in yes Low Limit
Hyst real in yes Hysteresis
Blk bool in yes Block
I_GT_H1 bool out yes Input greater than High Limit
I_LT_L1 bool out yes Input less than Low Limit

Function
The input I is compared with the high limit H1 and low limit L1. If exceeded, the corresponding
output is set. The output is reset when input value is less than the high limit minus hysteresis
or greater than the low limit plus the hysteresis. The input Blk disables the limit check and
sets the outputs to False.

32
FUNCTION BLOCK TYPES
Alarm_Lim4

Alarm_Lim4
Alarm_Lim4 is used for supervision of four limits. The input is compared with 2 upper limits
(high high limit and high limit) and 2 lower limits (low limit and low low limit).
Call Name: Alarm_Lim4

Function Block
Name Data Type Direction Initial Value Description
I real in yes Input
H2 real in yes High High Limit
H1 real in yes High Limit
L1 real in yes Low Limit
L2 real in yes Low Low Limit
Hyst real in yes Hysteresis
Blk bool in yes Block
I_GT_H2 bool out yes Input greater than High High Limit
I_GT_H1 bool out yes Input greater than High Limit
I_LT_L1 bool out yes Input less than Low Limit
I_LT_L2 bool out yes Input less than Low Low Limit

Function
The input I is compared with the high high limit H2, high limit H1, low limit L1 and low low limit
L2. If exceeded, the corresponding output is set. The output is reset when input value is less
than the high or high high limit minus hysteresis or greater than the low or low low limit plus
the hysteresis. The input Blk disables the limit check and sets the outputs to False.

33
FUNCTION BLOCK TYPES
AnalogDelay

AnalogDelay
AnalogDelay is used for delaying analog values.
Call Name: AnalogDelay

Function Block
Name Data Type Direction Initial Value Description
C2 dint in 2 Number of places in register
Set bool in Loading of new values each sample
L bool in Dynamic loading of data
Reset bool in Reset
I real in Input
Min dint in 1 Min Limit of C2 (Min value = 1)
Max dint in 10 Max Limit of C2 (Max value = 3600)
O real out Output

Function
New data is entered the element by replacing the oldest sample with the current value of input
I. The output is delayed by the number of places in queue C2 multiplied by the sampling time
of the control task.
When the input Set is True, data is loaded into the delay queue each sample and the time delay
is incremented by controller task time Ts sec. When the input Set is False, the delay queue is
halted. Data is also loaded when input L goes from False to True.
For example:
• If C2 = 10, controller task time is 1 sec and input Set = True, the output is delayed by 10 sec.
• If C2 = 10, controller task time is 1 sec and input L is triggered every 2 second, the output
is delayed by 20 sec.
When the input Reset is True, all data in the queue is cleared. Changing the number of places
in the delay queue C2, requires a “cold start” of the controller to take place

34
FUNCTION BLOCK TYPES
Avg

Avg
Avg is used for calculation of a moving average of n number of samples.
Call Name: Avg

Function Block
Name Data Type Direction Initial Value Description
C2 dint in 2 Number of samples. Requires coldstart if changed
Set bool in Loading of new values each sample
L bool in Dynamic loading of data
Reset bool in Reset
I real in Input
Min dint in 1 Min Limit of C2 (Min value = 1)
Max dint in 10 Max Limit of C2 (Max value = 3600)
O real out Output
OutF real out Output for First value in queue

Function
New data is entered the queue by replacing the oldest sample with the current value of input
I. The floating average is calculated by summing all the values in the queue and then dividing
by the number of queue places C2 as shown below.

æ 1 C 2
ö
O = ç
è C 2
å
n =1
In ÷
ø
When the input Set is True, data is loaded to the outputs O and OutF. The number of values
samples is set to 1. When the input Set is reset, the last value loaded to output OutF remains
and output O is calculated as above. Data is also loaded when input L goes from False to True.
If the number of sampled values, i.e., the number of times the function block has been
executed after input Set has gone from 1 to 0, is less than C2 then this value is substituted as
the divisor in the calculation. When the input Reset is True, all data in the queue is cleared.
Changing the number of samples in the queue C2 requires a “cold start” of the controller to
take place.

35
FUNCTION BLOCK TYPES
B16/B32SimpleEvent

B16/B32SimpleEvent
BxxSimpleEvent can be used to generate simple event for the connected boolean16 or
boolean32 data types.
Call Name: B16SimpleEvent and B32SimpleEvent

Function Block
Name Data Type Direction Initial Value Description
Name string in Object name
Enable bool in Enable event handling
B16 Boolean16/ in Input signal
Boolean32
Class dint in Class
Severity dint in Severity
Prefix string[30] in Prefix name

Function
The function block generates simple event for each boolean in Boolean16 or Boolean32 data
types. Event is triggered on the rising edge only. Event message will be generated for each
individual bit even if more than several bits become active at the same time.
Example:
• Prefix is set to ABC_
• When Bxx.B0 is true, it will generate event message ABC_B0

36
FUNCTION BLOCK TYPES
B16/B32ToDInt

B16/B32ToDInt
BxxToDInt can be used to convert the connected boolean16 or boolean32 data types into
integer.
Call Name: B16ToDInt and B32ToDInt

Function Block
Name Data Type Direction Initial Value Description
I Boolean16/ in Input
Boolean32
O dint out Output

Function
The function block converts Boolean16 or Boolean32 data type into integer data type.

37
FUNCTION BLOCK TYPES
B16/B32ToDword

B16/B32ToDword
BxxToDword can be used to convert the connected boolean16 or boolean32 data types into
dword.
Call Name: B16ToDword and B32ToDword

Function Block
Name Data Type Direction Initial Value Description
I Boolean16/ in Input
Boolean32
O dword out Output

Function
The function block convert Boolean16 or Boolean32 data type into dword data type.

38
FUNCTION BLOCK TYPES
COMP_I

COMP_I
COMP_I (COMParator - Integer) is used for comparison of 2 integer values.
Call Name: COMP_I

Function Block
Name Data Type Direction Initial Value Description
I1 dint in Input 1
I2 dint in Input 2
I1_H bool out Input 1 greater than Input 2
Equal bool out Input 1 equal to Input 2
I1_L bool out Input 1 less than Input 2

Function
The values at the two inputs I1 and I2 are compared and the result of the comparison can be
read at the outputs I1_H, Equal and I1_L.

39
FUNCTION BLOCK TYPES
COMP_R

COMP_R
COMP_R (COMParator - Real) is used for supervision of real number with several limits.
Call Name: COMP_R[n]

Function Block
Name Data Type Direction Initial Value Description
I real in Input
HHys real in High Hysteresis
LHys real in Low Hysteresis
I_LT_H1 bool out Input less than High Limit 1
I_GT_L1 bool out Input greater than Low Limit 1
ParError bool out Indicates input parameter error. Set if the index on the
extensible Parameters is higher than 32 and no execution
is performed.

The parameters below are extensible.


Name Data Type Direction Initial Value Description
H real in High Limit [n]
L real in Low Limit [n]
I_GE_H bool out Input greater than or equal to High Limit [n]
I_LE_L bool out Input less than or equal to Low Limit [n]

Function
Input I is compared with the limit value specified at the inputs H1...H[n] and L1...L[n]. For high
limits, the output for the different limits is set when input I is greater than or equal to the limit
value. For lower limits, the output is set when input I is less than or equal to the limit value.

Hysteresis
The input HHys gives the hysteresis for all limits at high level and LHys for all limits at low
level. At high level, the outputs will be reset when input I is lower than the high limit minus the
hysteresis HHys. At low level, the outputs will be reset when input I is greater than the limit
value plus the hysteresis LHys.

40
FUNCTION BLOCK TYPES
CON_PU1

CON_PU1
CON_PU1 (CONtroller - PUlsed 1) is a three state controller intended to control, by means of
pulses (increase/decrease), a process via an integrating actuator such as a shifting motor or
a solenoid valve. CON_PU1 can be combined with, for example, a PI regulator for process
controls.
Call Name: CON_PU1

Function Block
Name Data Type Direction Initial Value Description
RefV real in Reference Value
I real in Measured Value
Blk bool in Block
PF dint in 1 Pulse Frequency factor
ActT time in 0s Actuator Time (s)
TPMin time in 0s Time Pulse Minimum
TGap time in 0s Time Gap
K real in 0.5 Pulse length factor
DeadB real in 1.0 Deadband
TMBC time in 0s Time Minimum Between Change
MaxDev real in 100.0 Maximum Deviation
TPaMin time in 0s Time Pause Minimum
TPaC real in 0.2 Time Pause Constant
Sim bool in Simulate actuator position
Bal bool in Order mode to Balance
BalRef real in 0.0 Balance Reference
DBPos real in 4.0 Deadband for actuator position change (%)
DBRef real in 1.0 Deadband Reference for position change alarm
LimitDevEnbl bool in Input deviation used when sim mode active and simulated
valve position is limited
LimitDev real in Input deviation used when valve position is limited, and
LimitDevEnable is true
Dev real out Deviation
Inc bool out Increase
Dec bool out Decrease
Err bool out Error
SimPos real out Simulated actuator position

Function
The three state controller CON-PU1 is intended to control, by means of pulses at the outputs
Inc (Increase) and Dec (Decrease), a process via, for example, a shifting motor or a solenoid
valve. The following inputs should be in unit % (0-100): RefV, I, DeadB, MaxDev, BalRef, DBPos
and DBRef.

41
FUNCTION BLOCK TYPES
CON_PU1

The feedback can be obtained from the actuator or the function block can simulate the
actuator position internally. The effective pulse duration is proportional to the control error
and is calculated as follows:
=| ∗ ∗ |⁄100
where: Dev = Control deviation = I - RefV(%)
K = Pulse length factor
ActT = Actuator delay time interval in seconds
To permit gradual correction of a large control error, |Dev|, is limited to MaxDev. The actual
time pulse duration is calculated as:
= (| ∗ ∗ |)⁄100 + +
where: TPMin = Min pulse duration for exicatation of the shifting motor or solenoid valve.
This is the shortest pulse length which affects the actuator
TGap = Play compensation, added to the first pulse after a polarity change
For control errors less than deadband DeadB, the correction is considered to be complete and
no further pulse is calculated. TMBC is a delay time that gives the shortest pause time after a
change of the pulse outputs Inc / Dec. Calculation of a new pulse duration is activated at the
interval PF x Ts where Ts is the sample time of the function, that is, the cycle time of the
function block.

The least permitted pause time between two pulses is determined however by the parameters
TPaMin and TPaC so that the Pause time = TPaMin + TPaC x PL where PL is the pulse duration
calculated most recently. These possibilities of setting the pause time are normally only used
when CON_PU1 is used as a standalone regulator and provide great flexibility in trimming the
regulator. By setting PF x Ts relatively large and TPaMin = TPaC = 0, a constant pulse frequency

42
FUNCTION BLOCK TYPES
CON_PU1

is obtained. To obtain a constant pause time between the pulses, TPaC is set to 0 and TPaMin
to the required pause time. This is necessary when controlling processes with long time
constants.

43
FUNCTION BLOCK TYPES
CON_PU1

In processes with long delay times, pause times ³ the delay time are selected.
The pause time can be made to be dependent on the duration of the latest pulse calculated
with the parameter TPaC. This function is used when a rapid control of small errors is required
but when limits on the speed of change in the process response require long pause times with
large changes.
When CON_PU1 is used as a position regulator for a motor actuator, different building up
processes are obtained depending on a parameter G, this being in principle the relationship
between the real data of the actuator and the parameters set in CON_PU1.
( ∗ ) +
= + 100 ∗| |
where: TGapy = Actuator play
TPMiny = Least pulse length to which the actuator reacts
ActTy = Time delay interval of the actuator
The figure below shows the building up process for different G, where only (k x ActT)/ActTy
is included. The system is unstable when G ³ 2.

Simulation of Actuator Position


If it is impossible to feed back the actuator position to the function block, it can be simulated
internally in the function block by integrating Dev x K x ActT. The simulated value is limited to
0-100%. When Bal is set, BalRef is used as an integrator value, for example, with a limit switch
on the actuator to set the integrator to a known value or forced control when controlling the
process manually. With simulation, the preceding regulator should have an output signal > 0 -
100% (-100 - 200%).

Supervision
When actuator position is calculated to have changed > DBPos, a check is made to determine
if |I(t=n) - I(t=0)| < DBRef. If so, Err is set, otherwise Err is cleared. I(t=0) is the input value
when the calculation started and I(t=n) is the input value at the time when calculated actuator
position has changed > DBPos. DBPos is given in % of the span the actuator is to have moved

44
FUNCTION BLOCK TYPES
CON_PU1

in ActT seconds. The calculation starts all over after exceeding DBPos, when Dev changes sign
or when DBPos is not exceeded after 9 pulses. Err is reset when Dev changes sign, or if DBPos
is not exceeded after 9 pulses. Theoretically you can set DBRef = DBPos. This means that the
actuator follows the controller without delay. In practice, you will have to set DBRef < DBPos.

Ordinary Function
With ordinary function, only pulse generation according to
| |∗ ∗
= 100 + +
is performed. If |Dev| <DeadB, no pulse is obtained.

45
FUNCTION BLOCK TYPES
CONV_BI

CONV_BI
CONV_BI (CONVerter - Boolean to Integer) converts data from BC, BCD, or 1-of-N formed from
boolean variables into integers. The function block has a memory function for storage of
converted data.
Call Name: CONV_BI[n]

Function Block
Name Data Type Direction Initial Value Description
C2 int in 1 Conversion type (1 = BC, 2 = BCD, 3 = 1 of N)
Set bool in Loading of new values each sample
L bool in Dynamic loading of data
Reset bool in Reset
Sign bool in Input set to "1" with negative data values
Err bool out Error
O dint out Output

The parameters below are extensible.


Name Data Type Direction Initial Value Description
I bool in Input [n]

Function
CONV_BI converts binary code (BC), binary coded decimal code (BCD) or 1-of-N code to
integers of type dint (32 bit). Sign input can be used as a sign bit.
Output O
Input I
C2=1, BC C2=2, BCD C2=3, 1-of-N(1)
I[1] 1 1 1
I[2] 2 2 2
I[3] 4 4 3
I[4] 8 8 4
I[5] 16 10 5
I[6] 32 20 6
I[7] 64 40 7
I[8] 128 80 8
: : : :
I[31] 230 4x107 31
Sign *-1 *-1 *-1
(1) Only one of the inputs may be set with 1-of-N code.

Storage of Data
The code at the inputs I[1]...I[n] is converted and stored immediately the input L is set. If input
Set is set, the input code is converted and the integer is stored each time the function block

46
FUNCTION BLOCK TYPES
CONV_BI

is executed. When Set is reset (to 0) after having been set, the data stored most recently
remains. The input Set overrides the input L. When Set is set, L has no effect.

Clearing
The input Reset clears the output and prevents all further storage of data while Reset is set.

Supervision
When converting 1-of-N code, the setting of only one of the inputs I[1]...I[n] is supervised. If
two or more inputs are set, the value of the input signal with the lowest number is stored. The
error signal output Err is also set. If the integer value to be stored at the output exceeds the
value which can be represented, the error signal output is set. In addition, the output is limited
to the upper or lower limit value.

47
FUNCTION BLOCK TYPES
CONV_IB

CONV_IB
CONV_IB (CONVerter - Integer to Boolean) converts data from integer to boolean variables
using BC, BCD, or 1-of-N conversion. The function block has a memory function for storage of
converted data.
Call Name: CONV_IB[n]

Function Block
Name Data Type Direction Initial Value Description
C2 int in 1 Conversion type (1 = BC, 2 = BCD, 3 = 1 of N)
Set bool in Loading of new values each sample
L bool in Dynamic loading of data
Reset bool in Reset
I dint in Input
Err bool out Error
Sign bool out Input set to "1" with negative data values
Zero bool out Set to "1" when input is zero or Reset = 1

The parameters below are extensible.


Name Data Type Direction Initial Value Description
O bool out Output [n]

Function
CONV_IB converts integer value into boolean variables, using binary code (BC), binary coded
decimal code (BCD) or 1-of-N code. The code conversion to be performed is specified by the
call parameter C2. With positive data values, the output Sign is reset to 0. With negative values,
it is set to 1.
Input I Output O
C2=1, BC C2=2, BCD C2=3, 1-of-N(1)
1 1 1 O[1]
2 2 2 O[2]
4 4 3 O[3]
8 8 4 O[4]
16 10 5 O[5]
32 20 6 O[6]
64 40 7 O[7]
128 80 8 O[8]
256 100 9 O[9]
512 200 10 O[10]
: : : :
230 4x107 31 O[31]
- 4x107 32 O[32]
(1) (1) (1) Sign
(1)
Sign is used as a sign. Only one of the inputs may be set with 1-of-N code.

48
FUNCTION BLOCK TYPES
CONV_IB

Storage of Data
The integer at input I is converted immediately when input L is set. If input Set is set, the input
code is stored, and the result is converted each time the function block is executed. When Set
is reset (to 0), after having been set, the data stored most recently remains until the function
block once more is executed with one of the inputs Set, L or Reset set. The input Set overrides
the input L, that is, when Set is set, L has no effect.

Reset
The input Reset clears the data outputs O[1]...O[n], and prevents all further storage of data
while Reset is set.

Supervision
When converting data from integers to 1-of-N code, the numbers are restricted to -32 to +32.
If the integer value to be converted exceeds the value which can be represented at the outputs,
the error signal output is set. In addition, the output is limited to the upper or lower limit value.

49
FUNCTION BLOCK TYPES
COUNT_L

COUNT_L
COUNT_L (COUNTer - Limiter) is a presettable counter for counting up or down. The counter
also checks the counter value relative to 0 and optional max and min values.
Call Name: Count_L

Function Block
Name Data Type Direction Initial Value Description
L bool in Dynamic loading of data
U_D bool in true Up/Down (0=Down, 1=Up)
C bool in Clock
Reset bool in Reset
Enable bool in false Enable
HL dint in 100 Output High Limit
LL dint in 0 Output Low Limit
In dint in Input
GT_0 bool out Output greater than 0
EQ_0 bool out Output equal to 0
LT_0 bool out Output less than 0
GE_HL bool out Output greater than or equal to High Limit
LE_LL bool out Output less than or equal to Low Limit
Out dint out Output

Function
The counter value increases or decreases by 1 immediately when input C is set. The value
increases if U_D = 1, and decreases if U_D = 0. The duration of the counter period may not be
less than 2 x the cycle time of the program.
When input L is set, the counter is loaded with the value at input In. If both input L and input
C are set simultaneously, the counter is first loaded after which an up or down count is
performed. The input Enable must be set for the counter to count or load a new value.

Clearing
The input Reset clears the counter and prevents all further counting or loading. Reset
overrides Enable.

Supervision
The status outputs specify the relation of the counter value to zero (>0, =0, <0), and the
relation to the upper (GE_HL), and lower (LE_LL) limits. When the counter reaches its least or
greatest value, all counting ceases.

50
FUNCTION BLOCK TYPES
DeMux_MI

DeMux_MI
DeMux_MI (DEMUltiplexer - with Memory and Integer address) is used as a demultiplexer with
memory function and has an optional number of outputs. DeMux_MI_ML is for integer data
type and DeMux_MI_R is for real data type.
Call Name: DeMux_MI_IL[n] and DeMux_MI_R[n]

Function Block
Name Data Type Direction Initial Value Description
Set bool in Loading of new values each sample
L bool in Dynamic loading of data
Reset bool in Reset
A dint in Address
I dint/real in Input
KeepNonAddress bool in Keep non-addressed output
AErr bool out Address error
ParError bool out Indicates input parameter error. Set if the index on the
extensible Parameters is higher than 32 and no execution
is performed.

The parameters below are extensible.


Name Data Type Direction Initial Value Description
OA dint/real out Output address [n]

Function
At which output, OA[1]...OA[n] the data value at input I is to be stored is specified at input A
with an address (dint 1 - n). If the address A is 0, the value 0 is stored at all outputs. Not
addressed outputs are not updated and keep consequently the value from previous execution
if the KeepNonAddress parameter is set to True. Otherwise, not addressed outputs are reset
to 0.

Loading
The value is stored at the instant that the input L is set (to 1). If input Set is set, new data is
loaded each time the function block is executed. When Set is reset after having been set, the
data most recently loaded remains until the function block is executed with one of the inputs
Set, L or Reset set. The input Set overrides the input L, that is, when Set is set, L has no effect.

Clearing
Setting the input Reset clears the data outputs and prevents further storage of data.

Supervision
The address A is monitored and if its value is greater than the number of outputs or is
negative, the error signal output AErr is set. The data value 0 is then stored at all outputs.

51
FUNCTION BLOCK TYPES
DERivator

DERivator
DERivator is used to give derivation effect. The derivation effect can be limited with the filter
function, which serves as a low pass filter. The output signal can be limited with limit values
specified at special inputs. The balancing function permits the output signal to follow an
external reference and permits a bumpless return to the normal function. All transfers from
static states are bumpless.
Call Name: DERivator

Function Block
Name Data Type Direction Initial Value Description
I real in Input
K real in 1.0 Input for Gain
TD time in 0s Time Derivation
TF time in 0s Time Filter
RDer bool in Reset
Bal bool in Order mode to Balance
BalRef real in 0.0 Balance Reference
OHL real in 100.0 Output High Limit
OLL real in 0.0 Output Low Limit
O real out Output
O_HL bool out Output greater than or equal to High Limit
O_LL bool out Output less than or equal to Low Limit
Err bool out Error

Function
The step response in the time plane for a derivator is:

( )= ∗ ( )
where I(t) specifies the magnitude of the step.
The transfer function for a DER function is:

( )= ( ∗ )
(1 + ∗ )
This has been implemented in the DERivator element.

Gain, Derivation Time, Filter Time and Sampling Time


Certain constants are precalculated and stored internally in the element. These constants are
recalculated if TD, TF or K is changed or if sampling time Ts is changed. When recalculating, a
test is performed to check whether TD and TF ³ 2 x Ts. If not, TD and/or TF is set equal to 2 x
Ts.

Clearing of the Derivator


Both output O(t) and the internal state of the output are cleared when RDer goes to 1.

52
FUNCTION BLOCK TYPES
DERivator

Following
If Bal is set to 1, the derivator immediately goes into following and the output O is set to the
value of the input BalRef. If the value at BalRef exceeds the output signal limits, the output is
set to the limit value concerned. Return to dynamic state is bumpless.

Limitation
The limitation function limits the output signal to the values at the input OHL for upper limit
and OLL for lower limit. If the actual value is greater than or equal to the upper limit, the output
O_HL is set to 1. If it is less than or equal to the lower limit, the output O_LL is set to 1.
The element checks that the upper limit value OHL is greater than the lower limit value OLL. If
not, the output Err is set to 1. While the error status persists, the outputs O_HL, O_LL and O
retain the values they had in the sample before, in which the error occurred. After an error, the
return to a dynamic state is bumpless, in the same way as in the case above.

53
FUNCTION BLOCK TYPES
DInt/DwordSimpleEvent

DInt/DwordSimpleEvent
DIntSimpleEvent and DwordSimpleEvent can be used to generate simple event for the
connected dint and dword data types respectively.
Call Name: DIntSimpleEvent and DwordSimpleEvent

Function Block
Name Data Type Direction Initial Value Description
Name string in Object name
Enable bool in Enable event handling
Signal dint/dword in Input signal
Class dint in Class
Severity dint in Severity
Prefix string[30] in Prefix name

Function
The function block generates simple event for each boolean in dint or dword data types. Event
is triggered on the rising edge only. Event message will be generated for each individual bit
even if more than several bits become active at the same time.
Example:
• Prefix is set to ABC_
• When bit 0 is true, it will generate event message ABC_B0

54
FUNCTION BLOCK TYPES
DIntToB16/B32

DIntToB16/B32
DIntToBxx can be used to convert the connected integer data type into boolean16 or
boolean32 data types.
Call Name: DIntToB16 and DIntToB32

Function Block
Name Data Type Direction Initial Value Description
I dint in Input
O Boolean16/ out Output
Boolean32

Function
The function block converts integer data type into Boolean16 or Boolean32 data types.

55
FUNCTION BLOCK TYPES
DwordToB16/B32

DwordToB16/B32
DwordToBxx can be used to convert the connected dword data type into boolean16 or
boolean32 data types.
Call Name: DwordToB16 and DwordToB32

Function Block
Name Data Type Direction Initial Value Description
I dword in Input
O Boolean16/ out Output
Boolean32

Function
The function block converts dword data type into Boolean16 or Boolean32 data types.

56
FUNCTION BLOCK TYPES
Div_R

Div_R
Div_R (Divider Real) is used for division of two real numbers. When dividing integers, the
quotient is obtained with the remainder at a separate output.
Call Name: Div_R

Function Block
Name Data Type Direction Initial Value Description
I1 real in 1.0 Input for Dividend
I2 real in 1.0 Input for Divisor
Out real out Output
OutInt real out Quotient (Integer part of output)
Rem real out Remainder

Function
The value at input I1 is divided by the value at input I2. The quotient is stored at output Out.
The integer part of the output is available at output OutInt and the remainder at output Rem.

57
FUNCTION BLOCK TYPES
Filt_1P

Filt_1P
Filt_1P (Filter - 1 Pole) is used as a single pole low pass filter. The output signal can be limited
with limit values specified at special inputs. The balancing function permits the output signal
to follow an external reference and permits a bumpless return to the normal function. All
transfers from static states are bumpless.
Call Name: Filt_1P

Function Block
Name Data Type Direction Initial Value Description
I real in Input
K real in 1.0 Gain
T1 time in 5s Filter Time
Bal bool in Order mode to Balance
BalRef real in 0.0 Balance Reference
OHL real in 100.0 Output High Limit
OLL real in 0.0 Output Low Limit
O real out Output
O_EQ_HL bool out Output greater than or equal to High Limit
O_EQ_LL bool out Output less than or equal to Low Limit
Err bool out Error

Function
The step response in the time plane for a single pole low pass filter is:
( ) = ( ) (1 − /
)
The transfer function for a single pole low pass filter is:
( ) = (1 1 + 1)
This has been implemented in the Filt_1P function block.

Gain, Filter Time and Sampling Time


Certain constants are precalculated to make the execution time of the function block as short
as possible. The result is stored internally in the function block. When recalculating, a test is
performed to check if T1 > 2 x Ts. If not, T1 is set equal to 2 x Ts.

Following
If Bal is set to 1, the filter immediately goes into following and output O is set to the value of
input BalRef. If the value at BalRef exceeds the output signal limits, the output is set to the
limit value concerned. Return to dynamic state is bumpless.

Limitation
The limitation function limits the output signal to the limit values at input OHL for upper limit
value, and input OLL for lower limit value. If the actual value exceeds the upper limit value, the

58
FUNCTION BLOCK TYPES
Filt_1P

output O_EQ_HL is set to 1. If it falls below the lower limit value, the output O_EQ_LL is set to
1.
When the limitation status has been detected, a check is made each time the function block is
executed to determine if K x I(t) exceeds the output signal limitations. If so, the limitation
status remains. If not, the calculation of the output signal is performed by the algorithm in
the normal way. Return from limitation to a dynamic state is bumpless.
The function block checks that the upper limit value OHL is greater that the lower limit value
OLL. If not, the output Err is set to 1.
While the error status persists, the outputs O_EQ_HL, O_EQ_LL and O retain the values they
had in the sample before, in which the error occurred. After an error, the return to a dynamic
state is bumpless, in the same way as in the case above.

59
FUNCTION BLOCK TYPES
Filt_2P

Filt_2P
Filt_2P (Filter - 2 Pole) is used as a 2- pole low pass filter. The output signal can be limited with
limit values specified at special inputs. The balancing function permits the output signal to
follow an external reference and permits a bumpless return to the normal function. All
transfers from static states are bumpless.
Call Name: Filt_2P

Function Block
Name Data Type Direction Initial Value Description
I real in Input
K real in 1.0 Gain
T1 real in 0.0 1 / resonance angular frequency
T2 real in 0.0 Derivation Time
D real in 1.0 Damping
Bal bool in Order mode to Balance
BalRef real in 0.0 Balance Reference
OHL real in 100.0 Output High Limit
OLL real in 0.0 Output Low Limit
O real out Output
O_HL bool out Output greater than or equal to High Limit
O_LL bool out Output less than or equal to Low Limit
Err bool out Error

Function
The transfer function for a 2-pole low pass filter is:

( ) = (1 + 1)
(1 + 2 2+( 2) )
This has been implemented in the Filt_2P function block.

Gain, Filter Time, Damping Factor and Sampling Time


Certain constants are precalculated to make the execution time of the function block as short
as possible. The result is stored internally in the function block. When recalculating, a test is
performed to check if T1 > 2 x Ts. If not, T1 is set equal to 2 x Ts. In the same way a test is made
to check if D < 0.1, in which case D is set to 0.1. If T2 > 2 x Ts, T2 is set to 2 x Ts.
T1 can be set to 0, thus making the FB a pure low pass filter.

Following
If Bal is set to 1, the filter immediately goes into following and output O is set to the value of
input BalRef. If the value at BalRef exceeds the output signal limits, the output is set to the
limit value concerned. Return to dynamic state is bumpless.

60
FUNCTION BLOCK TYPES
Filt_2P

Limitation
The limitation function limits the output signal to the limit values at input OHL for upper limit
value, and input OLL for lower limit value. If the actual value exceeds the upper limit value, the
output O_EQ_HL is set to 1. If it falls below the lower limit value, the output O_EQ_LL is set to
1.
The function block checks that the upper limit value OHL is greater that the lower limit value
OLL. If not, the output Err is set to 1.
While the error status persists, the outputs O_EQ_HL, O_EQ_LL and O retain the values they
had in the sample before, in which the error occurred. After an error, the return to a dynamic
state is bumpless, in the same way as in the case above.

61
FUNCTION BLOCK TYPES
Fung_1V

Fung_1V
Fung_1V (Function Generator - 1 Variable) is used for generation of an optional function of one
variable, y = f(x). The function is described by a number of coordinates. Linear interpolation is
used for values between these coordinates. Maximum 16 coordinates can be specified.
Call Name: Fung_1V

Function Block
Name Data Type Direction Initial Value Description
X real in Input
Bal bool in Order mode to Balance
BalRef real in 0.0 Balance Reference
XTab Real16 in X table values
YTab Real16 in Y table values
Y real out Output
ParXErr bool out Parameter X Error
ParYErr bool out Parameter Y Error
Err bool out Error (input is out of range)
BalRefO real out Output for BalRef

Function
Fung_1V calculates an output signal Y for a value at the input X. The calculation is performed
in accordance with a piece by piece linear function which is determined by the vectors XTab
and YTab. For each X value in XTab, there is a corresponding Y value in YTab. The Y value at
the output is calculated by means of linear interpolation between the two X values in XTab
which are nearest the value at the input X. The values in XTab must be strictly increasing from
low to high numbers or decreasing from high to low numbers in the table.

Interpolation
The function generated can be illustrated by the following figure. The interpolation is
performed as follows:
( − )( − )
= + ( − )

Balancing
On activation of the balancing input Bal, the value at Y is set to the value at the input BalRef.
The X value which corresponds to this Y value is obtained at the output BalRefO. On balancing,
the X value is calculated by interpolation in the same way as the Y value is calculated during
normal operation. To permit the balancing, the values in YTab must be strictly increasing or
decreasing from low to high serial numbers in the table.

Error signal
If the input signal X is outside the range defined by XTab, the Err output is set to 1. The Y value
is then set to the greatest or lowest value resp. in YTab.

62
FUNCTION BLOCK TYPES
Fung_1V

Err is also set to 1 if BalRef is equal to or outside the YTab value range when Bal is set to 1. The
value at Y is then set to the value at the input BalRef and BalRefO is set to the greatest or
lowest value resp. in XTab.

63
FUNCTION BLOCK TYPES
GetBit

GetBit
GetBit is used to get the value of selected bit numbers. GetBitDInt is for integer data type and
GetBitDword is for dword data type.
Call Name: GetBitDInt[n] and GetBitDword[n]

Function Block
Name Data Type Direction Initial Value Description
I dint/dword in Input
Set bool in Loading of new values each sample
L bool in Dynamic loading of data

The parameters below are extensible.


Name Data Type Direction Initial Value Description
BitNo dint in Bit number [n]
O bool out Bit value [n]

Function
The output value O[1]...O[n] is retrieved from input I based on the specified inputs
BitNo[1]...BitNo[n].

Loading
The value is loaded at the instant the input L is set to 1. If input Set is set, new data is loaded
each time the function block is executed. When Set is reset after having been set, the data
loaded most recently remains. Input Set overrides input L, that is, when Set is set, L has no
function.

64
FUNCTION BLOCK TYPES
INTegrator

INTegrator
INTegrator is used to give an integration effect. The output signal can be limited with limit
values specified at special inputs. The balancing function permits the output signal to follow
an external reference and permits a bumpless return to the normal function.
Call Name: INTegrator

Function Block
Name Data Type Direction Initial Value Description
I real in Input
K real in 1.0 Gain
TI time in 30s Integration Time
RInt bool in Reset
Bal bool in Order mode to Balance
BalRef real in 0.0 Balance Reference
OHL real in 100.0 Output High Limit
OLL real in 0.0 Output Low Limit
O real out Output
O_EQ_HL bool out Output greater than or equal to High Limit
O_EQ_LL bool out Output less than or equal to Low Limit
Err bool out Error

Function
The INTegrator function can be written in the time plane as O(t) = K/TI (òt I(t) dt). The main
property when controlling is that the output signal retains its value when the input signal I(t)
= 0.The step response in the time plane is O(t) = k x I(t) x t/TI. The transfer function for an
integrator is G(s) = K(1/sTI).

Gain, Integration Time Constant and Sampling Time


The constant K x Ts/TI is precalculated and the result is stored internally in the function block.
This constant is recalculated if TI or K is changed or if the sampling time Ts is changed. When
recalculating, a test is made to see whether Ts/TI < 1. Ts/TI is otherwise set equal to 1.

Clearing of Integrator
The algorithm is cleared when RInt goes to 1.

Following
If Bal is set to 1, the regulator immediately goes into following and the output O is set to the
value of the input BalRef. If the value at BalRef exceeds the output signal limits, the output is
set to the limit value concerned. On return to the normal function, the value of output O during
the last sample in following remains a further sample time, after which integration will be
performed for this value.

65
FUNCTION BLOCK TYPES
INTegrator

Limitation
The limitation function limits the output signal to the values at the inputs OHL for upper limit
and OLL for the lower limit. If the actual value exceeds the upper limit, the output O_EQ_HL is
set to 1 and if it falls below the lower limit, the output O_EQ_LL is set to 1.
The function block checks that the upper limit value OHL is greater than the lower limit value
OLL. If this is not the case, the output Err is set to 1.
While the error status persists, the outputs O_EQ_HL, O_EQ_LL and O retain the values they
had in the sample before that in which the error occurred. After limitation or error status,
normal integration is performed from the current value

66
FUNCTION BLOCK TYPES
LIM

LIM
LIM (LIMiter) is used for limitation of real numbers.
Call Name: LIM

Function Block
Name Data Type Direction Initial Value Description
I real in Input
Track bool in false Tracking
TrackRef real in 0.0 Tracking Reference
OHL real in 100.0 Output High Limit
OLL real in 0.0 Output Low Limit
O real out Output
O_EQ_HL bool out Output greater than or equal to High Limit
O_EQ_LL bool out Output less than or equal to Low Limit
Err bool out Error

Function
LIM is used to limit a real value. Boolean output signals are given when the output is limited.

Limiting
When the input I exceeds the limit, the output O is limited to the limit value. One of the outputs
O_EQ_HL or O_EQ_LL will then be set depending on which limit was exceeded.

Supervision of Limit Values


The function block checks that the limit value OHL is greater than the limit OLL. If OHL is less
than OLL, the error signal output Err is set. The output O and the limit value outputs O_EQ_HL
and O_EQ_LL are retained from the sample before that in which the error status developed.

67
FUNCTION BLOCK TYPES
LIM_N

LIM_N
LIM_N (LIMiter - 1-of-N address) is used for limitation of real number to several limit values.
Call Name: DivLIM_N[n]

Function Block
Name Data Type Direction Initial Value Description
I real in Input
AErr bool out Address error
Err bool out Error
O real out Output
I_GT_HLA bool out Input greater than High Limit Adress
HLA_Act real out Actual High Limit
I_LT_LLA bool out Input less than Low Limit Adress
LLA_Act real out Actual Low Limit

The parameters below are extensible.


Name Data Type Direction Initial Value Description
A bool in Address [n]
HLA real in High Limit [n]
LLA real in Low Limit [n]

Function
LIM_N is used to limit up to n different limits. Boolean output signals are given when the
output is limited.

Selection of Limit Value


Which of the limit value inputs HLA[1]…HLA[n] or LLA[1]...LLA[n] is to limit the value at output
O is selected with the inputs A[1]…A[n]. If the input A[1] is 1, the output is limited by HLA[1]
and LLA[1], if A[2] is 1, the output is limited by HLA[2] and LLA[2], and so on. If none of the
inputs A[1]...A[n] is 1, output is limited to the data value 0. If 2 or more of the inputs A[1]...A[n]
are set at the same time, the output is limited by the limit values corresponding to the lowest
numbered set input. The error signal output AErr is set at the same time.

Limiting
When the input I exceeds the selected limit, the output O is limited to the limit value. One of
the outputs I_GT_HLA or I_LT_LLA will then be set depending on which limit was exceeded.
The value of the current limits for high and low level where limiting begins can be read at the
outputs HLA_Act and LLA_Act.

Supervision of Limit Values


The function block checks that the limit value HLA is greater than the limit LLA. If HLA is less
than LLA, the error signal output Err is set. The output O and the limit value outputs I_GT_HLA
and I_LT_LLA are retained from the sample before that in which the error status developed.
68
FUNCTION BLOCK TYPES
LIM_N

69
FUNCTION BLOCK TYPES
Max_R

Max_R
Max_R (Maximum selector Real) is used to select the largest value of an optional number of
real numbers.
Call Name: Max_R[n]

Function Block
Name Data Type Direction Initial Value Description
DEADB real in 0.0 Deadband
A dint out Output address
O real out Output

The parameters below are extensible.


Name Data Type Direction Initial Value Description
IA real in Input address [n]

Function
The values at the inputs IA[1]...IA[n] are compared and the greatest value is obtained at the
output O. The number of the input with the greatest value is obtained at the output A. If the
two largest signal values are equal when the function block is executed the first time, the
signal with the lowest connection number is selected as the greatest.

Deadband
The deadband specified at the input DEADB is symmetrical around the value of the greatest
input. The upper and lower deadband limits are calculated from the value for the largest input
in the preceding sample. To prevent rapid changes at the output O, the value at O is retained
until the value at the corresponding input is less than the calculated lower deadband limit or
until one of the other inputs exceeds the upper deadband limit.

70
FUNCTION BLOCK TYPES
Min_R

Min_R
Min_R (Minimum selector Real) is used to select the lowest value of an optional number of real
numbers.
Call Name: Min_R[n]

Function Block
Name Data Type Direction Initial Value Description
DEADB real in 0.0 Deadband
A dint out Output address
O real out Output

The parameters below are extensible.


Name Data Type Direction Initial Value Description
IA real in Input address [n]

Function
The values at the inputs IA[1]...IA[n] are compared and the lowest value is obtained at the
output O. The number of the input with the lowest value is obtained at the output A. If the two
largest signal values are equal when the function block is executed the first time, the signal
with the lowest connection number is selected as the smallest.

Deadband
The deadband specified at the input DEADB is symmetrical around the value of the least input.
The upper and lower deadband limits are calculated from the value for the lowest input in the
preceding sample. To prevent rapid changes at the output O, the value at O is retained until
the value at the corresponding input exceeds the calculated upper deadband limit or until one
of the other inputs falls below the lower deadband limit.

71
FUNCTION BLOCK TYPES
Mono

Mono
Mono can be used for time limiting of operation of outputs and automatic functions, impulse
extension, stall alarm function, and so on.
Call Name: Mono

Function Block
Name Data Type Direction Initial Value Description
RTG bool in false Retriggerable
I bool in Input
TP time in 1s Pulse Time
Reset bool in Reset
O bool out Output
TE time out Elapse Time

Function
A memory is set when input I is set. The output then goes to 1, see function diagram. When
the time set in the timer has elapsed, the memory is cleared and the output O goes to 0. The
Reset input has priority over input I. Reset = 1 clears the memory and the output goes to 0.

MONO Function, Not Retriggerable


If the input RTG is not set, a Mono function which is not retriggerable is obtained. If a new
pulse is obtained at the input I before the time set in the timer has elapsed, it does not affect
the timer. Only when the time set has elapsed and the output O is reset, the Mono function
can be restarted by the input I going from 0 to 1.

MONO Function, Retriggerable


If RTG is set, a retriggerable Mono function is obtained, that is, the timer starts from 0 each
time a new pulse is obtained at the input I. If a new pulse is obtained at the input I before the
time set in the timer has elapsed, the timer will restart, that is, the Mono function is
retriggerable.

72
FUNCTION BLOCK TYPES
Move

Move
Move_B copies the value at the input to the output and can be used to copy the value from
one variable to another. Move_B is for boolean data type, Move_IL is for integer data type and
Move_R is for real data type.
Call Name: Move_B[n], Move_IL[n] and Move_R[n]

Function Block
The parameters below are extensible.
Name Data Type Direction Initial Value Description
I bool/dint/real in Input [n]
O bool/dint/real out Output [n]

Function
The function block copies the value at the input to the respective output.

73
FUNCTION BLOCK TYPES
Mux_I

Mux_I
Mux_I (Multiplexer - with Integer address) is used as a selector and has an optional number of
inputs. Mux_I_B is for boolean data type, Mux_I_IL is for integer data type and Mux_I_R is for
real data type.
Call Name: Mux_I_B[n], Mux_I_IL[n] and Mux_I_R[n]

Function Block
Name Data Type Direction Initial Value Description
A dint in Address
AErr bool out Address error
O bool/dint/real out Output

The parameters below are extensible.


Name Data Type Direction Initial Value Description
IA bool/dint/real in Input address [n]

Function
The input data value IA[1]...IA[n], which is to be connected to the output O, is specified with
an address (integer 1 - n) at the input A. If the address is 0, the output terminal O is set to zero.

Supervision
The address A is monitored. If its value is negative or greater than the number of inputs, the
error signal output AErr is set. The data value 0 is then obtained at the output.

74
FUNCTION BLOCK TYPES
Mux_MI

Mux_MI
Mux_MI (Multiplexer - with Memory and Integer address) is used as a selector with memory
function and has an optional number of inputs. Mux_MI_IL is for integer data type and
Mux_MI_R is for real data type.
Call Name: Mux_MI_IL[n] and Mux_MI_R[n]

Function Block
Name Data Type Direction Initial Value Description
Set bool in Loading of new values each sample.
L bool in Dynamic loading of data
Reset bool in Reset
A dint in Address
AErr bool out Address error
O dint/real out Output

The parameters below are extensible.


Name Data Type Direction Initial Value Description
IA dint/real in Input address [n]

Function
The input data value IA[1]...IA[n], which is to be connected to the output O, is specified with
an address (integer 1 - n) at the input A. If the address is 0, the output terminal O is set to zero.

Loading
The value is loaded at the instant the input L is set to 1. If input Set is set, new data is loaded
each time the function block is executed. When Set is reset after having been set, the data
loaded most recently remains until the function block is once more executed with input Set, L
or Reset set. Input Set overrides input L, that is, when Set is set, L has no function.

Clearing
The input Reset clears the data output and prevents further storage of data.

Supervision
The address A is monitored. If its value is negative or greater than the number of inputs, the
error signal output AErr is set. The data value 0 is then obtained at the output.

75
FUNCTION BLOCK TYPES
Mux_MN

Mux_MN
Mux_MN (Multiplexer - with Memory and 1-of-N address) is used as a selector with memory
function and has an optional number of inputs. Mux_MN_IL is for integer data type and
Mux_MN_R is for real data type.
Call Name: Mux_MN_IL[n] and Mux_MN_R[n]

Function Block
Name Data Type Direction Initial Value Description
Set bool in Loading of new values each sample.
L bool in Dynamic loading of data
Reset bool in Reset
AErr bool out Address error
O dint/real out Output

The parameters below are extensible.


Name Data Type Direction Initial Value Description
A bool in Address [n]
IA dint/real in Input address [n]

Function
The input data value A[1]...IA[n] that is to be stored at the output is specified with the inputs
A[1]...A[n]. If the input A1 is 1, the value from input IA[1] is stored at the output, if A[2] is 1, the
value from input IA2, and so on. If none of the inputs A[1]...A[n] is set to 1, the data value 0 is
stored at the output O.

Loading
The value is loaded at the instant the input L is set to 1. If input Set is set, new data is loaded
each time the function block is executed. When Set is reset after having been set, the data
loaded most recently remains. Input Set overrides input L, that is, when Set is set, L has no
function.

Clearing
The input Reset clears the data output and prevents further storage of data.

Supervision
If two or more of the inputs A[1]...A[n] are set simultaneously, the output AErr is set and the
value from the input which corresponds to the address input set with the lowest number is
stored at the output O.

76
FUNCTION BLOCK TYPES
Mux_N

Mux_N
Mux_N (Multiplexer - with 1-of-N address) is used as a selector and has an optional number of
inputs. Mux_N_IL is for integer data type and Mux_N_R is real data type.
Call Name: Mux_N_IL[n] and Mux_N_R[n]

Function Block
Name Data Type Direction Initial Value Description
AErr bool out Address error
O dint/real out Output

The parameters below are extensible.


Name Data Type Direction Initial Value Description
A bool in Address [n]
IA dint/real in Input address [n]

Function
Which one of the inputs IA[1]...IA[n] is to be connected to the output O is selected with the
inputs A[1]...A[n]. If input A1 is set, input IA[1] is connected to the output and if A[2] is set,
input IA[2] is connected, and so on. If none of the inputs A[1]...A[n] is set, the data value 0 is
connected to the output O.

Supervision
If two or more of the inputs A[1]...A[n] are set at the same time, the output AErr is set and the
input which corresponds to the address input set with the lowest number is connected to
output O.

77
FUNCTION BLOCK TYPES
MuxA_I

MuxA_I
MuxA_I (Multiplexer Array - with Integer address) is used as a selector for text arrays and has
an optional number of inputs. The number of characters in the text arrays is optional.
Call Name: MuxA_I[n]

Function Block
Name Data Type Direction Initial Value Description
A dint in Address
AErr bool out Address error
O string out Output

The parameters below are extensible.


Name Data Type Direction Initial Value Description
IA string in Input address [n]

Function
The function block takes address given at the input A and stores data from the corresponding
input IA[n] at output O. If the address is greater than the number of inputs or if it is negative,
the output AErr is set to 1. In addition a blank text string is stored on the output. If A is set to
0, a blank text string is issued.

78
FUNCTION BLOCK TYPES
Osc_B

Osc_B
Oscillator Osc_B (Oscillator - Boolean variables) with variable frequency and pulse time is used
when pulse trains with periods from 2 x cycle time up to 24 hours are needed.
Call Name: Osc_B

Function Block
Name Data Type Direction Initial Value Description
Enable bool in false Enable
TP time in 0s Pulse Time
TC time in 0s Cycle Time
O bool out Output

Function
The oscillator starts when the input Enable is set to 1. TC and TP are rounded up to a multiple
of the actual cycle time.

79
FUNCTION BLOCK TYPES
PI

PI
PI (Proportional Integrating regulator) is used as a standard PI- regulator for serial
compensation in feedback systems. The control deviation is calculated internally in the
element. The output signal can be limited to limits specified at special inputs. The balancing
function permits the output signal to follow an external reference and permits a bumpless
return to normal function. All transfers from balancing or limited output signal are bumpless.
Call Name: PI

Function Block
Name Data Type Direction Initial Value Description
RevAct bool in true Reverse Control Action
RefV real in Reference Value
I real in Measured Value
K real in 0.5 Gain
TI real in 30.0 Integration Time (s)
RInt bool in Reset
Bal bool in Order mode to Balance
BalRef real in 0.0 Balance Reference
OHL real in 100.0 Output High Limit
OLL real in 0.0 Output Low Limit
O real out Output
OutEqHL bool out Output greater than or equal to High Limit
OutEqLL bool out Output less than or equal to Low Limit
Err bool out Error
Dev real out Deviation

Function

Control Deviation
Deviation Dev is calculated as follows even when the regulator is following: Dev = I – RefV

Reverse Control Action


RevAct is a function parameter which controls the direction of the output signal change in
relation to the actual value. If RevAct is set to 0, direct action is obtained, that is, increasing
actual value gives increasing output signal. When RevAct is set to 1, reversed action is
obtained, that is, increasing actual value gives decreasing output signal.

Transfer Function
The transfer function for a PI function is:
( ) = (1 + )
This has been implemented in the PI element.

80
FUNCTION BLOCK TYPES
PI

Gain, Integration Time Constant and Sampling Time


The constant K x Ts/TI is precalculated and the result is stored internally in the function block.
This constant is recalculated if TI or K is changed or if the sampling time Ts is changed. When
recalculating, a test is made to see whether Ts/TI < 1. Ts/TI is otherwise set equal to 1.

Clearing of Integrator
The integration section of the algorithm is cleared when RInt goes to 1. If the proportional
section of the algorithm exceeds the limits of the output signal, the limit status remains and
the internal status is updated in accordance with the section "Bumpless transfer from
following or limitation". If RInt is set permanently to 1, the element functions as a P-regulator.

Following
If Bal is set to 1, the regulator immediately goes into following and the output O follows the
value of the input BalRef. If the value at BalRef exceeds the output signal limits, the output is
set to the limit value concerned. On return to a normal function the value of the output O
during the last sample in the following remains during one sample time. See below under
"Bumpless transfer from following or limitation".

Limitation
The limitation function limits the output signal to the limit values at the inputs OHL for upper
limit and OLL for lower limit. If the actual value exceeds the upper limit value, the output
Out_EqHL is set to 1 and if it falls below the lower limit value, the output Out_EqLL is set to 1.
The element checks that the upper limit value OHL is greater than the lower limit value OLL. If
not, the output Err is set to 1. While the error status persists, the outputs Out_EqHL, Out_EqLL
and O retain the values they had in the sample before, in which the error occurred.

Bumpless Transfer from Following or Limitation


Transfer from following status (Bal = 1) or from a limited output signal is bumpless.
This is performed by recalculation of internal states, that is, the integration part according to:
( ) = ( )− ∗ ( )

81
FUNCTION BLOCK TYPES
Ramp

Ramp
Ramp (Ramp generator) is used to limit the speed of change of a signal. The output signal can
be limited with limit values specified at special inputs. The balancing function permits the
output signal to follow an external reference.
Call Name: Ramp

Function Block
Name Data Type Direction Initial Value Description
I real in Input
Step_Pos real in 0.0 Maximum positive step change
Step_Neg real in 0.0 Maximum negative step change
Slope_Pos real in 2.0 Positive ramp for the output
Slope_Neg real in 2.0 Negative ramp for the output
Bal bool in Order mode to Balance
BalRef real in 0.0 Balance Reference
OHL real in 100.0 Output High Limit
OLL real in 0.0 Output Low Limit
O real out Output
O_EQ_HL bool out Output greater than or equal to High Limit
O_EQ_LL bool out Output less than or equal to Low Limit
Err bool out Error

Function
The main property of a Ramp function is that the output signal follows the input signal while
the input signal is not changed more than the value specified at the step inputs. If the input
signal is changed more than so, the output signal is first changed by Step_Pos or Step_Neg
depending on the direction of change and then by Slope_Pos or Slope_Neg per second until
the values at the input and output are equal. This means also that if Step_Neg = Step_Pos =
0, a pure Ramp, that is, Slope/sec, is obtained at the output.
The greatest step change allowed at the output O is specified by the parameters Step_Pos
and Step_Neg for the respective direction of change. The ramp which the output signal is to
follow if the change at the input I exceeds Step_Pos or Step_Neg is specified by the inputs
Slope_Pos and Slope_Neg. All parameters are specified as absolute values with the same units
as input I.
The values of the parameters are stored internally in the function block. New values are only
entered under stationary conditions, that is, when I(t) = O(t).

Calculation of Output Signal


When calculating output signal O, three cases must be distinguished:
Case 1 I(t) = O(t-Ts)
This results in O(t) = I(t)
Case 2 I(t) > O(t-Ts)

82
FUNCTION BLOCK TYPES
Ramp

This results in the calculation of the value of the output in accordance with
O(t) = min(I(t) and (Step_Pos + VPOS (t - Ts) + Slope_Pos * Ts)
Case 3 I(t) < O(t-Ts)
This results in the calculation of the value of the output in accordance with:
O(t) = max(I(t) and (VNEG(t - Ts) - Step_Neg - Slope_Neg * Ts)
VPOS and VNEG are auxiliary variables with positive and negative steps respectively. These
are calculated in all cases according to:
VPOS(t) = min(O(t), VPOS( t – Ts) + Slope_Pos * Ts)
VNEG(t) = max(O(t), VNEG( t – Ts) + Slope_Neg * Ts)
If a new step with the same direction of change appears at the input before the internal
auxiliary signal has been updated the step part of the output signal is reduced. A step with
the opposite derivative, however, takes full effect. This is because the auxiliary variable for the
opposite direction always has been updated to O(t).

Following
If Bal is set to 1, the filter immediately goes into following and the output O is set to the value
of the input BalRef. If the value at BalRef exceeds the output signal limits, the output is set to
the limit value concerned. During following VPOS(t) = VNEG(t) = O(t) = BalRef(t). Return to
normal function is done as if a unit step had occurred on the input.

Limitation
The limitation function limits the output signal to the limit values at the inputs OHL for upper
limit and OLL for the lower limit. If the actual value exceeds the upper limit, the output
O_EQ_HL is set to 1 and if it falls below the lower limit, the output O_EQ_LL is set to 1. In the
limiting state VPOS(t), VNEG(t) and O(t) are set to the limit value concerned.
The function block checks that the upper limit value OHL is greater than the lower limit value
OLL. If not, the output Err is set to 1. While the error status persists, the outputs O_EQ_HL,
O_EQ_LL and O retain the values they had in the sample before that in which the error
occurred.

83
FUNCTION BLOCK TYPES
Reg

Reg
Reg (Register) is used as a memory function block with an optional number of positions.
Reg_IL is for integer data type and Reg_R is for real data type.
Call Name: Reg_IL[n] and Reg_R[n]

Function Block
Name Data Type Direction Initial Value Description
Set bool in Loading of new values each sample
L bool in Dynamic loading of data
Reset bool in Reset
ParError bool out Indicates input parameter error. Set if the index on the
extensible Parameters is higher than 32 and no execution
is performed.

The parameters below are extensible.


Name Data Type Direction Initial Value Description
I dint/real in Input [n]
O dint/real out Output [n]

Function
When input L becomes 1, the register is loaded with data from inputs I[1]...I[n]. Data previously
in the register is replaced. If input Set is set, loading is performed as above each time the
register is executed. When Set is reset after having been set, the data most recently loaded
remains until the function block is executed again, with input Set, L or Reset set. Input Set
overrides L so that when input Set is set, L has no effect.

Clearing
When input Reset is set, the register is cleared and all further entry is prevented. Reset
overrides both Set and L.

84
FUNCTION BLOCK TYPES
SetBit

SetBit
SetBit is used to manipulate the value of selected bit numbers of an input without decoding
all the bits value. SetBitDInt is for integer data type and SetBitDword is for dword data type.
Call Name: SetBitDInt[n] and SetBitDword[n]

Function Block
Name Data Type Direction Initial Value Description
I dint/dword in_out Input
Set bool in Loading of new values each sample
L bool in Dynamic loading of data

The parameters below are extensible.


Name Data Type Direction Initial Value Description
BitNo dint in Bit number [n]
BitValue bool in Bit value [n]

Function
The selected bit BitNo[1]...BitNo[n] is set with input BitValue[1]...BitValue[n] and then passed
back to input I.

Loading
The value is loaded at the instant the input L is set to 1. If input Set is set, new data is loaded
each time the function block is executed. When Set is reset after having been set, the data
loaded most recently remains. Input Set overrides input L, that is, when Set is set, L has no
function.

85
FUNCTION BLOCK TYPES
SR_D

SR_D
SR_D (Set Reset memory - Data input) is used as a memory for Boolean variables. Besides the
SR-function, it can also clock in data.
Call Name: SR_D

Function Block
Name Data Type Direction Initial Value Description
Set bool in Set input
D bool in Input
C bool in Dynamic loading for input D
Reset bool in Reset
Out bool out Output

Function
If only the Set and Reset inputs are used, SR_D functions as an ordinary SR function block.
When input Reset is reset and input C goes to 1, the value at input D is stored at the output.
When input Reset is set, the output is unconditionally reset, that is, Reset overrides the other
inputs.

86
FUNCTION BLOCK TYPES
SW

SW
SW (Switch) is used as a connection element for data and has an optional number of channels
with closing function. SW_ B is for boolean data type and SW_ R is for real data type.
Call Name: SW_B[n] and SW_R[n]

Function Block
Name Data Type Direction Initial Value Description
Act bool in Set Input

The parameters below are extensible.


Name Data Type Direction Initial Value Description
In bool/real in Input [n]
Out bool/real out Output [n]

Function
When the control input Act is 0, the output data is 0. When Act is set, data comes from the
inputs In[1]...In[n].

87
FUNCTION BLOCK TYPES
SW_C

SW_C
SW_C (SWitch - Changeover) is used as a connection element for data and has an optional
number of channels with switching function. SW_C_B is for boolean data type and SW_C_R is
for real data type.
Call Name: SW_C_B[n] and SW_C_R[n]

Function Block
Name Data Type Direction Initial Value Description
Act bool in Set Input

The parameters below are extensible.


Name Data Type Direction Initial Value Description
In1 bool/real in Input 1 [n]
In0 bool/real in Input 0 [n]
Out bool/real out Output [n]

Function
When the control input Act is 0, the data from the inputs In0[1]...In0[n] are connected to the
appropriate outputs. When Act is set, data comes from the inputs In1[1]...In1[n].

88
FUNCTION BLOCK TYPES
TimerPuls

TimerPuls
TimerPuls is used to generate a pulse with a duration determined by two times in the same
day (24 hour).
Call Name: TimerPuls

Function Block
Name Data Type Direction Initial Value Description
Year dint in 0 Year when pulse is to be given (0 = every year)
Month dint in 0 Month when pulse is to be given (0 = every month)
Day dint in 0 Day when pulse is to be given (0 = every day)
TOn1 time in Time when pulse starts
TOff1 time in Time when pulse stops
Err bool out Error
ErrType string[20] out Error type
O bool out Output

Function
TimerPuls is used to produce a pulse between two times within one (24 hours) day. The day is
specified by Year, Month and Day number within the month. The pulse duration is determined
by the inputs TOn1 and TOff1. The generated pulse can be used to start required functions.

Year, Month and Day Input


The year during which the pulse is to be obtained is specified at input Year. If Year is given as
0, a pulse is given each year.
The month during which the pulse is to be obtained is specified at input Month. If Month is
given as 0, a pulse is given each month. In addition to 0, month numbers 1 to 12 can be given.
The day of the month during which the pulse is to be obtained is specified at input Day. If Day
is given as 0, a pulse is given each day of the month. In addition to 0, day numbers 1 to 31 can
be given.

TOn and TOff Inputs


At which time a pulse is to begin or end respectively is given at the inputs TOn1 and TOff1.
TOn1 and TOff1 must be within the same 24 hour period, that is, TOn1 < TOff1. Time
specifications can vary from 00:00:00.000 to 23:59:59.999.
Year Month Day Description
0 0 0 Each day.
0 0 1 - 31 A certain day of each month, every year.
0 1 - 12 0 Each day during a certain month every year.
0 1 - 12 1 - 31 A certain day of each year.
1980 - 2099 0 0 Each day during a certain year.
1980 - 2099 0 1 - 31 A certain day each month during a certain year.
1980 - 2099 1 - 12 0 Each day during a certain month during a certain year.
1980 - 2099 1 - 12 1 - 31 A particular day.

89
FUNCTION BLOCK TYPES
TimerPuls

Supervision
If any input has a value outside the permitted range, the error signal Err is set (to 1) and the
type of error is given at output ErrType.

90
FUNCTION BLOCK TYPES
Tresh_L

Tresh_L
Tresh_L (Threshold - Logic) is used to determine when more than, or equal to, a given number
of boolean signals are set to 1.
Call Name: Tresh_L[n]

Function Block
Name Data Type Direction Initial Value Description
C1 dint in Threshold value
O bool out Output

The parameters below are extensible.


Name Data Type Direction Initial Value Description
I bool in Input [n]

Function
It is used to determine if the number of boolean values set to 1 is greater than or equal to the
specified number in C1. If so, the output O is set.

91

You might also like