1. Ladder Logic: We describe control elements of a cont rol str ategy available in the LOGICVIEW and
used by the DF65.
2. Function Blo cks: We pr esent detailed descriptions of all function blocks available in the LOGICVIEW
Introduction
and used by the DF65.
3. LOGICVIEW: We describe Smar’s Soft ware LOGI CV IEW. This is the application used to c onfigure the
hardware of a contr ol system ( I/ O Modules, Power Supplies, CPU, et c), implement ladder logic
(includi ng ladder network elements and function bloc k s)
We suggest user to read i nitially chapters 1 and 2 and next going to chapter 3 that describes clearly how
to implement elements described in the first two chapter s. However, user is free to start reading from
chapter 3 pri or to the ot her ones and consult chapters 1 and 2 any time it is necessary. Chapter 3 deals
with description of the Smar’s LOGICVIEW Software that is part of the DF65 System.
This manual has practical examples that describe step- to-step how to set strategies of control. These
examples were incl uded in order to make easier user’s understanding of the system. These applications
are distri buted along this manual.
III
DF65 – LogicView Configuration Manual
NOTE
This document is a description of all function blocks and logic elem ents (ladder) implemented in the coprocessor
(DF65). Besides this document presents a description of how to configure and edit ladder networks through Smar’s
LOGICVIEW. This document also describes details of this software.
Smar reserves it the right to change any part of this manual without prior notice.
Note that different versions of the DF65 have different types of data, function blocks and generi c characteristics. The
last version of the DF65 is always an update of the old manual without prior notice. It means it will have all
characteristics included, old and new ones.
IV
Summary
Summary
Introduction........................................................................................................................................................... III
Chapter 1 - Network Elements (Ladder Elements) a nd Tools..................................................1.1
The Network Elements........................................................................................................................................ 1.1
Definitions of the Elements of the Network Tool Box........................................................................................1.1
Normally Open Contact.................................................................................................................................................................................1.1
Set (Latch) Coil.............................................................................................................................................................................................1.2
Set Retentive (Memory) Coil........................................................................................................................................................................1.2
Vertical Connecting Line ..............................................................................................................................................................................1.3
Eliminate Vertical Connecting Line from the Focused Cell.........................................................................................................................1.3
Function Blocks ............................................................................................................................................................................................1.3
User Function ...............................................................................................................................................................................................1.3
Jump to a Network........................................................................................................................................................................................1.3
Return for the Last Jump..............................................................................................................................................................................1.3
Boolea n Lo gic..................................................................................................................................................... 1.3
Normally Open Relay .................................................................................................................................................................................................1.3
Logical Function OR ...................................................................................................................................................................................................1.4
Logical Function AND.................................................................................................................................................................................................1.4
EN Input and ENO Output...................................................................................................................................2.1
Available Function bl oc k s in alphabetic or de r..................................................................................................2.2
Function Blocks Listed by Functional Groups.................................................................................................. 2.3
Time and Pulse Related Functions..................................................................................................................... 2.4
Pulse Counter Down (CTD)........................................................................................................................................................................................2.7
Pulse Counter Up (CTU) ............................................................................................................................................................................................2.8
Pulse Counter Up (CTU1)..........................................................................................................................................................................................2.9
Real Time Alarm (RTA) ............................................................................................................................................................................................2.10
Data Manipulation Functions............................................................................................................................ 2.17
Byte to Bits Conversion (BTB) .................................................................................................................................................................................2.17
BCD to Integer Conversion (BTI) .............................................................................................................................................................................2.18
First In First Out (FIFO)..........................................................................................................................................................................................2.19
Integer to BCD Conversion (ITB) ...........................................................................................................................................................................2.23
Integer to Real Conversion (ITR) ...........................................................................................................................................................................2.24
Bitwise Not (NOT).....................................................................................................................................................................................................2.26
Real Constants (RCT) ............................................................................................................................................................................................2.28
Real to Integer Conversion (RTI) .............................................................................................................................................................................2.29
Bit Wise Logic (BWL)................................................................................................................................................................................................2.32
Mathema t ic a l F unc tions.................................................................................................................................... 2.34
Absolute Value (ABS).............................................................................................................................................................................................2.34
Comparison Functi o ns..................................................................................................................................... 2.41
Maximum (MAX).....................................................................................................................................................................................................2.47
Process Control Functions............................................................................................................................... 2.50
Xlim Cross Limit and Rate-Of-Change (XLIM) ........................................................................................................................................................2.50
Sample Hold with Up and Down (SMPL).................................................................................................................................................................2.54
Automatic Up and Down Ramp (Aramp) .................................................................................................................................................................2.54
Equation 3 - Signal Processing................................................................................................................................................................................2.60
Control Loop with local set point and A/M station ...................................................................................................................................................2.65
System Status (Sta tus ).............................................................................................................................................................................................2.66
Control Loop with local set point, A/M station with safety value when the DF57 status is “bad”...........................................................................2.68
Control Loop with local set point, A/M station and stat us indic at io n of DF57 modu le. ..........................................................................................2.69
Motor starting with TURN ON and TURN OFF commands and safety contacts including the status of the digital input module........................2.70
Step Control (STP) ..................................................................................................................................................................................................2.71
VI
Summary
Chapter3 - The LOGICVIEW ........................................................................................................3.1
Using the LOGICVIEW......................................................................................................................................... 3.2
Launching the application...........................................................................................................................................................................................3.2
Project Informat io n ......................................................................................................................................................................................................3.2
Working Direc tory .......................................................................................................................................................................................................3.3
Setting up the I/O Modu les.........................................................................................................................................................................................3.4
Special Modules .........................................................................................................................................................................................................3.6
Configuration and Hardware Consistency .................................................................................................................................................................3.7
Editing the I/O Modules..............................................................................................................................................................................................3.8
Special I/O Modules ............................................................................................................................................ 3.8
Configuring the DF44 Module ....................................................................................................................................................................................3.8
Configuring the DF45 Temperature Module............................................................................................................................................................3.10
Configuring the DF46 Module ..................................................................................................................................................................................3.11
Configuring the FB700 Module ................................................................................................................................................................................3.12
The Balance Sheet ...................................................................................................................................................................................................3.14
ID and the Modules........................................................................................................................................... 3.15
A note about the copy, paste, and move tools................................................................................................ 3.16
Copy and paste.........................................................................................................................................................................................................3.16
Adding M od ule s................................................................................................................................................ 3.19
Adding a new Rack ........................................................................................................................................... 3.19
Global Table ...................................................................................................................................................... 3.20
Config ur in g V ir tual Modules (Discret e Memory Locations)............................................................................ 3.21
User Tags and Description for Virtual Points...........................................................................................................................................................3.22
Configuring the control strategy...................................................................................................................... 3.24
The Logic Network....................................................................................................................................................................................................3.24
The Complete Cycle of the DF65.............................................................................................................................................................................3.24
Synchronized Ladder Logic Execution and Communication...................................................................................................................................3.24
Execution Sequence of a Logic Network.................................................................................................................................................................3.25
Moving from one Logic Network to the other...........................................................................................................................................................3.26
Inserting Ladd er D iagra m E lem ents ........................................................................................................................................................................3.26
Inserting Function Blocks .........................................................................................................................................................................................3.29
Deleting elements with the button delete.................................................................................................................................................................3.31
Function Blocks Lin ks...............................................................................................................................................................................................3.32
PID loop automa t ic/ma nu a l operat ion......................................................................................................................................................................3.32
PID loop set point operation.....................................................................................................................................................................................3.36
General Hints on th e Netwo rk ..................................................................................................................................................................................3.38
Finding Things in the Networks........................................................................................................................ 3.38
Using the I/O Find Opt ion.........................................................................................................................................................................................3.41
The User Funct ion Find Tab .....................................................................................................................................................................................3.43
The Function Blocks Find Tab .................................................................................................................................................................................3.43
Adding Notes to the Ladder Logic Programming Lines.................................................................................. 3.44
Configurati on Memo ry Usage an d Execution Time Estimation ...................................................................... 3.45
CPU Memory ............................................................................................................................................................................................................3.45
The Network (Ladder Diagram)................................................................................................................................................................................3.47
How to Estimate the Space for User-Functions.......................................................................................................................................................3.48
Function Blocks.........................................................................................................................................................................................................3.49
Connecting to the DF65.................................................................................................................................... 3.51
Communication Switch .............................................................................................................................................................................................3.51
Physical Layer an d Time ou t....................................................................................................................................................................................3.52
Changing the DF65 Communication Settings .........................................................................................................................................................3.54
Changing the DF65 Communication Parameters....................................................................................................................................................3.55
Communication Optimized.......................................................................................................................................................................................3.56
List of Implemented Modbus Commands ........................................................................................................ 3.57
VII
DF65 – LogicView Configuration Manual
Ethernet Communication Settings................................................................................................................... 3.57
Time out for the LAN.................................................................................................................................................................................................3.57
ENET-700/ ENET-710 IP address ...........................................................................................................................................................................3.58
Using ENET-7 00.......................................................................................................................................................................................................3.59
Using ENET-7 10.......................................................................................................................................................................................................3.61
Serial Port Config ura t ion ..........................................................................................................................................................................................3.62
RS-485 Port Operating Modes.................................................................................................................................................................................3.63
Changing the IP Address and Username/Password...............................................................................................................................................3.64
Adjustment of Timeout to ENET-700/ENET-710.....................................................................................................................................................3.64
Working ON-LINE.............................................................................................................................................. 3.65
Downloading the configuration.................................................................................................................................................................................3.66
DF65 in the RUN Mode ............................................................................................................................................................................................3.67
Moni toring Function Blocks and Ladder Elements State ........................................................................................................................................3.68
Using the Monitor in g Fea tur e in the MOD BUS Ad dress es Pag e ...........................................................................................................................3.69
ONLINE M ode.................................................................................................................................................... 3.70
How it works? ............................................................................................................................................................................................................3.71
The online editing buttons ........................................................................................................................................................................................3.72
Full Onli ne Edition............................................................................................................................................. 3.72
Using the Full Online Edition....................................................................................................................................................................................3.73
Add/Remove RIO Interface......................................................................................................................................................................................3.79
Add/Remove User Functions ...................................................................................................................................................................................3.79
Move Modules in the Module Page..........................................................................................................................................................................3.80
Update in the Full Online Edition..............................................................................................................................................................................3.81
System Test after th e updat e ...................................................................................................................................................................................3.83
Differences between Online Edition and Full Online Edition.......................................................................... 3.88
Full Online Edition Advantages........................................................................................................................ 3.88
Note for DF45 Module ..............................................................................................................................................................................................3.89
Note for FB-700 Module...........................................................................................................................................................................................3.89
Note for Block View Communication........................................................................................................................................................................3.89
Communication Failures................................................................................................................................... 3.89
a) Before using the Sen d butto n ..............................................................................................................................................................................3.89
b) After using the Send button .................................................................................................................................................................................3.89
c) After using the Accept Changes button ...............................................................................................................................................................3.90
Update Desistance in the Full Online Edition.................................................................................................. 3.91
Example for Full Online Edition........................................................................................................................ 3.93
Example 1 .................................................................................................................................................................................................................3.93
Example 2 .................................................................................................................................................................................................................3.97
Connecting the DF65 to an HMI...................................................................................................................... 3.100
OPC (OLE for Process Control).............................................................................................................................................................................3.100
Using Communication Drivers with MODBUS............................................................................................... 3.102
Implications in Modifying a DF65 Configuration............................................................................................ 3.104
Digital Memory Map................................................................................................................................................................................................3.104
Analog Memory Map...............................................................................................................................................................................................3.104
Special Registers ............................................................................................................................................ 3.105
Function Block Modbus Address Allocation: .........................................................................................................................................................3.108
VIII
Summary
User Function Blocks...................................................................................................................................... 3.109
Creating an User Fu nc t ion .....................................................................................................................................................................................3.109
Warning mess ag es.................................................................................................................................................................................................3.112
How to estimate mem ory spac e used by user functions .......................................................................................................................................3.113
Editing an user function..........................................................................................................................................................................................3.114
Optimizing Hardware for an Application........................................................................................................ 3.114
This section will help you to understand the meaning of the network ladder elements and the
network tools.
The Network Elements
As mentioned before, LOGIC VIEW uses symbols and notations defined in the standard IEC-61131-
3.
Fig 1.1 - Network Tool Box.
Definitions of the Elements of the Network Tool Box
Normally Open Contact
The state of the left link is copied to the right link if the state of the associated Boolean variable
indicated by "LABEL " is ON. Otherwis e, th e state of the right li n k is OFF.
Normally Closed Contact
The state of the left link is copied to the right link if the state of the associated Boolean variable is
OFF. Otherwi se, th e state o f the r ight link is OFF.
Positive Transition-Sensing Contact
The state of the right link is ON from one evaluation of this element to the next when a transition of
the a ss oci at ed v ari abl e fr om OFF to ON is s ens ed a t th e sam e ti m e that th e st ate o f t he l eft li nk i s
ON. The state of the ri ght li nk will be OFF at all other ti mes.
Negative T ransition-Sensing Contact
The state of the right link is ON from one evaluation of this element to the next when a transition of
the a ss oci ated va ri abl e fr om ON to OF F i s sens ed a t t he sam e ti m e the s tat e of th e lef t li nk is O N.
The s tate o f the right l ink will be OFF at al l other times.
1.1
Ladder Elements
Coil
The s tate o f the left link is copied to the asso ciated Boolean variable and t o the right link.
Negated Coil
The state of the left link is copied to the right link. The inverse of the state of the left link is copied to
the associated Boolean variable, that is, if the state of the left link is OFF, then the state of the
associated variable is ON, and vice versa.
Set (Latch) Coil
The a ssoci ated B oolea n vari able i s set to th e ON stat e when t he lef t li nk is i n the O N stat e, and
remains set until reset by a Reset Coil.
Reset (Unlatch) Coil
The a sso ci at ed boo lea n va ria bl e is r eset to the O FF st at e when th e lef t li nk is i n th e ON st ate, an d
remains reset until set again by a SET coil.
Retentive (Memory) Coil
The associat ed Bool ean variable will be retentive to the memory .
Note: that the action of this coil is identical to Coil, except that the associated Boolean variable
is automatically declared t o be in retentiv e memory wit hout the explicit use of t he VAR RETAIN
declaration defined in the initialization of variables in IEC-61131-3 standard.
Set Retentive (Memory) Coil
The associated boolean variable is set to the ON state when the left link is in the ON state, and
remains set until reset by a Reset Coil. The associated boolean variable will be retentive to the
memory.
Note: that the action of this coil is identical to Set (Latch) Coil, except that the associated
boolean variable is automatically declar ed to be in retentive memory without the explicit use of the
VAR RETAIN declaration defined in the initialization of variables in IEC-61131-3 standard.
Reset Retentive (Memory) Coil
The a sso ci at ed boo lea n va ria bl e is r eset to the O FF st at e when th e lef t li nk is i n th e ON st ate, an d
remains reset until set by a SET coil. The associated boolean variable will be retentive to the
memory.
Note: that the action of this coil is identical to Reset (Unlatch) Coil, except that the associated
boolean variable is automatically declar ed to be in retentive memory without the explicit use of the
VAR RETAIN declaration defined in the initialization of variables in IEC-61131-3 standard.
Positive Transition-Sensing Coil
The s ta te o f t he as so cia t ed bo olea n v ari abl e i s O N fr om one ev al uat io n of th is el em ent to the n ext
when a transition of the left link from OFF to ON is sensed. The state of the left link is always copied
to the r ight link.
1.2
Configuration Manual
Negative Transition-Sensing Coil
The s ta te o f t he as so cia t ed bo olea n v ari abl e i s O N fr om one ev al uat io n of th is el em ent to the n ext
when a transition of the left link from ON to OFF is sensed. The state of the left link is always copied
to the r ight link.
Horizontal Connecting Line.
Use this tool to draw a connecting line from left to right in the ce ll on focus.
Vertical Connecting Line
Use this tool to draw a connecting line from the right side of the focused cell to the down.
Eliminate Vertical Connecting Line from the Focused Cell
Eliminate vertical connecting line. To do this actions, it’s necessary to locate the selection box in the
element which has th e vertical line.
Function Blocks
Use this tool to open a dialog box for choosing the desired Built-in-Function.
Boolean L ogic
User Function
Use this tool to open a dialog box for choosing available User-Functions.
Jump to a Network
If more than one network is available, it will open a dialog box for choosing the destination
network.
Return for the Last Jump
Use this tool to return to the next executable cell preceding the last jump. If no jump has being
used, it will then be ignored.
The association of relays and coils create boolean functions. Below we present a brief summary of
these functions and Boolean Algebra.
Normally Open Relay
Diagram State Table
A S
0 0
1 1
When the state of A changes from 0 to 1 the contact A is closed and the flow goes from the power
rail at left to the right powering the coil S.
Normally Closed Relay
Diagram State Table
A S
0 1
1 0
1.3
Ladder Elements
=
+
=
The A relay is normally closed. The power fl ow passes through A powering A until the value of A
changes from 0 to 1. In this way the coil S has the contrary behavior compared to the the coil of t he
previous item. (normally open contact)
Logical Function OR
Diagram State Table
A B S
0 0 0
0 1 1
1 0 1
Relays A and B are normally open. W it h t he association of both we implement the OR function. The
coil is powered w hen an y of the two relays i s clos ed.
1 1 1
Logical Function AND
Diagram State Table
A B S
0 0 0
0 1 0
Relays A and B are normally open. The coil S is powered when A and B are equal 1 at the same
time. Otherwise the power flow will not pass from the left side (power rail) to the right side.
1 0 0
1 1 1
Boolean Equations
Using relays and coils it is possible to implement boolean functions. For example, consider the
diagram below:
The S output depends of the state of the relays A, B, C, D and of the coil E. E depends of the values
of A,B,C and D. So:
1.4
B).C.D(A E
ES
Configuration Manual
Boolean Algebra
Boolean equations as shown above may become very complicated, however the result might be
simplified using the boolean algebra. Below we show a summary of properties of the Boolean
Algebra.
When these expressions become too complex we suggest that you use the Karnaugh map in order
to simplify them. This information is easily found on any Digital Electronics Book.
A.A= A
AA
A
A+
A+A=A
= 0
=1
B.ABA=+
BAA.B+=
1.5
Ladder Elements
1.6
Chapter 2
ANY
ANY
_
ANY_
ANY
_
L
L
Introduction
FUNCTION BLOCKS
This is a complete and updated reference of the Function Blocks (FB) supported by the DF65 CPU.
Here we present block diagrams showing inputs, outputs, configuration parameters and internal
variables. It also includes detailed explanations of each block, how they work, how to configur e each
one of them and a few examples are presented in order to help with the user’s understanding and
utilization.
Many times, an input or output will be classified as ANY, ANY_NUM, ANY_BIT, ANY_REAL or
ANY_INT. If input is ANY_NUM it means it might be connected to either a REAL or INT output. For
a better explanation, see the t able below:
Reference Dat a Type Number of bits Version
BOOLEAN Boolean 1 1.xx or superior
INT Integer 16 2.xx or superior
REAL Float 32 2.xx or superior
WORD String 16 2.xx or superior
NUM
REA
REA
If the user tries to set two outputs of a function block having variables of different data types, for
example, adding an integer to a float, the LOGIC VIEW will not allow this setting. As the first block
variable is selected, it is expected that all other inputs have the same data type of this variable.
During this configuration of inputs and outputs LOGIC VIEW asks the user to inform variable data
types that should be set when the manual describes it as ANY_XX.
Each function block has a table where all inputs, outputs, parameters and variables of each block
are shown.
I - Inputs: It is a variable from another FB or from an I/O card
P - Parameter: User’s configurations.
O - Outputs: Variable s re sulting fro m processing inside each block.
V - Variables: Auxiliary variables of block algorithms.
Information about the use of point "." and comma ", " in the input of parameters of function
blocks:
The format for the numeric data input (use of "." and ",") it should be in agreement with the defined
patterns in the regional configurations of the computer.
EN Input and ENO Output
Every function has an EN input and an ENO output.
EN input is set to enable the function block that should be processed. If EN is false, all outputs
change to zero and the FB is not executed.
ENO changes to true logic to indicate the function was successfully executed without troubles.
BIT
ANY_INT
BOOL, BYTE
INT
2.1
Available Function blocks in alphabetic order
FUNCTION NAME DESCRIPTION
ABS Absolute Value
ACC Pulse Accumulator
ACC_N Pulse Accumulator
ADD Addition
ARAMP Automatic Up and Down Ramp
BTB BYTE_TO_BITS Conversion
BTI BCD_TO_INT Conversion
BWL Bit wis e Logic
CTD Counter Down
CTU Counter Up
CTU1 Counter Up
DIV Division
EQ Equality
FIFO First In First Out
GE Decreasing Monotonic Sequence
GT Decreasing Sequence
ICT Integer Constants
ITB INT-TO-BCD Conversion
ITR Conversion Int to Real
LE Increasing Monotonic Sequence
LIN Linearization
LMT Limiter
LT Increasing Sequence
MATH1 Multivariable Equations
MAX Maximum
MIN Minimum
MOD Modulo
MUL Multiplication
MUX Multiplexer
NE Inequality
NOT Bitwise NOT
OSEL Output Selection
PID PID Controller
RCT Real Constants
RTA Real Time Clock Alarm
RTI Conversion Real To Int
SEL Binary Selection
SMPL Sample Hold with Up and Down
SQR Square Root
STATUS System Status
STP Step Control
SUB Subtraction
TOF Timer Off-Delay
TOF1 Timer Off-Delay
TON Timer On-Delay
TON1 Timer On-Delay
TOT Totalization
TP Timer Pulse
TP1 Timer Pulse
TRC Truncation
XLIM Cross Limit and Rate-Of-Change
Function Blocks
2.2
DF65 – LogicView Configuration Manual
Function Blocks Listed by Functional Groups
TIMER/PULSE FUNCTIONS
MNEMONIC DESCRIPTION
ACC Pulse Accumulator
ACC_N Pulse Accumulator
CTU1 Counter Up
TOF1 Timer Off-Delay
TON1 Timer On-Delay
TP1 Timer Pulse
CTD Counter Down
CTU Counter Up
TOF Timer Off-Delay
TON Timer On-Delay
TP Timer Pulse
RTA Real Time Clock Alarm
DATA MANIPULATION FUNCTIONS
MNEMONIC DESCRIPTION
BTB BYTE_TO_BITS Conversion
BTI BCD_TO_INT Conversion
BTW Bitwise Logic
FIFO First In First Out
ICT Integer Constants
ITB INT-TO-BCD Conversion
ITR Conversion Int to Real
MUX Multiplexer
NOT Bitwise NOT
OSEL Output Selection
RCT Real Constants
RTI Conversion Real to Int
SEL Binary Selection
MATH FUNCTIONS
MNEMONIC DESCRIPTION
ABS Absolute Value
ADD Addition
DIV Division
MOD Modulo
MUL Multiplication
SQR Square Root
SUB Subtraction
TRC Truncate
COMPARISON FUNCTIONS
MNEMONIC DESCRIPTION
EQ Equality
GE Decreasing Monotonic Sequence
GT Decreasing Sequence
LE Increasing Monotonic Sequence
LMT Limiter
LT Increasing Sequence
MAX Maximum
MIN Minimum
NE Inequality
PROCESS CONTROL FUNCTIONS
MNEMONIC DESCRIPTION
ARAMP Automatic Up and Down Ramp
LIN Linearization
MATH1 Multivariable Equation
PID PID Controller
SMPL Sample Hold with Up and Down
STATUS System Status
STP Step Control
TOT Totalization
XLIM Cross Limit and Rate-Of-Change
2.3
Time and Pulse Related Functions
Pulse Accumulator (ACC)
Description
This Pulse Accumulator Block works with the DF41/DF42/DF67 Modules and the main objective of
the accumulating input pulses is coming from an external source. Typically one of the inputs from
the DF 4 1 mo dule is l in k ed to the IN input in the ACC block.
During the control cycle the DF41/DF42/DF67 accumulate pulses in a local register in the circuit. At
the end of every control cycle the DF65 CPU reads the accumulated amount and automatically
clears the internal register for the next cycle (preventing an overflow). When the control logic
executes, the ACC block gets the integer number of pulses in the IN input and adds it to an int ernal
accumulator TOT_L and TOT_H and, as can be seen, this accumulator is shared as outputs of the
ACC block.
Two actions take place when the CLRA input is high in the ACC block:
The TOT_L and TOT_H accumulated values are moved to MEM_L and MEM_H register.
The T OT_L and TOT_H contents are t hen cleared.
The Q output
This function block can also give the information of “pulse speed” (flow) in a time interval (MP) that
can be configured by the user. The Q output will keep showing an updated value of accumulated
pulses on each MP time interval.
The parameters TR_ON and TR_OFF are the hysteresis limits for the Q threshold. The THR output
will go to high when Q is higher or equal to TR_ON and will go back to low when it is lower or equal
to TR_OFF.
Accu mulator Mod e
The ACC fu nction block can c ount pulses i n the TOT_L and TOT_H register s in tw o diff erent w ays:
Maximum counting in TOT_L is 32767 and TOT_H represents how many times TOT_L
overflowed.This means that the total accumulated pulse is calculated by the following formula:
(TOT_H * 32768) + TOT_L
Maximum counting in TOT_L is 9999 and TOT_H represents how many times TOT_L
overflowed.This means that the total accumulated pulse is calculated by the following formula:
(TOT_H * 10000) + TOT_L
The accumulation mode is set during the ACC block configuration. The mode set for TOT_L and
TOT_H will be extended to MEM_L and MEM_H.
ACC PULSE ACCUMULATOR
BOOL
EN
ACC
BOOL
INT
CLRA
IN
MEM_L
MEM_H
ENO
THR
TOT_L
TOT_H
Function Blocks
BOOL
BOOL
Q
INT
INT
INT
INT
INT
IF EN = 1 THEN
ENO = 1
TOT= TOT+ IN
TACC = TACC + IN
IF CLRA = 1 THEN
MEM = TOT
TOT = 0
IF TIMER >= MP
Q = TACC
IF TACC >= TR_ON
THR = 1
IF TACC <= TR_OFF
THR = 0
TACC = 0
ELSE
ENO = 0
2.4
DF65 – LogicView Configuration Manual
CLASS MNEM DESCRIPTION TYPE
I
P
O
EN INPUT ENABLE BOOLEAN
CLRA STORES TOT TO MEM AND ERASES THE ACCUMULATOR BOOLEAN
IN INPUT PULSE (DF41/DF42/DF67/M-305) INT
CTW CONTROL WORLD WORD
TR_ON THRESHOLD VALUE TO SET THR OUTPUT TO ON INT
TR_OFF THRESHOLD VALUE TO SET THR OU TPUT TO OFF INT
MP MEASURING PERIOD (THRESHOLD ) INT
ENO OUTPUT ENABLE BOOLEAN
THR OUTPUT THR BOOLEAN
Q PULSES ACCUMULATED IN MP PERIOD (FLOW)) INT
TOT_L ACTUAL ACCUM ULATOR VALUE (LOW WORD) INT
TOT_H ACTUAL ACCUMULATOR VALUE (HIGH WORD) INT
MEM_L MEMORY ACCUMULATOR VALUE (LOW WORD) INT
MEM_H MEMORY ACCUMULATOR VALUE (HIGH WORD) INT
TACC PULSE ACCUMULATOR INT V
TMAC TIME ACCUMULATOR INT
I: Input. P: Parameter. O: Output. V: Variable
Auxiliary and PRM Passing
- Status indication bits:
Bit 0 - Is t he EN Bo olean i nput s tatu s
Bit 1 - Is t he CLRA Boolean input status Bit 2 - Is t he ENO B oolean input status Bit 3 - Is t he THR B oolean inp ut status
Config uration Only
- Select the TOTALIZATION MODE (LOWER WORD LIMIT):
Bit 8
0 = TOT ACCUMULATOR (LOW WORD) GOES FROM 0 TO 9999
1 = TOT ACCUMULATOR (LOW WORD) GOES FROM 0 TO 32767
Pulse Accumulator (ACC_N)
Description
This block accumulates pulses from IN1 and IN2 inputs and displays the totalized value in the TOT1
to TOT4 outputs. CLEAR input equal to 1 clears these counters and the totalized value is moved to
the registers MEM1 and MEM2 and the totalization continues.
Factor of Multiplication of Scale
All inputs have an associated parameter to convert the inputs in Engineering Units. If the Factor is
equal to 1 the output is given in the 0 to 10000 range.
Hysteresis and Limits
Each input has two param eters to define the hysteresis of pulse totalization. Parameters TR_ON1 to
TR_ON4 and TR_OFF1 to TR_OFF4 set this hysteresis. Outputs THR1 to THR4 go to a true logic
state (1) when the flow is bigger than the values of TR_ON1 to TR_ON4 and go to the false logic
state (0) when the flow is smaller or equal than values set on TR_OFF1 to TR_OFF4. Flow is
defined as the pulse frequency in a time interval MP (user set).
Clear Input
Every time there’s a transition in the Clear input from zero to one, outputs TOT are reset and their
respective v alues are passed to the outputs MEM.
2.5
Function Blocks
ACC_N PULSE ACCUMULATOR
CLASS MNEM DESCRIPTION TYPE
I
P
O
V
EN INPUT ENABLE BOOL
CLEAR CLEARS TOTALIZATION AND SENDS ALL VALUES TO THE MEM OUTPUTS BOOL
IN1 PULSE INPUT 1 INT
IN2 PULSE INPUT 2 INT
IN3 PULSE INPUT 3 INT
IN4 PULSE INPUT 4 INT
FACTOR1 SCALE CONVERSION FACTOR (EU) OF INPUT 1. REAL
FACTOR2 SCALE CONVERSION FACTOR (EU) OF INPUT 2 REAL
FACTOR3 SCALE CONVERSION FACTOR (EU) OF INPUT 3. REAL
FACTOR4 SCALE CONVERSION FACTOR (EU) OF INPUT 4. REAL
TR_ON1
TR_OFF1
TR_ON2
TR_OFF2
TR_ON3
TR_OFF3
TR_ON4
TR_OFF4
MP TIME WHERE PULSES ARE COUNTED INT
ENO ENABLE OUTPUT BOOL
MEM1 VALUE OF ACCUMULATED PULSES REAL
MEM2 VALUE OF ACCUMULATED PULSES REAL
MEM3 VALUE OF ACCUMULATED PULSES REAL
MEM4 VALUE OF ACCUMULATED PULSES REAL
THR1 INDICATES IF HYSTERESIS LIMITS WERE REACHED FOR INPUT 1 REAL
THR2 INDICATES IF HYSTERESIS LIMITS WERE REACHED FOR INPUT 2 REA L
THR3 INDICATES IF HYSTERESIS LIMITS WERE REACHED FOR INPUT 3 REA L
THR4 INDICATES IF HYSTERESIS LIMITS WERE REACHED FOR INPUT 4 REA L
TACC1 PULSE ACCUMULATOR OF INPUT 1 INT
TACC2 PULSE ACCUMULATOR OF INPUT 2 INT
TACC3 PULSE ACCUMULATOR OF INPUT 3 INT
TACC4 PULSE ACCUMULATOR OF INPUT 4 INT
TAMC TIME ACCUMULATOR ( TIMER) INT
OVRFLW OVERFLOW INDICATION OF TOT AND MEM BYTE
B_THR BOOLEAN THRESHOLD AND STATUS BYTE
INCR1 INCREMENTS FOR CARRY OVER REAL
INCR2 INCREMENTS FOR CARRY OVER REAL
INCR3 INCREMENTS FOR CARRY OVER REAL
INCR4 INCREMENTS FOR CARRY OVER REAL
CTD function counts 0 (false) to 1 (true) logic state transitions, for example, an ON-OFF button.
While the button is not pressed, the ON operation is not done. When the button is pressed, the state
changes to ON. So there was an OFF/ ON transition.
Internal Counte r CTA
Every time an ascending transition occurs in the block input, the pulse accumulator (CTA) is
decreased by one unit. When the internal counter reaches zero, OUT changes to its true state. The
internal counter CTA may be accessed through an output of this function block.
RST (Reset)
If RST is equal to true, the int ernal clock will reset.
Setting the number of pulses to be counted
Internal parameter PST adjusts the number of pulses this block will count until OUT changes to the
tr ue logic s tate. On LOGIC VIEW , the user must in form the valu e of t he PST parameter. This value
may also be set through the block input PSV. In this case the user shoul d connect the PSV input to
another FB output or to an I/O module.
CTD PULSE COUNTER DOWN (CTD)
BOOL
BOOL
BOOL
CLASS MNEM DESCRIPTION TYPE
I
P PST COUNTER VALUE ADJUSTED THROUGH PARAMETER INT
O
V STS STATUS WORD
EN INPUT ENABLE BOOLEAN
IN PULSE INPUT BOOLEAN
RST BLOCK RESET BOOLEAN
PSV
ENO OUTPUT ENABLE BOOLEAN
OUT COUNTER STATE CTA. 0 IF CTA <> 0, 1 IF CTA=0 BOOLEAN
CTA PULSE ACCUMULATOR INT
I: Input. P: Parameter. O: Output. V: Variable
RST
EN ENO
BOOL
CTD
IN
OUT
PSV
THIS INPUT IS CONNECTED TO ADJUST PST
EXTERNALLY
CTAINT
BOOL
INT
IF PSV THEN
PT:= PSV
ELSE
PT:= PST
IF EN=1 THEN
ENO := 1
IF RST = 1 THEN
CTA := PT
ELSE
IF IN = 1 AND CTA > MIN_INT
THEN
CTA := CTA - 1
IF CTA <= 0 THEN
OUT = 1
ELSE
OUT = 0
ELSE
ENO := 0
OUT := 0
CTA := 0
INT
2.7
Pulse Counter Up (CTU)
Description
The CTU function counts transitions from 0 (false) to 1 (true).
Internal Counte r CTA
Every time an ascending transition occurs in the block input, the pulse accumulator (CTA) is
increased by one unit . When the internal counter reaches zero, OUT changes to the true state. The
internal counter CTA may be accessed through an output of this function block.
RST (Reset)
If the RST input is TRUE the counter will be cleared.
Setting the Number of Pulses to be Counted
Internal parameter PST adjusts the number of pulses this block will count until OUT changes to the
true logic state. On LOGICVIEW the user must set the value of the PST parameter. This value may
also be set through block input PSV. In this case the user should connect the PSV input to another
FB output or to an I/O module.
CTU PULSE COUNTER UP
IF PSV THEN
PT:= PSV
ELSE
BOOL
ENENO
BOOL
CTU
BOOL
BOOL
IN
RST
PSV
OUT
CTAINT
CLASS MNEM DESCRIPTION TYPE
EN INPUT ENABLE BOOLEAN
I
P PST COUNTER VALUE ADJUSTED THROUGH PARAMETER INT
O
V STS STATUS WORD
IN PULSE INPUT BOOLEAN
RST BLOCK RESET BOOLEAN
PSV
ENO OUTPUT ENABLE BOOLEAN
OUT OUT=1 WHEN THE VALUE SET IN PST IS REACHED BOOLEAN
CTA PULSE ACCUMULATOR INT
THIS INPUT IS CONNECTED TO ADJUST PST
EXTERNALLY
I: Input. P: Parameter. O: Output. V: Variable
BOOL
INT
PT:= PST
IF EN=1 THEN
ENO := 1
IF RST = 1 THEN
CTA := 0
ELSE
IF IN = 1 AND CTA <
MAX_INT THEN
CTA := CTA + 1
IF CTA >= PT THEN
OUT = 1
ELSE
OUT = 0
ELSE
ENO := 0
OUT := 0
CTA := 0
INT
Function Blocks
2.8
DF65 – LogicView Configuration Manual
Pulse Counter Up (CTU1)
This function works exactly like the CTU block but it only has two inputs and one output. OUT
changes to true when the internal counter (not accessible) reaches the value set by the PST
parameter.
CLASS MNEM DESCRIPTION TYPE
I
P PST COUNTER VALUE ADJUSTED THROUGH PARAMETER INT
0 OUT OUT=1 WHEN THE VALUE SET IN PST IS REACHED BOOLEAN
V STS STATUS WORD
IN1 INPUT ENABLE BOOLEAN
IN2 PULSE INPUT BOOLEAN
I: Input. P: Parameter. O: Output. V: Variable
2.9
L
A
Real Time Alarm (RTA)
Description
This alarm is based on the DF65 CPU real time clock. When the alarm occurs the ALM output goes
to true and remains in this condition. The alarm is turned ON according to the date and hour set
inside the RTA block. The user should select the time to start the alarm and also the date. The user
may select the day of the week, the day of the month, month and year.
RST (Reset)
If a RST (RESET) is applied, the ALM output will return false but not before it remains true for at
least one second.
Time Parameter
The user must set the hour desired for the alarm to be active. This hour must be set in the format
HR:MIN:SEC, where the parameters HR, MIN and SEC are respecti vely r elated with hours, minutes
and seconds.
Day Parameter
The user may select this parameter, choosing a specific date. The Day parameter supports two
options: Day Of The Week and Day Of The Month.
If the user sets the Day Of The Week parameter, it will have to set by the named day: Sunday,
Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.
If the user sets the parameter, Day Of The Month, it will have to set in the 2 digits format.
Month Parameter
The user will have to set th e month of th e year for the al arm to be activ e i n a 2-digit format
Year Parameter
The user will have to set the year for the alarm to be active in a 4-digit format. The desired year
must be in the 1980 to 2079 range.
RTA REAL TIME ALARM
Function Blocks
BOOL
EN
ENO
BOOL
RTA
BOOL
RST
LM
BOO
CLASS MNEM DESCRIPTION TYPE
I
P
O
V CTB CONTROL BYTE BYTE
EN INPUT ENABLE BOOLEAN
RST BLOCK RESET BOOLEAN
SEC SECOND BYTE
MIN MINUTE BYTE
HR HOUR BYTE
WD DAY OF THE WEEK BYTE
DAY DAY BYTE
MON MONTH BYTE
YR YEAR BYTE
ENO OUTPUT ENABLE BOOLEAN
ALM ALARM OUTPUT BOOLEAN
I: Input. P: Parameter. O: Output. V: Variable
2.10
DF65 – LogicView Configuration Manual
A
Timer Off-Delay (TOF)
Description
This FB holds the true state of the input IN for a time interval previously set.
PST Parameter
PST defines the time interval during the true state which is hold. It is set through the PST
parameter". This tim e is given by PST and is multiplied by 10 ms (PST * 0.01 s). If IN changes to
true, before OUT changes to false, OUT will stay on true state and the time period will restart when
IN goes to false.
Internal Counte r CTA
Wh en a tr ue t o f als e lo gi c st ate t ra nsi ti on oc cur s i n th e bl ock i npu t, the C TA a cc umul at or woul d be
increased by one unit.
PSV Input
The user may set the PSV input to select the value of the PST param eter externa lly. In this case,
the PSV input must be connected to an FB output or anI/O module.
TOF TIMER OFF-DELAY
BOOL
BOOL
INT
CLASS MNEM DESCRIPTION TYPE
I
P PST PARAMETER PRE ADJUSTED TIMER VALUE THROUGH PST INT
O
V
EN INPUT ENABLE BOOLEAN
IN PULSE INPUT BOOLEAN
PSV THIS INPUT IS CONNECTED TO ADJUST PST EXTERNALLY INT
ENO OUTPUT ENABLE BOOLEAN
OUT BLOCK OUTPUT BOOLEAN
CTA TIMER PULSE ACCUMULATOR INT
ICT INITIAL COUNTER TIMER VALUE TO INT
STS STATUS WORD
I: Input. P: Parameter. O: Output. V: Variable
Detail on th e STS parameter
BIT 8 - RESUL T BIT: 1= ON, ON-DELAY OCCUR;
0= OFF, OUT=0.
BIT 0 - ENABLE BIT: 1= CO UNT ER IS RUNNING;
0 = IS NOT COUNTING.
Timer Off-Delay Function - Timing diagrams
ENENO
IN
PSV
8 0
IN
OUT
PT
CTA
0
TOF
t0
t0
t0
OUT
CT
t1
t1 + PT
t1
IF PSV THEN
PT:= PSV
ELSE
BOOL
PT:= PST
IF EN=1 THEN
ENO := 1
IF IN = 1 THEN
OUT = 1
CTA := 0
ELSE
BOOL
IF CTA >= PT THEN
OUT := 0
ELSE
INT
OUT := 1
CTA := CTA + 1
ELSE
ENO := 0
OUT := 0
t2
t3 t4
t2
t2
t3
t5
t5 + PT
t5
2.11
Function Blocks
Timer Off-Delay (TOF1)
It works as the TOF block except it has only one input and one output. The Timer value is only set
through internal block parameters.
CLASS MNEM DESCRIPTION TYPE
I IN PULSE INPUT BOOLEAN
P PST
0 OUT OUT=1 WHEN THE VALUE SET IN PST IS REACHED BOOLEAN
V STS STATUS WORD
TIMER PRESET VALUE ADJUSTED THROUGH THE
TIMER PARAMETER
INT
I: Input. P: Parameter. O: Output. V: Variable
Timer On-Delay (TON)
Description
This function causes a delay in the false to true transition on the OUT output for a specific time
interval.
PST Parameter
PST defines the time interval during the true state which is hold. It is set through the PST
parameter". PST multiplied by 10 ms (PST * 0.01 s) gives this time. If IN changes to true, before
OUT changes to false, OUT will stay on the true state and the time period will restart when IN goes
to false.
Internal Counte r CTA
Wh en a tr ue t o f als e lo gi c st ate t ra nsi ti on oc cur s i n th e bl ock i npu t, the C TA a cc umul at or woul d be
increased by one unit.
PSV Input
The user may set the PSV input to select the value of the PST param eter externa lly. In this case,
the PSV input must be connected to an FB output or an I/O module.
TON TIMER ON-DELAY
IF PSV THEN
PT:= PSV
ELSE
PT:= PST
IF EN=1 THEN
ENO := 1
IF IN = 1 AND CTA >= PT
THEN
OUT = 1
ELSE
OUT := 0
IF IN = 0 THEN
CTA := 0
ELSE
CTA := CTA + 1
CLASS MNEM DESCRIPTION TYPE
EN INPUT ENABLE BOOLEAN
I
P PST
O
V
IN Pulse input BOOLEAN
PSV
ENO OUTPUT ENABLE BOOLEAN
OUT BLOCK OUTPUT BOOLEAN
CTA TIMER PULSE ACCUMULATOR INT
ICT INITIAL TIMER VALUE TO THE COUNTER INT
STS STATUS WORD
THIS INPUT IS CONNECTED TO ADJUST PST
EXTERNALLY
PARAMETER PRE ADJUSTED TIMER VALUE THROUGH
PST
I: Input. P: Parameter. O: Output. V: Variable
ELSE
ENO := 0
OUT := 0
CTA := 0
INT
INT
2.12
DF65 – LogicView Configuration Manual
Detail on th e STS parameter
8 0
BIT 8 - RESUL T BIT: 1= ON, ON-DELAY OCCUR;
0= OFF, OUT=0.
BIT 0 - ENABLE BIT: 1= CO UNTER IS RUNNING;
Timer On-Delay Function - Timing diagrams
*OBS: Parameter BAS has no effect at moment!
IN
OUT
CTA
PT
0
t0
t0 + PT
t0
t1
t1
t1
t2
t3t4t5
t2
t3t4t5
t5t4 + PT
2.13
Function Blocks
Timer On-Delay (TON1)
It works as the TON block except it has only one input and one output. The timer value is only set
through internal block parameters.
CLASS MNEM DESCRIPTION TYPE
I IN PULSE INPUT BOOLEAN
P PST
0 OUT OUT=1 WHEN THE VALUE SET IN PST IS REACHED BOOLEAN
V STS STATUS WORD
PARAMETER PRE ADJUSTED TIMER VALUE THROUGH
PST
INT
I: Input. P: Parameter. O: Output. V: Variable
2.14
DF65 – LogicView Configuration Manual
Timer Pulse (TP)
Description
This FB generates a pulse with fixed duration on the OUT output f or each rising transition (false to
true) in the IN input.
Setting Pulse Width
Internal parameter PST multiplied by 0.01 second (10ms) determines pulse width (or it is set
externally through PSV, if this input is connected). Transitions on the IN input will be ignored while
the output pulse is active. The CTA counter is available as an output (integer).
Internal Counte r CTA
Every time a pulse is generated in the output the pulse accumulator CTA is increased by one unit.
PSV Input
User may set t he PSV input to select the val ue of the PST parameter external ly. In this c ase, the
PSV input must be connected to an FB output or an I/O module.
TP TIMER PULSE
CLASS MNEM DESCRIPTION TYPE
EN INPUT ENABLE BOOLEAN
I
P PST
O
V
IN PULSE INPUT BOOLEAN
PSV
ENO OUTPUT ENABLE BOOLEAN
OUT BLOCK OUTPUT BOOLEAN
CTA TIMER PULSE ACCUMULATOR INT
ICT INITIAL TIMER VALUE TO THE COUNTER INT
STS STATUS WORD
Detail on th e STS parameter
8 0
BIT 8 - RESUL T BIT: 1= ON, ON-DELAY OCCUR;
0= OFF, OUT=0.
BIT 0 - ENABLE BIT: 1= CO UNT ER IS RUNNING;
0 = IS NOT COUNTING.
IF PSV THEN
PT:= PSV
ELSE
PT:= PST
IF EN=1 THEN
ENO := 1
IF CTA > 0 AND CTA < PSV
THEN
OUT = 1
CTA := CTA + 1
ELSE
OUT := 0
IF IN = 0 AND CTA >= PSV
THEN
CTA := 0
THIS INPUT IS CONNECTED TO ADJUST PST
EXTERNALLY
PARAMETER PRE ADJUSTED TIMER VALUE THROUGH
PST
IF IN = 1 AND CTA = 0 THEN
CTA := CTA + 1
ELSE
ENO := 0
OUT := 0
CTA := 0
INT
INT
2.15
Timer Pulse Function - Timing diagrams
Function Blocks
IN
OUT
PT
CTA
t0
t0
0
t0
t1
t1
t2
t3t4t5
t2 + PT
t2
t2
t4
t4 + PTt0 + PT
t4t5
Timer Pulse (TP1)
It works like the TP FB, however thi s block only has one pulse input and only one output OUT.
Every time a rising transition occurs on the IN input, a pulse with width defined by the PST
parameter times 0.01 seconds will be generated in the output.
CLASS MNEM DESCRIPTION TYPE
I IN PULSE INPUT BOOLEAN
P PST
0 OUT
PARAMETER PRE ADJUSTED TIMER VALUE THROUGH
PST
OUT=1 EVERY 0.01 SECONDS EVERY TIME THERE IS A
RISING TRANSITION IN THE INPUT
INT
BOOLEAN
V STS STATUS WORD
I: Input. P: Parameter. O: Output. V: Variable
2.16
DF65 – LogicView Configuration Manual
Data Manipulation Functions
Byte to Bits Conversion (BTB)
Description
This FB converts 1 byte in 8 parall el outputs, each one of them representing one bit.
Conversion
One byte is the input of this block and the outputs (OUT_1 to OUT_8) compose the input byte in the
parallel format. The least significant bit is O UT_1 and the most significant bit is O UT_8. The input
byte may be from an I/O card, a virtual byte or another FB. Outputs can be connected to the BWL
(Bi t Wise Logic) block or t he NOT block f or exam ple.
BTB BY TE TO BITS CONVERSION
CLASS MNEM DESCRIPTION TYPE
I
O
EN INPUT ENABLE BOOLEAN
IN BLOCK INPUT BYTE
ENO OUTPUT ENABLE BOOLEAN
OUT_1 BIT 0 (LSB) BOOLEAN
OUT_2 BIT 1 BOOLEAN
OUT_3 BIT 2 BOOLEAN
OUT_4 BIT 3 BOOLEAN
OUT_5 BIT 4 BOOLEAN
OUT_6 BIT 5 BOOLEAN
OUT_7 BIT 6 BOOLEAN
OUT_8 BIT 7 (MSB) BOOLEAN
I: Input. P: Parameter. O: Output. V: Variable
IF EN=1 THEN
ENO := 1
OUT_1 := BIT_0 ( IN )
OUT_2 := BIT_1 ( IN )
OUT_3 := BIT_2 ( IN )
OUT_4 := BIT_3 ( IN )
OUT_5 := BIT_4 ( IN )
OUT_6 := BIT_5 ( IN )
OUT_7 := BIT_6 ( IN )
OUT_8 := BIT_7 ( IN )
ELSE
ENO := 0
OUT := 0
2.17
BCD to Integer Conversion (BTI)
Description
This FB converts an input BCD value to an integer and puts the result in the OUT output.
Conversion
A 2-digit number on BCD has the following format:
BIT7-BIT6-BIT5-BIT4 _____BIT3-BIT2-BIT 1-B IT0
Each set of 4 bits composes a digit. For example: the number 10. If expressed in the BCD code it i s
written as 10. The first digit can be written in the binary form as 0001, and the second as 0000. So,
10BCD= 0001 000Binary. It is common to confuse the BCD code with the binary representation.
However, each group of 4 bits only represents one digit varying from 0 to 9. There can’t be a
representation on BCD like 12 9BCD, even though 12 can be expressed by 4 bits. The BCD code is
typically used in 7 segment displays. Each segment represents a BCD digit. The above
representation may be extended to N digits, always noting that each digit varies only from 0 to 9.
BTI BCD TO INTEGER CONVERSION
IF EN=1 THEN
ENO := 1
OUT = INTEGER( IN)
ELSE
ENO := 0
OUT := 0
Function Blocks
CLASS MNEM DESCRIPTION TYPE
I
O
EN INPUT ENABLE BOOLEAN
IN BLOCK INPUT ANY_BIT
ENO OUTPUT ENABLE BOOLEAN
OUT INPUT VALUE CONVERTED TO INTEGER INT
I: Input. P: Parameter. O: Output. V: Variable
2.18
DF65 – LogicView Configuration Manual
First In First Out (FIFO)
Description
This block allows storing data with DF65. Every tim e this block is used, a non-volatile RAM area is
reserved to the database first in first out (FIFO).
FIFO size
The user may create this area directly in the SIZE parameter. The biggest size allowed will depend
on the free RAM memory available in the CPU module when the setting is being done. Data in the
FIFO and their correspondent sampling times may be accessed directly through communication with
the CPU module via Modbus/RTU or Modbus/TCP.
Control Word (CTW) - FIFO MOD E
Standard Mode:
Data is stored in the FIFO until it is full. After that, any other data can’t be stored until one or more
variables are removed.
Moving Window Mode:
Data flow is always in the IN direction of the block. In this case if the FIFO is full, an automatic
unload of the old variables is executed before the new variable can be stor ed. So, the FIFO always
keeps the most updated samples.
Circular Queue Mode:
Data flow is always in the IN direction of the block. If the FIFO is full, the new data will be stored in
the oldest data´s position. There is no change in the position of the other data.
Control Word (CTW)- FIFO Memory
Dat a logging works in 3 different w ays:
- Save Only Last Time
Saves variable and only time of the last sample.
- Do Not Save Time
Saves only the variable.
- Save Value and Time
Saves variable and sampling time for all samples.
LOAD, UNLOAD, CLEAR Inputs
Every time LOAD state changes to true, FIFO starts to store data in the IN input. At each CPU cycle
of scan time, the FIFO block reads the input variable and increments the internal pointer to the next
memory position. If UNLOAD changes to true, FIFO is unloaded. Clear input erases all memory
area reserved for the FIFO block.
Trigger
If the trigger parameter is set to an N value, output will change to true when the FIFO stores the
sample number N. Suppose Trigger is set to 9 and the FIFO size is 10 registers. When FIFO stores
the ninth value the trigger output goes to true.
EMPTY and FULL outputs
EMPTY output indicates when FIFO is completely empty if its state is equal to true.
FULL output indicates when FIFO is completely full if its state is equal to true.
Data Type
The user must select two types of data to be stored: integer or real.
1 integer DATA has 2 bytes (1 Modbus Register)
1 real DATA has 4 bytes (2 Modbus Registers)
If the user chooses the data type as integer, each register will occupy one Modbus register. There
must be a distinction between the number of registers set for FIFO and the actual number of
Modbus registers. If the chosen data type is REAL, two Modbus registers are allocated.
Sampling Time Storing Mode
FIFO always allocates Modbus addresses to store time.
Save Only Last Time: 6 bytes are allocated to register time for the last sample
Do Not Save Time: FIFO reserves this Modbus area to internal time parameters, not storing
sampling time.
Save Value and Time: To each value stored it is rese rve d one register to this data plus 3 registers (6
bytes) to store each sampling time.
2.19
Function Blocks
Allocated Modbus Addresses
FIFO is allocated by the LOGIC VIEW in a Modbus area 4xxxx (register). PTR is a pointer to the
beginning of the Modbus address of the FIFO (relative Modbus Addresses). For example, if FIFO
has 16 registers (words), Modbus registers 42501 to 42516 are addressed as 0 to 15.
Bits Sequency to FIFO control word
Only Configuration Auxiliary and Parameter Passing
15 11 10 9 8 7 6 5 4 3 2 1 0
Auxiliary and PRM Passing
- Status indication bits:
Bit 0 - Is the EN boolean input status
Bit 1 - Is the LOAD boolean input status (1=LOAD; 0=NONE)
Bit 2 - Is the UNLOAD boolean input status (1=UNLOAD; 0=NONE)
Bit 3 - Is the CLEAR boolean input status (1=CLEAR; 0=NONE)
Bit 4 - Is the ENO boolean output status
Bit 5 - Is the EMPTY boolean output status
Bit 6 - Is the TRIGGER boolean output status (Trigger Quantity Matched)
Bit 7 - Is the FULL boolean output status
Config uration Only
Bit 11 Bit 8
0 0 - STANDARD MODE
0 1 - MOVING WINDOW MODE
1 0 - CIRCULAR QUEUE MODE
1 1 - CIRCULAR QUEUE MODE
Note
The Circular Q ueue Mode is implemented only from f i r mware vers ion XX.55*
* The details of equi pment version ca n be seen o n figure 3. 2 of this manual.
- Select the acquisit ion :
Bit 9 Bit 10
0 0 Save data on FIFO and last time-stamp on the Control Table.
1 0 Save data to FIFO and no time-stamp at all.
0 1 Save data with time-stamp on every sample on the FIFO.
2.20
DF65 – LogicView Configuration Manual
CLASS MNEM DESCRIPTION TYPE
EN INPUT ENABLE BOOLEAN
I
P
O
V
LOAD LOAD N VALUES FROM FIFO BOOLEAN
UNLOAD UNLOAD N VALUES FROM FIFO BOOLEAN
CLEAR CLEAR FIFO DATA BOOLEAN
IN DATA INPUT ANY_NUM
CTW CONTROL WORLD WORD
SIZE
TRIGGER
ENO OUTPUT ENABLE BOOLEAN
EMPTY FIFO IS EMPTY BOOLEAN
TRIGGER
FULL FIFO IS FULL BOOLEAN
PTR
CTR NUMBER COUNTER OF THE REGISTER USED BY FIFO INT
SEC SECOND BYTE
MIN MINUTE BYTE
HR HOUR BYTE
DAY DAY BYTE
MON MONTH BYTE
YR YEAR BYTE
I: Input. P: Parameter. O: Output. V: Variable
SPECIFIES FIFO SIZE, REGISTER # MODBUS ADDRESS
OF THE REGISTER (WORD)
WHEN FIFO READS THE VALUE SET ON TRIGGER,
OUTPUT TRIGGER WILL CHANGE TO TRUE.
INDICATES THAT THE AMOUNT OF REGISTERS SET ON
THE TRIGGER PARAMETER WAS REACH
POINTER FOR MEMORY ADDRESSING OF FIFO
(MODBUS RELATIVE ADDRESS)
INT
INT
BOOLEAN
INT
2.21
L
Integer Constants (ICT)
Description
This FB sends integer constant values to the outputs OUT1, OUT2 e OUT3. These constant values
are s et d uri n g th e blo ck c onf igu rat io n in t he LO GI C VI EW. Th ese c on st an ts wi ll onl y be s ent to t he
outputs when the EN input is true and the outputs are necessarily integer variables.
PRM1, PRM2 e PRM3 Parameters
The u ser m us t ty pe t he v al ues of th e co ns ta nts in th ese pa ram et er s. Eac h v al ue wi ll be p as sed t o
the respective block output.
For ex:
PRM1= 32
PRM2=346
PRM3= 456
When EN=1 true, Out1, Out2 and Out 3 will indicate: 32, 346, 456.
ICT INTEGER CONSTANTS
BOOL
ENENO
PRM1
PRM2
PRM3
ICT
OUT1
OUT2
OUT3
BOO
INT
INT
INT
IF EN=1 THEN
ENO := 1
OUT1 := PRM1
OUT2 := PRM2
OUT3 := PRM3
ELSE
ENO := 0
OUT1 := 0
OUT2 := 0
OUT3 := 0
Function Blocks
2.22
CLASS MNEM DESCRIPTION TYPE
I EN INPUT ENABLE BOOLEAN
P
O
PRM1 VALUE OF CONSTANT 1 INT
PRM2 VALUE OF CONSTANT 2 INT
PRM3 VALUE OF CONSTANT 3 INT
ENO OUTPUT ENABLE BOOLEAN
OUT1 OUTPUT WITH VALUE SET ON PRM1 INT
OUT2 OUTPUT WITH VALUE SET ON PRM2 INT
OUT3 OUTPUT WITH VALUE SET ON PRM3 INT
I: Input. P: Parameter. O: Output. V: Variable
DF65 – LogicView Configuration Manual
Integer to BCD Conversion (ITB)
Description
This function converts an integer to the BCD format and puts the result in the output OUT.
Conversion and Operation
If t he o utp ut i s a b yte, the t wo les s si gni fi can t di git s of th e num ber are c onv er ted to B CD and if t he
output is a bit, it will represent the bit of less significant order of this conversion.
For example: IN= 112 and the output is a byte. In the output we have 12BCD or 0001 0010. If the
output is one bit, it will indicate false.
ITB INTEGER TO BCD CONVERSION
BOOL
INT
CLASS MNEM DESCRIPTION TYPE
I
O
EN INPUT ENABLE BOOLEAN
IN BLOCK INPUT INT
ENO OUTPUT ENABLE BOOLEAN
OUT INPUT VALUE CONVERTED TO BCD ANY_BIT
ENENO
IN
I: Input. P: Parameter. O: Output. V: Variable
ITB
OUT
BOOL
ANY_BIT
IF EN=1 THEN
ENO := 1
OUT = BCD( IN)
ELSE
ENO := 0
OUT := 0
2.23
Integer to Real Conversion (ITR)
Description
This function converts an integer to a real and puts the result in the output OUT.
Conversion and Operation
For example: Suppose we have 455 (integer) in the input of this block. The ITR block will convert
this value to real allowing operations that require real data.
ITR INTEGER TO REAL CONVERSION
IF EN=1 THEN
ENO := 1
OUT = INT_TO_REAL( IN)
ELSE
ENO := 0
OUT := 0
CLASS MNEM DESCRIPTION TYPE
I
O
EN INPUT ENABLE BOOLEAN
IN BLOCK INPUT INT
ENO OUTPUT ENABLE BOOLEAN
OUT INPUT VALUE CONVERTED TO REAL REAL
I: Input. P: Parameter. O: Output. V: Variable
Function Blocks
2.24
DF65 – LogicView Configuration Manual
Multiplexer (MUX)
Description
This function selects one of the inputs IN and puts the result in the OUT output. The selection is
done according to the value in the SEL input.
Output Selection
If SEL is equal to 0, t he selected output will be IN1. If SEL= 1 the selected output will be IN2 and so
on. However, if the SEL input is negative, IN1 will be selected. If SEL is greater than the num ber of
possible inputs (N-1) the INn output will be selected. In both exceptions ENO goes to false indicating
the SEL input is out of range.
MUX MULTIPLEXER
IF EN=1 THEN
ENO := 1
SWITCH SEL
CASE 0: OUT := IN1
CASE 1: OUT := IN2
.
.
.
CASE n-1: OUT := INn
ELSE
ENO := 0
OUT := 0
CLASS MNEM DESCRIPTION TYPE
EN INPUT ENABLE BOOLEAN
SEL INPUT SELECTION ANY_INT
IN1 INPUT NUMBER 1 ANY
I
O
IN2 INPUT NUMBER 2 ANY
IN3 INPUT NUMBER 3 ANY
… …
… …
INNn-1 INPUT NUMBER N-1 ANY
INn INPUT NUMBER N ANY
ENO OUTPUT ENABLE BOOLEAN
OUT OUTPUT SELECTED BY SEL INPUT ANY
I: Input. P: Parameter. O: Output. V: Variable
2.25
Bitwise Not (NOT)
Description
It inverts the Logic State of the IN input. The output will be NOT (IN).
Operation
If the input is true (1), the output will be false and vice versa. This function allows either bit or byte
inputs. One byte has all of its digits logically inverted. If the input is 0000000 the output will be
1111111.
NOT BITWISE NOT
IF EN=1 THEN
ENO := 1
OUT := NOT IN
ELSE
ENO := 0
OUT := 0
CLASS MNEM DESCRIPTION TYPE
I
O
EN INPUT ENABLE BOOLEAN
IN BLOCK INPUT ANY_BIT
ENO OUTPUT ENABLE BOOLEAN
OUT INPUT STATE IS LOGICALLY INVERTED ANY_BIT
I: Input. P: Parameter. O: Output. V: Variable
Function Blocks
2.26
DF65 – LogicView Configuration Manual
Output Binary Selection (OSEL)
Description
This function allows the user to select one output to where the input value (IN) will be sent. If the
input SEL is false (0), then the output OUT1 will be selected. Otherwise, OUT2 is selected.
Control Word- Selection of value of non selected outputs
OUT1 Not Selected
When SEL is true, this will select OUT2. The user should set the desir ed value for the non-used
output.
Keep Last Value: Keep the l ast value of t he output OU T1
Set to Zero: Sends zero to the output OUT1
OUT2 Not Selected
When SEL is false, this will select OUT1. The user should set the desired value for the non-used
output.
Keep Last Value: Keep the l ast value of t he output OU T2
Set to Zero: Sends zero to the output OUT2
OSEL OUTPUT BINARY SELECTION
BOOL
BOOL
ANY_NUM
CLASS MNEM DESCRIÇÃO TIPO
I
P CTW CONTROL WORD WORD
O
EN INPUT ENABLE BOOLEAN
SEL OUTPUT SELECTION BOOLEAN
IN1 INPUT ANY_NUM
Only Configuration Auxiliar y an d p arameter passage
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
m1 m2
Bits below select the value of the output when it is not connected to the input IN.
Bit 8 0 = Output OUT1 keeps last value
1 = Output OUT1 goes to 0 (Se t to ZERO)
Bit 9 0 = Output OUT2 keeps last value
1 = Output OUT2 goes to 0 (Se t to ZERO)
ENENO
SEL
IN
OSEL
OUT1
OUT2
BOOL
ANY_NUM
ANY_NUM
IF EN=1 THEN
ENO := 1
IF SEL = 0 THEN
OUT1 := IN
IF m2 = 1 THEN
OUT2 := 0
ELSE
OUT2 := IN
IF m1 = 1 THEN
OUT1 := 0
ELSE
ENO := 0
2.27
Real Constants (RCT)
Description
This FB sends real constant values to the outputs OUT1, OUT2 and OUT3. These constant values
are s et d uri n g th e blo ck c onf igu rat io n in t he LO GI C VI EW. Th ese c on st an ts wi ll onl y be s ent to t he
outputs when the EN input is true and the outputs are necessarily real variables.
PRM1, PRM2 e PRM3 Parameters
The u ser m us t ty pe t he v al ues of th e co ns ta nts in th ese pa ram et er s. Eac h v al ue wi ll be p as sed t o
the respective block output.
For examp le:
PRM1= 32.78
PRM2=346.76
PRM3= 456.87
When EN=1 true, Out1, Out2 e Out 3 will indicate: 32.78/346.76/456.87.
RCT REAL CONSTANTS
IF EN=1 THEN
ENO := 1
OUT1 := PRM1
OUT2 := PRM2
OUT3 := PRM3
ELSE
ENO := 0
OUT1 := 0.0
OUT2 := 0.0
OUT3 := 0.0
Function Blocks
CLASS MNEM DESCRIPTION TYPE
I EN INPUT ENABLE BOOLEAN
P
O
PRM1 CONSTANT VALUE 1 REAL
PRM2 CONSTANT VALUE 2 REAL
PRM3 CONSTANT VALUE 3 REAL
ENO OUTPUT ENABLE BOOLEAN
OUT1 OUTPUT WITH VALUE SET ON PRM1 REAL
OUT2 OUTPUT WITH VALUE SET ON PRM2 REAL
OUT3 OUTPUT WITH VALUE SET ON PRM3 REAL
I: Input. P: Parameter. O: Output. V: Variable
2.28
DF65 – LogicView Configuration Manual
Real to Integer Conversion (RTI)
Description
This function converts a real value to an integer and puts it in the OUT output.
Conversion and Operation
If the number we want to convert cannot be put in the integer format, OUT assum es the greatest (or
smallest) possible integer value and ENO goes to false, indicating an exception in the function
executi on. The table bel ow presents some of these conversi ons:
RTI REAL TO INTEGER CONVERSION
BOOL
REAL
CLASS MNEM DESCRIPTION TYPE
I
O
EN INPUT ENABLE BOOLEAN
IN BLOCK INPUT REAL
ENO OUTPUT ENABLE BOOLEAN
OUT INPUT VALUE CONVERTED TO INTEGER. INT
IF EN=1 THEN
ENO := 1
IF IN > INT_H_LIMIT THEN
OUT = INT_H_LIMIT
ELSE
IF IN < INT_L_LIMIT THEN
OUT = INT_L_LIMIT
ELSE
OUT := REAL_TO_INT(
ROUND_UP( IN ))
ELSE
ENO := 0
OUT := 0
2.29
Binary Selection (SEL)
Description
This FB is used to select between two inputs IN1 and IN2 and will redirect them to the OUT output.
The SEL input works as a selection switch. If SEL is false, IN1 will be sent to OUT. Otherwise IN2
will be sent to the OUT output.
SEL BINARY SELECTION
IF EN=1 THEN
ENO := 1
IF SEL = 0 THEN
OUT := IN1
ELSE
OUT := IN2
ELSE
ENO := 0
OUT := 0
CLASS MNEM DESCRIPTION TYPE
I
O
EN INPUT ENABLE BOOLEAN
SEL INPUT SELECTION BOOLEAN
IN1 INPUT 1 ANY
IN2 INPUT 2 ANY
ENO OUTPUT ENABLE BOOLEAN
OUT OUTPUT ANY
I: Input. P: Parameter. O: Output. V: Variable
Function Blocks
2.30
DF65 – LogicView Configuration Manual
ANY_
Truncate (TRC)
Description
This function truncates a real number and the output will have only t he integer part of t he input
number.
Conversion and Operation
Suppose the input is the format IN= X.Y then the output will be equal to OUT= X. For exam ple, if
IN= 1.34566 the output will be 1.
TRC TRUNCRATE
OL
ENENO
TRC
L
IN
OUT
BOOL
INT
IF EN=1 THEN
ENO := 1
OUT = TRUNC( IN)
ELSE
ENO := 0
OUT := 0
CLASS MNEM DESCRIPTION TYPE
I
O
EN INPUT ENABLE BOOLEAN
IN BLOCK INPUT REAL
ENO OUTPUT ENABLE BOOLEAN
OUT TRUNCATED INPUT VALUE ANY_INT
I: Input. P: Parameter. O: Output. V: Variable
2.31
Function Blocks
Bit Wise Logic (BWL)
Description
This function allows implementation of the logic functions using a function block. Six different
function blocks can be set: AND, NAND, OR, NOR, XOR e NXOR. The user chooses the type of
logic operation during the BW L block setting and this block will perform this logic function. It has
extensions for more than 2 configurable inputs (max of 14 i nputs). If the inputs are bytes, it will
perform the logic operations bit-to-bit. If the inputs are bits, logic operations are done for each
bit/input.
Control Word - AND Function
The Logic Function of the IN1 and IN2 inputs has an output given by the following Boolean
expression:
OUT=IN1.IN2 . Thi s will result in a state table as shown below:
IN1 IN2 OUT
0 0 0
0 1 0
1 0 0
1 1 1
If the inputs are bytes, the AND function is done bit-to-bit, i.e.:
IN1= (BIT17)(BIT16)(BIT15)(BIT14)(BI T13) (BIT12) (BIT11) (BI T10)
IN2= (BIT27)(BIT26)(BIT25)(BIT24)(BI T23) (BIT22) (BIT21) (BI T20)
OUT= (BIT17ANDBIT27)…………………………(BIT11ANDBIT21)
Ex: IN1= 00001111
IN2= 11110000
OUT= 00000000
Control Word - Function NAND
This function associates the AND and NOT functions. So, the logic output is the AND logic function
inverted.
Control Word - Function OR
Logic function for the two inputs IN1 and IN2 have an output given by the expression :
OUT=IN1+IN2.
Transposed to stat e as in table below:
IN1 IN2 OUT
0 0 0
0 1 1
1 0 1
1 1 1
If the inputs are bytes, the OR function is done bit-to-bit, i.e.:
IN1= (BIT17)(BIT16)(BIT15)(BIT14)(BI T13) (BIT12) (BIT11) (BI T10)
IN2= (BIT27)(BIT26)(BIT25)(BIT24)(BI T23) (BIT22) (BIT21) (BI T20)
OUT= (BIT17ORBIT27)…………………………(BIT11ORBIT21)
Ex: IN1= 00001111
IN2= 11110000
OUT= 11111111
Control Word - Function NOR
This function associates the OR and NOT functions. So, the logic output is the OR logic function
inverted.
Control Word - Function XOR
Logic function for the two inputs IN1 and IN2 has an output given by the expression:
IN2 IN1IN2 IN1+
OUT=
. Tr anspo sed t o state a s in the tabl e below:
2.32
DF65 – LogicView Configuration Manual
If the inputs are bytes, the XOR function is done bit-to-bit, i.e.:
IN1= (BIT17)(BIT16)(BIT15)(BIT14)(BI T13) (BIT12) (BIT11) (BI T10)
IN2= (BIT27)(BIT26)(BIT25)(BIT24)(BI T23) (BIT22) (BIT21) (BI T20)
OUT= (BIT17XORBIT27)…………………………(BIT11XORBIT21)
Example: IN1= 01011100
IN2= 11110000
OUT= 10101100
Control Word - Function NXOR
This function associates the AND and XOR functions. So, the logic output is the XOR logic function
inverted.
The BWL block allows expansion to up to 14 inputs. In the table below we present logic functions for
more than 2 inputs and their respective outputs.
INPUTS OUTPUTS
IN1 IN2 … INn-1 INn AND NAND OR NOR XOR NXOR
P CTW CONTROL WORD WORD
O
V OPR LOGICAL OPERATION WORD
EN INPUT ENABLE BOOLEAN
IN1 INPUT NUMBER 1 ANY_BIT
IN2 INPUT NUMBER 2 ANY_BIT
IN3 INPUT NUMBER 3 ANY_BIT
… …
… …
INn-1 INPUT NUMBER N-1 ANY_BIT
INn INPUT NUMBER N ANY_BIT
ENO OUTPUT ENABLE BOOLEAN
OUT OUTPUT BOOLEAN/BYTE
BWL
IN1 IN2 OUT
0 0 0
0 1 1
1 0 1
1 1 0
OUT
BOOL
ANY_BIT
IF EN=1 THEN
ENO := 1
OUT := IN1 BWL IN2 BWL ...
BWL INn
IF CTW > 2 THEN
OUT := NOT( OUT )
ELSE
ENO := 0
OUT := 0
; --------------------------------------BWL = IS THE LOGIC
OPERATION
CTW - PARAMETER DEFINES
THE LOGIC OPER
0 = AND ; 3 = NOT(AND)
1 = OR ; 4 = NOT(OR)
2 = XOR ; 5 = NOT(XOR)
2.33
Mathematical Functions
Absolute Value (ABS)
Description
This FB finds the absolute value of the input IN and puts the result in the output OUT.
For example, if IN= - 0.875 the output wi ll be 0.875.
ABS ABSOLUTE VALUE
Function Blocks
BOOL
ANY_NUM
ENENO
ABS
IN
OUT
BOOL
ANY_NUM
IF EN=1 THEN
ENO := 1
OUT := ABS( IN )
ELSE
ENO := 0
OUT := 0
CLASS MNEM DESCRIPTION TYPE
I
O
EN INPUT ENABLE BOOLEAN
IN BLOCK INPUT ANY_NUM
ENO OUTPUT ENABLE BOOLEAN
OUT ABSOLUTE VALUE OF INPUT ANY_NUM
I: Input. P: Parameter. O: Output. V: Variable
2.34
DF65 – LogicView Configuration Manual
Addition (ADD)
Description
This function adds all of the IN inputs and places the result in the OUT output.
Operation
If the result goes out of the limits of the data type that can be represented, OUT will be the greatest
(or shortest) possible value represented according to its type. This would be indicated as ENO=
false. The number of inputs (n) used in this operation is previously set during configuration. If the
user tries to set m ore than two inputs with variables of different data types, for example, adding a
real to an integer, the LOGIC VIEW will not allow this operation. As the first input is selected it is
expected that all other inputs be of the same data type as in the first data type.
ADD ADDITION
IF EN=1 THEN
ENO := 1
OUT := IN1 + IN2 + ... + INn
ELSE
ENO := 0
OUT := 0
CLASS MNEM DESCRIPTION TYPE
I
O
EN INPUT ENABLE BOOLEAN
IN1 INPUT NUMBER 1 ANY_NUM
IN2 INPUT NUMBER 2 ANY_NUM
IN3 INPUT NUMBER 3 ANY_NUM
… …
… …
INn-1 INPUT NUMBER N-1 ANY_NUM
INn INPUT NUMBER N ANY_NUM
ENO OUTPUT ENABLE BOOLEAN
OUT ADDITION OPERATION RESULT ANY_NUM
I: Input. P: Parameter. O: Output. V: Variable
2.35
Division (DIV)
Description
This function divides IN1 by IN2.
Operation
If the result goes out of the limits of the data type that can be represented, output will be the greatest
(or shortest) possible value that can be represented according to its type. All exceptions are
indicated by ENO equal to false.
If the user tries to set more than two inputs with variables of different data types, for example,
adding a real to an integer, LOGIC VIEW will not allow this operati on. As the first input is selected it
is expected that all other inputs will be of the same data type as the first data type. A division by
zero will produce different results according to the data type. If the variables are integer the output
will be –1. If the variables are real the result will be zero.
DIVISION
Function Blocks
BOOL
ANY_NUM
ANY_NUM
ENENO
DIV
IN1
IN2
OUT
BOOL
ANY_NUM
IF EN=1 THEN
ENO := 1
OUT := IN1 / IN2
ELSE
ENO := 0
OUT := 0
CLASS MNEM DESCRIPTION TYPE
I
O
EN INPUT ENABLE BOOLEAN
IN1 DIVIDEND INPUT ANY_NUM
IN2 DIVISOR INPUT ANY_NUM
ENO OUTPUT ENABLE BOOLEAN
OUT DIVISION RESULT ANY_NUM
I: Input. P: Parameter. O: Output. V: Variable
2.36
DF65 – LogicView Configuration Manual
Modulo (MOD)
Description
This FB takes the rest of the division of IN1 by IN2 and places the result in the OUT output.
Operation
For example: IN1= 25 and IN2= 7, OUT= 4 because:
25 |_7_
4Í 3
Both IN1 and IN2 must be integer variables.
MODULO
CLASS MNEM DESCRIPTION TYPE
I
O
EN INPUT ENABLE BOOLEAN
IN1 DIVIDEND INPUT ANY_INT
IN2 DIVISOR INPUT ANY_INT
ENO OUTPUT ENABLE BOOLEAN
OUT REST OF DIVISION ANY_INT
I: Input. P: Parameter. O: Output. V: Variable
IF EN=1 THEN
ENO := 1
/* OUT := IN1 MODULO IN2 */
IF IN2 = 0 THEN
OUT := 0
ELSE
OUT := IN1 - (IN1 / IN2) * IN2
ELSE
ENO := 0
OUT := 0
2.37
Multiplication (MUL)
Description
This function multiplies all inputs and places the result in the OUT output.
Operation
If the result goes out of the limits of the data type that can be represented, OUT will be the greatest
(or shortest) possible value represented according to its type. This would be indicated as ENO=
false. The number of inputs (n) used in this operation is previously set during configuration. If the
user tries to set m ore than two inputs with variables of different data types, for example, adding a
real to an integer, LOGIC VIEW will not allow this operation. As the first input is selected it is
expected that all other inputs will be the same data type as the first data type.
MUL MULTIPLICATION
IF EN=1 THEN
ENO := 1
OUT := IN1 * IN2 * ... * INn
ELSE
ENO := 0
OUT := 0
Function Blocks
CLASS MNEM DESCRIPTION TYPE
EN INPUT ENABLE BOOLEAN
IN1 INPUT NUMBER 1 ANY_NUM
IN2 INPUT NUMBER 2 ANY_NUM
IN3 INPUT NUMBER 3 ANY_NUM
I
… …
… …
INn-1 INPUT NUMBER N-1 ANY_NUM
INn INPUT NUMBER N ANY_NUM
ENO OUTPUT ENABLE BOOLEAN
O
OUT MULTIPLICATION RESULT ANY_NUM
I: Input. P: Parameter. O: Output. V: Variable
2.38
DF65 – LogicView Configuration Manual
Square Root (SQR)
Description
This function block will fi nd the square root of the input and places the result in the OUT output. If IN
is negative, OUT= 0 then the ENO output will indicate false.
Control World - Input/Out put Type
The data type in the inputs and outputs may be set as “Regular” or “Percentages”.
If the Percentage o pt ion wa s chosen, t hen there ar e two modes of operat ion:
If the in p ut was se t to integer:
If the inp ut was set to real:
Option “Regul ar” will make the functi on block operate norm ally , i.e. calculatin g the SQ R function
directly.
SQR SQUARE ROOT
INOUT*100=
INOUT*10=
IF EN=1 THEN
ENO := 1
OUT := SQR( IN )
ELSE
ENO := 0
OUT := 0
CLASS MNEM DESCRIPTION TYPE
I
P
O
V PER PERCENTAGE OPERATION WORD
EN INPUT ENABLE BOOLEAN
IN INPUT ANY_NUM
CTW CONTROL WORLD WORD
CTO LEVELING REAL
ENO OUTPUT ENABLE BOOLEAN
OUT OPERATION RESULT ANY_NUM
I: Input. P: Parameter. O: Output. V: Variable
2.39
Subtraction (SUB)
Description
This function subtracts IN2 from IN1 (IN1 - IN2).
Operation
If the result goes out of the limits of the data type that can be represented, OUT will be the greatest
(or smallest) possible value represented according to its type. This situation is indicated as ENO=
false. The number of inputs (n) used in this operation is previously set during configuration. If the
user tries to set m ore than two inputs with variables of different data types, for example, adding a
real to an integer, LOGIC VIEW will not allow this operation. As the first input is selected it is
expected that all other inputs will be the same data type as the first data type.
SUB SUBTRACTION
Function Blocks
IF EN=1 THEN
ENO := 1
OUT := IN1 - IN2
ELSE
ENO := 0
OUT := 0
CLASS MNEM DESCRIPTION TYPE
I
O
EN INPUT ENABLE BOOLEAN
IN1 FIRST ELEMENT OF SUBTRACTION ANY_NUM
IN2 SECOND ELEMENT OF SUBTRACTION ANY_NUM
ENO OUTPUT ENABLE BOOLEAN
OUT SUBTRACTION RESULT ANY_NUM
I: Input. P: Parameter. O: Output. V: Variable
2.40
DF65 – LogicView Configuration Manual
Comparison Functions
Equality (EQ)
Description
This function will indicate true in the OUT output if the inputs do not have a deviation greater than
the DBN value (Death Zone) of the input IN1. This block is indicated when the user desires to
compare variables in terms of equality. The DBN parameter supplies a tool to determine how close
each one of these measurements is to be considered equal.
DBN Parameter and Operation
In case only two inputs are used (IN1 and IN2) this function block performs as an equal-with-deathzone comparison, so OUT will be true only if ABS(IN1-IN2) <= DBN
For example: We have 3 inputs and DBN is equal to 10. And IN1= 12, IN2=21 e IN3= 5.
So,
ABS(IN1-IN2)= 9 < 10
ABS(IN1-IN3)= 7 < 10
Thus, as DBN = 10, OUT is equal to true.
EQ EQUALITY
IF EN=1 THEN
ENO := 1
OUT := ABS (IN1 - IN2) <= DBN &
ABS (IN1 - IN3) <= DBN &
... &
ABS (IN1 - INn) <= DBN
ELSE
ENO := 0
OUT := 0
CLASS MNEM DESCRIPTION TYPE
EN INPUT ENABLE BOOLEAN
IN1 INPUT NUMBER 1 ANY_NUM
IN2 INPUT NUMBER 2 ANY_NUM
I
P DBN DEAD ZONE REAL
O
IN3 INPUT NUMBER 3 ANY_NUM
… …
… …
INn-1 INPUT NUMBER N-1 ANY_NUM
INn INPUT NUMBER N ANY_NUM
ENO OUTPUT ENABLE BOOLEAN
OUT COMPARISION LOGIC RESULT BOOLEAN
I: Input. P: Parameter. O: Output. V: Variable
2.41
Decreasing Monotonic Sequence (GE)
Description
This function will indicate true in the OUT output if the inputs (IN1 to INn) are disposed in a
decreasing monotonic sequence, i.e., a sequence of numbers in two adjacent elements are related
It is possible to use t his expression to implement conditional bl ocks comparing two inputs and t hen,
making a decision.
Operation:
An example: 12,8,8,5,3,1.
In a case where only two inputs are used this function block performs as a comparison of greater-orequal to, making OUT= true if IN1>=IN2.
GE DECREASING MONOTONIC SEQUENCE
IF EN=1 THEN
ENO := 1
OUT := (IN1 >= IN2) & (IN2 >= IN3) &
... ... & (
INn-1 >= INn)
ELSE
ENO := 0
OUT := 0
Function Blocks
2.42
CLASS MNEM DESCRIPTION TYPE
I
O
EN INPUT ENABLE BOOLEAN
IN1 INPUT NUMBER 1 ANY_NUM
IN2 INPUT NUMBER 2 ANY_NUM
IN3 INPUT NUMBER 3 ANY_NUM
… …
… …
INn-1 INPUT NUMBER N-1 ANY_NUM
INn INPUT NUMBER N ANY_NUM
ENO OUTPUT ENABLE BOOLEAN
OUT COMPARISION LOGIC RESULT BOOLEAN
I: Input. P: Parameter. O: Output. V: Variable
DF65 – LogicView Configuration Manual
Decreasing Sequence (GT)
Description
This function will return true in the output OUT if the inputs (IN1 to INn) are in a decreasing order,
i.e: IN1>IN2>IN3>IN4……..INn-1>INn.
In a case of the use of only 2 inputs (IN1 and IN2) this function block performs as a comparison
greater than, and OUT becomes true if IN1>In2.
It is possible to use this expression to implement conditional blocks that compare two inputs and
then make a decision.
GT DECREASING SEQUENCE
IF EN=1 THEN
ENO := 1
OUT := (IN1 > IN2) & (IN2 > IN3) & ...
& ( INn-1 > INn)
ELSE
ENO := 0
OUT := 0
CLASS MNEM DESCRIPTION TYPE
EN INPUT ENABLE BOOLEAN
IN1 INPUT NUMBER 1 ANY_NUM
IN2 INPUT NUMBER 2 ANY_NUM
I
O
IN3 INPUT NUMBER 3 ANY_NUM
… …
… …
INn-1 INPUT NUMBER N-1 ANY_NUM
INn INPUT NUMBER N ANY_NUM
ENO OUTPUT ENABLE BOOLEAN
OUT COMPARISION LOGIC RESULT BOOLEAN
I: Input. P: Parameter. O: Output. V: Variable
2.43
Increasing Monotonic Sequence (LE)
L
Description
This function will indicate true in the OUT output if the inputs (IN1 to INn) are disposed in an
increasing monotonic sequence, i.e., a sequence of numbers in two adjacent elements are related
by INn-1≤INn, so that:
IN1,IN2,IN3……..INn-2,INn-1, INn
Where:
IN1≤IN2
IN2≤IN3
…
INn-2≤INn-1
INn-1≤INn.
For example: 1,1,3,3,4 , 5,6,78,78,8
In a case of the use of only 2 inputs (IN1 and IN2) this function block performs as a comparison
smaller or equal than, and OUT becomes true if IN1 ≤IN2.
It is possible to use this expression to implement conditional blocks that compare two inputs and
then make a decision.
LE INCREASING MONOTONIC SEQUENCE
Function Blocks
BOOL
ANY_NUM
ANY_NUM
ANY_NUM
ENENO
LE
IN1
IN2
INn
OUT
BOOL
IF EN=1 THEN
BOO
ENO := 1
OUT := (IN1 <= IN2) & (IN2 <= IN3) &
... ... & (
INn-1 <= INn)
ELSE
ENO := 0
OUT := 0
CLASS MNEM DESCRIPTION TYPE
I
O
EN INPUT ENABLE BOOLEAN
IN1 INPUT NUMBER 1 ANY_NUM
IN2 INPUT NUMBER 2 ANY_NUM
IN3 INPUT NUMBER 3 ANY_NUM
… …
… …
INn-1 INPUT NUMBER N-1 ANY_NUM
INn INPUT NUMBER N ANY_NUM
ENO OUTPUT ENABLE BOOLEAN
OUT COMPARISION LOGIC RESULT BOOLEAN
I: Input. P: Parameter. O: Output. V: Variable
2.44
DF65 – LogicView Configuration Manual
Limiter (LMT)
Description
This function block limits the IN input between values of MAX and MIN inputs and places the result
in the outp ut OUT. If the limits are exceeded ENO will change to false. Sup pose t h at we wi s h to limit
the signal input between 1 and 10. In this case we may create two constants and connect them at
the MIN and MAX inputs. When the upper l imit is exceeded the output is equal to 10 and when the
bottom limit is reached the output is 1.
MIN and MAX Parameters
The user will configure the maximum value (MAX) and minimum value (MIN) of the output. The
output will be equal to MAX if the input exceeded the value set for MAX and it will be equal to MIN if
the input is smal ler than MI N .
LMT LIMITER
BOOL
ANY_NUM
ANY_NUM
ANY_NUM
ENENO
LMT
MIN
IN
MAX
OUT
BOOL
ANY_NUM
If en=1 then
Out:= MIN(MAXM(IN,MIN),MAX)
IF (OUT<MIN) OR (OUT>MAX) then
ENO:=0
Else
ENO:=1
Else
Eno:=0
Out:=0
CLASS MNEM DESCRIPTION TYPE
EN INPUT ENABLE BOOLEAN
I
O
IN INPUT TO BE LIMITED ANY_NUM
MIN LIMITER MINIMUM LIMIT ANY_NUM
MAX LIMITER MAXIMUM LIMIT ANY_NUM
ENO OUTPUT ENABLE BOOLEAN
OUT LIMITED BLOCK OUTPUT ANY_NUM
I: Input. P: Parameter. O: Output. V: Variable
2.45
Increasing Sequence (LT)
Description
This function will return to true in the output OUT if the inputs (IN1 to INn) are in an increasing order,
i.e: IN1<IN2<IN3<IN4……..INn-1<INn
In the case of the use of only 2 inputs (I N1 and IN2) this function block performs as a comparison
smaller than, and OUT becomes true if IN1 < IN2.
It is possible to use this expression to implement conditional blocks that compare two inputs and
then make a decision.
LT INCREASING SEQUENCE
IF EN=1 THEN
ENO := 1
OUT := (IN1 < IN2) & (IN2 < IN3) & ...
& ( INn-1 < INn)
ELSE
ENO := 0
OUT := 0
Function Blocks
CLASS MNEM DESCRIPTION TYPE
EN INPUT ENABLE BOOLEAN
IN1 INPUT NUMBER 1 ANY_NUM
IN2 INPUT NUMBER 2 ANY_NUM
I
O
IN3 INPUT NUMBER 3 ANY_NUM
… …
… …
INn-1 INPUT NUMBER N-1 ANY_NUM
INn INPUT NUMBER N ANY_NUM
ENO OUTPUT ENABLE BOOLEAN
OUT COMPARISON LOGIC RESULT BOOLEAN
I: Input. P: Parameter. O: Output. V: Variable
2.46
DF65 – LogicView Configuration Manual
Maximum (MAX)
Description
This function selects the maximum va lue of the IN inputs and places it in OUT outpu ts.
Operation
The number of inputs is previously determined during setting. Suppose we have 4 inputs and their
values are:
IN1= 5.899
IN2= 7.900
IN3= 10.899
IN4= 23.90
The output generated by the MAX functi on bock will be IN4 or 23.90.
MAX MÁXIMUM
IF EN=1 THEN
ENO := 1
OUT := MAX(IN1, IN2, ..., INn)
ELSE
ENO := 0
OUT := 0
CLASS MNEM DESCRIPTION TYPE
EN INPUT ENABLE BOOLEAN
IN1 INPUT NUMBER 1 ANY_NUM
IN2 INPUT NUMBER 2 ANY_NUM
I
O
IN3 INPUT NUMBER 3 ANY_NUM
… …
… …
INn-1 INPUT NUMBER N-1 ANY_NUM
INn INPUT NUMBER N ANY_NUM
ENO OUTPUT ENABLE BOOLEAN
OUT MAXIMUM INPUT VALUE BOOLEAN
I: Input. P: Parameter. O: Output. V: Variable
2.47
Minimum (MIN)
A
M
Description
This function selects the minimum value of the IN inputs and places it in OUT outputs.
Operation
The number of inputs is previously determined during setting. Suppose we have 4 inputs and their
values are:
IN1= 5.899
IN2= 7.900
IN3= 10.899
IN4= 23.90
The output genera ted by the MIN function block will be IN1 or 5. 899.
MIN MÍNIMUM
Function Blocks
BOOL
ANY_NUM
ANY_NUM
ANY_NUM
ENENO
MIN
IN1
IN2
OUT
INn
BOOL
NY_NU
IF EN=1 THEN
ENO := 1
OUT := MIN(IN1, IN2, ..., INn)
ELSE
ENO := 0
OUT := 0
CLASS MNEM DESCRIPTION TYPE
EN INPUT ENABLE BOOLEAN
IN1 INPUT NUMBER 1 ANY_NUM
IN2 INPUT NUMBER 2 ANY_NUM
I
O
IN3 INPUT NUMBER 3 ANY_NUM
… …
… …
INn-1 INPUT NUMBER N-1 ANY_NUM
INn INPUT NUMBER N ANY_NUM
ENO OUTPUT ENABLE BOOLEAN
OUT MINIMUM INPUT VALUE BOOLEAN
I: Input. P: Parameter. O: Output. V: Variable
2.48
DF65 – LogicView Configuration Manual
_
_
Inequality (NE)
Description
The output will indicate true only if t he difference IN1-IN2 is shorter than the DBN value, i.e., (I N1IN2) > DBN. The user sets the DBN parameter.
In this case OUT is equal to 1 (true) because the DBN value (0.05) indicates that in this example
IN1 is different of IN2. User may control the range where there is equality through the DBN
parameter.
NE INEQUALITY
BOOL
ANY
NUM
ENENO
NE
IN1
OUT
BOOL
BOOL
IF EN=1 THEN
ENO := 1
OUT := ABS (IN1 - IN2) > DBN
ELSE
ENO := 0
OUT := 0
ANY
NUM
IN2
CLASS MNEM DESCRIPTION TYPE
I
O
EN INPUT ENABLE BOOLEAN
IN1 INPUT NUMBER 1 ANY_NUM
IN2 INPUT NUMBER 2 ANY_NUM
ENO OUTPUT ENABLE BOOLEAN
OUT LOGIC COMPARISON RESULT BOOLEAN
I: Input. P: Parameter. O: Output. V: Variable
2.49
Process Control Functions
_
ANY_
Xlim Cross Limit and Rate-Of-Change (XLIM)
Description
This function limits a signal between static and dynamic values and also controls the rate of change.
OUT% is the filtered result of the A% input.
Static and Dynamic Limitation
Static
To limit statically, the input B is disconnected. Signal A is limited between BL and BH (user’s
settings).
Dynamic
If input B is connected it is possible to dynamically limit the input A through the B input. To achieve
more flexibility, these limits are changeable with individual gain and bias.
Control Word (CTW)- Rate of Change
Limit of rate of change may be applied in three ways, increasing, decreasing or in a specific
direction. There are 4 types of rate of change available: Check Both; Check Only Upper; Only
Actuation Rate or None.
BL and BH Parameters
If A≤BL output OUT is equal to BL.
If BL<A<BH output OUT is equal to A.
IF A≥BH output OUT is equal to BH.
Parameters GH e GL
If A≤ B.GL+BL output OUT is equal to B.GL+BL
If B.GL+BL<A<B.GH+BH output OUT is equal to a A
If A≥ B.GH+BH output OUT is equal to B.GH+BH
DB Param eter a nd LOW a nd HIG H Outp uts
Thi s FB has t wo out put s to i ndic ate i f th e low (LOW ) or h igh ( HIGH ) lim its were r each ed. T he DB
parameter can be adjusted to generate a hysteresis, avoiding output oscillation while the variable is
close to the limit value.
RAT Parameter and R-O-C Output
ROC output goes to true when the signal rate of change reaches the value set in t he parameter
RAT. When the input A changes faster than RAT, the variation in the output is kept inside a value
fixed by RAT until the input signal decreases to a value inferior to RAT. The ROC alarm in t his
interval is on HIGH.
XLIM XLIM CROSS LIMIT AND RATE-OF-CHANGE
Function Blocks
BOOL
ANY
NUM
ANY_NUM
2.50
ENENO
XLIM
A%
B%
HIGH
LOWBOOL
R-O-C
OUT%
BOOL
BOOL
BOOL
NUM
DF65 – LogicView Configuration Manual
CLASS PARAM DESCRIPTION TYPE
I
P
O
EN INPUT ENABLE BOOLEAN
A% INPUT A ANY_NUM
B% INPUT B ANY_NUM
CTW CHECK BOTH/JUST UPPER/ONLY ACTUATION RATE WORD
GL BOTTOM LIMIT GAIN I/1000
BL BOTTOM LIMIT BIAS I/100
GH UPPER LIMIT GAIN I/1000
BH UPPER LIMIT BIAS I/100
DB DEAD ZONE (HYSTHERESIS) % I/100
RAT SPEED OF MAXIMUM VARIATION % PER SECOND I/100
ENO OUTPUT ENABLE BOOLEAN
HIGH UPPER LIMIT ALARM BOOLEAN
LOW BOTTOM limit ALARM BOOLEAN
R-O-C RATE OF CHANGE ALARM BOOLEAN
OUT% OUTPUT ANY_NUM
I: Input. P: Parameter. O: Output. V: Variable
2.51
Function Blocks
Totalization (TOT)
Description
This block gives the totalization of the input. This totalization is the integral of the input times a scale
factor FCF that allows the user to configure totalizati on in 3 different modes of operation. If your
application requires the computing of instantaneous totalized volume, use the TOT function block to
accomplish this task. The time basis of this calcula t ion is sec onds.
Flow is generally given in Engineering Units (EU) by units of time. For exam ple:
3
/ s flow as input of the TOT function block will have as output volume in m3.
A 1 m
TOT Output and TU Parameter
The time interval while the output is totalized is according to the value set for TU. The integration
(totalization) is kept in an internal register that goes up to 8000000 units. Output TOT is the
total ization va l u e.
dl Output
Maximum value of totalization is 8000000 and the minimum is – 8000000. Every time the function
block output reaches these values the dl output changes from false to true during an interval of time.
That particular Function Block has an internal counter. The user can reset this counting through a
command that is represented by a pulse or a button. This dl output is a second counter that counts
how many times this "CLEAR" operation was made.
FCF Parameter
The FCF param eter allows the TOT function block to operate in 4 different modes:
In is real and represents flow in Engineering Units (EU):
FCF must be equal to 1 so that the totali zation is done without any EU scale factor. (or adjust the
factor y ou wish to use) For exampl e:
Flow Q is measured in m
Suppose a constant flow of 60 m
)(
0
FCF
TU
tTOT
3
/h. One hour has 3600 seconds. So, the TU value must be equal to 3600.
3
/h. The totalization is given by the expre ssion:
sststst
)(
1
)(*)(
3600
0
60*
)(
1
===
∫∫∫
60
0
3
][
mdtdtdttIN
:is valueTOT theseconds 60or hours 1/60or minute 1after So,
60
3
Each 1/60 hours or each one minute, the TOT block totali zes the input and displays the value in the
output. So:
3
_____________ 1 hour
60 m
3
_____________ t (time interval when the totalization is displaye d/upd ate d )
1 m
1
][
∫
60
0
So , t= 1/60 hours or 1 minute.
- IN is REAL and represents flow in percentage values.
In this case the input will be seen as a percentage represented by a REAL number in the range 0 to
100 %. FCF must be equal to the maximum value in engineering units (flow at 100%) so the
totalization is given in EUs. The TU parameter setting is similar to the previous item. The totalization
wil l be displayed in t he EU config ured.
IN is INT EGER
In this case the input will be interpreted as an integer number i n the range of 0 to 10000 (0% and
100%). FCF must be equal t o the maximum flow in EUs divided by 10000. Suppose a maximum
flow of 1 m
divided by 10000, or 0.0001. TU in this case is 1 because the unit of totalization is m
input is equal to 5000 or 50 % of the scale. Thus:
OUT
3
/s and a constant flow of 0.5 m3/s. The value for FCF is equal to the maximum flow
tt
FCF
∫∫
TU
00
3
1
mdtmTOT
==
3
. A 0.5 m3/s
===
3
mtdtdttIN
)(5.05000*0001.0)%(*
2.52
DF65 – LogicView Configuration Manual
So, in one minute (or 60 seconds) the totalized value is 30 m
- When FC is smaller than zero:
When the block is totalizing a negative flow, the totalization is decreased while when the flow is
positive the totalization is incremented. When FCF is greater than zero, positive, the TOT function
block only accepts positive flows.
CLEAR Input
If the CLEAR input is changed t o true, the totalization is restarted and the internal registers of the
TOT funct ion block are cleared.
TOT TOTALIZATION
3
.
BOOL
ENENO
BOOL
TOT
BOOL
CLEAR
INANY_NUM
FCF * IN dt
∫
dI
OUT
CLASS MNEM DESCRIPTION TYPE
I
P
O
V ACC FRACTIONARY VALUE OF TOTALIZATION REAL
EN INPUT ENABLE BOOLEAN
CLEAR CLEARS THE TOTALIZATION BOOLEAN
IN BLOCK INPUT ANY_NUM
CTW CONTROL WORLD WORD
TU TOTALIZATION VALUE FOR ONE UNITY OF COUNTING REAL
FCF FACTOR OF FLOW RATE REAL
ENO OUTPUT ENABLE BOOLEAN
dl
OUT TOTALI ZED OUTPUT REAL
ALARM THAT INDICATES WHEN THE TOTALIZATION
REACHED 80 00 00 0 OR – 80 00 00 0. IN THI S CA SE dl= 1.
I: Input. P: Parameter. O: Output. V: Variable
BOO
REAL
BOOLEAN
2.53
Sample Hold with Up and Down (SMPL)
This function block samples the value of the IN input and places it in a register when the PASS
input moves from true to false. The register value may be increased or decreas ed using the UP and
DOWN inputs. The speed of this incr ement or decrement is defined by the ASPD parameter. This
block may be used with a PID block.
SMPL SAMPLE HOLD WITH UP AND DOWN
Function Blocks
CLASS MNEM DESCRIPTION TYPE
I
P
O
EN INPUT ENABLE BOOLEAN
UP INCREMENT COUNTER BOOLEAN
DOWN DECREMENT COUNTER BOOLEAN
PASS PUTS REGISTER VALUE IN THE OUTPUT BOOLEAN
IN INPUT ANY_NUM
ACCEL ACCELERATION FACTOR- INCREMENT OR DECREMENT INT
ASPD SPEED OF ACTUATION IN % PER SECOND REAL
L_LMT BOTTON LIMIT REAL
H_LMT UPPER LIMIT REAL
ENO OUTPUT ENABLE BOOLEAN
OUT OUTPUT ANY_NUM
I: Input. P: Parameter. O: Output. V: Variable
Automatic Up and Down Ramp (Aramp)
Description
This function incremen ts or decrement s the OUT output i n a linear w ay bas ed on a pre- es tablished
time interval. This function block may be used to create a database to an automatic set point
generator when used together with the linearization block or a simple ramp.
In a set point application this function block is prepared to generate a 0% to 100 % output in a time
interval tracking the set point curve. The ARAMP output will be connected to the input of the LIN
function (linearization) set with a profile curve of the set point.
Control Word- Time Selection
The time basis of this block can be selected in minutes, seconds or hours according to the
requirements of the application. This selection affects directly the chosen value for the FTIME
parameter.
FTIME, INC/DECR Parameter
FTIME is the time output it takes to change from 0% to 100 %. Direction of the change is given by
the output INC/DECR. If this input is true, the output OUT will be gradually decreased with speed
defined by the FTIME parameter, otherwise, the output will be incremented with the speed defined
in the FTIME parameter.
Pause Command (PAUSE)
PAUSE freezes the output OUT so that the output can be incremented or decrement right after
pause is true through the UP and DOWN inputs.
2.54
DF65 – LogicView Configuration Manual
UP and DOWN Commands, ASPD Parameter
The UP and DOWN inputs will advance or revert the OUT output to a desired value using the
manual speed adjusted by the ASPD parameter. This parameter configures the speed of manual
actuation.
LOW_L and HIGH_L Parameters
The parameter LOW_L configures the bottom limit of the ramp generated by the ARAMP function
block while the HIGH_L parameter configures the upper limit of the output ramp. It starts from the
value in the IN input and goes to the maximum value, set in the HIGH_L parameter. If the value is
smaller than LOW_L the initial value of the ramp will be equal to LOW_L.
HIGH and LOW Alarms
When the output ramp reaches the bottom limit (LOW_L) or upper limit (HIGH_L), the alarms LOW
and HIGH will be turned on. LOW goes to high level if the bottom limit is reached. Similarly, if the
upper limit is reached the output HIGH goes to true.
ACCEL Parameter
It is the manual acceleration of actuation. When the block output is a parabola, the ACCEL
parameter allows bett er adjusting of the output, allowing more definition of the rate of change of the
output.
ARAMP AUTOMATIC UP AND DOWN RAMP
CLASS MNEM DESCRIPTION TYPE
EN INPUT ENABLE BOOLEAN
UP MOVES OUTPUT FORWARD ACCORDING TO ASPD BOOLEAN
DOWN REVERTS OUTPUT ACCORDING TO ASPD BOOLEAN
I
P
O
PAUSE FREEZES OUTPUT BOOLEAN
PRESET RAMP RESET BOOLEAN
INC/DEC OUTPUT WILL BE INCREMENTED
OUTPUT WILL BE DECREASED
IN% BLOCK INPUT ANY_NUM
CTW HOURS, MINUTES OR SECONDS WORD
ASPD MANUAL ACTUATION SPEED IN % PER SECOND INT/100
ACCEL INITIAL MANUAL ACCELERATION OF ACTUATION INT
FTIME TIME TO CHANGE THE OUTPUT FROM 0 TO 100 % INT
LOW_L BOTTOM LIMIT OF REGISTER INT/100
HIGH_L UPPER LIMIT OF REGISTER INT/100
ENO OUTPUT ENABLE BOOLEAN
HIGH RAMP UPPER LIMIT ALARM BOOLEAN
LOW RAMP BOTTOM LIMIT ALARM BOOLEAN
OUT% OUTPUT RAMP ANY_NUM
BOOLEAN
I: Input. P: Parameter. O: Output. V: Variable
2.55
Function Blocks
Linearization (LIN)
Description
This block simulates a function using a table of points. Intermediate values are computed using the
linear interpolation method. They can be arranged to implement curves of more than 10 points. The
user should set a table of points, X and Y pair of points, that represent the function. A value in the X
input corresponds to an output value Y, i.e., this block creates a function f(x). To each X coordinate
there is a corresponding y. The user must enter 10 pair s of points:
This function block may work in two modes according to the input settings:
Input IN% is an integer:
In this case the function block input will be interpreted as a number in the range 0 to 10000.
Input IN% is a real:
In this case the function block input will be interpreted as a real percentage.
Bypass
If the Bypass input is on HIGH, the LIN block passes the input of the block without processing it.
Control Word (CTW)- Serial Behavior
When an application requires more than 10 points, LIN function block may be put in a series. The
DONE signal must be connected to the bypass input of the next block. The first block must be set as
FIR ST and the interm ediate blocks as INTERMEDIA TE and th e last block as LAST.
An application with 30 points will have the following configuration:
2.56
LIN LINEARIZATION
BOOL
ENENO
BYPASSBOOL
X , Y TABLE
ANY_NUM
IN%
LIN
DONE
OUT%
BOOL
BOOL
ANY_NUM
DF65 – LogicView Configuration Manual
CLASS PARAM DESCRIPTION TYPE
I
P
O
EN INPUT ENABLE BOOLEAN
BYPASS
IN% BLOCK INPUT ANY_NUM
CTW CONTROL WORLD WORD
X1 X TO THE FIRST POINT I/100
Y1 Y TO THE FIRST POINT I/100
. .
. .
X10 X TO THE LAST POINT I/100
Y10 Y TO THE LAST POINT I/100
CTW CONTROL WORLD WORD
ENO OUTPUT ENABLE BOOLEAN
DONE
OUT OUTPUT ANY_NUM
I: Input. P: Parameter. O: Output. V: Variable
Multivariable Equations (Math1)
Description
It is possible to choose between 3 equations that make different mathematical operations. To each
chosen type of equation, there are specific parameter settings. The 3 types of equati on are:
Equation 1- Relative Humidity
Equation 2- API Function
Equation 3- Sign Processing
NOTE: In t he bl ock settings t he LOGICVIEW will present to each equation options to set many
parameters. T he user should only set the paramet ers in dicated in t his ma nual.
PASSES THE INPUT TO THE OUTPUT WITHOUT ANY
PROCESSING
ENABLES THE NEXT LIN BLOCK IN AN APPLICATION IN
SERIES.
BOOL
ENENO
BOOLEAN
BOOLEAN
BOOL
ANY_NUM
ANY_NUM
ANY_NUM
ANY_NUM
ANY_NUM
IN1
IN2
IN3
IN4
IN5
MATH1
LOW
HIGH
OUT
BOOL
BOOL
ANY_NUM
Equation 1 – Relative Humidity
The Relative Humidity output is relative humidity calculated with reference to two inputs. These
consist of temperature inputs. One of them will read from a dry bulb and other read will from a humid
bulb.
Humidity
Humidity is equal to the result of the function of moisture calculation, in the range of 0.000000 to
1000000, representing values from 0 to 100 %.
Scale Conversion to the outputs
OUT = A * Humidity + B
A and B param eters are set by the user. A is the scale GAIN of the output value OUT and B is the
BIAS of the scale of output value OUT. Example: to obtain a 0 to 100 % output, A must be set to
equal 100 and B to equal 0.
LOW and HIGH Parameters
LOW is the bottom LIMIT of the output OUT. If the output OUT is smaller than the bottom limit, it is
displa yed in the digital output LOW, i .e., LO W= 1.
HIGH is the upper limit of the output OUT. If the output OUT is smaller than the bottom limit, it is
displayed in the digital output HIGH, i.e., HIGH= 1.
2.57
Relative Humidity Equation Parameters
K1: It is a constant adjusted according to where the application is located. This value m ust be equal
to the local atmospheric pressure and it is set in the block parameters configuration windows of the
LOGICVIEW.
K2: It is the scale GAIN of input values on the inputs IN1 and IN2.
K3: Scale BIAS of the values in the inputs IN1 and IN2.
Inputs are calculated using the following equations:
Tbdry = IN1 * K2 + K3
Tbhumid = IN2* K2 + K3
To obtain a 0 to 100 °C input, where the values of IN1 and IN2 are from 0 to 10000 K2 must be
equal to 0.01 and K3 equal to 0.
K4: It shows the value of Tbdry = IN1 * K2 + K3 in Engineering Units (only for the supervision
system using Modbus communication in the Modbus Address specified by the K4 parameter).
K5: It shows the value of TbHumid= IN2*K2 + K3 in EU Units (only for the supervision system using
Modbus communication in the Modbus Address specified by the K5 parameter).
CLASS MNEM DESCRIPTION TYPE
EN INPUT ENABLE BOOLEAN
IN1 DRY BULB TEMPERATURE (BEFORE CONVERSION) REAL
I
P
O
IN2 HUMID BULB TEMPERATURE (BEFORE CONVERSION) REAL
IN3 NOT USED REAL
IN4 NOT USED REAL
IN5 NOT USED REAL
K1 ATMOSPHERIC PRESSURE REAL
K2 GAIN OF VALUE SCALE OF INPUTS IN1 AND IN2 REAL
K3 BIAS OF VALUE SCALE OF INPUTS IN1 AND IN2 REAL
K4 DISPLAYS VALUE OF Tbdry (AFTER CONVERSION) REAL
K5 DISPLAYS VALUE OF TbHUMID (AFTER CONVERSION) REAL
A OUTPUT SCALE (GAIN) REAL
B OUTPUT SCALE (BIAS) REAL
LOW OUTPUT BOTTOM LIMIT REAL
HIGH OUTPUT UPPER LIMIT REAL
R_PTR POINTER TO VIRTUAL MEMORY (ANALOG) WORD
ENO OUTPUT ENABLE BOOLEAN
LOW BOTTOM LIMIT ALARM BOOLEAN
HIGH UPPER LIMIT ALARM BOOLEAN
OUT RELA TIVE HUMIDITY OUTPUT ANY_NUM
I: Input. P: Parameter. O: Output. V: Variable
Equation 2 - API
This block implements an equation according to the API standard whose specifications are
pres ented i n att ached tables . Thes e tabl es of p etrol eum meas uremen t are u sed in c alcul ati ons of
amounts of crude oil and sub products of petroleum in reference conditions in any of the 3 systems
of measurement widely used. These tables are supplied for standard calculations of measurem ents
of petroleum fluids quantities in spite of the source point, destination or measurem ent units used by
habit or laws.
A complete list of all new released ASTM-API-IP tables is the result of cooperation between the
American Society for Testing and Materials, American Petroleum Institute and the Institute of
Petroleum (London).
Control Word (CTW)- Select Inputs
This equation has four types of possible inputs where the user should select one of them.
Each option chooses a specific table.
ºAP I+ Tem perature (ºF) Î see tabl es 5/6
Relative Humidity + Temperature (ºF) Î see tables 23/24
Density + Temp eratu re (ºC) Î see tables 53/54
Density + Temp eratu re (ºC) Î see tables 59/60
Function Blocks
2.58
DF65 – LogicView Configuration Manual
Control Word (CTW)- Select Products
The type of product should be selected in this field. Available products are crude oil, generali zed
products, MTBE and lubricating oil. Once the inputs and product are selected, we have the table
that will be used in the calculations.
Control Word (CTW)- Select Output
The user should set the type of the output. There are 2 options:
VCF
CCF
Tables
Once the user has set inputs, product and output will have to be implicitly set a table of the API
standard.
Input Scale Conversion Factors Conversion
The Input scale has two factors (parameters the user must set) to convert these parameters to
engineering units (EU). IN1 input must be adjusted through the parameters K1 (GAIN) and K2
(BIAS). Similarly IN2 input must be set through parameters K3 (GAIN) and K4 (BIAS). After
conversion they will be in the following format:
Density (EU)= IN1*K1+K2
Temperatur e (EU)=IN2*K3+K4
Pressure (EU)=IN3*LOW+HIGH
CLASS MNEM DESCRIPTION TYPE
I
P
O
EN INPUT ENABLE BOOLEAN
IN1 DENSITY AND CORRECTED DENSITY INPUT REAL
IN2 TEMPERATURE INPUT REAL
CTW CONTROL WORLD WORD
K1
K2
K3
K4
K5
A VCF REAL
B F – COMPRESSION FACTOR
LOW
HIGH
R_PTR NOT USED
ENO OUTPUT ENABLE BOOLEAN
LOW INPUT DATA WITHIN EXTRAPOLATION RANGE BOOLEAN
HIGH INPUT DATA OUT OF EXTRAPOLATION RANGE BOOLEAN
OUT OUTPUT: VCF VALUE OR INTERMEDIATE REAL
I: Input. P: Parameter. O: Output. V: Variable
Tables 5 e 6
A-Crude Oil 0 up to 100 0 up to 300 0 up to 100 oAPI
B-Generalized
products
C-MTBE (*) 0 up to 300 0.00027 up to 0.00097 oF-1
D-Lubricating oil -10 up to 45 0 up to 300 -10 up to 45 oAPI
Inputs Outputs
API Gravity
Range (oAPI)
0 up to 85 0 up to 300 0 up to 85 oAPI
INPUT GAIN FOR DENSITY TO CONVERT IT TO
ENGINEERING UNITS ACCORDING TO THE TABLES
ATTACHED.
INPUT BIAS FOR DENSITY TO CONVERT IT TO
ENGINEERING UNITS ACCORDING TO THE TABLES
ATTACHED.
INPUT GAIN FOR TEMPERATURE TO CONVERT IT TO
ENGINEERING UNITS ACCORDING TO THE TABLES
ATTACHED
INPUT BIAS FOR TEMPERATURE TO CONVERT IT TO
ENGINEERING UNITS ACCORDING TO THE TABLES
ATTACHED.
COEFFICIENT FOR THERMAL EXPANSION AT 60 ºF OR
15ºC (1/ ºF OR 1/ ºC)
PRESSURE INPUT GAIN TO BE CONVERTED IN
ENGINEERING UNITS ACCORDING TO THE TABLES
ATTACHED
PRESSURE INPUT BIAS TO BE CONVERTED IN
ENGINEERING UNITS ACCORDING TO THE TABLES
ATTACHED.
Temperature Range(oF)
Intermed iate (tabl e 5) Fi n al (table 6)
API at 60 oF VCF at 60 oF
REAL
REAL
REAL
REAL
REAL
2.59
Function Blocks
Inputs Outputs
Tables 23 & 24
A-Crude Oil
B-Generalized
products
C-MTBE (*) 0 up to 300
D-Lubricating oil
Relati ve Density
Range
0.61 1 up to
1.076
0.65 3 up to
1.076
0.80 0 up to
1.164
Temperature Range(ºF)
0 up to 300 0.611 up to 1.076
0 up to 300 0.653 up to 1.076
0 up to 300 0.800 up to 1.164
Intermediate(table
23)
Relati ve Density at
60(ºF)
0.00 027 up to
0.00 097 (ºF-1)
Final (table 24)
VCF at 60(º F)
Inputs Outputs
Tables 53 e 54
A-Crude Oil
B-Generalized
products
C-MTBE (**) -18 up to 150
D-Lubricating oil
Density
Range
(kg/m3)
610 up to
1075
653 up to
1075
800 up to
1164
Temperature Range(ºC)
-18 up to 150 610 up to 1075
-18 up to 150 653 up to 1075
-20 up to 150 800 up to 1164
Intermed iate(t abl e 53) Final (table 54)
Density at 1 5 ºC
(kg/m3)
0.000486 up to
0.00 1674 (ºC-1)
VCF at 15 ºC
Inputs Outputs
Tables 59 e 60 .
A-Crude Oil
B-Generalized pr od uc t s
C-MTBE (**) -18 up to 150
D-Lubricating oil
Density
Range
(kg/m3)
610 up to
1075
653 up to
1075
800 up to
1164
Temperature
Range(ºC)
-18 up to 150 610 up to 1075
-18 up to 150 653 up to 1075
-20 up to 150 610 up to 1075
Intermediate(tab
le 59)
Density at 2 0ºC
(kg/m3)
0.000486 up to
0.00 1674 ºC-1
Final (table 60)
VCF at 20ºC
(*) Coefficient of thermal expansion at 60 ºF
(**)Coefficient of thermal expansion at 15 ºC
Option Signal Processing uses an equation that filters the input signal. The filter used is a first order
exponential filter. Input IN1 receives the signal.
Characteristic Filter Time (K1)
This parameter is the characteristic time filter in seconds. Consider a step input. When the output
signal reaches 63 % of the step value, the time measured until this moment is defined as
characteristic time.
2.60
DF65 – LogicView Configuration Manual
Hysteresis K2 and High e Low alarms
When the input reaches the values set in HIGH, output HIGH will change to true until the input goes
beyond HIGH-K2. Similarly, when the input reaches LOW, output LOW will go to true until the input
goes beyond LOW+K2.
CLASS MNEM DESCRIPTION TYPE
I
P
O
EN INPUT ENABLE BOOLEAN
IN1 PROCESSING SIGNAL ANY_NUM
K1 CHARACTERISTIC TIME IN SECONDS. IT IS A FIRST
K2
LOW
HIGH
ENO OUTPUT ENABLE BOOLEAN
LOW BOTTOM LIMIT ALARM BOOLEAN
HIGH UPPER LIMIT ALARM BOOLEAN
OUT OUTPUT A FTER FILTER ANY_NUM
ORDER EXPONENTIAL FILTER
HYSTERESISALARM PROCESSING HIGH AND LOW. IT
MUST BE A NON NEGATIVE VALVE.
BOTTOM LIMIT FOR ALARM PROCESSING AFTER THE
DIGITAL FIL TER.
UPPER LIMIT FOR ALARM PROCESSING AFTER THE
DIGITAL FIL TER..
REAL
REAL
REAL
REAL
I: Input. P: Parameter. O: Output. V: Variable
2.61
Function Blocks
PID Controller (PID)
Description
The acclaimed PID algorithm for continuous process control, associated with the flexibility of the
configuration of the operation settings through parameterization, allow use of this block to a variety
of applications and control strategies.
This block supplies several options of settings of the algorithm having as a basis the terms
Proportional (P), Integral (I) and Derivative (D) that may be applied in error or just to the process
variable (PV).
The u ser ma y set li mits of anti-res et wi ndup (only applied to the int egral t er m).
Plus, the user might choose the type of PID algorithm: ISA or parallel, direct action or reverse,
manual to automatic transference bum pless or hard.
Control Word (CTW) - Type of PID
PI.D: P and I actions actuate over the error and the D action over the process variable. In this way
the output signal tracks set point changes according to proportional an integral action, but there is
no undesired variation due to the derivative action. It is the most recommended type for most
applications with set point adjustable by the user.
PID: P, I and D actuate over the error so that the output signal is changed when there are changes
in the processes variable or set poi nt. It is recomm ended for relation control or to cascade slave
control.
I.PD: In this type only integral action actuates over the error. Set point changes produce soft output
signal variations. It is recommended for a process that cannot have sudden changes in the variable
due to the set point change. It is the case of heating process with high GAIN.
Control Word (CTW) - Type of algorithm
esT
e
e
.KOUT:PARALLEL
p
++=
sT
.
R
..
D
+
α
sT
..1
D
⎡
1
1KOUT :ISA
P
⎢
⎣
Control Word (CTW) - Type of action
Some processes require that the output signal (manipulated variable-MV) does not increase when
the process variable increases, while most of the other applications require the opposite.
Type of acti on Error Effect
Reverse e = SP – PV Output decreases with the increase of PV
Direct e = PV – SP Output increases with the increase of PV
Control Word (CTW) - Type of transference from Manual to Automatic
Bumpless: During switching from manual to automatic, the PID block will start calculations from the
last manual value, i.e., there is not a jump in the block output.
Hard: During switching from manual to automatic, the PID FB will supply as first value in automatic
the last manual value plus the proportional term.
++=
sT
.
R
α
+
⎤
sT
.
D
e
.
⎥
sT
..1
D
⎦
2.62
DF65 – LogicView Configuration Manual
_
A
Anti Saturation by the integral term (AWL and AWU)
Usually the control algorithm automatically stops the contribution of the integral mode when the
output signal reaches the 0 or 100 % limits. Contributions of proportional and derivative are not
affected.
A unique characteristic of the algorithm is the possibility to set these limits. For example in
narrowing those limits through the AWL and AWU parameters, we can get faster answers while
avoiding overshoot in the heating process.
PID Constants (KP, TR, TD and BIAS)
KP –Proportional Gain
TR – Integral time in minutes per repetition, so, the larger is this parameter the shorter is the integral
action. It can be interpreted as the necessary time to the output being incremented or decreased of
the erro r value (Par allel P ID), keeping it constant.
TD –Derivative Time given in minutes. The derivative time is calculated using a false derivation, i.e.,
an action similar to a lead/lag controller, in which the lag constant is Alfa*TD. In this block
implementation the Alfa factor is equal to 0.13.
BIAS –This parameter will allow the adjustment of the initial output value when the control is
transferred from manual to automatic. This cannot be done if the function block output is connected.
PID PID CONTROLER
BOOL
EN
ENO
BOOL
PID
BOOL
ANY
NUM
ANY_NUM
ANY_NUM
TRF
SP
PV
FB%
PI.D
PID
I.PD
NY_NUM
OUT%
2.63
Function Blocks
CLASS PARAM DESCRIPTION TYPE
I
P
O
V
EN INPUT ENABLE BOOLEAN
TRF SELECTS MANUAL OR AUTOMATIC WORKING BOOLEAN
SP SET POINT ANY_NUM
PV PROCESS VARIABLE ANY_NUM
FB%
CTW CONTROL WORLD WORD
KP PROPORTIONAL GAIN INT/100
BIAS BIAS INT/100
AWL ANTI-RESET BOTTOM FINAL LIMIT INT/100
AWU ANTI-RESET UPPER LIMIT INT/100
TR INTEGRAL TIME (MIN/REPETITIONS) REAL
TD DERIVATIVE FACTOR (MIN) REAL
ENO OUTPUT ENABLE BOOLEAN
OUT% OUTPUT (MANIPULATED VARIABLE) ANY_NUM
ER0 EXPECTED ERROR IN THE PROCESS INT/100
PV0 EXPECTED VARIABLE IN THE PROCESS INT/100
FB0 EXPECTED FEEDBACK VALUE INT/100
B0 EXPECTED BIAS VALUE LONG
IT0 EXPECTED INTEGRAL TIME (MIN/REP) REAL
DR0 EXPECTED DERIVATIVE FACTOR (MIN) REAL
IF TRF=1, INPUT CONNECTED TO FB IS PASSED TO THE
OUTPUT
ANY_NUM
I: Input. P: Parameter. O: Output. V: Variable
CTW Parameter Details
Only Settings
15 12 11 10 9 8 5 4 2 1 0
Auxili ar y an d p aram eters pass in g
Auxiliary and parameter’s passing
Bit 0 - St ate of I nput Boolean EN
Bit 1 - State of Input Boolean TRF (0 = Auto; 1 = Manual, tracking)
Bit 2 - St ate of I nput Boolean ENO
Bit 4- State of the feedback auxiliary variable (1 = tracking)
Bit 5 - Working State (0 = first time, 1 = running, not for the first time)
2.64
DF65 – LogicView Configuration Manual
Control Loop with local set point and A/M station
Characteristics of the Configuration:
Local set point adjustable through PRM1 parameter of the ICT block.
Pr ocess variable obtained from the DF57 module, (see the diagram above), in the range of
Mode control automatic/manual through virtual variable (MAN).
SMPL plays the role of a manual/auto matic station allow ing increment or decrease (UP and
0 a 10000.
DOWN inputs) of the output when in manual mode.
2.65
Function Blocks
System Status (Status)
Description
This block will allow the configuration of 8 boolean variables to inform status of an I/O module, a
remote I/O module, or the communication ports of the DF65. The user has 4 options of class to
select.
Control Word (CTW)- Select Class
IO_Master: An I/O module connected in the same rack where the CPU is located.
IO_RIO: It is an I/O module connected to DF66.
COMM_RIO: Communication status between DF65 and DF66.
Cpu_port: Communication status of DF65 ports (Port_1, Port_2 and Port_3). Indicates activity in the
communication port.
Control Word (CTW)- Select Sub Class and Select item
After choosing class, the user should se le ct sub class and ite m. C lass.sub_ cl ass.item
IO_master.rack.slot: it must be informed rack and slot where the desired module is located.
IO_RIO.rack.slot: It must be informed rack and slot whe re module is located.
COMM_RIO.RIO: It must be informed which remote I/O.
CPU_PORT.PORT: It must be informed which CPU port (Port_1, Port_2 or Port_3) it is required to
monitory communication.
Status meaning and outputs
Acc ordi ng to th e choice, the meaning of the status block outputs is:
IO_Master e IO_RIO:
0: Status= module I/O “bad” .
1: Status= module de I/O “good”.
COMM_RIO:
0: “Communication failure”.
1: “Communication without errors”.
CPU_PORT:
0: Port not communicating..
1: Port Communicating.
2.66
DF65 – LogicView Configuration Manual
CLASS MNEM DESCRIPTION TYPE
I IN1 INPUT ENABLE BOOLEAN
SC1
SC2
SC3
SC4
P
SC5
SC6
SC7
SC8
ENO OUTPUT ENABLE BOOLEAN
OUT1 STATUS OF SC1 BOOLEAN
OUT2 STATUS OF SC2 BOOLEAN
OUT3 STATUS OF SC3 BOOLEAN
0
OUT4 STATUS OF SC4 BOOLEAN
OUT5 STATUS OF SC5 BOOLEAN
OUT6 STATUS OF SC6 BOOLEAN
OUT7 STATUS OF SC7 BOOLEAN
OUT8 STATUS OF SC8 BOOLEAN
CLASS BYTE
SUBCLASS BYTE
ITEM 2 BYTES
CLASS BYTE
SUBCLASS BYTE
ITEM 2 BYTES
CLASS BYTE
SUBCLASS BYTE
ITEM 2 BYTES
CLASS BYTE
SUBCLASS BYTE
ITEM 2 BYTES
CLASS BYTE
SUBCLASS BYTE
ITEM 2 BYTES
CLASS BYTE
SUBCLASS BYTE
ITEM 2 BYTES
CLASS BYTE
SUBCLASS BYTE
ITEM 2 BYTES
CLASS BYTE
SUBCLASS BYTE
ITEM 2 BYTES
2.67
Function Blocks
Control Loop with local set point, A/M station with safety value when
the DF57 status is “bad”
Characteristics of the Configuration:
Local set point adjustable through PRM1 parameter of the ICT block.
Process variable obtained from the D F57 module, (see the diagram above), in the range of
Mode control automatic/manual through virtual variable (MAN).
SMPL plays the role of a manual/automatic station allowing increm ent or decrease (UP
DF57 module status is checked. In case it has a failure, the block output changes the
2.68
0 a 10000.
and DOWN inputs) of the output when in manual mode.
status of the output OUT1 to “bad”. A SEL block (binary selection) has as inputs the PID
block output and a constant generated by the ICT block. So, when there is a failure a
safety value is sent to the output.
DF65 – LogicView Configuration Manual
Control Loop with local set point, A/M station and status indication of
DF57 module.
Characteristics of the Configuration:
Local set point adjustable through PRM1 parameter of the ICT block.
Process variable obtained from the DF57 module, seen in the above picture, in the range
of 0 a 10000.
Mode control automatic/manual through virtual variable (MAN).
SMPL plays the role of a manual/auto matic station allow ing increment or decrease (UP and
DOWN inputs) of the output when in manual mode.
DF57 module status is checked. In case it has a failure, the block output changes the
status of the output OUT1 to “bad”. The SMPL block selects the control to manual and the
output is frozen with the last value that had the “good” status.
2.69
Function Blocks
Motor starting with TURN ON and TURN OFF commands and safety
contacts including the status of the digital input module
TURN ON TURN OFF SEAL(DI) THERMAL (DI) STATUS(A) SEAL2
Turns the
MOTO R on
through an
auxiliary
variable
1 0 1 0 1(**) 0/1(*) 0/1(*) TURN ON
X 1 X X X X X TURN OFF
X X X 1 X X X TURN OFF
X X X X 0(**) X X TURN OFF
Turns the
MOTOR OFF
through an
auxiliary
variable
Seal for turning
ON the motor, it
holds the state
TURN MOTOR
ON.
Alarm in dicating th e
motor temperature
reached a limit.
Module status of
the digital input.
Failures in this
module turn the off
the motor.
Auxiliary
Control
X- Redundant State
(*)- These controls are manual switches operated manually. Two contacts form an OR logic gate, so
the output will be enabled if SEAL2 or Switch/Maintenance are TRUE (1).
(**) – STATUS = 1 means communication without failures
STA TUS = 0 m eans incorrec t ID or module not p resent.
SWITCH/
MAINTENANCE
Auxiliary Control
MOTOR
(DO)
2.70
DF65 – LogicView Configuration Manual
Step Control (STP)
Description
This functions use is combined with the PID block. Connect a PID block output to the DMV input to
make an ON_OFF or ON_NONE_OFF control. ON_OFF establishes the OPEN and CLOSE control
of valves during a particular time interval. ON_NONE_OFF allows the OPEN and CLOSE control of
valves according to the rate of variation in the PID output or DMV input.
Valves opening time VOT
This parameter must be adjusted with the approximated time necessary to open the valve totally or
close it totally.
Minimum Pulse Width
The user should configure minimum pulse width per 0. 1 seconds through WPL parameter and time
for t otal excursion of the control element .
Control Word (CTW)- Control Type
The u ser mu st cho ose the cont rol type, i.e., ON_O FF or ON_NONE _OFF
ON_OFF Control
Suppose the OPEN input starts a motor that opens a valve while CLOSE output starts a motor that
closes this valve. The STP block allows these control pulses to be generated using the VOT value.
In this control mode, the block compares DMV with internal values. If DMV is greater than 80 % the
output is TRUE/ON. If it’s sm aller than 70 % the output goes to OFF/FALSE. Values between 70 %
and 80 % make the output assum e the last state.
ON_NONE_OFF Control
A PID having only proportional action with gain KP=1 and VOT equal to 1 minute. Suppose that in
the instant t= 0 a step with error 25% is applied. Thus, the valve opening is 25 % of 1 minute, or
0.25*TR= 15 seconds. Figure below shows this example:
Integral action of a PID is equal to a series of pulses with size WPL and frequency determined by
the integral time of the PID block (TR) and by the control deviation. Pulse frequency is given by the
TR value. WPL is fixed and determined during the block setting. Suppose TR= 1 minute and WPL=
3 seconds and a step with error 25 % is applied in the input. A standard controller would increase or
decrease output of 25 % on 1 minute (TR). To make the valve have an opening tim e (VOT) equal to
1 minute we need 15 seconds (25 % of 60 seconds), because WPL=3 seconds. So, 5 pulses with
width equal to 3 seconds are required. Output remains in this mode of functioning while the PID
output keeps the same rate of change.
2.71
Function Blocks
_
2.72
STP STEP CONTROL
BOOL
EN
ENO
BOOL
STP
STEP
CONTR
ON
ON/OFF
ANY
NUM
DMV%
OFF
CLOSE
CLASS PARAM DESCRIPTION TYPE
I
P
O
V
EN INPUT ENABLE BOOLEAN
DMV% BLOCK INPUT ANY_NUM
CTW CONTROL WORLD WORD
WPL MINIMUM PULSE WIDTH PER 0.1 SECONDS INT
VOT VALVE OPENING TIME IN 1 INT
ENO OUTPUT ENABLE BOOLEAN
ON HIGH LEVEL OUTPUT (OPEN) BOOLEAN
OFF LOW LEVEL OUTPUT (CLOSE) BOOLEAN
MVB PREVIOUS MV INT
C_TIME PULSE HOLD INT
DEBT DEBT ACCUMULATED INT
I: Input. P: Parameter. O: Output. V: Variable
BOOL
BOOL
DF65 – LogicView Configuration Manual
Details of Parameter CTW
Only Settings Auxili ar y an d p aram eters pass in g
15 8 7 3 2 1 0
Auxiliary and parameter passing
Bits that indicate status:
Bit 0 – State of Input Boolean EN
Bit 1 - Stat e of Inp ut Boolean ENO
Bit 2 - State of Output Boolean OPEN (1 = OPEN; 0 = NONE)
Bit 3 - State of Output Boolean CLOSE (1 = CLOSE; 0 = NONE)
Bit 7 – Last state o f EN
2.73
Function Blocks
2.74
Chapter 3
THE LOGICVIEW
Introduction
Installation
This chapter presents the essentials for the use of the LOGICVIEW programming software for the
advanced Smar DF65 Universal Hybrid Controller. It will show how to create, download and
troubleshoot a DF65 configuration.
The user should read about the DF65 in chapter 1 “Ladder Logic". In chapter 2 "Function Blocks” to
get familiar with the ladder elements and function blocks. Next the user will be able to design a
control strategy for a specific application.
The LOGICVIEW application software is based on 32 bits Microsoft Windows and is therefore
operated in the same basic way as other Windows applications, i.e. through menus, browsing, cut
and paste, buttons, drop down lists, etc. It is assumed that the user is already familiar with Windows
interface.
This manual will also show how to generate and register the DF65 Tag List in the computer running
the DF65 OPC Server.
The DF65 OPC Server operation and setup will also be reviewed here.
Operating System
The LOGICVIEW runs on any 32bits Windows. Therefore, it is ready for Windows 95/98, Windows
NT (with service pack 3, minimum), Windows 2000, Windows Millennium (Me) and Windows XP.
However the DF65 OPC Server counts on the multi-tread feature of Windows NT (with service pack
3, minimum) and Windows 2000 therefore will automatically exclude other version of Windows.
Before Installation Begins
Verify minimum resources as listed below. It is recommended (and sometimes mandatory), that the
user stop any Anti-Virus and some display controller applications. It is best to close all applications
before installing the new software.
Minimum Resources for the LOGICVIEW
- A Pentium IV processor or higher (or equivalents as AMD, Athlon, Duron).
- 256 MB of RAM or higher.
- Hard disk with a minimum free space of 100MB
- Microsoft Windows 2000 (Service Pack 2) or Windows XP.
- A serial port or Ethernet Adapter Card to communicate with the DF65 controller
Minimum Resources for the DF65 Tag List and DF65 OPC Server
Same as above but the operating system has to be: Windows NT + Service Pack3 or higher or
Windows 2000.
Installing
The installation should automatically start a few seconds after the CD-ROM is inserted in a CDROM driver. If after inserting the CD-ROM into the driver the installation does not start automatically,
go to the directory containing the application and run the SETUP executable file. The installation
program will run and guide the user through out the installation procedure.
3.1
LogicView Configurati on Manual
Using the LOGICVIEW
Launching the application
To start the DF65 programming software click the START button. Go to PROGRAMS and then find
the SMAR group while placing the mouse pointer over it the user will see one or more buttons with
Smar applications, and then click the LOGICVIEW application icon.
First a registration window will appear, click OK to proceed. Later the user might come back to this
screen by using the menu: Help/About LogicView.
Next select “New Configuration” on the Dialog Box shown below for a new configuration or “Open an
Existing Configuration” to open an old file.
Fig 3.1- Launching LOGICVIEW
One configuration has to be created for each DF65 system. A DF65 system is composed of one
CPU module, one or more I/O modules and 0 to 6 Remote I/O interfaces with respective I/O
modules. This means, a project with many DF65 CPUs will have one configuration file for each
CPU.
In case of redundant CPUs, both have to carry the same configuration.
Project Information
When launching the LOGICVIEW “First Page” also referred to as, the “Documentation Page”, it will
automatically appear. Fill the table with all of the pertinent information and the most important part
here is to select the appropriate DF65 version before starting configuration. Typically the CPU the
user has received is the latest version available, but one way to make sure is to connect the DF65
CPU to a serial port of the PC and go to the On-line mode. See Connecting to the DF65 topic for
more details.
The user can return to the documentation page and make changes at any time using the menu
Configuration/First Page or click
This information is valuable for project organization and documentation. Many of the printable
reports generated by the LOGICVIEW will contain this information.
.
3.2
LogicView
Fig 3.2- Project Information Window
Working Directory
LOGICVIEW allows the user to set the working directory. This directory will be used as the default
directory for saving configurations. Also when the user uploads a configuration from the DF65,
LOGICVIEW will automatically save the uploaded configuration in this directory.
To set the Working Directory click at ToolsPreferences and select the tab Directory. The following
Window will be displayed.
Click at the button “…” to change the directory.
Fig 3.3-Selecting the Working Directory
3.3
LogicView Configurati on Manual
Fig 3.4- Selecting Window
The button “Default” will reset this path to the default path to C:\Program
Files\Smar\LOGICVIEW_v8-54\Working\.
LogicView generates the backup of a configuration whenever the rescue of an alteration is made.
The extension of the backup files is ".Bxx ", where " xx " is the sequential numbering of the files of
generated backup, for example: the first backup possesses the extension .B01, second .B02 and
and so on. The amount of backup files is configured in the field shown by the illustration 3.3, being
limited by the physical capacity of HD. For use of a file backup, he/she is due rename the file for the
extension " .PL8 ".
Setting up the I/O Modules
In the last step the user selected the CPU version to be used. Now the user will need to completely
define the DF65 system hardware. To enter the “Module Page” the user may go to the menu
Configuration/Module Page or click .
For a new configuration this page will begin with a 4 slot Rack carrying a Power Supply on slot 0
(zero) and a CPU Module on slot 1 (one). Slots 2 and 3 are initially empty.
3.4
Fig 3.5-Setting the I/O Modules
LogicView
Adding Modules
To add Modules go to an empty cell on the “Module” column and click on it. A drop down arrow will
appear to the right of the cell. Now click on the down arrow and make a Module selection by clicking
on it.
As soon as the Module is selected it will be added to the corresponding empty slot and also (very
important), LOGICVIEW automatically creates memory allocation for the I/O points. The user no
longer needs to manage memory allocation as before on most of the old existing systems.
Fig 3.6- Adding Modules Window
3.5
LogicView Configurati on Manual
Special Modules
The user will notice that some Modules require extra configuration and a special dialog box will
automatically be launched as soon as the Module is selected. Some are Analog Input (DF44),
Analog Output (DF46), Temperature input (DF45), Foundation Fieldbus Scanner (FB700) and soon
will include DeviceNet and Profibus modules.
For example, the Temperature Module (DF45) will launch a configuration dialog box where the user
can set how the inputs are going to work.
Fig 3.7- DF45 Temperature I/O Module Configuration on LOGICVIEW
3.6
LogicView
Confi guration and Hardware Consistency
It is extremely important that the rack number and the position of each module in the configuration
match the actual hardware assembly. Many of the modules on a DF65 system are not intelligent and
the CPU cannot know if they are misplaced or non existent.
More elaborate modules, like the DF45, will cause warning messages from the FB700, if the actual
positioning does not match the software configuration.
It is strongly recommended that you printout the hardware configuration and use it to check the
actual installation.
It is necessary to go to menu File/Print and select options as indicated in the next figure then click
the OK button for an initial printout of your project.
Fig 3.8- The Print Settings Window
3.7
LogicView Configurati on Manual
Editing the I/O Modules
Modules can be Deleted, Replaced (deleted and placed) or simply moved to any other slot in the
DF65 system even to the slot of a Remote I/O.
It is necessary to highlight the Module to be edited. Click the column to the left of the row where the
Module is located.
Note: some icons on the tool bar are now enabled for use.
Special I/O Modul es
Many of the DF65 I/O modules can be specially configured to be adapted to application
requirements. These types of modules give the user an extra degree of flexibility. Typically modules
that are related to analog signals, special sensors and those that acquire/send signals using popular
protocols such as Modbus, DeviceNet, Profibus and Foundation Fieldbus have a dedicated level of
configuration.
Configuring the DF44 Module
This module provides 8 analog continuous signals of current or voltage. The inputs are isolated from
IMB. All DF44 inputs are differential and isolated (minimum 10mΩ) making the easy and more
reliable installation with regard to grounding subjects.
The inputs are independently configured for read:
- 10 V, 5 V, 0 to 5 Vdc or 1-5 V, with internal shunt resistor on posicion V.
- 20 mA, 0-20 mA, 4-20 mA, with internal shunt resistor on posicion I.
As soon as the DF44 is added to an empty slot the following dialog box appears. Each channel must
be independently configured. The CPU will receive the input signal already converted in a
percentage on the input range selected.
3.8
Fig 3.9- Editing I/O Modules Window
To delete a Module
To move a Module
To characterize a Module
LogicView
This number comes in the range from 0 to 10,000. This number has the meaning of percentage with
an imaginary fixed point to separate the last 2 decimal digits. For example 5000 represents 50.00 %
while 10000 represents 100.00 % of the inputs selected range. Another example is when the input
shows as 5460 it is actually indicating 54.60 % of the selected input range.
Fig 3.10- Setting the DF44 Inputs on LOGICVIEW
3.9
LogicView Configurati on Manual
Configuring the DF45 Temperature Module
Each individual input in the DF45 has a particular configuration.
When the dialog box for the module configuration opens we can set the type of measurement, wiring
connectivity, sensor type, engineering units to work and range that will be converted in percentage.
The DF45 module provides both a value (integer) and a status (boolean). The status indicates that
there is a sensor burnout, high or low as selected in the configuration. This status may be used to
alert the operator and also be used for failure to make a decision in the interlock logic.
Two groups will be associated to this module:
- DF45G1B8Irrm.c, a group with 8 boolean points where each one represents the “burnout state” to
the individual inputs.
- DF45G2NR8Irrm.c, a group with 8 integer points representing the percentage of each individual
input signal.
Fig 3.11- Setting the DF45 Inputs on LOGICVIEW
3.10
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.