ABB Procontic, PC331 Programming-Software - 7
ABB Procontic, PC331 Programming-Software - 7
Connection Elements
Advant Controller 31
ABB Procontic CS31
907 PC 331
Programming and Test Software
ABB Schalt-
und Steuerungstechnik
Overview of blocks arranged alphabetically according to call names
Depending on the different families of the AC31 / CS31 basic units (series 30, 40, 50 and series 90), two libraries are used
and called in the editor "Project menu". If the CE is called in the FBD/LD or IL editor, it is automatically displayed, if the
CE is available or not.
& 01-01 AWTB 05-18 EMASm 10-09 MOK 16-01 VGLD see =?D
* 01-03 AWTD 06-01 EMASmVT 11-01 MRK 16-04 VGRD see >D
*: 01-05 BCDBIN see ESV 11-03 MUL2N 16-06 VKLD see <D
*D 01-07 BCDDUAL FCDEL 11-06 MUL2ND 16-10 VRZ 21-16
+ 01-09 BCDDUAL 06-03 FCRD 11-08 MULD see *D VRZD 21-19
+D 01-11 BCDDUALD 06-07 FCWR 11-11 MULDI see *: VVZ 22-01
– 01-13 BCDDW see FDEL 11-14 MUXR 16-14 WAES 22-04
–D 01-15 BCDDUALD FEHSU 11-16 MUXRD 16-17 WAND 22-06
/ 01-17 BEG 06-10 FIFO 11-19 NEGD 17-01 WDEC 22-08
: 01-19 BEGD 06-12 FKG 11-23 NOTBIT 17-03 WDW 22-11
:D 02-01 BETR 06-14 FRD 11-26 PACK 17-06 WOL 22-13
< 02-04 BETRD 06-16 FWR 12-01 PACKD 17-08 WOR 22-15
<= 02-06 BINBCD see HLG 12-04 PDM 17-10 WOS 22-17
<D 02-08 DUALBCD I– 12-10 PE 17-13 WRB 23-01
= 02-10 BITSU 06-18 I+ 12-13 PI 17-15 WRDW 23-04
=1 02-12 BMELD 07-01 IDENT 12-15 PIDT1 18-01 WRW 23-08
=? 02-14 CALLUP 07-04 IDL see IDLm PT1 18-08 WUMC 23-11
=?D 02-16 COPY 07-08 IDLB 12-17 RDB 18-11 WWDW 23-14
=D 02-18 COS1 07-10 IDLm 12-20 RDDW 18-14 WXOR 23-15
=PE 03-01 COUNTB 07-11 IDS see IDSm RDW 18-17 ZUDKW 23-17
=R 03-03 COUNTW 07-13 IDSB 13-01 RS 19-01 ZUWD see =D
=S 03-05 CS31CO 07-17 IDSm 13-04 SETB 19-03
=W 03-07 CS31QU 07-25 If then 13-07 SFEHSU 19-05
> 03-09 CS31TE 07-26 If then word 13-08 SHIFT 19-09
<> 03-11 DIN 08-01 INITS 13-09 SIN1 19-14
>< 03-13 DIVD see :D INITV 13-12 SINIT 19-15
>= 03-15 DMUX 08-02 INTK 13-15 SPBM 20-01
>D 03-17 DMUXD 08-05 IOCON 13-19 SQRT 20-04
5F_ARC 03-19 DOUT 08-09 IOR 14-01 SR 20-06
5F_ARC94 03-19 DRUCK 08-10 IOW 14-03 SUBD see –D
ABORT 04-01 DT1 09-01 LDT 14-05 TESTB 20-08
ADAPT 04-03 DUALBCD 09-04 LIFO 14-08 UHR 20-16
ADDD see +D DUALBCDD 09-08 LIZU 14-12 UNPACK 20-20
ADRWA 04-10 DWAES 09-11 LZB 14-15 UNPACKD 20-22
AINIT 04-15 DWAND 09-13 MAJ 14-17
AMELD 04-17 DWBCD see MASKE 14-19 UNPAD see
AMELDD 04-20 DUALBCDD MASKED 15-01 UNPACKD
ANAI4_20 05-01 DWOL 09-15 MAX 15-04 USM 20-24
APOLL 05-03 DWOR 09-17 MAXD 15-06 UST 20-26
AREC 05-04 DWOS 09-19 MAZ 15-08 USTD 21-01
ASEND 05-07 DWUMC 10-01 MAZD 15-10 USTR 21-03
ASEND+ s. ASEND DWW 10-04 MIN 15-12 USTRD 21-05
ASV 05-11 DWWW 10-06 MIND 15-14 VGL3P 21-07
AWM 05-14 DWXOR 10-07 MOA 15-16 VGLEH 21-10
AWT 05-16 EMAS s. EMASm MODBUS *) 15-21 VGLUH 21-13
& 01-01 AWTB 05-18 EMASm 10-09 MUL2N 16-06 VRZ 21-16
* 01-03
*: 01-05 BCDBIN see ESV 11-03
BCDDUAL MULDI see *:
+ 01-09 BCDDUAL 06-03 WAND 22-06
MAX 15-04
MIN 15-12
MOA 15-16
DWW 10-04 MOAT 15-19
ASV 05-11 MODBUS 15-21
MOK 16-01
AWT 05-16 EMAS s. EMASm MRK 16-04
____________________________________________________________________________________________
This catalog of blocks provides you first of all with two
overviews of all blocks,
CAUTION!
In this catalog the blocks are sorted alphabetically ac-
cording to their block names. They are not sorted accord-
ing to the call names in FBD/LD or IL!
The description of each block is structured as follows:
Block name Brief description
Call name in FBD
ALLOCATION SET MEMORY =S
A binary variable is set in latching form with this con- nection
element.
FBD IL Representations in FBD,
A state 1 at the input sets the operand at the output to a state 1. A
state 0 at the input has no influence on the operand at the output. LD and IL (input/output
! E1 designations which are
=S =S A1
E1 A1 not displayed on the
screen are given in italics
in the description.)
LD
E1 A1
S
Parameters:
Parameters
E1 BINARY E, M, A, S, K Set condition
Inputs, outputs / data
A1 BINARY M, A Storage variable type / permissible
operands / meaning of
CE Data Series 90 Series 30, 40, 50
Runtime:
the parameter
Basic runtime: 4.3 µs 15 µs
Additional runtime: 2.3 µs per additional output (A3...An) 9 µs Miscellaneous data of
Output updating: yes yes the block
Number of historical values: none none
Available as of: ABB Procontic CS31 / 907 PC 331 907 PC 331 / 07 KR 31 V 1.0
07 CR 41, 07 CT 41, 07 KR 51, 07 KT 51
Description
A state 1 at the input sets the operand at the output to a state 1. A
state 0 at the input has no influence on the operand at the output.
Detailed description
IMPORTANT:
This CE must only be used as an output CE, i. e. in the FBD it must
not be connected further by a line on the output side. An operand
(M or A) must be specified at the output.
Page number
Example
Example
FBD IL
! E 00,00
=S =S A 02,00
E 00,00 A 02,00
LD
E 00,00 A 02,00
S
Param. type:
Information on the data type (L=bit, B = byte, W = word, D
= double word, F = floating, A = analog, T = text constant,
Z = time constant, S = miscellaneous, X = all).
Param. block:
Information on whether or not the input can be duplicated
(input cannot be duplicated: 0;
input can be duplicated: > 0).
Dupli. type:
Information on the type of duplication
(single = 0, in blocks = 1).
Abreviations
You will find abbreviations used on Page 0–3 of the binder
entitled “907 PC 33, General Part”.
1) If calling in IL is different from calling in FBD/LD and comf. IL, this is additionally noted separated by /.
2) This function is realized in IL using a sequence of commands and/or blocks.
1) If calling in IL is different from calling in FBD/LD and comf. IL, this is additionally noted separated by /.
2) This function is realized in IL using a sequence of commands and/or blocks.
Pulse Page
Pulse (positive edge) I+ 2) 12-13
Pulse (negative edge) I– 2) 12-10
1) If calling in IL is different from calling in FBD/LD and comf. IL, this is additionally noted separated by /.
2) This function is realized in IL using a sequence of commands and/or blocks.
ARCNET Page
Initialization of the ARCNET controller AINIT 04-15
Send data packages to ARCNET APOLL 05-03
Receive ARCNET data packages AREC 05-04
Send ARCNET data packages ASEND 05-07
Coupling visualization via ARCNET (for 07 KT 92 and 07 KT 93) 5F_ARC 03-19
Coupling visualization via ARCNET (for 07 KT 94) 5F_ARC94 03-19
1) If calling in IL is different from calling in FBD/LD and comf. IL, this is additionally noted separated by /.
2) This function is realized in IL using a sequence of commands and/or blocks.
1) If calling in IL is different from calling in FBD/LD and comf. IL, this is additionally noted separated by /.
2) This function is realized in IL using a sequence of commands and/or blocks.
1) If calling in IL is different from calling in FBD/LD and comf. IL, this is additionally noted separated by /.
2) This function is realized in IL using a sequence of commands and/or blocks.
3) Call only possible in IL.
4) Call not possible in IL.
! E1
& & E2
E1 = A1
E2 A1
LD
E1 E2 A1
][ ][ ()
____________________________________________________________________________________________
Parameters
E1 BINARY E, M, A, S, K Operand 1 of the AND combination
Description
This connection element realizes a logical AND combina-
tion of the operands at the inputs. The result is allocated
to the operand at the output.
E1 E2 A1
0 0 0
1 0 0
0 1 0
1 1 1
Example
FBD IL
! E 00,00
& & E 03,11
E 00,00 = A 02,00
E 03,11 A 02,00
LD
CE FBD Definition
&
E1
E2 A1
E1 E L Y P N 0 0
E2 E L Y P N 1 0
A1 A L Y P N 0 0
CE IL Definition
! E1
* * E2
E1 = A1
E2 A1
____________________________________________________________________________________________
Parameters
E1 WORD EW, MW, AW, KW Multiplicand
E2 WORD EW, MW, AW, KW Multiplier; The input is capable of duplication
A1 WORD MW, AW Result (Product)
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: < 30 µs
Additional runtime: 23 µs per additional input (E3 ... En)
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
The following specially applies here to the non–negated under no circumstances may negation or subtraction be
inputs E1 and E2: carried out on this value.
Low limit: 8000 H (–32768)
The following generally applies: An admissible value is generated again by means of an
allocation (=), addition (+), multiplication (*) or division (:).
● Low limit: 8001H –32767
● High limit: 7FFFH +32767 On allocation (=), the forbidden value 8000H (–32768) is
● Inadmissible value: 8000H ––– corrected to the allowed value 8001H (–32767).
Example
FBD/LD IL
! EW 00,00
* * MW 00,00
EW 00,00 = AW 02,00
MW 00,00 AW 02,00
CE FBD Definition
*
E1
E2 A1
E1 E W Y P N 0 0
E2 E W Y P N 1 0
A1 A W Y P N 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
Example
FBD/LD IL
!BA 0
*: MULDI
EW 00,00 Z1* EW 00,00
MW 03,11 Z2: MW 03,11
EW 00,00 Z3 A1 AW 02,00 EW 00,00
AW 02,00
CE FBD Definition
*:
Z1*
Z2:
Z3 A1
Z1* E W N P Y 0 0
Z2: E W N P Y 0 0
Z3 E W N P Y 0 0
A1 A W N P N 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 MULDI
00002 PP 0 Z1* Input WORD
00003 PP 0 Z2: Input WORD
00004 PP 0 Z3 Input WORD
00005 PP 0 A1 Output WORD
____________________________________________________________________________________________
Parameters
E1 DOUBLE WORD MD, KD Multiplicand
E2 DOUBLE WORD MD, KD Multiplier
A1 DOUBLE WORD MD Result (Product)
Q BINARY A,M Result limited
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 117 ... 120 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Example
FBD/LD IL
!BA 0
*D MULD
MD 00,00 MD 00,00
KD 03,11 MD 00,00 KD 03,11
Q A 02,00 MD 00,00
A 02,00
CE FBD Definition
*D
E1
E2 A1
Q
E1 E D N P N 0 0
E2 E D N P N 0 0
A1 A D N P N 0 0
Q A L N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 MULD
00002 PP 0 E1 Input DOUBLE WORD
00003 PP 0 E2 Input DOUBLE WORD
00004 PP 0 A1 Output DOUBLE WORD
00005 PP 0 Q Output BINARY
! E1
+ + E2
E1 = A1
E2 A1
____________________________________________________________________________________________
Parameters
E1 WORD EW, MW, AW, KW Summand 1
E2 WORD EW, MW, AW, KW Summand 2; The input can be duplicated
A1 WORD MW, AW Total
____________________________________________________________________________________________
Example
FBD/LD IL
! EW 00,00
+ MW 00,00
EW 00,00 = AW 02,00
MW 00,00 AW 02,00
CE FBD Definition
+
E1
E2 A1
E1 E W Y P N 0 0
E2 E W N P N 1 0
A1 A W Y P N 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
E1 DOUBLE WORD MD, KD Summand 1
E2 DOUBLE WORD MD, KD Summand 2
A1 DOUBLE WORD MD Total
Q BINARY A, M Total, limited
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 49 ... 52 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Example
FBD/LD IL
!BA 0
+D ADDD
MD 00,00 MD 00,00
KD 03,11 MD 00,00 KD 03,11
Q A 02,00 MD 00,00
A 02,00
CE FBD Definition
+D
E1
E2 A1
Q
E1 E D N P N 0 0
E2 E D N P N 0 0
A1 A D N P N 0 0
Q A L N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 ADDD
00002 PP 0 E1 Input DOUBLE WORD
00003 PP 0 E2 Input DOUBLE WORD
00004 PP 0 A1 Output DOUBLE WORD
00005 PP 0 Q Output BINARY
! E1
– – E2
E1 = A1
E2 A1
____________________________________________________________________________________________
Parameters
E1 WORD EW, MW, AW, KW Minuend
E2 WORD EW, MW, AW, KW Subtrahend; the input can be duplicated
A1 WORD MW, AW Result (difference)
____________________________________________________________________________________________
The value of the operand at the input E2 is subtracted ● Low limit: 8001H –32767
from the value of the operand at the input E1 and the re- ● High limit: 7FFFH +32767
sult is allocated to the operand at the output A1. ● Inadmissible value: 8000H –––
The input E2 is capable of duplication (E2...En). If it is du- In the two’s complement arithmetic, the value 8000H
plicated, all values of the operands at the inputs E2...En (–32768) lies outside of the number range and is neither
are subtracted from the operand at the input E1. generated nor processed correctly by the PLC. If this for-
bidden value reaches the PLC
The input E1 and the output A1 can be negated. ● by bit manipulations of the user or
● by being read from outside the PLC or
Number range ● by an indirect word constant
Example
FBD/LD IL
! EW 00,00
– – MW 00,00
EW 00,00 = AW 02,00
MW 00,00 AW 02,00
CE FBD Definition
–
E1
E2 A1
E1 E W Y P N 0 0
E2 E W N P N 1 0
A1 A W Y P N 0 0
CE IL Definition
Parameters
E1 DOUBLE WORD MD, KD Minuend
E2 DOUBLE WORD MD, KD Subtrahend
A1 DOUBLE WORD MD Result (difference)
Q BINARY A, M Result, limited
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 50 ... 55 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
The result is limited to the maximum or minimum value of ● Low limit: 8000 0000H – 2 147 483 647.
the number range. If limiting has taken place, a 1 signal is The following generally applies:
allocated to the binary operand at the output Q. If no limit-
ing has taken place, a 0 signal is allocated to the binary Integer double word (32 bits)
operand at the output Q. ● Low limit: 8000 0001H – 2 147 483 647
● High limit: 7FFF FFFFH + 2 147 483 647
The value of the operand at the input E2 is checked be- ● Inadmissible value: 8000 0000H –––
fore subtraction to determine whether or not it lies outside
of the permissible number range (8000 0000H). If this is
the case, calculation is done with the value –2 147 483
647 (8000 0001H) instead of this inadmissible value.
The inputs and outputs can neither be duplicated nor ne-
gated.
Example
FBD/LD IL
!BA 0
–D SUBD
MD 00,00 MD 00,00
KD 03,11 MD 00,00 KD 03,11
Q A 02,00 MD 00,00
A 02,00
CE FBD Definition
–D
E1
E2 A1
Q
E1 E D N P N 0 0
E2 E D N P N 0 0
A1 A D N P N 0 0
Q A L N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 SUBD
00002 PP 0 E1 Input DOUBLE WORD
00003 PP 0 E2 Input DOUBLE WORD
00004 PP 0 A1 Output DOUBLE WORD
00005 PP 0 Q Output BINARY
! E1
/ / E2
E1 = A1
E2 A1
KOP
E1 A1
][ ()
E2
][
____________________________________________________________________________________________
Parameters
E1 BINARY E, M, A, S, K Operand 1 of the OR combination
CE Data
Runtime:
Basic runtime: 6.6 µs
Additional runtime: 2.3 µs per additional input
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
This connection element realizes a logical OR combina-
tion of the operands at the inputs. The result is allocated
to the operand at the output.
E1 E2 A1
0 0 0
1 0 1
0 1 1
1 1 1
Example
FBD IL
! E 00,00
/ / E 03,11
E 00,00 = A 02,00
E 03,11 A 02,00
KOP
E 0,00 A 02,00
][ ()
E 03,11
][
CE FBD Definition
/
E1
E2 A1
E1 E L Y P N 0 0
E2 E L Y P N 1 0
A1 A L Y P N 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
E1 WORD EW, MW, AW, KW Dividend
E2 WORD EW, MW, AW, KW Divisor
A1 WORD MW, AW Result (quotient)
____________________________________________________________________________________________
The value of the operand at the input E1 is divided by the ● Lower limit: 8001H –32767
value of the operand at the input E2 and the result is allo- ● High limit: 7FFFH +32767
cated to the operand at the output A1. ● Inadmissible value: 8000H –––
The result of division is always a whole number. Rounding In twos complement arithmetic, the value 8000H
(inclusion of the digits after the decimal point) does not (–32768) lies outside the number range and is neither
take place. generated nor processed correctly by the PLC. If this for-
bidden value reaches the PLC
The input E2 can be duplicated (E2...En). The following
● by bit manipulations on the part of the user or
applies if it is duplicated:
● by reading in from outside the PLC or
E1 : E2 : E3 ... : En = A1.
● by an indirect word constant
All inputs and the output can be negated.
under no circumstances may a negation or substraction
be done on this value.
Number Range
A permissible value is generated again by an allocation
Integer word (16 bits) (=), addition (+), multiplication (*) or division (:).
The following applies here particularly to the non–ne- In the event of allocation (=), the forbidden value 8000H
gated inputs E1 and E2: (–32768) is corrected to the allowed value 8001H
Lower limit: 8000H (–32768) (–32767).
Example
FBD/LD IL
! EW 00,00
: : MW 00,00
EW 00,00 = AW 02,00
MW 00,00 AW 02,00
CE FBD Definition
:
E1
E2 A1
E1 E W Y P N 0 0
E2 E W Y P N 1 0
A1 A W Y P N 0 0
CE IL Definition
00000 ! PP 0 E1 Input WORD
[ 1
00002 : PP 1 E2 Input WORD (capable of duplication)
] 1
00005 = PP 0 A1 Output WORD
____________________________________________________________________________________________
Parameters
E1 DOUBLE WORD MD, KD Dividend
E2 DOUBLE WORD MD, KD Divisor
A1 DOUBLE WORD MD Result (quotient)
REST DOUBLE WORD MD Rest
Q BINARY A, M Result limited
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 300 ... 324 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
REST = 0 Output for the remainder ● Low limit: 8000 0001H –2 147 483 647
Q=1 Output to signal that the value at the output ● High limit: 7FFF FFFFH +2 147 483 647
A1 has been limited ● Inadmissible value: 8000 0000H –––
Example
FBD/LD IL
!BA 0
:D DIVD
MD 00,00 MD 00,00
KD 03,11 MD 01,00 KD 03,11
REST MD 00,00 MD 01,00
Q A 02,00 MD 00,00
A 02,00
CE FBD Definition
:D
E1
E2 A1
REST
Q
E1 E D N P N 0 0
E2 E D N P N 0 0
A1 A D N P N 0 0
REST A D N P Y 0 0
Q A L N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 DIVD
00002 PP 0 E1 Input DOUBLE WORD
00003 PP 0 E2 Input DOUBLE WORD
00004 PP 0 A1 Output DOUBLE WORD
00005 PP 0 REST Output DOUBLE WORD
00005 PP 0 Q Output BINARY
____________________________________________________________________________________________
Parameters
Z1< WORD EW, MW, AW, KW Value to be compared
Z2 WORD EW, MW, AW, KW Comparison value
Q BINARY A, M, S Result of the comparison
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: < 12 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Example
FBD/LD IL
! MW 00,00
< < AW 02,00
MW 00,00 Z1< = M 00,00
AW 02,00 Z2 Q M 00,00
CE FBD Definition
<
Z1<
Z2 Q
Z1< E W Y P Y 0 0
Z2 E W Y P Y 0 0
Q A L Y P Y 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
Z1<= WORD EW, MW, AW, KW Value to be compared
Z2 WORD EW, MW, AW, KW Comparison value
Q BINARY A, M, S Result of the comparison
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: < 12 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
The inputs can be negated, but not duplicated. The output ● by bit manipulations of the user or
can be inverted, but not duplicated.
● by being read from outside the PLC or
● by an indirect word constant
Number range
under no circumstances may negation or subtraction be
Integer word (16 Bit) carried out on this value.
An admissible value is generated again by means of an
The following specially applies here to the non–negated allocation (=), addition (+), multiplication (*) or division (:).
inputs:
● Low limit 8000H –32768 On allocation (=), the forbidden value 8000H (–32768) is
● High limit 7FFFH +32767 corrected to the allowed value 8001H (–32767).
Example
FBD/LD IL
! MW 00,00
<= <= AW 02,00
MW 00,00 Z1<= = M 00,00
AW 02,00 Z2 Q M 00,00
CE FBD Definition
<=
Z1<=
Z2 Q
Z1<= E W Y P Y 0 0
Z2 E W Y P Y 0 0
Q A L Y P Y 0 0
CE IL Definition
00000 ! PP 0 Z1<= Input WORD
00002 < PP 0 Z2 Input WORD
00004 = PP 0 Q Output BINARY
____________________________________________________________________________________________
Parameters
Z1< DOUBLE WORD MD, KD Value to be compared
Z2 DOUBLE WORD MD, KD Comparison value
Q BINARY A, M, Result of the comparison
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 35 ... 36 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
Number range
Integer double word (32 Bit)
The following specially applies here to the inputs Z1< and
Z2:
● Low limit: 8000 0000H –2 147 483 648
● High limit: 7FFF FFFFH +2 147 483 647
Example
FBD/LD IL
!BA 0
<D VKLD
MD 00,00 Z1< MD 00,00
KD 01,00 Z2 Q A 02,00 KD 01,00
A 02,00
CE FBD Definition
<D
Z1<
Z2 Q
Z1< E D N P Y 0 0
Z2 E D N P Y 0 0
Q A L N P Y 0 0
CE IL Definition
! E1
= = A1
E1 A1
LD
E1 A1
][ ()
____________________________________________________________________________________________
Parameters
E1 BINARY E, M, A, S, K Source
A1 BINARY M, A, S Target, output capable of duplication
____________________________________________________________________________________________
Description
This connection element allocates the value of the oper-
and at the input to the operand at the output.
Example
FBD IL
! E 00,00
= = A 02,00
E 00,00 A 02,00
LD
E 00,00 A 02,00
][ ()
CE FBD Definition
=
E1 A1
E1 E L Y P N 0 0
A1 A L Y P N 1 0
CE IL Definition
00000 ! PP 0 E1 Input BINARY
[ 1
00002 = PP 1 A1 Output BINARY (capable of duplication)
] 1
! E1
=1 &N E2
E1 /N E1
E2 A1 & E2
= A1
____________________________________________________________________________________________
Parameters
E1 BINARY E, M,A,S,K Operand 1 of the XOR combination
Description
This connection element realizes a logical EXCLUSIVE
OR combination of the operands at the inputs. The result
is allocated to the operand at the output.
Truth table:
E1 E2 A1
0 0 0
1 0 1
0 1 1
1 1 0
Example
FBD/LD IL
! E 00,00
=1 &N E 03,11
E 00,00 /N E 00,00
E 03,11 A 02,00 & E 03,11
= A 02,00
CE FBD Definition
=1
E1
E2 A1
E1 E L N P N 0 0
E2 E L N P N 0 0
A1 A L N P N 0 0
CE IL Definition
00000 ! PP 0 E1 Input BINARY
00002 &N PP 0 E2 Input BINARY
00004 /N PP 0 E1 Input BINARY
00006 & PP 0 E2 Input BINARY
00008 = PP 0 A1 Ouput BINARY
____________________________________________________________________________________________
Parameters
Z1=? WORD EW, MW, AW, KW Value to be compared
Z2 WORD EW, MW, AW, KW Comparison value
Q BINARY A, M, S Result of the comparison
____________________________________________________________________________________________
Example
FBD/LD IL
! MW 00,00
=? =? AW 02,00
MW 00,00 Z1=? = M 00,00
AW 02,00 Z2 Q M 00,00
CE FBD Definition
=?
Z1=?
Z2 Q
Z1=? E W Y P Y 0 0
Z2 E W Y P Y 0 0
Q A L Y P Y 0 0
CE IL Definition
____________________________________________________________________________________________
Parametes
Z1=? DOUBLE WORD MD, KD Value to be compared
Z2 DOUBLE WORD MD, KD Comparison value
Q BINARY A, M Result of the comparison
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 35 ... 37 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
Number range
Integer double word (32 Bit)
The following specially applies here to the inputs Z1=?
and Z2:
● low limit: 8000 0000H –2 147 483 648
● high limit: 7FFF FFFFH +2 147 483 647
The following generally applies:
● low limit: 8000 0001H –2 147 483 647
● high limit: 7FFF FFFFH +2 147 483 647
● inadmissible value: 8000 0000H –––
Example
FBD/LD IL
!BA 0
=?D VGLD
MD 00,00 Z1=? MD 00,00
KD 01,00 Z2 Q A 02,00 KD 01,00
A 02,00
CE FBD Definition
=?D
Z1=?
Z2 Q
Z1=? E D N P Y 0 0
Z2 E D N P Y 0 0
Q A L N P Y 0 0
CE IL Definition
!BA 0
=D ZUWD
E1 A1 E1
A1
____________________________________________________________________________________________
Parameters
E1 DOUBLE WORD MD, KD Source
A1 DOUBLE WORD MD Target
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 31 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
The input and the output can neither be duplicated nor ne-
gated.
Example
FBD/LD IL
!BA 0
=D ZUWD
MD 00,00 MD 02,00 MD 00,00
MD 02,00
CE FBD Definition
=D
E1 A1
E1 E D N P N 0 0
A1 A D N P N 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 ZUWD
00002 PP 0 E1 Input DOUBLE WORD
00003 PP 0 A1 Output DOUBLE WORD
! BED
=PE = PE
BED
____________________________________________________________________________________________
Parameters
BED BINARY E, M, A, S, K Condition for program end
____________________________________________________________________________________________
Description
The conditional program end may be planned within a
PLC program. Depending on the status of the operand at
the input BED, processing of the PLC program is ended or
is not ended here.
Example
FBD/LD IL
! M 01,03
=PE = PE
M 01,03 BED
CE FBD Definition
=PE
BED
BED E L N P Y 0 0
CE IL Definition
00000 ! PP 0 BED Condition for program end (BINARY)
00002 =PE
LD
E1 A1
][ (R)
____________________________________________________________________________________________
Parameters
E1 BINARY E, M, A, S, K Reset condition
A1 BINARY M, A Store variable
____________________________________________________________________________________________
Description
A state 1 at the input sets the operand at the output to a
state 0. A state 0 at the input has no influence on the oper-
and at the output.
IMPORTANT:
This CE must only be used as an output CE, i. e. in the
FBD it must not be connected further by a line on the out-
put side. An operand (M or A) must be specified at the out-
put.
Example
FBD IL
! E 00,00
=R =R A 02,00
E 00,00 A 02,00
LD
E 00,00 A 02,00
][ (R)
CE FBD Definition
=R
E1 A1
E1 E L Y P N 0 0
A1 A L N P N 1 0
CE IL Definition
LD
E1 A1
][ (S)
____________________________________________________________________________________________
Parameters
E1 BINARY E, M, A, S, K Set condition
A1 BINARY M, A Storage variable
____________________________________________________________________________________________
____________________________________________________________________________________________
Description
A state 1 at the input sets the operand at the output to a
state 1. A state 0 at the input has no influence on the oper- Example:
and at the output.
IMPORTANT: =S
This CE must only be used as an output CE, i. e. in the E1 A1 A1 not allowed
FBD it must not be connected further by a line on the out- A2
put side. An operand (M or A) must be specified at the out-
put. =S
E1 A1
The output A1 can be duplicated (A2...An). The input E1 & not allowed
can be inverted.
=S
E1 A1
A2
A1
A2
correct
Example
FBD IL
! E 00,00
=S =S A 02,00
E 00,00 A 02,00
LD
E 00,00 A 02,00
][ (S)
! E1
=W = A1
E1 A1
____________________________________________________________________________________________
Parameters
E1 WORD EW, MW, AW, KW Source
A1 WORD MW,AW Target; output capable of duplication
____________________________________________________________________________________________
Example
FBD/LD IL
! EW 00,00
=W = AW 02,00
EW 00,00 AW 02,00
CE FBD Definition
=W
E1 A1
E1 E W Y P N 0 0
A1 A W Y P N 1 0
CE IL Definition
00001 ! PP 0 E1 Input WORD
[ 1
00002 = PP 1 A1 Output WORD (capable of duplication)
] 1
____________________________________________________________________________________________
Parameters
Z1> WORD EW, MW, AW, KW Value to be compared
Z2 WORD EW, MW, AW, KW Comparison value
Q BINARY A, M, S Result of the comparison
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: < 12 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Example
FBD/LD IL
! MW 00,00
> > AW 02,00
MW 00,00 Z1> = M 00,00
AW 02,00 Z2 Q M 00,00
CE FBD Definition
>
Z1>
Z2 Q
Z1> E W Y P Y 0 0
Z2 E W Y P Y 0 0
Q A L Y P Y 0 0
CE IL Definition
00000 ! PP 0 Z1> Input WORD
00002 > PP 0 Z2 Input WORD
00004 = PP 0 Q Output BINARY
____________________________________________________________________________________________
Parameters
Z1<> WORD EW, MW, AW, KW Value to be compared
Z2 WORD EW, MW, AW, KW Comparison value
Q BINARY A, M, S Result of the comparison
____________________________________________________________________________________________
Example
FBD/LD IL
! MW 00,00
<> <> AW 02,00
MW 00,00 Z1<> = M 00,00
AW 02,00 Z2 Q M 00,00
CE FBD Definition
<>
Z1<>
Z2 Q
Z1<> E W Y P Y 0 0
Z2 E W Y P Y 0 0
Q A L Y P Y 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
Z1<> WORD EW, MW, AW, KW Value to be compared
Z2 WORD EW, MW, AW, KW Comparison value
Q BINARY A, M, S Result of the comparison
____________________________________________________________________________________________
Example
FBD/LD IL
! MW 00,00
>< <> AW 02,00
MW 00,00 Z1>< = M 00,00
AW 02,00 Z2 Q M 00,00
CE FBD Definition
><
Z1><
Z2 Q
Z1>< E W Y P Y 0 0
Z2 E W Y P Y 0 0
Q A L Y P Y 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
Z1>= WORD EW, MW, AW, KW Value to be compared
Z2 WORD EW, MW, AW, KW Comparison value
Q BINARY A, M, S Result of the comparison
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: < 12 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Example
FBD/LD IL
! MW 00,00
>= >= AW 02,00
MW 00,00 Z1>= = M 00,00
AW 02,00 Z2 Q M 00,00
CE FBD Definition
Z1>=
Z2 Q
Z1>= E W Y P Y 0 0
Z2 E W Y P Y 0 0
Q A L Y P Y 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
Z1> DOUBLE WORD MD, KD Value to be compared
Z2 DOUBLE WORD MD, KD Comparison value
Q BINARY A, M Result of the comparison
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 35 – 37 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
Number range
Integer double word (32 Bit)
The following specially applies here to the inputs Z1> and
Z2:
● low limit: 8000 0000H –2 147 483 648
● high limit: 7FFF FFFFH +2 147 483 647
Example
FBD/LD IL
!BA 0
>D VGRD
MD 00,00 Z1> MD 00,00
KD 02,00 Z2 Q A 00,00 KD 02,00
A 00,00
CE FBD Definition
>D
Z1>
Z2 Q
Z1> E D N P Y 0 0
Z2 E D N P Y 0 0
Q A L N P Y 0 0
CE IL Definition
ERR
OP0
Parameters
FREI BIT Enabling
SEC WORD 1. User data flag reception
T_O1 WORD 1. User data flag reception
ERR WORD Error
OP0 1. Operand in operand memory
Description
To get a simple and effective data transfer to visualization In addition to this protocol, communication between the
systems, a protocol according to MODBUS was realized. PLCs can be realized according to the block descriptions
ASEND, ASEND+ and AREC.
Apart from the ARCNET blocks AINIT, AREC, ASEND,
ASEND+ and APOLL, the connection element 5F_ARC In the PLC program, a range of 125 flag words each must
(for 07 KT 92/93) or 5F_ARC94 (for 97 KT 94) is used in be reserved for sending as well as for receiving. The tele-
the PLC program. The functionality of the connection ele- grams consist of an ARCNET head (CP, DIN, JOB_NR)
ments 5F_ARC and 5F_ARC94 is identical. and the MODBUS telegram, which may use these 125
words as a maximum. All telegrams are sent with the DIN
These connection elements call a C subroutine via the block identifier 5F and the user data length (AREC/ASEND) 125
CALLC which interprets the received data. The protocol (maximum length). The ARCNET address of the correspond-
works in accordance to a master/slave principle. The PC ing subscriber is always used as job number. This job num-
always works as master and the PLC always as slave. ber is entered at the ASEND or ASEND+ block and at the
Which data should be sent or received is configured in the AREC block.
PC. In the PLC always a "standard program" is used.
Example: If the master (PC) has ARCNET address 1 and
It is possible to couple several masters with a PLC. In this the PLC has ARCNET address 2, the job number = 1 must
case, the PLC program must be expanded with several be used at the blocks AREC and ASEND in the PLC pro-
5F_ARC or 5F_ARC94 blocks. gram.
The counter is the 1. word in the telegram received. This The 1. operand in the operand memory (KW00,00) has to
word has to be assigned to the 1. word in the response be assigned at output OP0. With this, the operand memo-
telegram. ry address is identified.
With the 2. word, the actual user data telegram begins. FCT 1: Read n bits
This word has to be applied to T_I1 of block 5F_ARC. The FCT 3: Read n words
block interprets the telegram and outputs a response at FCT F: Write n bits
T_O1 (2. word in the response telegram). If the telegram FCT 10: Write n words
was a "write instruction", the corresponding bit, word or
double word flags are overwritten by the block. If the tele- Bits to be transferred are packed. Bit and word transfers
gram was a "read instruction", the content of the flags to are differentiated via the function code.
be read are entered in the response telegram. If a faulty Caution:
telegram was received, the error number is output at ERR, High and low byte are exchanged as in the MODBUS tele-
additionally to this, an error telegram is entered starting at gram. The MODBUS CRC checksum is also sent. Several
T_O1. The flags starting at T_O1 contain always the cor- masters are possible because they can be identified. The
rect response after a block execution. Afterwards, the re- response to a request is always sent back to the right
sponse has to be sent to the master via ASEND or ASEND+. master.
The enabling input FREI at block 5F_ARC must only be Additionally to this protocol, user defined telegrams can
set if a telegram containing the DIN identifier 5F has been also be programmed as usual via other DIN identifiers.
received at AREC of the corresponding master.
Addresses
The addresses are defined as follows (see also 07 KR 31 documentation):
Binary operands
Step chains must only be read.
Address Operand
0000H E00,00 binary inputs
0001H E00,01
0002H E00,02
03FFH E63,15
1000H A00,00 binary outputs
1001H A00,01
1002H A00,02
13FFH A63,15
2000H M000,00 binary flags
2001H M000,01
2002H M000,02
2FFFH M255,15
3000H S00,00 step chains
3001H S00,01
3002H S00,02
37FFH S127,15
Word operands:
Indirect constants are only overwritten in operand range, i.e. after restarting the PLC program, it is switched back to the
original set value.
Address Operand
0000H EW00,00 word inputs
0001H EW00,0
0002H EW00,02
007FH EW07,15
1000H AW00,00 word outputs
1001H AW00,01
1002H AW00,02
107FH AW07,15
2000H MW000,00 word flags
2001H MW000,01
2002H MW000,02
2FFFH MW255,15
3000H KW00,00 indirect constants
3001H KW00,01
3002H KW00,02
327FH KW39,15
4000H MD00,00 double word flags
41FFH MD31,15
5000H KD00,00 double word constant
507FH KD7,15
The ARCNET telegram is structured according to the description of the blocks ASEND/AREC, with DIN identifier 5FH and
a user data length of 125 words.
The user data field is structured as follows:
Request:
Response:
02 01 000F 0010 xxxx
02 01 000F 0010 xxxx
CRC checksum CRC checksum
16 bit 16 user data bits are sent
from E000,15 in 2 bytes
Request: Response:
02 03 000F 0005 xxxx 02 03 0A 0001 0002 0003 0004 0005 xxxx
CRC check-
CRC checksum
sum
5 words 5 user data words are sent in
read from E000,15 10 bytes
Number of bytes
Read
Function code
from slave 2 Slave code
Response:
02 0F 100F 0004 xxxx
CRC checksum
Number of user data bytes * 2
Address
Function code
Slave address
Write:
02 10 100F 0005 0A 01 0002 0003 0004 0005 00 xxxx
CRC checksum
User data
Number of user data bytes = 10
Number of user data words = 5
from AW00,15 - address 100FH
Read
from slave 2
Response:
02 10 100F 0014 xxxx
CRC checksum
CRC Number of user data bytes * 2 = 20 (decimal)
Address
Function code
Slave address
!BA 0
ABORT ABORT
FREI FREI
____________________________________________________________________________________________
Parameters
FREI BINARY E, M, A, K Block enable
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 10 µs
Additional runtime: –––
Output updating: –––
Number of historical values: none
Available as of: ABB Procontic CS31 / Communication Processor 07 KP 62
____________________________________________________________________________________________
Description
The function block serves to abort a PLC program. All out-
puts are set to 0 if the PLC program is aborted.
The block can be used in particular for aborting the PLC
program if a specific error of error class 3 occurs.
The function block is activated by a 1 signal at its enable
input FREI. If a 0 signal is applied to the enable input, the
function block has no effect. The following thus applies:
FREI = 0: ––> the block has no effect
FREI = 1: ––> the block aborts the program
Example
FBD/LD IL
!BA 0
ABORT ABORT
M 255,13 FREI M 255,13
Parameters
W WORD EW, AW, MW, KW Command variable (setpoint)
X WORD EW, AW, MW, KW Controlled variable (actual value)
YR WORD EW, AW, MW, KW Manipulated variable of the controller at the starting
time of adaption
START BINARY E, A, M, S Start of adaption
READY BINARY E, A, M Adaption completed message
ERROR WORD AW, MW Error messages
Y BINARY A, M Excitation signal (manipulated variable) during
adaption
INIT WORD AW, MW Initial value for the controller
KP WORD AW, MW Proportional coefficient
TN/TZ WORD AW, MW Integral action time, scaled to PLC cycle time TZ
TV/TZ WORD AW, MW Derivative action time, scaled to PLC cycle time TZ
T1/TZ WORD AW, MW Returning time, scaled to PLC cycle time TZ
D–FREI BINARY A, M Enable for the controller’s D component
KS WORD AW, MW Gain of the controlled system
TU WORD AW, MW Delay time of the controlled system
TG WORD AW, MW Stabilization time of the controlled system
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: not available
Additional runtime: not available
Output updating: no; recommendation: Allocate the output directly to a flag or use a global
intermediate flag; see volume 3, chapter 2.5.3
Number of historical values: 70 words
Available as of: ABB Procontic CS31 / 907 PC 331
which can be defined on the basis of the transfer function. Starting/aborting adaption
In this process, the actual progression of the transfer Adaption begins by a 0/1 edge at the START input. A run-
function is replaced by the tangent placed at its reversing ning adaption is aborted by means of a 1/0 edge at the
point. START input.
Carrying out adaption
x During adaption, the output Y supplies the binary manipu-
lated variable for the controlled system. The PIDT1 con-
troller is inactive, i.e. the controller must not influence the
Tg system. This must be ensured by a control logic in the
Ks PLC program.
At the start of adaption the block requires the initial values
x(t)
of the currently available controlled and manipulated vari-
ables. These initial values are only known exactly when
set for the first time (controlled variable = ambient temper-
ature, manipulated variable = 0).
In the event of adaption in controlled mode (resetting in
the event of a setpoint change), the initial value of the ma-
nipulated variable is defined by the actuation output of the
Reversing tangent PIDT1 controller. Owing to the planned control structure
(PIDT1 followed by a PDM block), the PIDT1 controller
does not supply a stationary manipulated variable. Con-
Tu t
tinuous oscillation of the controller’s manipulated variable
sets in, preventing exact measurement of the constant
The above figure shows the transfer function, its revers- component. Low pass filtering of the controller’s manipu-
ing tangent and the resulting characteristic quantities in lated variable is therefore recommended in order to pro-
aperiodic processes. vide the initial value of the manipulated variable for the
adaption block (PT1 block, time constant > 10 s).
The adaption block is designed especially for processes
whose characteristic quantities fulfill the following condi- As the result of continuous oscillation of the controller’s
tions: manipulated variable, the controlled variable also suffers
continuous oscillation. However, this oscillation is atte-
5 < Tg/Tu < 100 nuated very substantially by the low pass response of the
20 sec < Tu < 300 sec controlled system. Additional filtering of the controlled
0.25 < Ks <2 variable is therefore not necessary.
● ERROR = 2: error
Less than 16 interpolation points were available for calcu- The D–FREI output indicates whether or not a PI or a
lation of the reversing tangent. Adaption is aborted. Rem- PIDT1 controller is necessary.
edy: Reduce the cycle time.
● ERROR = 3: error
The following applies:
The delay time TU lies outside of the permissible value
range (TU < 0). Adaption is aborted.
Remedy: Consult ABB.
W READY
X ERROR
Ypt1 ADAPT Y
START
CONTROLLER PARAMETERS
KP
TN/TZ
TV/TZ
T1/TZ
LABEL 1 AWT
Yk Y
READY
(negated)
PDM Ys
TA/TZ = 5 Yb
Y BINARY
YR WORD
Current manipulated variable of the controller at the start Excitation signal (manipulated variable) for the controlled
of adaption. system during adaption.
INIT WORD
START BINARY
Start input. Initial value for the controller after termination of adaption.
KP WORD
0/1–edge: start of adaption.
1/0–edge: abort adaption.
Proportional coefficient: This is output as a percentage.
Ready message. Integral action time, scaled through the PLC cycle time
TZ.
1–Signal reports regular termination of adaption.
TV/TZ WORD
ERROR WORD
Derivative action time, scaled to the PLC cycle time TZ.
Fault message.
T1/TZ WORD
● ERROR = 1: Error
At the start of adaption the controlled variable difference Returning time, scaled to the PLC cycle time TZ.
is less than the minimum value MINXD = 3843. Adaption
is aborted. D–FREI BINARY
Remedy: Increase the initial controlled deviation.
Enabling for the controller’s D component. This output is
● ERROR = 2: Error
used to decide whether a PI or PIDT1 controller is re-
Less than 16 interpolation points were available for calcu-
quired.
lation of the reversing tangent. Adaption is aborted. Rem-
D–FREI = 0 –> PI controller
edy: Reduce the cycle time.
D–FREI = 1 –> PIDT1 controller
● ERROR = 3: Error
The delay time TU lies outside the permissible value KS WORD
range (TU < 0). Adaption is aborted.
Remedy: Consult ABB. Gain of the controlled system.
EXAMPLE
FBD/LD IL
CE FBD Definition
not defined *)
CE IL Definition
not defined *)
!BA 0
ADRWA ADRWA
E E
#n #n
EC0 E=EC EC0
AT0 ADR AT0
E=EC
ADR
____________________________________________________________________________________________
Parameters
E WORD EW, AW, MW, KW Input value
#n DIRECT #, #H Quantity EC or AT
CONSTANT
EC0 WORD EW, AW, MW, KW Input code; input can be duplicated
AT0 WORD EW, AW, MW, KW Output table, input is also duplicated with EC0
E=EC BINARY A, M Input value = input code
ADR WORD AW, MW indirect address
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 44 µs
Additional runtime: 8 µs per operand EC0..ECn–1
Output updating: no; recommendation: Allocate the output directly to a flag or use a global
intermediate flag; see volume 3, chapter 2.5.3
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
● If the value at the input E agrees with one of the values ● If the value at the input E agrees with one of the values
at the inputs EC0 ... ECn–1: at the inputs EC0...ECn–1:
– The output E=EC is set to 1 (hit), – The output E=EC is set to 1 (hit).
– The allocated operand is selected from the output – The allocated operand is selected from the output
table AT0...ATn–1. table AT0...ATn–1 and its indirect address is gene-
rated.
● If the value at the input E does not agree with one of the
values at the inputs EC0...ECn–1: ● If the value at the input E does not agree with one of the
– The output E=EC is set to 0 (no hit) values at the inputs EC0...ECn–1:
– no operand is selected from the output table – the output E=EC is set to 0 (no hit)
AT0...ATn–1: – no operand is selected from the output table AT0...
ATn–1 and accordingly no indirect address is genera-
Convention for allocation between EC0...ECn–1 and
ted either.
AT0...ATn–1:
EC0 –> AT0 #n DIRECT CONSTANT
EC1 –> AT1 The number of the planned inputs EC0...ECn–1 is speci-
. . fied at the input #n. It is specified as a direct constant.
. . Example: The following are planned: EC0, EC1, EC2 –>
ECn–1 –> ATn–1 #n = 3.
E=EC BINARY
The output E=EC indicates whether or not the value at the
input E agrees with one of the values at the inputs
EC0...ECn–1.
E=EC = 0 –> No agreement
E=EC = 1 –> The value at the input E agrees with
one of the values at the inputs
EC0...ECn–1.
ADR WORD
Together with its value, the operand at the ADR output
represents an indirect address. This is the indirect ad-
dress of the operand selected from the output table
AT0...ATn–1. The indirect address is produced by virtue
of the fact that the address of the selected operand is allo-
cated as a value to the operand at the output ADR.
If no agreement between the input E and the inputs
EC0...ECn–1 is determined during comparison, then no
indirect address is generated either. Therefore, no value
is allocated to the ADR output. In this case, the ADR out-
put is not updated.
ADRWA
E
#n
MW 3,2 is EC0 AWM
selected EC1
EC2 E=EC
ADR Indirect address ADR
MW 3,1 AT0 of MW 3,2 Value of
–> MW 3,2 AT1 A
MW 3,2
MW 4,5 AT2
The value of the
flag MW 3,2 is
read by indirect
addressing and
is output through
the output A
ADRWA
E
#n
MW 4,5 is EC0 USM
selected EC1
EC2 E=EC
ADR Indirect address ADR
MW 3,1 AT0 of MW 4,5
MW 3,2 AT1
–> MW 4,5 AT2
Value to be
allocated to E
MW 4,5
The value at
the input E is
allocated to the
flag MW 4,5 by
means of
indirect
addressing
Example
FBD/LD IL
!BA 0
ADRWA ADRWA
EW 02,00 E
EW 02,00
# 3 #n
# 3
MW 08,00 EC0 E=EC A 00,01
MW 08,00
MW 08,01 EC1 ADR AW 01,00
MW 08,02 EC2 MW 08,01
MW 09,00 AT0 MW 08,02
MW 09,01 AT1 MW 09,00
MW 09,02 AT2 MW 09,01
MW 09,02
A 00,01
AW 01,00
CE FBD Definition
ADRWA
E
#n
EC E=EC
AT ADR
E E W N P Y 0 0
#n K W N P Y 0 0
EC E W N P Y 1 0
AT E W N P Y 1 0
E=EC A L N P Y 0 0
ADR A W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 ADRWA
00002 PP 0 E Input WORD (Input value)
00003 PP 0 #n Input WORD (Number of ECs and ATs)
[ 1
00004 PP 0 EC Input WORD (Input code)
] 1
[ 1
00005 PP 0 AT Input WORD (output table)
] 1
00006 PP 0 E=EC Output BINARY (Input value=Ecode)
00007 PP 0 ADR Output WORD (operand address)
FBD/LD IL
!BA 0
AINIT AINIT AINIT
0/1 DONE M 00,00 0/1 DONE A 00,00 M 00,00
TO ERR KW 01,00 TO ERR A 00,01 KW 01,00
NODE NODE MW 00,00 A 00,00
STAT STAT MW 00,01 A 00,01
DIAG DIAG MW 00,02 MW 00,00
TOS TOS A 00,02 MW 00,01
TOND TOND MW 00,03 MW 00,02
TOJN TOJN MW 00,04 A 00,02
LEV LEV MW 00,05 MW 00,03
RECO RECO M 01,00 MW 00,04
MW 00,05
M 01,00
Parameters
0/1 BINARY E, M, A, K, S Initialization of the ARCnet controller with 0/1 edge
TO WORD EW, MW, AW, KW Timeout in ms when sending data packages
DONE BINARY A, M Initialization terminated
ERR BINARY A, M Error has occurred
NODE WORD AW, MW Own node number (station address)
STAT WORD AW, MW Status register of the ARCnet controller
DIAG WORD AW, MW Diagnosis register of the ARCnet controller
TOS BINARY A, M Timeout has occurred during send operation
TOND WORD AW, MW Node number of lost data package after timeout
TOJN WORD AW, MW Job number of lost data package after timeout
LEV WORD AW, MW Level of the send buffer
RECO BINARY A, M Network reconfiguration is running (after loss of token)
The outputs STAT, DIAG, TOS, TOND, TOJN, LEV and RECO are updated after a successful initialization with each
block call.
____________________________________________________________________________________________
DIAG WORD
The output DIAG indicates the content of the diagnosis
register of the ARCnet controller after a successful initiali- The inputs and outputs can neither be duplicated nor in-
zation. verted.
____________________________________________________________________________________________
CE data
Runtime: 07 KT 92 / 07 KT 63
Basic runtime: 73...161 µs, typ. 93 µs
Additional runtime: none
Updating of the outputs: yes
Number of the historical values: 1 word
Available as of: ABB Procontic CS31, 07 KT 92 R262, 07 KT 93 R171
!BA 0
AMELD AMELD
FREI FREI
R NR R
#n A #n
E0 ÄND E0
NR
A
ÄND
____________________________________________________________________________________________
Parameters
FREI BINARY A, E, M, S, K Block enabling
R BINARY A, E, M, S, K Reset
#n DIRECT #, #H Number of input values
CONSTANT
E0 WORD EW, AW, MW, KW Input values: Input can be duplicated
NR WORD AW, MW Number of the input value
A WORD AW, MW Current input value
ÄND BINARY A, M Change detected
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 57 µs
Additional runtime: 31 µs per input E0...En–1
Output updating: yes, if FREI = 1
Number of historical values: #n + 3 words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
FREI BINARY
Processing of the block is enabled with the FREI input.
FREI = 0 –> Block is not processed
FREI = 1 –> Processing of the block is enabled
R BINARY
The block can be reset with the R input.
R = 0 –> No reset
R = 1 –> Reset of the block
Reset signifies:
– Adoption of the current values at the inputs
E0...En–1 as historical values.
– All outputs are set to the value 0
#n DIRECT CONSTANT
The number of values to be monitored at the inputs
E0...En–1 is specified at the input #n. The number is spe-
cified as a direct constant.
Range for #n: 1 < #n < 127
E0...En–1 WORD
The input E0 can be duplicated (E0...En–1).
The operands to be monitored for a change are specified
at the inputs E0...En–1.
NR WORD
The serial number of the input E0...En–1 where a change
has been discovered is output through the output NR.
If no output change is discovered during processing of the
block, the number of the input changing last is still output
through the output NR.
The following affiliations apply:
Change discovered at E0 –> NR = 0
Change discovered at E1 –> NR = 1
Change discovered at En–1 –> NR = n–1
A WORD
If a change is discovered at one of the inputs E0...En–1,
the changing input value is allocated to the output A.
If no change is discovered at the inputs E0...En–1 during
processing of the block, the value of the input changing
last is still output through the output A.
ÄND BINARY
The output ÄND indicates whether or not a change has
been discovered at the inputs E0...En–1.
ÄND = 0 –> No change discovered
ÄND = 1 –> Change discovered
Example
FBD/LD IL
!BA 0
AMELD AMELD
E 00,01 FREI E 00,01
M 00,06 R NR AW 01,01 R 00,06
# 4 #n A MW 01,07 # 4
MW 09,00 E0 ÄND A 00,03 MW 09,00
MW 09,01 E1 MW 09,01
MW 09,02 E2
MW 09,02
MW 09,03 E3
MW 09,03
AW 01,01
MW 01,07
A 00,03
CE FBD Definition
AMELD
FREI
R NR
#n A
E ÄND
FREI E L N P Y 0 0
R E L N P Y 0 0
#n K W N P Y 0 0
E E W N P Y 1 0
NR A W N P Y 0 0
A A W N P Y 0 0
ÄND A L N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 AMELD
00002 PP 0 FREI Input BINARY (block enable)
00003 PP 0 R Input BINARY (Reset)
00004 PP 0 #n # CONSTANT (Number of input values)
[ 1
00005 PP 1 E Input WORD (input values)
] 1
00006 PP 0 NR Output WORD (No.)
00007 PP 0 A Output WORD (current input value)
00008 PP 0 ÄND Output BINARY (change detected)
!BA 0
AMELDD AMELDD
FREI FREI
R NR R
#n A #n
E0 ÄND E0
NR
A
ÄND
____________________________________________________________________________________________
Parameters
FREI BINARY A, E, M, S, K Block enable
R BINARY A, E, M, S, K Reset
#n DIRECT #, #H Number of input values
CONSTANT
E0 DOUBLE WORD MD, KD Input values; input can be duplicated
NR WORD AW, MW Number of the input value
A DOUBLE WORD MD Current input value
ÄND BINARY A, M Change detected
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 64 µs
Additional runtime: 41 µs per input E0 ... En–1
Output updating: yes if FREI = 1
Number of historical values: (2 * #n) + 4 words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Example
FBD/LD IL
!BA 0
AMELDD AMELDD
E 00,01 FREI E 00,01
M 00,06 R NR AW 01,01 R 00,06
# 4 #n A MD 01,00 # 4
MD 00,00 E0 ÄND A 00,03 MD 00,00
MD 00,01 E1 MD 00,01
MD 00,02 E2
MD 00,02
MD 00,03 E3
MD 00,03
AW 01,01
MD 01,00
A 00,03
CE FBD Definition
AMELDD
FREI
R NR
#n A
E ÄND
FREI E L N P Y 0 0
R E L N P Y 0 0
#n K W N P Y 0 0
E E D N P Y 1 0
NR A W N P Y 0 0
A A D N P Y 0 0
ÄND A L N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 AMELDD
00002 PP 0 FREI Input BINARY (block enable)
00003 PP 0 R Input BINARY (Reset)
00004 PP 0 #n # CONSTANT (number of input values)
[ 1
00005 PP 1 E Input DOUBLE WORD (input values)
] 1
00006 PP 0 NR Output WORD (No.)
00007 PP 0 A Output DOUBLE WORD (current input value)
00008 PP 0 ÄND Output BINARY (change detected)
FBD/LD IL
Parameters
EW WORD EW, MW Direct analog input
Description
The connection element ANAI4_20 is intended for read- EW WORD Direct analog input
ing current values of a 4...20 mA range. It is used with the The input EW is assigned to the analog input to be read.
direct analog inputs EW06,00...EW06,03 of the central
unit 07 KT 92. The input range of 4...20 mA is converted AW WORD Analog value in internal
into an internal numerical range of 0...32760. There is representation
also an open-circuit monitoring. The word output AW provides the analog signal con-
verted into the internal numerical range. In case of an
open circuit the output is set to 0. The diagram 1 shows
The analog inputs, which the connection element
the relationship between the input current at the direct
ANAI4_20 is used for, have to be configured as current
analog input and the output value at AW.
inputs. A separate connection element ANAI4_20 is re-
quired for each 4...20 mA current input. ERR BINARY Open-circuit monitoring
The binary output ERR indicates a signal 1 if the connec-
The analog inputs are designed for currents of 0...20 mA. tion element ANAI4_20 has detected an open-circuit. If
The analog input words EW06,00...EW06,03 generate the input current of an analog input of the 07 KT 92 is low-
values of a 0...32760 range corresponding to 0...20 mA. er than 3.6 mA, the open-circuit monitoring assumes an
The connection element ANAI4_20 transforms the nu- open-circuit (see diagram 2). AW is set to 0, if an open-cir-
merical range at EW of 6552...32760 = 4...20 mA into a cuit is detected.
numerical range of 0...32760 at AW.
One step of the output value AW then amounts to
10 = 0.004883 mA. An input value at EW which is lower
than 6552 = 4 mA leads to an output value at AW of 0.
32760
Numerical value at AW
24570
16380
8190
0 4 10 15 20
Input current / mA
Diagram 1: Relationship between the input current at the direct analog input and the output value AW
1
Open-circuit
ERR 0
0 4 10 15 20
3.6 Input current / mA
Diagram 2: The output ERR indicates an open-circuit signal if the input current is lower than 3.6 mA
CE Data
Runtime:
Basic runtime: 180 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Used operands:
Local word flags: 7
Available as of: ABB Procontic CS31 / 907 PC 331 R202
FBD/LD IL
CE data
Runtime: 07 KT 92 / 07 KT 93
Basic runtime: 40 µs
Additional runtime: 47...187 µs
Updating of the outputs: –––
Number of the historical values: 0 words
Available as of: ABB Procontic CS31, 07 KT 92 R262, 07 KT 93 R171
FBD/LD IL
Parameters
#JOB DIRECT #, #H Total number of jobs configured in the block
CONSTANT
N0 WORD EW, MW, AW, KW Node number (station address) of the sender
#D0 DIRECT #, #H DIN identification
CONSTANT
#J0 DIRECT #, #H Job number
CONSTANT
#L0 DIRECT #, #H Number of words of the user data to be received
CONSTANT
MW0 WORD EW, MW, AW, KW First word variable, as of the received user data are
stored
UJOB BINARY A, M Unknown job received
JR0 BINARY A, M Job received
The inputs N0, #D0, #J0, #L0 and MW0 as well as the output JR0 can be duplicated as blocks.
____________________________________________________________________________________________
The ARCnet controller must have been initialized by the #J0 DIRECT CONSTANT
function block AINIT before data packages can be read The job number is specified for the configured job at input
from the storage buffer by the function block AREC. #J0.
The following is valid: –32767 < #J < +32767
Important note:
If a PLC is used with an ARCnet interface, a certain sec-
tion of the PLC TURBO program memory No. 2 is re- #L0 DIRECT CONSTANT
served for ARCnet. The number of user data words is specified for the confi-
If programs with more than 2 k instructions are executed, gured job at input #L0.
the system-dependent capacity utilization can possibly The following is valid: 0 < #L < 125
be increased by reason of the reduced TURBO memory MW0 WORD
No. 2 when changes are made to a running program. The starting word flag of the user data is specified for the
There are no problems, if configured job at input MW0.
● the capacity utilization is less than 80 % before
making changes to a running program or if
● the program length is less than 2 k instructions. UJOB BINARY
Output UJOB indicates that a data package was stored in
the storage buffer which could not be assigned to any job.
#JOB DIRECT CONSTANT The following applies:
The total number of jobs configured in this function block UJOB = 1: unknown job received
is assigned to the input #JOB. UJOB = 0: no unknown job received
The following is valid: 1 < #JOB
JR0 BINARY
Output JR0 (job received) indicates that a data package
N0 WORD from the storage buffer has been assigned to this job. The
The node number (station address) of the sender is speci- user data of the data package are stored continuously be-
fied for the configured job at input NO. ginning from the word variable MW0.
The following is valid: 0 < N0...Nn–1 < 255 The following applies:
JR0 = 1: job received
JR0 = 0: no job received
#D0 DIRECT CONSTANT
The DIN identification is specified for the configured job at
input #D0. Note
The following is valid: 0 < #D < 127 Neither the inputs nor the outputs can be inverted. The in-
not allowed: 111 (6FH) puts N0, #D0, #J0, #L0 and MW0 and the output JR0 can
be duplicated as a block.
LB HB LB HB LB HB
Sender Receiver CP DN
JN JN NW1 NW1 NW2 NW2
0 1 2 F9H FAH FBH FCH FDH FEH FFH
Position
CE data
Runtime: 07 KT 92 / 07 KT 93
Basic runtime: (97 + 8 * #JOB) µs
Additional runtime: ((52...178 + 16 * #JOB) * #JOB) µs
Updating of the outputs: no
Number of the historical values: 0 words
Available as of: ABB Procontic CS31, 07 KT 92 R262, 07 KT 93 R171
FBD/LD IL
!BA 0
ASEND ASEND ASEND
#JOB #3 #JOB #3
EN M 01,00 EN M 01,00
#n #1 #n #1
N0 Job 1 KW 01,00 N0 Job 1 KW 01,00
#D #127 #D #127
#J #20 #J #20
#L ST #4 #L ST M 00,00 #4
MW MW10,00 MW MW 10,00
M 00,00
M 01,00
ASEND+ ASEND+ #3
KW 01,01
EN M 01,00 EN KW 01,02
#n #3 #n KW 01,03
N0 Job 2 KW 01,01 N0 Job 2 #127
#D KW 01,02 N1 #21
#J KW 01,03 N2 #12
#L ST #127 #D ST M 00,01 MW 10,04
MW #21 #J M 00,01
#12 #L
MW10,04 MW
:
: M 01,00
ASEND+ #2
: KW 01,04
M 01,00 EN KW 01,05
#2 #n #127
ASEND+ KW 01,04 N0 Job 3 #22
KW 01,05 N1 #16
EN #127 #D MW 11,00
#n #22 #J M 00,02
#16 #L ST M 00,02
N0 Job n MW11,00 MW
#D
#J
#L ST
MW
Parameters
#JOB DIRECT #, #H Total number of jobs configured in the block
CONSTANT
EN BINARY E, M, A, K, S Enable: Send job
0: do not send
0/1 edge: send
1: send only if user data have changed
#n DIRECT #, #H Number of receivers of the data package;
CONSTANT the following applies: 1 < #n < 15
N0 WORD EW, MW, AW, KW Node number (station address) of the
receiver. The input can be duplicated.
#D DIRECT #, #H DIN identification
CONSTANT
#J DIRECT #, #H Job number
CONSTANT
#L DIRECT #, #H Number of user data words to be sent
CONSTANT
MW WORD EW, MW, AW, KW First word variable of the user data words
ST BINARY A, M Job has been stored in the storage buffer
Description For the same reason, the output ST may not be con-
nected by a line with another CE. A variable must always
The ASEND function block is intended for sending off jobs be defined at the output ST.
(data packages) via the ARCnet network. The configured
jobs are stored in a buffer storage. From here, they are
transferred to the ARCnet controller for sending off. The ASEND+ blocks only exist in FBD. During the translation,
transport from the buffer storage to the ARCnet controller the ASEND block and all the following ASEND+ are com-
is managed by the APOLL function block. The transport is bined into one ASEND–IL function block.
also carried out by the operating system in the idle period
between two PLC cycles. The ARCnet controller must have been initialized by the
function block AINIT before data packages can be stored
The maximum size of the storage buffer is 31 data pack- in the storage buffer by the function block ASEND.
ages.
The output ST indicates that the configured job has been Important note:
stored in the storage buffer.
If a PLC is used with an ARCnet interface, a certain sec-
Important note tion of the PLC TURBO program memory No. 2 is re-
served for ARCnet.
A user program must not contain more than one block
call of ASEND. If more than one job have to be sent off,
the ASEND block must be extended by the ASEND+ If programs with more than 2 k instructions are executed,
block. For each further job, one ASEND+ must be confi- the system-dependent capacity utilization can possibly
gured in the FBD directly following ASEND. be increased by reason of the reduced TURBO memory
No. 2 when changes are made to a running program.
ASEND+ is only an extension block for ASEND, but not
autonomous. For that reason, all used ASEND+ blocks There are no problems, if
must be configured directly following an ASEND block or
then following each other. Under no circumstances may ● the capacity utilization is less than 80 % before
other CEs be inserted between ASEND and ASEND+ or making changes to a running program or if
ASEND+ and a following ASEND+ respectively. ● the program length is less than 2 k instructions.
LB HB LB HB LB HB
Sender Receiver CP DN
JN JN NW1 NW1 NW2 NW2
0 1 2 F9H FAH FBH FCH FDH FEH FFH
Position
CE data
Runtime: 07 KT 92 / 07 KT 93
Basic runtime: (21 + 22 * #JOB) µs
Additional runtime: (106...360 * #JOB) µs
Updating of the outputs: yes
Number of the historical values: #JOB words
Available as of: ABB Procontic CS31, 07 KT 92 R262, 07 KT 93 R171
____________________________________________________________________________________________
Parameters
0 I IT BINARY E, M, A, S, K Input signal
ZD DOUBLE WORD MD, KD Delay time
Q BINARY M, A Delayed signal
____________________________________________________________________________________________
Description
The 1–0 edge of the input 0I I T is delayed by the time ZD
and is output as a 1–0 edge at the output Q. 0 T
Initialization
EXAMPLE
FBD/LD IL
!BA 0
ASV ASV
E 01,00 0I IT E 01,00
KD 03,00 ZD Q M 07,02 KD 03,00
M 07,02
CE FBD Definition
ASV
0I IT
ZD Q
0I IT E L N P Y 0 0
ZD E D N P Y 0 0
Q A L N P Y 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
ADR WORD EW, AW, MW, KW Indirect address of the operand to be read
A WORD AW, MW Value of the operand read
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 26 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
This function block reads the value of an operand, using
the method of indirect addressing. The value read is allo-
cated to the output A
Note: The AWM block can only be used meaningfully in
conjunction with the ADRWA block.
The value of the operand at the input ADR is interpreted
as an address of the operand to be read (indirect addres-
sing).
Example
FBD/LD IL
!BA 0
AWM AWM
AW 09,00
AW 09,00 ADR MW 00,03 MW 00,03
CE FBD Definition
AWM
ADR A
ADR E W N P Y 0 0
A A W N P N 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 AWM
00002 PP 0 ADR Input WORD (operand address)
00003 PP 0 A Output WORD (operand value)
____________________________________________________________________________________________
Parameters
Description
A 0 signal at the binary input 0/1 allocates the value of the
word operand at the input 0 to the word operand at the
output A1.
Example
FBD/LD IL
!BA 0
AWT AWT
E 01,00 0/1 E 01,00
EW 01,01 0 EW 01,01
EW 01,02 1 MW 08,15 EW 01,02
MW 08,15
CE FBD Definition
AWT
0/1
0
1 A1
0/1 E L N P Y 0 0
0 E W N P Y 0 0
1 E W N P Y 0 0
A1 A W N P N 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
0/1 BINARY E, M, A, S, K Switchover input
0 BINARY E, M, A, S, K Binary input for 0/1 = 0
1 BINARY E, M, A, S, K Binary input for 0/1 = 1
A1 BINARY A, M Binary output
____________________________________________________________________________________________
Description
A 0 signal at the binary input 0/1 allocates the status of the
operand at the input 0 to the operand at the output A1.
Example
FBD/LD IL
!BA 0
AWTB AWTB
E 01,00 0/1 E 01,00
E 01,01 0 E 01,01
E 01,02 1 M 08,15 E 01,02
M 08,15
CE FBD Definition
AWTB
0/1
0
1 A1
0/1 E L N P Y 0 0
0 E L N P Y 0 0
1 E L N P Y 0 0
A1 A L N P N 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
0/1 BINARY E, M, A, S, K Switchover input
0 DOUBLE WORD MD, KD Double word input for 0/1 = 0
1 DOUBLE WORD MD, KD Double word input for 0/1 = 1
A1 DOUBLE WORD MD Double word output
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 41 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
A 0 signal at the binary input 0/1 allocates the value of the
double word operand at the input 0 to the double word op-
erand at the output A1.
Example
FBD/LD IL
!BA 0
AWTD AWTD
E 01,00 0/1 E 01,00
MD 01,01 0 MD 01,01
KD 01,02 1 MD 08,15 KD 01,02
MD 08,15
CE FBD Definition
AWTD
0/1
0
1 A1
0/1 E L N P Y 0 0
0 E D N P Y 0 0
1 E D N P Y 0 0
A1 A D N P N 0 0
CE IL Definition
!BA 0
BCDDUAL BCDBIN
BCD DUAL BCD
DUAL
____________________________________________________________________________________________
Parameters
BCD WORD EW, MW, AW, KW BCD–coded number
DUAL WORD AW,MW Binary number
____________________________________________________________________________________________
Description Example 1
The positive BCD coded number at the input BCD is con- BCD NUMBER HEXDEC NUMBER
verted to a binary number and is allocated to the operand
at the DUAL output.
15 11 7 3 0 BIT 15 11 7 3 0
The input and the output can neither be duplicated nor ne-
gated. 1 2 3 4 0 4 D 2
Definition:
15 11 7 3 0 BIT 15 11 7 3 0
Example 2
Z4 Z3 Z2 Z1 Z4 Z3 Z2 Z1
BCD NUMBER HEXDEC NUMBER
Numerical value: Numerical value:
Z1 1 Z1 1 15 11 7 3 0 BIT 15 11 7 3 0
* *
Z2 * 10 Z2 * 16
Z3 * 100 Z3 * 256 A 2 F 4 2 8 7 2
Z4 * 1000 Z4 * 4096
0 < Zi < 9 0 < Zi < F
Note: Z1 = 4 *1 = 4 Z1 = 2 *1 = 2
Z2 = 15 * 10 = 150 Z2 = 7 * 16 = 112
Z3 = 2 * 100 = 200 Z3 = 8 * 256 = 2048
At the BCD input, the block additionally also accepts dig- Z4 = 10 * 1000 = 10000 Z4 = 2 * 4096 = 8192
its to which the following applies:
+ 10354 + 10354
0 < Zi < F
Example:
● Negative: 1
Sign AWT
Value BCDDUAL M 01,00 0/1
MW 02,00 BCD DUAL 0
positive BINARY
Example
FBD/LD IL
!BA 0
BCDDUAL BCDBIN
MW 07,02 BCD DUAL MW 07,03 MW 07,02
MW 07,03
CE FBD Definition
BCDDUAL
BCD DUAL
BCD E W N P Y 0 0
DUAL A W N P Y 0 0
CE IL Definition
!BA 0
BCDDUALD BCDDW
BCD DUAL BCD
DUAL
____________________________________________________________________________________________
Parameters
BCD DOUBLE WORD MD, KD BCD coded number
DUAL DOUBLE WORD MD Binary number
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 310 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description Note:
The positive BCD coded number at the input BCD is con- The block also accepts digits at the BCD input to which
verted to a binary number and is allocated to the operand the following applies:
at the DUAL output.
0 < Zi < F
The input and the output can neither be duplicated nor ne-
gated. Representation of a negative BCD number
See function block BCDDUAL
Definition
The significance of the digits in a BCD coded number and Conversion of a negative BCD number to a negative
a hexadecimal number is defined as follows: binary number
See function block BCDDUAL
BINARY NUMBER HEXDEC NUMBER
31 15 0 BIT 31 15 0
Z8 Z7 Z6 Z5 Z4 Z3 Z2 Z1 Z8 Z7 Z6 Z5 Z4 Z3 Z2 Z1
Z1 * 1 Z1 * 1
Z2 * 10 Z2 * 16
Z3 * 100 Z3 * 256
Z4 * 1000 Z4 * 4096
Z5 * 10000 Z5 * 65536
Z6 * 100000 Z6 * 1048576
Z7 * 1000000 Z7 * 16777216
Z8 * 10000000 Z8 * 268435456
Example 1: Example 2:
31 15 0 BIT 31 15 0 31 15 0 BIT 31 15 0
1 2 3 4 5 6 7 8 0 0 B C 6 1 4 E 1 B 3 4 A 2 F 4 0 1 4 5 C 7 D 2
Z1 = 8 *1 = 8 Z1 =14 * 1 = 14 Z1 = 4 * 1 = 4 Z1 = 2 * 1 = 2
Z2 = 7 * 10 = 70 Z2 = 4 * 16 = 64 Z2 = 15 * 10 = 150 Z2 =13 * 16 = 208
Z3 = 6 * 100 = 600 Z3 = 1 * 256 = 256 Z3 = 2 * 100 = 200 Z3 = 7 * 256 = 1792
Z4 = 5 * 1000 = 5000 Z4 = 6 * 4096 = 24576 Z4 = 10 * 1000 = 10000 Z4 =12 * 4096 = 49152
Z5 = 4 * 10000 = 40000 Z5 =12 * 65536 = 786432 Z5 = 4 * 10000 = 40000 Z5 = 5 * 65536 = 327680
Z6 = 3 * 100000 = 300000 Z6 = 11 * 1048576 = 11534336 Z6 = 3 * 100000 = 300000 Z6 = 4 * 1048576 = 4194304
Z7 = 2 * 1000000 = 2000000 Z7 = 0 * 16777216 = 0 Z7 = 11 * 1000000 = 11000000 Z7 = 1 * 16777216 = 16777216
Z8 = 1 * 10000000 = 10000000 Z8 = 0 * 268435456 = 0 Z8 = 1 * 10000000 = 10000000 Z8 = 0 * 268435456 = 0
Example
FBD/LD IL
!BA 0
BCDDUALD BCDDW
KD 01,00 BCD DUAL MD 02,00 KD 01,00
MD 02,00
CE FBD Definition
BCDDUALD
BCD DUAL
BCD E D N P Y 0 0
DUAL A D N P Y 0 0
CE IL Definition
!BA 0
BEG BEG
E1 E1
OG OG
UG A1 UG
A1
____________________________________________________________________________________________
Parameters
E1 WORD EW, MW, AW, KW Input value
OG WORD EW, MW, AW, KW High limit
UG WORD EW, MW, AW, KW Low limit
A1 WORD AW, MW Limited value
____________________________________________________________________________________________
CE Data 07 KR 91 / 07 KT 92 / 07 KT 93 07 KR 31
Runtime:
Basic runtime: 32...35 µs 147 µs
Additional runtime: ––– –––
Output updating: yes yes
Number of historical values: none none
Available as of: ABB Procontic CS31 / 907 PC 331 907 PC 331 / 07 KR 31 V 1.0
____________________________________________________________________________________________
Description A1
Example
FBD/LD IL
!BA 0
BEG BEG
MW 05,00 MW 05,00
KW 03,01 OG KW 03,01
KW 03,02 UG MW 09,10 KW 03,02
MW 09,10
CE FBD Definition
BEG
E1
OG
UG A1
E1 E W N P N 0 0
OG E W N P Y 0 0
UG E W N P Y 0 0
A1 A W N P N 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 BEG
00002 PP 0 E1 Input WORD (input value)
00003 PP 0 OG Input WORD (high limit)
00004 PP 0 UG Input WORD (low limit)
00005 PP 0 A1 Output WORD (limited value)
!BA 0
BEGD BEGD
E1 E1
OG OG
UG A1 UG
A1
____________________________________________________________________________________________
Parameters
E1 DOUBLE WORD MD, Input value
OG DOUBLE WORD MD, KD High limit
UG DOUBLE WORD MD, KD Low limit
A1 DOUBLE WORD MD Limited value
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 30 ... 38 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description A1
Example
FBD/LD IL
!BA 0
BEGD BEGD
MD 05,00 MD 05,00
KD 03,01 OG KD 03,01
KD 03,02 UG MD 09,10 KD 03,02
MD 09,10
CE FBD Definition
BEGD
E1
OG
UG A1
E1 E D N P N 0 0
OG E D N P Y 0 0
UG E D N P Y 0 0
A1 A D N P N 0 0
CE IL Definition
!BA 0
BETR
BETR E1
E1 A1 A1
____________________________________________________________________________________________
Parameters
E1 WORD EW, MW, AW, KW Input value
A1 WORD MW, AW Absolute value of the input value
____________________________________________________________________________________________
Example
FBD/LD IL
!BA 0
BETR
BETR EW 00,00
EW 00,00 AW 02,00 AW 02,00
CE FBD Definition
BETR
E1 A1
E1 E W N P N 0 0
A1 A W N P N 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 BETR
00002 PP 0 E1 Input WORD
00003 PP 0 A1 Output WORD
!BA 0
BETRD
BETRD E1
E1 A1 A1
____________________________________________________________________________________________
Parameters
CE Data
Runtime:
Basic runtime: 32 ... 36 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
The input and the output can neither be duplicated nor ne-
gated.
Example
FBD/LD IL
!BA 0
BETRD
BETRD MD 00,00
MD 00,00 MD 02,00 MD 02,00
CE FBD Definition
BETRD
E1 A1
E1 E D N P N 0 0
A1 A D N P N 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 BETRD
00002 PP 0 E1 Input DOUBLE WORD
00003 PP 0 A1 Output DOUBLE WORD
!BA 0
BITSU BITSU
R R
R/V R/V
#ANZ END #ANZ
ANF NR ANF
BIT POS BIT
END
NR
POS
____________________________________________________________________________________________
Parameters
R BINARY A, E, M, S, K Reset of the block and new search
R/V BINARY A, E, M, S, K Search direction, up/down
#ANZ DIRECT #, #H Field length, number of word operands
CONSTANT
ANF WORD EW, AW, MW, KW Field start, 1st word operand
BIT WORD EW, AW, MW, KW Number of set bits to be skipped
END BINARY A, M Field end reached
NR WORD AW, MW Number of the word operand containing the set bit
POS WORD AW, MW Bit position within the word operand
____________________________________________________________________________________________
_________
CE Data
Runtime:
Basic runtime: 136 µs
Additional runtime: 26 µs per word variable
Ouput updating: yes
Number of historical values: 9 words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description After the start of the PLC program (1st program cycle),
the block sets all outputs to the value 0 and immediately
This function block searches through a bit field for a set begins searching for set bits. Therefore, the search is al-
bit. The bit field consists of successive word operands. If ready active in the first program cycle.
a set bit is found, this is indicated at the block’s outputs. If the block finds a set bit, its position is indicated at the
block’s outputs and the search is ended. The next time
The inputs and outputs can neither be duplicated nor ne- the block is called in the next program cycle, it conti-nues
gated/inverted. the search, doing so at the bit position directly following
the bit found last. If the end of the bit field is reached dur-
The bit field consists of successive word operands. The ing the search, this is indicated and a new search can be
first word operand in the bit field is specified at the input started again by means of a reset signal. The new search
ANF. again begins at the start of the bit field.
R/V BINARY
The searching direction is specified at the input R/V. – Special function: BIT = 0
R/V = 0 –> Search down If the block finds a set bit, in the next program cycle the
R/V = 1 –> Search up search is not automatically continued at the subse-
quent bit position. The search is interrupted at this point
R/V = 0 means: The start of the bit field within the mea- until the bit found has assumed the significance 0. Dur-
ning of the search is identical with the ing interruption of the search, the position of the bit
physical start of the bit field. found last continues to be indicated at the outputs. If
R/V = 1 means: The start of the bit field within the mea- the bit found last assumes the value 0, the search is
ning of the search is identical with the continued at the next bit position. If a further bit is set in
physical end of the bit field. the selected search direction, this bit’s position is indi-
cated and the search is interrupted again.
If no more bits are set in the search direction, the posi-
#ANZ DIRECT CONSTANT
tion of the bit found last is indicated. The output END
The number of word operands of which the bit field con-
sists is specified at the input #ANZ. This is specified as a (field end reached) is set to 1.
direct constant.
– If no bits are set after a reset, the block runs through the
ANF WORD bit field up to its end and stops there. The output END
The word operand with which the bit field physically be- (field end reached) is set to one. The outputs NR and
gins is specified at the input ANF. The entire bit field con- POS are set to 0.
sists of the operand at the input ANF and the subsequent
operands corresponding to the operand numbering. The
total number of word operands is specified at the input – If bits are set after a reset, the block indicates the first
#ANZ. set bit in the search direction and stops at this bit.
END BINARY Position of the set bit within the word operand
Whether or not the end of the bit field has been reached Numbering within a word operand is from 0...15. At the
during the search is indicated at the END output. same time, position 0 corresponds to the least significant
END = 0 –> End of the bit field not reached bit and position 15 to the most significant bit within the
END = 1 –> End of the bit field reached word operand.
Search down: The end of the bit field is defined by bit If the end of the field is reached during a search without a
position 15 in the last word operand of set bit having been found, the position of the bit found last
the physical bit field. continues to be output through the output NR and the out-
put POS. This takes place until a new search is compelled
Search up: The end of the bit field is defined by bit from the start of the bit field by a reset at the input R.
position 15 in the first word operand of
the physical bit field. If no bits are set at all within the entire bit field, the outputs
If the bit is set at the last bit position of the field and it is assume the following values at the end of the first search:
found and indicated during a search, the output END is
not yet set to the value 1. This is not done until the next END =1
processing cycle of the block. Therefore, the prerequisite NR =0
for setting the output END is that no set bit has been found POS =0
during the current search.
This state can be terminated again by a 1 signal at the in-
put R (reset).
NR, POS WORD
If the block finds a set bit in the planned bit field, its posi-
tion is indicated at the outputs NR and POS.
Meanings:
NR: Current number of the word operand in
which the set bit has been found.
POS: Position of the set bit within the word ope–
rand.
Current number of the word operand
NR = 0 –> 1st word operand of the bit field
NR = 1 –> 2nd word operand of the bit field
. . .
. . .
NR = n–1 –> nth word operand of the bit field
Example
FBD/LD IL
!BA 0
BITSU BITSU
S 01,00 R S 01,00
K 01,05 R/V K 01,05
# 2 #ANZ END A 00,01 # 2
AW 10,10 ANF NR MW 01,00 AW 10,10
KW 13,00 BIT POS AW 02,01 KW 13,00
A 00,01
MW 01,00
AW 02,01
CE FBD Definition
BITSU
R
R/V
#ANZ END
ANF NR
BIT POS
R E L N P Y 0 0
R/V E L N P Y 0 0
#ANZ K W N P Y 0 0
ANF E W N P Y 0 0
BIT E W N P Y 0 0
END A L N P Y 0 0
NR A W N P Y 0 0
POS A W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 BITSU
00002 PP 0 R Input BINARY (reset)
00003 PP 0 R/V Input BINARY (search direction)
00004 PP 0 #ANZ DIRECT CONSTANT (#words field length)
00005 PP 0 ANF Input WORD (field start)
00006 PP 0 BIT Input WORD (number of set bits to be skipped)
00007 PP 0 END Output BINARY (field end reached)
00008 PP 0 NR Output WORD (No.)
00009 PP 0 POS Output WORD (bit position)
!BA 0
BMELD BMELD
FREI FREI
R NR R
#n A #n
E0 ÄND E0
NR
A
ÄND
____________________________________________________________________________________________
Parameters
FREI BINARY A, E, M, S, K Block enable
R BINARY A, E, M, S, K Reset
#n DIRECT #, #H Number of input values
CONSTANT
E0 BINARY A, E, M, S, K Input values; input can be duplicated
NR WORD AW, MW Number of the input value
A BINARY A, M Current input value
ÄND BINARY A, M Change detected
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 61 µs
Additional runtime: 31 µs per input E0 ... En–1
Output updating: yes if FREI=1
Number of historical values: even number of binary values: (2 + #n/2) words
odd number of binary values: (2 + (#n + 1)/2) words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Example
FBD/LD IL
!BA 0
BMELD BMELD
E 00,01 FREI E 00,01
M 00,06 R NR AW 01,01 M 00,06
# 4 #n A M 01,07 # 4
M 09,00 E0 ÄND A 00,03 M 09,00
M 09,01 E1 M 09,01
M 09,02 E2
M 09,02
M 09,03 E3
M 09,03
AW 01,01
M 01,07
A 00,03
CE FBD Definition
BMELD
FREI
R NR
#n A
E ÄND
FREI E L N P Y 0 0
R E L N P Y 0 0
#n K W N P Y 0 0
E E L N P Y 1 0
NR A W N P Y 0 0
A A L N P Y 0 0
ÄND A L N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 BMELD
00002 PP 0 FREI Input BINARY (block enable)
00003 PP 0 R Input BINARY (reset)
00004 PP 0 #n # CONSTANT (number of input values)
[ 1
00005 PP 1 E Input BINARY (input values)
] 1
00006 PP 0 NR Output WORD (No.)
00007 PP 0 A Output BINARY (current input value)
00008 PP 0 ÄND Output BINARY (change detected)
FBD/LD IL
Subroutine
Parameters
FREI BINARY E, M, A, K, S Block enable
#OFF DIRECT #, #H Offset address of the subroutine
CONSTANT
#SEG DIRECT #, #H Segment address of the subroutine
CONSTANT
#VGW DIRECT #, #H Number of historical values of the subroutine
CONSTANT
#VAR DIRECT #, #H Number of input/output variables of the subroutine
CONSTANT
E1 X E, M, A, K, S, EW, MW, Input variable (capable of duplication)
AW, KW, MD, KD
A1 X M, A, MW, AW,MD Output variable (capable of duplication)
After processing of the subroutine, the program branches #VAR DIRECT CONSTANT
back to the block. Before the subroutine is called, all reg-
isters are automatically saved and restored after the re- The total number of input and output variables of the sub-
turn. routine is specified at the input #VAR. Therefore, this is
the total of all E1...En and A1...An. This is specified as a
The input E1 and the output A1 are capable of duplication. direct constant.
The inputs and outputs can neither be negated nor in-
verted.
E1 BINARY, WORD, DOUBLE WORD
FREI BINARY
The input E1 is capable of duplication (E1...En).
Enable function block processing
FREI = 0: Block is not processed The input variables for the subroutine are specified at the
FREI = 1: Block is processed inputs E1...En. The subroutine performs “reading” ac-
cess to these variables. When the subroutine accesses
these variables, the assembler programmer must pay at-
#OFF DIRECT CONSTANT tention to the defined data format. Direct constants (value
#SEG DIRECT CONSTANT transfer) are not allowed at the inputs E1...En.
The start address of the assembler subroutine is speci-
fied at these two inputs. The start address consists of an
offset and a segment address. The offset and segment A1 BINARY, WORD, DOUBLE WORD
addresses are specified as direct constants. The output A1 can be duplicated (A1...An).
If the value “0” is specified as the segment address, the The output variables for the subroutine are specified at
block expects the subroutine to have been stored in the the outputs A1...An. The subroutine performs “writing”
user program memory. The offset address then repre- access to these variables, i.e. values calculated in the
sents the byte spacing between start of user program and subroutine are provided to the main program with the aid
start of subroutine. The subroutine is automatically saved of the output variables A1...An. The assembler program-
as well when saving the PLC program on EPROM or flash mer must pay attention to the defined data format when
EPROM. accessing these variables.
DS:BX
Example 1: sing. For each call of the subroutine, its own memory
locations are available in the historical values memo-
The values of the first two word variables in the block ry. If a subroutine is called three times, for instance, in
call are to be fetched to the registers AX and CX. total 3 times as many historical values are occupied in
the historical values memory as are specified in the
call. The number of memory
MOV BX,ES:[SI] ;Fetch address for 1st va– words used (1 word = 16 bits) in the historical values
;riable and store in BX memory must be specified as a direct constant in the
MOV AX,DS:[BX] ;fetch value to AX call of the block. If too many historical values are oc-
MOV BX,ES:[SI+2] ;fetch address for second cupied, the PLC issues an error message when the
;variable and store in BX command PA (program editing) is used or when the
MOV CX,DS:[BX] ;fetch value to CX program is started.
COPY !BA 0
FREI COPY
ANZ FREI
QOFF ANZ
QSEG QOFF
ZOFF QSEG
ZSEG ZOFF
ZSEG
____________________________________________________________________________________________
Parameters
FREI BINARY E,A,M,K,S Block enable
ANZ WORD EW,AW,MW,KW Quantity (n) of words to be copied
QOFF WORD EW,AW,MW,KW Offset address of the start of the source area
QSEG WORD EW,AW,MW,KW Segment address of the start of the source area
ZOFF WORD EW,AW,MW,KW Offset address of the start of the target area
ZSEG WORD EW,AW,MW,KW Segment address of the start of the target area
____________________________________________________________________________________________
CE Data Series 90 Series 30, 40, 50
Runtime:
Basic runtime: 59 µs 146 µs
Additional runtime: 2 µs per copied word 30 µs per copied word
Output updating: not applicable not applicable
Number of historical values: none none
Available as of: ABB Procontic CS31 / 907 PC 331
907 PC 331 / 07 KR 31 V 2.0
07 CR 41, 07 CT 41, 07 KR 51, 07 KT 51
____________________________________________________________________________________________
Description QOFF WORD
Offset address of the start of the source area
This function block copies n words from a source memory
area into a target memory area.
The contents of the source memory area are not QSEG WORD
changed. Segment address of the start of the source area
In each case, the start of the source and target memory
areas is specified at the block’s inputs by means of the off- ZOFF WORD
set and segment addresses. These are planned as vari-
Offset address of the start of the target area
ables or as indirect constants.
The inputs and outputs can neither be duplicated nor in-
verted/negated. ZSEG WORD
Segment address of the start of the target area
FREI BINARY
Block enable
FREI = 0 –> The block is not processed Example:
FREI = 1 –> The block is processed 128 words are to be copied from address 4000H:6 to
ANZ WORD address 5000H:4.
Quantity n of words to be copied. Number of words to be copied: 128
The following applies: 0 < n < + 8000H Offset address of the source memory: 6
n = 0: No copying Segment address of the source memory: 4000H
n = 8000H: A whole segment (64 kbytes) Offset address of the target memory: 4
is copied Segment address of the target memory: 5000H
Note:
If the COPY function block is located in the PLC program prevented by planning the COPY block in the PLC pro-
with the lower priority, programming can be interrupted by gram with the higher priority.
the program with the higher priority. An interrupt can be
Example
FBD/LD IL
!BA 0
COPY
COPY
M 00,00 FREI
MW 09,07 ANZ M 00,00
EW 09,08 QOFF MW 09,07
MW 04,02 QSEG EW 09,08
KW 00,00 ZOFF MW 04,02
EW 09,09 ZSEG KW 00,00
EW 09,09
CE FBD Definition
COPY
FREI
ANZ
QOFF
QSEG
ZOFF
ZSEG
FREI E L N P Y 0 0
ANZ E W N P Y 0 0
QOFF E W N P Y 0 0
QSEG E W N P Y 0 0
ZOFF E W N P Y 0 0
ZSEG E W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 COPY
00002 PP 0 FREI Enable BINARY
00003 PP 0 ANZ Number of words WORD
00004 PP 0 QOFF OFFSET source WORD
00005 PP 0 QSEG SEGMENT source WORD
00006 PP 0 ZOFF OFFSET target WORD
00007 PP 0 ZSEG SEGMENT target WORD
FBD/LD IL
COS1 COS1
!BA 0
ANG AD MW 00,02 ANG AD MD 04,00 COS1
ERR ERR M 05,00 MW 00,02
MD 04,00
M 05,00
Parameters
ANG WORD EW, AW, MW Angle 0...3600 (corresponds to 0.0o....360.0o)
AD DOUBLE WORD AD, MD Cosine of the input value
ERR BINARY M, A Error, if input value is negative or greater than 3600
____________________________________________________________________________________________
CE data
Runtime: 07 KR 91 / 07 KT 92 / 07 KT 93 / 07 KP 62
Basic runtime: 42 – 71 µs
Additional runtime: –––
Updating of the outputs: yes
Number of historical values: 0 words
Available as of: ABB Procontic CS31 07KT92 R202/R262, 07KT93 R171
ABB Procontic T200 07KP62 R202
Parameters
W/DW BINARY E, K , M, S Switch word/double word
W/DW = 0 → E = word,
W/DW = 1 → E = double word
E WORD EW, MW Input
DOUBLE WORD MD
NUM WORD AW, MW Number of set bits
LOW WORD AW, MW Position of the lowest set bit
HIGH WORD AW, MW Position of the highest set bit
CE data
Output updating: yes
Number of historical values: none
The set bits in E (binary input W/DW = 0 → E = word, W/ The set bits in E are counted and output to output NUM.
DW = 1 → E = double word) are counted and output to the Additionally, at output LOW the position of the lowest set
output NUM. Additionally, at output LOW the position of bit is output and at output HIGH the highest set bit is out-
the lowest set bit is output and at output HIGH the highest put.
set bit is output.
For E = 0 the following applies:
For E = 0 the following applies: NUM = 0, LOW = 0, HIGH = 0.
NUM = 0, LOW = 0, HIGH = 0.
NUM WORD
W/DW BINARY At output NUM the number of set bits of E is output.
For W/DW = 0 input E is a word operand, for W/DW = 1 If E is a word operand (W/DW = 0) the following applies:
input E is a double word operand. 0 ≤ NUM ≤ 15.
If E is a double word operand (W/DW = 1) the following
applies:
0 ≤ NUM ≤ 31.
Graphic
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
COUNTB
Source
Parameters
NO WORD EW, MW Counter number 0 or 1
U/D BINARY E, K , M, S Direction 0 = up, 1 = down
EN BINARY E, K , M, S Enabling of the counting process with EN = 1
SET BINARY E, K , M, S Set to initial value with SET = 1
STA WORD EW, MW Start value
END WORD EW, MW End value
ERR BINARY A, M Error
STAT WORD AW, MW Status
CF BINARY A, M Carry flag (1 = end value reached)
OUT WORD AW, MW Count (actual value)
CE data
Output updating: yes
Number of historical values: 1 word (2 bytes)
Description
The fast counter in the central unit 07 KT 94 works inde- - The maximum counting frequency is 50 kHz.
pendently of the user program. Therefore, the counter can
- The counter uses the terminals 2 (E 62,00) and 3
react to external signals fast. It can be used in seven diffe-
(E 62,01) as fast inputs and also the output terminal 46
rent configurable operating modes. The operating mode is
(A 62,00) in one operating mode. It is not possible to
configured in the system constant KW 85,02.
switch off the counting function of the 07 KT 94 in order
The planned operating mode is only activated in the initia- to use all inputs and outputs for other purposes.
lization phase (power on, cold start, warm start). The same
- The counter can count up in all operating modes. It
function block COUNTW is used for all operating modes.
counts beginning with the start value (set value) up to
Independent of the operating mode the following properties the end value (maximum range from -32768 to +32767
are valid: or from 8000H to 7FFFH). If the value +32767 is excee-
ded, the counter jumps to -32768. If the counter rea-
- Either the pulses of the counter input signal are coun- ches the planned end value in the function block (END),
tedor the evaluated signals of track A and track B in output CF is set to 1 (end value reached) and stored.
case of connected synchro transmitters. When setting the counter the output CF is reset to 0.
NO WORD
In particular operating modes 2 counters can be processed CF BINARY
independently of each other. In this case the function block If the counter reaches the planned end value END, output
is planned twice. Then the value 0 (for counter 0) has to be CF is set to 1 and the value is stored. When setting the
applied to the first function block and the value 1 (for counter counter the output CF is reset to 0.
1) to the second function block. Normally NO is planned
with the value 0. OUT WORD
The current counter value (actual value) can be retrieved at
U/D BINARY any time using the output OUT of the function block.
In some operating modes the counter can also count down. The following section describes which operating modes
If this is required, the input U/D (Up/Down) of the function can be configured, how they can be planned and how they
block has to be configured with the value 1. In this case differ from each other. The system constant KW 85,02
the counter counts beginning with the start value (set value) configures the counter operating mode. A hex value of the
up to the end value (maximum range from -32768 to +32767 low byte (bit 0 to bit 7) of KW 85,02 has the following
or from 7FFFH to 8000H). If the value -32768 is underrun meaning:
the counter jumps to +32767.
00H = no counter (default setting)
EN BINARY 01H = Mode 1, one count-up counter
The processing of the counting signals must be enabled. 02H = Mode 2, one count-up counter with release input
Depending on the operating mode this is performed using 03H = Mode 3, two count-up/count-down counters
a terminal or the input EN (Enable) of the function block 04H = Mode 4, two count-up/count-down counters, the
(EN is set to 1). second counter counts the pulses on the falling
edge
STA WORD
05H = Mode 5, one count-up/count-down counter with
The counter can be set to a start value. This start value
must be applied to the input STA (start value) of the function dynamic set input, setting at the rising edge
block. With a set signal (depending on the operating mode 06H = Mode 6, one count-up/count-down counter with
either using a terminal or the input SET of the function dynamic set input, setting at the falling edge
block) the value of the word variable is transferred to the 07H = Mode 7, one count-up/count-down counter with
counter. directional discriminator
Note: If enabling is active and the set signal is available The high byte is configured with 00H.
during several processing cycles, the processing processor
always sets the counter at the program end. During the Caution: The planned operating mode is only activated
remaining time of the processing cycle the counter counts in the initialization phase (power on, cold start, warm
pulses. start).
Terminal 2 (E 62,00): Counting input counter 0 For this procedure synchro transmitters with a signal
Terminal 3 (E 62,01): Counting input counter 1 of 24 V can be used. Signals of 5 V synchro transmit-
ters must be increased. A zero track of the synchro
The function block COUNTW is required twice. transmitter is not processed. The message „End value
Note: reached“ can only be inquired via the function block,
Changing the counting direction (via U/D) is not plan- not via a terminal.
ned during running operation. If U/D is switched over, at The following two terminals are reserved for the counter
the same time the counter is set to the start value and and cannot be used for other purposes:
after this counting is continued in the new counting di-
rection. Terminal 2 (E62,00): Track A of the synchro transmitter
Terminal 3 (E62,01): Track B of the synchro transmitter
– Operating mode 4: 2 counters (1 counting input
inverted)
This operating mode corresponds completely to the
operating mode 3 with the only exception that the se-
cond counting input (counter 1) is inverted. It counts
the 1/0 edges at terminal 3 (E 62,01).
– Operating mode 5: 1 up-down counter with
dynamic set input via terminal
In this operating mode one up-down counter with dyna-
mic set input is available. Dynamic means that setting
has only an effect on the signal edge and not during
application of the signal.
The following two terminals are reserved for the counter
and cannot be used for other purposes:
Terminal 2 (E 62,00): Counting input
Terminal 3 (E 62,01): Dynamic set input
The dynamic set input at terminal 3 acts on the 0/1
edge.
The message „End value reached“ can only be inquired
via the function block, not via a terminal.
Graphic
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
COUNTW
Source
FBD/LD IL
CS31CO CS31CO
!BA 0
FREI RDY M 00,00 FREI RDY A 00,00
CS31CO
GRN OK MW 10,00 GRN OK M 00,01
M 00,00
CODE ERR MW 10,01 CODE ERR MW 10,10
MW 10,00
D1 A1 MW 10,02 D1 A1 MW 10,11
MW 10,01
D2 A2 MW 10,03 D2 A2 MW 10,12
MW 10,02
D3 A3 MW 10,04 D3 A3 MW 10,13
MW 10,03
D4 A4 MW 10,05 D4 A4 MW 10,14
MW 10,04
D5 A5 MW 10,06 D5 A5 MW 10,15
MW 10,05
D6 A6 MW 10,07 D6 A6 MW 11,00
MW 10,06
D7 A7 MW 10,08 D7 A7 MW 11,01
MW 10,07
D8 MW 10,09 D8
MW 10,08
MW 10,09
A 00,00
M 00,01
MW 10,10
MW 10,11
MW 10,12
MW 10,13
MW 10,14
MW 10,15
MW 11,00
MW 11,01
These flags may be set to these values, e.g. with function “Overwrite”
in the PLC.
Parameters
FREI BINARY E, A, M, S Enable (0/1 edge) for processing the block
GRN WORD EW, AW, MW, KW Group number of the remote module to which
the job refers
CODE WORD EW, AW, MW, KW Identification of the job to be performed
D1 WORD EW, AW, MW, KW 1st parameter of the job
: : : :
D8 WORD EW, AW, MW, KW 8th parameter of the job
RDY BINARY A, M Processing of the job is completed
OK BINARY A, M It has been possible to process the job correctly
ERR WORD AW, MW Error message/status message
A1 WORD AW, MW 1st parameter of the response
: : : :
A7 WORD AW, MW 7th Parameter of the response
– job
Status identifications
GRN: 255 (Master PLC with bus)
CODE: 132
ERR = 8: The function block is waiting since a job of an- D1 ... D8: not used
other user is currently being processed.
– OK response
ERR = 10: The job has been sent to the addressee and
RDY: 1
the block is waiting for its response.
OK: 1
A1 ... A7: 0
The not–OK response of the individual jobs al- ● Scanning the open–circuit monitoring of an out-
ways looks as follows: put to establish whether it is activated or deacti-
vated
– Not–OK response
The following basically applies for the not–OK re- – job
sponse: GRN: group number 0 ... 63
CODE: 33
RDY: 1 D1: channel number
OK: 0 D2 ... D8: not used
ERR: 1 ☞ inadmissible job identification
2 ☞ wrong parameter; e. g. group – OK response
number to which there exists no RDY: 1
remote module OK: 1
3 ☞ remote module does not accept A1: 47 ☞ open–circuit monitoring ON
job 32 ☞ open–circuit monitoring OFF
A1 ... A7: 0 A2 ... A7: 0
– job – job
GRN: group number 0 ... 63 GRN: group number 0 ... 63
CODE: 162 ☞ input
CODE: 224 ☞ open–circuit monitoring ON
163 ☞ input/output
160 ☞ open–circuit monitoring OFF
D1: channel number
D1: channel number D2 ... D8: not used
D2 ... D8: not used
– OK response
– OK response RDY: 1
RDY: 1 OK: 1
OK: 1 A1 ... A7: 0
A1 ... A7: 0
● Scanning the input delay of a channel
– job
● Deactivating or activating open–circuit monito- GRN: group number 0 ... 63
ring of an output CODE: 38
D1: channel number
– job D2 ... D8: not used
GRN: group number 0 ... 63
– OK response
CODE: 225 ☞ open–circuit monitoring ON
RDY: 1
161 ☞ open–circuit monitoring OFF OK: 1
D1: channel number A1: input delay:
D2 ... D8: not used 2 ☞ 2 ms
4 ☞ 4 ms
– OK response .
RDY: 1 .
.
OK: 1
30 ☞ 30 ms
A1 ... A7: 0
32 ☞ 32 ms
A2 ... A7: 0
– OK response
RDY: 1
OK: 1
A1: bit value (0 or 1)
A2 ... A7: 0
Note:
bit: even number (0, 2, 4)
word: odd number (1, 3, 5)
____________________________________________________________________________________________
FBD/LD IL
CS31QU CS31QU
!BA 0
FREI E 00,00 FREI CS31QU
E 00,00
Parameters
FREI BINARY E, A, M, S Enable block processing
____________________________________________________________________________________________
Processing of the block is enabled with a 1 signal at input 2. A CS31 error of class 4 has occurred:
FREI, and the block then acknowledges CS31 errors con- The block acknowledges the error on the CS31 re-
tinuously. It may take several PLC cycles to acknowledge mote module signalling the error
an error on a CS31 module. and
also clears the error message on the PLC, i.e. error
flag M 255,14 is reset.
If the function block is enabled, it constantly checks
whether a CS31 error of class 3 or 4 has occurred and ac- Examples of an FK4 error:
knowledges this error. – a remote module signals open circuit
____________________________________________________________________________________________
Parameters
0/1 BINARY E, K, M, S, Enabling for non-recurring processing of the block with 0/1 edge
TIME DOUBLE WORD KD, MD Time for the modification identifier of the number of modules in
EW 07,15
RDY BINARY A, M Processing finished
OK BINARY A, M Module at CS31 bus ok.
ERNO WORD AW, MW Error number
255: no master
>0: remote module cannot be assigned
(list pointer inquiring of the bus configuration)
#n DIRECT #,#H Number of modules
CONSTANT
#A DIRECT #,#H Address (group number) of the remote module
CONSTANT
#> DIRECT #,#H 0: lowest channel number ≤ 7
CONSTANT 1: lowest channel number > 7
#S DIRECT #,#H For binary modules: number of process data bytes, which the
CONSTANT module sends to the master (0...15 corresponds to 0...15 bytes)
For word modules: number of process data words, which the
module receives from the master (100...108 corresponds to 0...8
words)
#R DIRECT #,#H For binary modules: number of process data bytes, which the
CONSTANT module receives from the master (0...15 corresponds to 0...15
bytes)
For word modules: number of process data words, which the
module receives from the master (100...108 corresponds to 0...8
words)
MO BINARY A, M Module ok.
(Module specifications match with the block specifications)
ME BINARY A, M Send/receive data from module and block are different
The inputs and outputs from #A to ME can be doubled for each module.
CE data
Output updating: no
Number of historical values: 3 words (6 bytes)
Description
This block can only be used by the master at the CS31 OK BINARY
bus (KW 00,00 = - 1). During initialization each remote Output OK indicates that the remote modules at the CS31
module logs in at the master with the following data : Ad- bus correspond to the block parameters. This output has
dress, lowest channel number and number of process data always to be considered together with output RDY. The
bytes/words, which the module sends to the master or following applies:
receives from it. After a 0/1 edge at input 0/1, the block
compares these data with the description of the remote RDY = 1 and OK = 1: The remote modules at the CS31
modules at the block inputs. If they agree, the outputs MO bus correspond to the block
= 1 and ME = 0 are set for this remote module. If the parameters.
number of remote modules (EW 07,15) does not change RDY = 1 and OK = 0: An error has occurred. The
within the time at input TIME, the block processing is fin- error can be evaluated using the
ished (RDY = 1). If OK = 1, all modules at the bus corre- outputs ERNO, MO and ME
spond to the block description. If OK = 0, the correspond- of the individual modules.
ing error of the individual modules can be read at output
ERNO and at the outputs MO and ME.
Graphic
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
CS31TE
Source
Parameters
CU BINARY E, M, A, K, S Pulse input, counting
R BINARY E, M, A, K, S Resetting the counter
PV WORD EW, MW, AW, KW Set point of the counter
Q BINARY M, A Output „End value reached“
CV WORD MW, AW Output for counter content
Description
The function block is used to count pulses. During count- CU BINARY
ing, every positive edge of the pulse at input CU is evaluat-
ed. The edge increases the value at output CV by "1". A positive edge increases the counter content by 1.
If the counter reaches the set point defined at input PV, R BINARY
output Q assumes the value 1. The signal 1 sets the counter at output CV to value 0.
With R, the counter can be reset to 0. PV WORD
Set point of the counter
Q BINARY
The signal 1 at this output signalizes that the counter
content has reached the set point:
CV < PV → Q = 0
CV = PV → Q = 1
CV > PV → Q = 1
CV WORD
Current counter content which is increased by 1 at input
CU with each positive edge.
Value range:
Integer word (16 bits)
- Low limit: 0000H or 0
- High limit: 7FFFH or +32767
Graphic
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
CTU
BIT_IN Y N Y 0 00 CU Q 00 0 Y N Y BIT_OUT
BIT_IN Y N Y 0 00 R CV 00 0 Y N Y WORT_OUT
WORT_IN Y N Y 0 00 PV
Source
Parameters
#num DIRECT CONSTANT #,#H Counter operating mode
R BINARY E, M, A, K, S Resetting the counter
S BINARY E, M, A, K, S Setting the counter
INIT WORD EW, MW, AW, KW Counter start value
RPI BINARY E, M, A, K, S Enabling the CATCH inputs with counter reset
SP BINARY E, M, A, K, S Enabling the CATCH inputs without counter reset
R-Q BINARY E, M, A, K, S Resetting output Q
Q BINARY M, A Counter zero crossing
CV WORD AW, MW Current counter value
SPCV WORD AW, MW Stored counter value
Using operating modes 1 and 2, two fast counters can R-Q BINARY
operate in a program at the same time. However, if a fast
The signal 1 resets output Q.
counter of operating mode 3 has already been programmed,
no further fast counter independent on the operating mode Q BINARY
can be processed in the program. The counter value has one zero crossing.
Q =1 if CV changes from –1 to 0 or from 0 to –1.
R BINARY CV WORD
The signal 1 sets the counter value in CV and the value Current value of the counter.
stored in SPCV to 0. This input has highest priority.
R = 1 → CV = 0
SPCV = 0 SPCV WORD
The signal 1 sets the counter to the value specified at Value range:
INIT. Integer word (16 bits)
S = 1 → CV = INIT Lower limit: 8000H -32768
Upper limit: 7FFFH +32767
INIT WORD
Start value for the fast counter.
RPI BINARY
The signal 1 enables the CATCH inputs. RPI has the
higher priority than SP.
RPI = 0 → The CATCH inputs are
disabled
RPI = 1 → A positive edge at the CATCH
inputs E 62,02 or E 62,03
stores the value in SPCV.
The counter is reset.
SP BINARY
The signal 1 enables the CATCH inputs.
SP = 0 → The CATCH inputs are disabled.
SP = 1 → A positive edge at the CATCH inputs E 62,02
or E 62,03 stores the value in SPCV.
The counter is not reset.
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
CTUH
DIREKT-KONS Y N Y 0 00 #num Q 00 0 Y N Y BIT_OUT
BIT_IN Y N Y 0 00 R CV 00 0 Y N Y WORT_OUT
BIT_IN Y N Y 0 00 S SPCV 00 0 Y N Y WORT_OUT
WORT_IN Y N Y 0 00 INIT
BIT_IN Y N Y 0 01 RPI
BIT_IN Y N Y 0 01 SP
BIT_IN Y N Y 0 01 R-Q
Source
Parameters
ENA BIT E, A, M, K, S Enable
IN BIT E Input which has to be updated
Description
At the beginning of each program cycle, the PLC process Using the function blocks DI and DO, a shorter terminal-
automatically generates a current process image of all in- terminal reaction at the selected direct inputs and outputs
puts. The block is used to update one input selected at IN can be reached.
within the process image during the program cycle. At in-
put IN, only the direct inputs and the inputs of the local Boundary conditions:
expansion must be programmed. – recommended only for standalone PLC processes
This can be necessary for special applications in order to – recommended only for large cycle time
acquire and process signal changes at the direct inputs
and the inputs of the local expansion more than one time – only reasonable for high capacity utilization of the
per cycle. PLC
Graphic
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
DI
BIT_IN Y N Y 0 00 ENA
BIT_IN Y N Y 0 00 IN
Source
FBD/LD IL
Use: Example:
The PLC processor automatically builds an updated pro-
cess image of the direct inputs at the start of each pro- – Cycle time: 80 ms
gram cycle. The DIN function block is able to create addi- – Capacity utilization: 95%
tional updates of the process image of the direct inputs – 3 DIN + 3 DOUT blocks distributed regularly over
within program cycles. This may be required in conjunc- the PLC program
tion with specific applications, in order to detect and pro- (i.e. after 20 ms, 40 ms and 60 ms)
cess signal changes of the direct inputs more than once
per program cycle.
In this example, the direct inputs of the PLC processor are
If the DIN and DOUT function blocks are used, the termi- read every 20 ms. The updated values of the direct out-
nal-to-terminal reaction time between direct inputs and di- puts are provided with the same frequency. See the figure
rect outputs can be reduced. below for illustration.
D D D D D D
O I O I O I
U N U N U N P
T T T E
0 ms 20 ms 40 ms 60 ms 80 ms
____________________________________________________________________________________________
CE Data
Runtime:
Stand-alone PLC:
07 KR 91, 07 KT 93: < 0.2 ms
07 KT 92: < 1 ms
additional with MASTER or SLAVE PLC: up to 4.8 ms
Output updating: –––
Number of historical values: 0 words
Available as of: ABB Procontic CS31, 07 KT 93, 07 KT 92 d, 07 KR 91 d
!BA 0
DMUX
DMUX
INDX INDX
#n INOK #n
E0 A E0
INOK
A
____________________________________________________________________________________________
Parameters
INDX WORD EW, AW, MW, KW Index input
#n DIRECT #, #H Quantity n of word inputs E0 ... En–1
CONSTANT
E0 WORD EW, AW, MW, KWWord input capable of duplication
INOK BINARY A, M Range monitoring of the index input
A WORD AW, MW Word output to which one of the inputs E0...En–1 is
switched through.
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 36 µs
Additional runtime: none
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Relationship between E0...En–1, INDX and A: The output A is set to 0 if the input INDX = 0.
The input INDX is used to define which of the inputs INDX WORD
E0...En–1 is connected to the output A. Index input for selection of one of the inputs E0...En–1.
The following applies:
1 < INDX < n (Number of inputs E0...En–1)
Note:
INDX = 0 –> Initialization of the output A with 0.
INOK BINARY
Range monitoring for the input INDX
Example
FBD/LD IL
!BA 0
DMUX
DMUX
MW 00,00 INDX MW 00,00
# 2 #n # 2
MW 00,01 E0 MW 00,01
MW 00,02 E1 INOK M 00,00 MW 00,02
A MW 00,03 M 00,00
MW 00,03
CE FBD Definition
DMUX
INDX
#n INOK
E A
INDX E W N P Y 0 0
#n K W N P Y 0 0
E E W N P Y 1 0
INOK A L N P Y 0 0
A A W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 DMUX
00002 PP 0 INDX Index (WORD)
00003 PP 0 #n # Quantity (#)
[ 1
00004 PP 1 E Input (WORD)
] 1
00005 PP 0 INOK Output ’index valid’ (BINARY)
00006 PP 0 A Output (WORD)
!BA 0
DMUXD
DMUXD
INDX INDX
#n #n
E0 INOK E0
A
INOK
A
____________________________________________________________________________________________
Parameters
INDX WORD EW, AW, MW, KW
Index input
#n DIRECT #, #H Quantity n of the double word inputs
E0 ... En–1
E0 DOUBLE WORD MD, KD Double word inputs E0 ... En–1;
the input E0 is capable of duplication.
NOK BINARY A, M Range monitoring of the index input
A DOUBLE WORD MD Double word output to which one of the inputs
E0 ... En–1 is switched through.
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 38 µs
Additional runtime: none
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
E DOUBLE WORD
Input E0 ... En–1 capable of duplication.
INOK BINARY
Range monitoring for the input INDX
A DOUBLE WORD
Output to which one of the n inputs E0...En–1 is switched
through.
Example
FBD/LD IL
!BA 0
DMUXD
DMUXD
MW 00,00 INDX MW 00,00
# 2 #n # 2
MD 00,01 E0 MD 00,01
MD 00,02 E1 INOK M 00,00 MD 00,02
A MD 00,03 M 00,00
MD 00,03
CE FBD Definition
DMUXD
INDX
#n
E INOK
A
INDX E W N P Y 0 0
#n K W N P Y 0 0
E E D N P Y 1 0
INOK A L N P Y 0 0
A A D N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 DMUXD
00002 PP 0 INDX Index (WORD)
00003 PP 0 #n Quantity (#)
[ 1
00004 PP 1 E Input (DOUBLE WORD)
] 1
00005 PP 0 INOK Output ’index valid’ (BINARY)
00006 PP 0 A Output (DOUBLE WORD)
Parameters
ENA BIT E, A, M, K, S Enable
OUT BIT A Output which has to be updated
Description
During the program processing, the PLC process genera- Using the function blocks DI and DO, a shorter terminal-
tes a current process image of all outputs. At the cycle terminal reaction at the selected direct inputs and outputs
end, the values of the output image are assigned to the can be reached.
individual output addresses.
Boundary conditions:
The block is used to update one output selected at OUT
– recommended only for standalone PLC processes
during the program cycle.
– recommended only for large cycle time
At output OUT, only the direct outputs and the outputs of
the local expansion must be programmed. – only reasonable for high capacity utilization of the PLC
This can be necessary for special applications in order to
read out the output signal changes more than one time per
PLC cycle or in a faster way via the direct/local outputs.
Graphic
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
DO
BIT_IN Y N Y 0 00 ENA OUT 00 0 Y N Y BIT_OUT
Source
FBD/LD IL
Use: Example:
The PLC processor automatically outputs a process
image of the direct outputs, which was updated during the – Cycle time: 80 ms
program cycle, at the end of each program cycle. The – Capacity utilization: 95%
DOUT function block is able to output additional updates – 3 DIN + 3 DOUT blocks distributed regularly over
of the process image of the direct outputs within program the PLC program
cycles. This may be required in conjunction with specific (i.e. after 20 ms, 40 ms and 60 ms)
applications, in order to have available signal changes of
the direct outputs more than once per program cycle.
In this example, the direct inputs of the PLC processor are
If the DIN and DOUT function blocks are used, the termi- read every 20 ms. The updated values of the direct out-
nal-to-terminal reaction time between direct inputs and di- puts are provided with the same frequency. See the figure
rect outputs can be reduced. below for illustration.
D D D D D D
O I O I O I
U N U N U N P
T T T E
0 ms 20 ms 40 ms 60 ms 80 ms
____________________________________________________________________________________________
CE Data
Runtime:
Stand-alone PLC:
07 KR 91, 07 KT 93: < 0.2 ms
07 KT 92: < 1 ms
additional with MASTER or SLAVE PLC: up to 4.8 ms
Output updating: –––
Number of historical values: 0 words
Available as of: ABB Procontic CS31, 07 KT 93, 07 KT 92 d, 07 KR 91 d
____________________________________________________________________________________________
Parameters
FREI BINARY A, E, S, M Enable signal for output of one text (0–>1–edge)
SSK WORD AW, EW, MW, KW Interface identifier; Number of the serial interface
TXNR WORD AW, EW, MW, KW Text number; number of the text to be output
TX0 ALL texts Texts; input for the texts; input can be duplicated
RDY BINARY A, E, M Ready; block is ready for output of a text
____________________________________________________________________________________________
Description ing so, the interface driver interprets the display formats
for the operand values and converts them to the required
The DRUCK function block outputs texts and values of display format before output.
operands stored in the PLC program through a serial in-
terface. Initialization of the serial interface
The numeric values to be output are conditioned for a di- Before the DRUCK block can communicate with one of
versity of representations by specifying a format identifi- the possible serial interfaces, it must be initialized with the
er. SINIT block.
The texts and operand identifiers to be output are stored Apart from the required interface parameters, a freely de-
in the user program in the PLC directly after the DRUCK finable end of text character is specified when using the
block. SINIT block in order to mark the end of the overall text/te-
legram to be sent. Whether or not the end of text charac-
The texts each have a text number for identification. ter is to be output through the interface is also specified in
the SINIT block.
The DRUCK block writes texts and operand values to be
output to a buffer from where they are fetched by an inter- The data flow is synchronized principally by way of the
face driver and output through the serial interface. In do- RTS and CTS signals.
S BUFFER 2
S BUFFER 1 COM2
COM1
Communication
software
Text V24
DRUCK
End of text
character
256 Bytes
Brief overview of the block’s parameters After the first call of the block or after termination of a text
output, the following applies:
FREI RDY TXNR SSK MEANING
RDY = 1
0/1–EDGE 1 2 1 The text with the
number 2 is output
through interface 1
The block is now ready for output of a new text.
Quantity: 1...99
RDY BINARY
– Each double word operand counts as
In the program cycle in which the block is called for the 10 to 11 characters *
first time, and during the time when a text is output, the
following applies:
RDY = 0. When the program is started, the PLC checks the texts to
determine whether or not the maximum length is exceed-
As long as RDY is equal to 0, no new text output can be ed.
activated and any 0 –> 1 edge present at the FREI input
will be ignored and will be lost. * depends on format
#n #” Subtext ”#
#n : Number of the text to be entered as a Format identifier:The format identifier specifies the type
direct constant (1...99). of the operand and the display format
#” : Start identifier for text input. of its value. The format identifier is a
3–digit number. The 1st digit from the
”# : End identifier for text input (only in ter- left specifies the operand type. There
minal mode). are 3 operand types:
Caution: This end identifier is not spe-
cified when using the ABB Procontic Binary 1
programming system. Only when texts Word : 2
are entered directly in the PLC in termi- Double word: 3
nal mode do these have to be termi-
nated with this identifier. Numbers 2 and 3 define the display for-
Subtext: All ASCII characters 0...7F. The cha- mat.
racter ASCII <NUL> is an exception for
07 KR 91 / 07 KT 92 / 07 KT 93. This Operand: Binary, word or double word operands
character is used as a prefix for the for- whose values are output depending on
mat identifier in the send buffer. the display format.
Example:
The following output is to be made on a printer:
First line
Blank line
Second line
To do this, the following text must be planned:
First line <CR> <LF> <LF> second line
The following applies:
<CR> = 013
<LF> = 010
The text input in the programming system is as follows:
#”First line\013\010\010second line
Example
The text with the number 1 is to be planned in the
DRUCK block. The text consists of two subtexts (text
1 and text 2). The value of the word flag MW 2,3 is to
be output as a three–digit number (format 03) be-
tween these subtexts.
#1#”Text1#203MW02,03#”Text2
Subtext 2
Operand
Format identifier
Subtext 1
Text number 1 ... 99
FBD/LD IL
!BA 0
DRUCK
DRUCK
M 00,00 FREI M 00,00
MW 00,00 SSK MW 00,01
MW 00,01 TXNR MW 00,00
# 1 TX0 RDY A 00,00 A 00,00
#”TEXT1 TX1 # 1
# 203 TX2 #”TEXT1
MW 02,03 TX3 # 203
#”TEXT2 TX4 MW 02,03
#”TEXT2
Input of texts with a terminal directly into the PLC Characteristics: Texts for the DRUCK block
If no ABB Procontic programming system is available to Storage: Directly after the DRUCK block
the user, he can enter his PLC program directly into the Quantity: 1...99
PLC as an instruction list (IL) using a terminal, or can read
it out. Length: Up to 256 characters (owing to their
send buffer length = 256)
In doing so, the texts are entered directly after the In this case, the following applies to the length of the texts:
DRUCK block, i.e. the text is entered as from the program
memory address following the operand at the RDY out- ● 07 KR 91 / 07 KT 92 / 07 KT 93:
put.
– Each text character counts as 1 character
Input of texts directly in the PLC – Each format identifier counts as 3 characters
When entering texts directly in the PLC, the user must – Each bit operand counts as 1 character
pay attention to the syntax rules for text formatting. – Each word operand counts as 2 characters
A text for the DRUCK block consists of: – Each double word operand counts as 4 characters
● 07 KR 31:
– the text number
– one or several subtexts (optional) – Each text character counts as 1 character
– operand with format identifier (optional)
– Each bit operand counts as 1 character
Texts are entered in the PLC within the “enter/edit user – Each word operand counts as 1 to 6 characters *
program” mode (see also System Description ABB Pro-
contic CS31, Vol. 7.3, ”Programming and Diagnosis Unit – Each double word operand counts as
TCZ”, chapter “Operating and test functions”). 10 to 11 characters *
The program editing (PA) function checks texts to ensure
Entered texts or subtexts (special characters are also that they will not exceed the maximum length.
possible) are embedded in the special characters #” (start
of text input) and “# (end of text input). * depends on format
____________________________________________________________________________________________
#n #” Subtext ”#
#n : Number of the text to be entered as a direct terminal mode do these have to be terminated with
constant (1...99). this identifier.
#” : Start identifier for text input.
Subtext:
”# : End identifier for text input in terminal mode. All ASCII characters 0...7F. The character ASCII <NUL>
Caution: This end identifier is not specified when is an exception for 07 KR 91 / 07 KT 92 / 07 KT 93. This
using the ABB Procontic programming system. character is used as a prefix for the format identifier in the
Only when texts are entered directly in the PLC in send buffer.
Format identifier:The format identifier specifies the type – If the user wishes a different processing sequence, this
of the operand and the display format must be planned by appropriate mutual interlocking of
of its value. The format identifier is a the DRUCK blocks.
3–digit number. The 1st digit from the
left specifies the operand type. There Communication by a DRUCK block and an EMAS
are 3 operand types: block with the same serial interface
A DRUCK block and an EMAS block may use the same
Binary: 1 serial interface without the need for special precautions.
Word: 2
Double word: 3 Display formats for numerical values to be output
The PLC is capable of presenting the numerical values to
Numbers 2 and 3 define the display for- be output on a screen or a printer in diverse ways.
mat.
Operand: Binary, word or double word operands The display format for a numerical value is defined by the
whose values are output depending on format identifier. This is planned directly before the flag to
the display format. be output and consists of three digits. It is defined as fol-
lows:
Correcting a character during text input with a termi-
nal Format identifier: The format identifier specifies the type
An incorrect character can not be corrected when enter- of the operand and the display format
ing a text on terminal. To correct the text input it must be of its value. The format identifier is a
terminated with the end of text input identifier ”# and the three–digit number. The first digit from
program must be terminated by pressing <CR>. By pro- the left specifies the operand type.
gram input, you must restart at the address of the charac- There are three operand types:
ter you wish to correct. Text input then begins with the
start of text input identifier #”. Binary: 1
Word: 2
Input of texts containing more than 80 characters on Double word: 3
a terminal
When making a text input, a maximum of 80 characters Digits 2 and 3 define the display for-
can be displayed in each line of the screen. If the text is mat.
more than 80 characters long, text input must be con-
Examples: ● Format identifier 103
cluded at the end of the screen line by means of the end of
– Digit 1: 1: Binary operand
text input identifier ”# and you must move to the next line
– Digits 2 and 3: 03: Display format 03
in the screen by entering the semicolon (;). Now continue
(see table)
text input with the start of text input identifier #”.
Communication between several DRUCK blocks and
the same serial interface ● Format identifier 204
Several DRUCK blocks may use the same serial interface – Digit 1: 2: Word operand
without the need for taking special precautions. If the seri- – Digits 2 and 3: 04: Display format 04
al interface is occupied by a DRUCK block, the other (see table)
DRUCK blocks automatically wait until it is free again.
– If several DRUCK blocks wish to access the same inter- ● Format identifier 341
face simultaneously, the DRUCK block located nearest – Digit 1: 3: Double word
to the front in the user program is given access. There- operand
fore, the order of priority corresponds to the sequence in – Digits 2 and 3: 41: Display format 41
which the DRUCK blocks are called in the user program. (see table)
*) The end identifier ”# is dropped if input is made into the ABB Procontic programming system. The end identifier ”# is needed only when making inputs
directly into the PLC using a terminal.
1000
900
800
700
600
500
400
300
200
100
10 20 30 40 50 60 70 80 90 100
Load in %
CE FBD Definition
DRUCK
FREI
SSK
TXNR
TX RDY
FREI E L N P J 0 0
SSK E W N P J 0 0
TXNR E W N P J 0 0
TX E X N P J 1 0
RDY A L N P J 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 DRUCK
00002 PP 0 FREI Input BINARY (block enable)
00003 PP 0 TXNR Input WORD (text number)
00004 PP 0 SSK Input WORD (interface identifier)
00005 PP 0 RDY Output BINARY (Ready)
[ 1
00006 PP 1 TX Input ALLE (No., text, format, 0)
] 1
____________________________________________________________________________________________
Parameters
x WORD EW, AW, MW, KW Controlled variable
KP WORD EW, AW, MW, KW Proportional coefficient, specified as a percentage
T1/T WORD EW, AW, MW, KW Time constant scaled to cycle time
y WORD AW, MW Manipulated variable
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 200 µs
Additional runtime: none
Output updating: yes
Number of historical values: 4 words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
Transfer function:
The controlled variable x is multiplied by the proportional
coefficient KP. The proportional coefficient is specified as
x
a percentage. If the controlled variable no longer
changes, the manipulated variable y moves towards the
value 0 in an e function. The time constant T1 specifies
the time when the step response has dropped to approxi- 1
mately 37% of its initial value. The value has dropped be-
low 1% after 5*T1.
Transfer function: KP
KP * s * T1
F(s)=
s * T1 + 1
37%
T1 t
x WORD
The operand for the controlled variable (input value for the
DT1 function) is specified at the input x.
KP WORD
The proportional coefficient is specified at the input KP.
This value is specified as a percentage (since version V6;
GJP5122900 R301) and can be positive or negative.
Example:
1 = 1 Percent
55 = 55 Percent
100 = 100 Percent
1000 = 1000 Percent
–100 = –100 Percent
T1/T WORD
The time constant of the DT1 function is specified at the
input T1/T.To do this, the time constant T1 must be scaled
to the PLC cycle time T.
y WORD
The manipulated variable (output value of the DT1 func-
tion) is output through the output y.
Example
FBD/LD IL
!BA 0
DT1 DT1
MW 00,00 x MW 00,00
KW 03,07 KP KW 03,07
KW 04,00 T1/T y AW 01,01 KW 04,00
AW 01,01
CE FBD Definition
DT1
x
KP
T1/T y
x E W N P Y 0 0
KP E W N P Y 0 0
T1/T E W N P Y 0 0
y A W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 DT1
00002 PP 0 x Input WORD (controlled variable)
00003 PP 0 KP Input WORD (proportional coefficient)
00004 PP 0 T1/T Input WORD (time constant)
00005 PP 0 y Output WORD (manipulated variable)
____________________________________________________________________________________________
Parameters
DUAL WORD EW, MW, AW, KW Binary number
BCD WORD AW,MW BCD coded number
____________________________________________________________________________________________
Description Example:
The binary number at the DUAL input is converted to a HEXDEC NUMBER BCD NUIMBER
BCD coded number and is allocated to the operand at the
output BCD. 15 11 7 3 0 BIT 15 11 7 3 0
Definition:
Conversion of a negative binary number to a BCD
number
The significance of the digits in a hexidecimal number and
a BCD coded number is defined as follows: A negative binary number with an amount less than
270FH can be converted to a BCD number, whereby the
value and the sign of the BCD number are each stored in
HEXDEC NUMBER BCD NUMBER one flag.
15 11 7 3 0 BIT 15 11 7 3 0
Z4 Z3 Z2 Z1 Z4 Z3 Z2 Z1
Example
WDW DUALBCDD
MW 03,00 MD 03,00
Example
FBD/LD IL
!BA 0
DUALBCD BINBCD
MW 07,03 DUAL BCD MW 07,04 MW 07,03
MW 07,04
CE FBD Definition
DUALBCD
DUAL BCD
DUAL E W N P Y 0 0
BCD A W N P Y 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
DUAL DOUBLE WORD MD, KD Binary number
BCD DOUBLE WORD MD BCD coded number
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 36 – 288 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
Description Example:
+ 12345678 + 12345678
The significance of the digits in a hexadecimal number
and a BCD coded number is defined as follows:
Z8 Z7 Z6 Z5 Z4 Z3 Z2 Z1 Z8 Z7 Z6 Z5 Z4 Z3 Z2 Z1
Z1 * 1 Z1 * 1
Z2 * 16 Z2 * 10
Z3 * 256 Z3 * 100
Z4 * 4096 Z4 * 1000
Z5 * 65536 Z5 * 10000
Z6 * 1048576 Z6 * 100000
Z7 * 16777216 Z7 * 1000000
Z8 * 268435456 Z8 * 10000000
Example
FBD/LD IL
!BA 0
DUALBCDD DWBCD
KD 07,03 DUAL BCD MD 07,04 KD 07,03
MD 07,04
CE FBD Definition
DUALBCDD
DUAL BCD
DUAL E D N P Y 0 0
BCD A D N P Y 0 0
CE IL Definition
!BA 0
DWAES DWAES
E1 E1
#OFF #OFF
#SEG #SEG
____________________________________________________________________________________________
Parameters
E1 DOUBLE WORD MD, KD Input for the operand to be read
#OFF DIRECT #, #H Offset address of the memory location to which the
CONSTANT value of E1 must be written in the event of a change.
#SEG DIRECT #, #H Segment address of the memory location to which the
CONSTANT value of E1 must be written in the event of a change.
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 27 µs
Additional runtime: –––
Output updating: yes
Number of historical values: 2 words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
E1 DOUBLE WORD
If the operand at the input E1 changes, its value is written
to the address specified at the inputs #OFF and #SEG.
Example
FBD/LD IL
!BA 0
DWAES DWAES
MD 08,03 MD 08,03
#H CBE0 #OFF #H CBE0
#H 8800 #SEG #H 8800
CE FBD Definition
DWAES
E1
#OFF
#SEG
E1 E D N P N 0 0
#OFF K W N P Y 0 0
#SEG K W N P Y 0 0
CE IL Definition
!BA 0
DWAND DWAND
E1 E1
E2 A1 E2
A1
____________________________________________________________________________________________
Parameters
E1 DOUBLE WORD MD, KD Operand 1
E2 DOUBLE WORD MD, KD Operand 2
A1 DOUBLE WORD MD Result of the AND combination
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 49 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
This function block generates, bit by bit, the AND combi- The inputs and the output can neither be duplicated nor
nation of the operands present at the inputs E1 and E2. inverted/negated.
The result is allocated to the operand at the output A1.
Example
Example
FBD/LD IL
!BA 0
DWAND DWAND
MD 00,00 MD 00,00
KD 03,01 MD 08,00 KD 03,01
MD 08,00
CE FBD Definition
DWAND
E1
E2 A1
E1 E D N P N 0 0
E2 E D N P N 0 0
A1 A D N P N 0 0
CE IL Definition
!BA 0
DWOL DWOL
FREI FREI
#OFF #OFF
#SEG A1 #SEG
A1
____________________________________________________________________________________________
Parameters
FREI BINARY E, A, M, S, K Block enable
#OFF DIRECT #, #H Offset address of the memory location whose double word
CONSTANT value is to be read.
#SEG DIRECT #, #H Segment address of the memory location whose double word
CONSTANT value is to be read.
A1 DOUBLE WORD MD Output to which the value read is allocated.
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 26.5 µs; 19.0 µs in case of no enable.
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Example
FBD/LD IL
!BA 0
DWOL DWOL
E 01,00 FREI E 01,00
#H CBE0 #OFF #H CBE0
#H 8800 #SEG MD 08,03 #H 8800
MD 08,03
CE FBD Definition
DWOL
FREI
#OFF
#SEG A1
FREI E L N P Y 0 0
#OFF K W N P Y 0 0
#SEG K W N P Y 0 0
A1 A D N P N 0 0
CE IL Definition
!BA 0
DWOR DWOR
E1 E1
E2 A1 E2
A1
____________________________________________________________________________________________
Parameters
E1 DOUBLE WORD MD, KD Operand 1
E2 DOUBLE WORD MD, KD Operand 2
A1 DOUBLE WORD MD Result of the OR combination
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 35 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description The inputs and the output can neither be duplicated nor
negated nor inverted.
This function block generates a bit–by–bit OR combina-
tion of the operands present at the inputs E1 and E2. The
result is allocated to the operand at the output A1.
Example
Example
FBD/LD IL
!BA 0
DWOR DWOR
MD 00,00 MD 00,00
KD 03,01 MD 08,01 KD 03,01
MD 08,01
CE FBD Definition
DWOR
E1
E2 A1
E1 E D N P N 0 0
E2 E D N P N 0 0
A1 A D N P N 0 0
CE IL Definition
!BA 0
DWOS DWOS
FREI FREI
E1 E1
#OFF #OFF
#SEG #SEG
____________________________________________________________________________________________
Parameters
FREI BINARY E, M, A, S, K Block enable
E1 DOUBLE WORD MD, KD Input for the operand to be written
#OFF DIRECT #, #H Offset address of the memory location to which the
CONSTANT value of E1 must be written.
#SEG DIRECT #, #H Segment address of the memory location to which the
CONSTANT value of E1 must be written.
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 38 µs in case of enable; 19 µs in case of no enable.
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Example
FBD/LD IL
!BA 0
DWOS DWOS
E 01,00 FREI E 01,00
MD 08,03 MD 08,03
#H FFF0 #OFF #H FFF0
#H 2000 #SEG #H 2000
CE FBD Definition
DWOS
FREI
E1
#OFF
#SEG
FREI E L N P Y 0 0
E1 E D N P N 0 0
#OFF K W N P Y 0 0
#SEG K W N P Y 0 0
CE IL Definition
____________________________________________________________________________________________
Parametes
E DOUBLE WORD MD, KD Input
#2*n DIRECT #, #H, KW Quantity n of reference values (multiplied by 2)
CONSTANT
EC DOUBLE WORD MD, KD Reference value; the input can be duplicated
AC DOUBLE WORD MD, KD Output code; the input can be duplicated
E=EC BINARY A, M Coincidence indication
A DOUBLE WORD MD Output of the output code’s value
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 53 µs
Additional runtime: 10 µs per entered reference value
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
Example
FBD/LD IL
!BA 0
DWUMC DWUMC
MD 08,03 E MD 08,03
#4 #2*n #4
MD 05,00 EC0 E=EC M 08,14 MD 05,00
MD 05,01 EC1 A MD 08,14 MD 05,01
MD 05,02 AC0 MD 05,02
KD 05,03 AC1 KD 05,03
M 08,14
MD 08,14
CE FBD Definition
DWUMC
E
#2*n
EC E=EC
AC A
E E D N P Y 0 0
#2*n K W N P Y 0 0
EC E D N P Y 1 0
AC E D N P Y 1 0
E=EC A L N P Y 0 0
A A D N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 DWUMC
00002 PP 0 E Input DOUBLE WORD (input value)
00003 PP 0 #2*n # CONSTANT (number of EC and AC)
[ 1
00004 PP 1 EC Input DOUBLE WORD (reference value)
] 1
[ 1
00005 PP 1 AC Input DOUBLE WORD (output code)
] 1
00006 PP 0 E=EC Output BINARY (input value=Ecode)
00007 PP 0 A Output DOUBLE WORD (output value)
!BA 0
DWW DWW
E1 A1 E1
Q A1
Q
____________________________________________________________________________________________
Parameters
E1 DOUBLE WORD MD, KD Double word variable to be converted
A1 WORD AW, MW Result of conversion, word variable
Q BINARY A, M Result limited
____________________________________________________________________________________________
Description
The value of the double word operand at the input E1 is
converted to a word variable and the result is allocated to
the word operand at the output A1.
The result is limited to the maximum or minimum number
range.
Max. number range: +32 767 (7FFFH)
Min. number range: –32 767 (8001H)
If limiting has taken place, a 1 signal is allocated to the
binary operand at the output Q. If no limiting has taken
place, a 0 signal is allocated to the binary operand at the
output Q.
If the value of the operand at the input E1 lies outside of
the permissible number range (value 8000 0000H), the
converted value is set to –32 767 (8001H).
Example
FBD/LD IL
!BA 0
DWW DWW
MD 00,00 AW 05,00 MD 00,00
Q M 03,01 AW 05,00
M 03,01
CE FBD Definition
DWW
E1 A1
Q
E1 E D N P N 0 0
A1 A W N P N 0 0
Q A L N P Y 0 0
CE IL Definition
The block packs one 32 bit double word into 2 16 bit words.
The low word of the double word input E (bit 0 to bit 15) is FBD/LD
assigned to output A1 and the high word of input E (bit 16
to bit 31) is assigned to output A2. DWWW
E A1
A2
Parameters
E DOUBLE WORD MD Double word input
A1 WORD AW, MW Output, low word of input E
A2 WORD AW, MW Output, high word of input E
CE data
Output updating: yes
Number of historical values: none
Description
The block packs one 32 bit double word into 2 16 bit words. A1 WORD
The low word of the double word input E (bit 0 to bit 15) is
assigned to output A1 and the high word of input E (bit 16 At output A1, the low word (bit 0 to bit 15) of input E is
to bit 31) is assigned to output A2. output.
The double word at input E is split up into 2 16 bit words At output A2, the high word (bit 16 to bit 31) of input E is
E1 and E2. output.
Graphic
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
DWWW
DWORT_IN Y N Y 0 00 E A1 00 0 Y N Y WORT_OUT
A2 00 0 Y N Y WORT_OUT
Source
SN ZN Command / Variable Symbol Long text
!BA 0
DWXOR DWXOR
E1 E1
E2 A1 E2
A1
____________________________________________________________________________________________
Parameters
E1 DOUBLE WORD MD, KD Operand 1
E2 DOUBLE WORD MD, KD Operand 2
A1 DOUBLE WORD MD Result of the XOR combination
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 35 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description The inputs and the output can neither be duplicated nor
negated nor inverted.
This function block generates the bit–by–bit XOR combi-
nation of the operands present at the inputs E1 and E2.
The result is allocated to the operand at the output A1.
Example
Example
FBD/LD IL
!BA 0
DWXOR DWXOR
MD 00,00 MD 00,00
KD 00,01 MD 08,02 KD 00,01
MD 08,02
CE FBD Definition
DWXOR
E1
E2 A1
E1 E D N P N 0 0
E2 E D N P N 0 0
A1 A D N P N 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 DWXOR
00002 PP 0 E1 Input DOUBLE WORD
00003 PP 0 E2 Input DOUBLE WORD
00004 PP 0 A1 Output DOUBLE WORD
____________________________________________________________________________________________
Parameters
QUIT BINARY A, E, M, S, K Reception of telegrams not enabled.
SSK WORD AW, EW, MW, KW Interface identifier; number of the serial interface
#ANU DIRECT Number of outputs for user information
CONSTANT #, #H
VT0 ALL texts Comparison telegram; input capable of duplication
MEUN BINARY A, M Data invalid
RDY BINARY A, M Telegram has been received
TELN WORD AW, MW Number of the comparison telegram with which the
received one agrees
MW0 WORD AW, MW User data; output capable of duplication
____________________________________________________________________________________________
Description
The function block EMAS Initialization of the serial interface
– receives telegrams through a serial interface of the PLC
One of the possible serial interfaces must be initialized
– compares these telegrams to comparison telegrams with the SINIT block before the EMAS can communicate
stored in the user program with one of these. Besides the required interface parame-
ters, the following are specified in the SINIT block:
– and, if these agree, provides the user data of the tele-
gram received at the block’s outputs.
– An end of telegram character, which can be planned
The received telegrams are fetched from the serial inter- freely, in order to recognize the end of the telegram to
face by an interface driver and are provided in a BUFFER be received
for further processing by EMAS. The driver recognizes
the end of the telegram by the end of telegram character. – Whether or not a character received through the inter-
This end of telegram character is planned in the SINIT face is to be echoed. Synchronization of the data flow is
block. basically achieved by way of the RTS and CTS signals.
E BUFFER 2
E BUFFER 1 COM2
COM1
Communication
Software
Telegram V24
EMAS
End of
telegram
character
256 Bytes
0 0 1 EMAS has received a valid telegram and is ready to receive a new telegram.
RDY = 1 –> A telegram has been received and proces- – Whether or not a character received at the input is to be
sed echoed. Synchronization of the data flow is basically
achieved by way of the RTS and CTS signals.
TELN WORD
If a valid telegram is received, the number of the affiliated Comparison telegrams
comparison telegram is output through the output TELN 1...99 comparison telegrams are stored directly after the
(telegram number). EMAS block.
Detailed description of the functional scope As regards the dummy parameters for the user informa-
of function block EMAS tion, EMAS distinguishes between dummy parameters
for digits and dummy parameters for characters.
The function block EMAS Dummy parameter for digits: # (1 # for each digit)
– compares these telegrams to the comparison tele- Dummy parameter for digits
grams stored in the user program For each dummy digit parameter (#) of the comparison
telegram, EMAS expects precisely one ASCII coded dec-
– and, if they agree, provides the user data of the tele- imal digit in the telegram to be received.
gram received at the block’s outputs.
Up to 5 dummy digits constitute one dummy parameter
group. Such a group of dummy digits represents the nu-
The telegrams received are fetched from the serial inter- merical value of a decimal number comprising up to 5 dig-
face by an interface driver and are provided for further its.
processing in a BUFFER for the EMAS. The driver recog-
nizes the end of the telegram by the end of telegram char- No dummy parameter is specified for the decimal num-
acter. This end of telegram character is planned in the SI- ber’s sign because EMAS takes it into account automati-
NIT block. cally.
The EMAS allocates one user information output to each gram to be received. These may comprise ASCII charac-
numerical value belonging to a dummy parameter group. ters of letters, but also all other hex values from 0...FF.
In doing so, EMAS automatically limits the value range to
+32767. The length of a dummy character group is up to 255. If this
were the case, the complete comparison telegram would
consist of dummy characters only.
Dummy parameter for characters
EMAS allocates the characters/bytes received without
For each dummy character (*) of the comparison tele- change and successively to its user information outputs
gram, EMAS expects any one character/byte in the tele- MW0...MWn.
____________________________________________________________________________________________
#n #” * ”#
TEXT
Example:
The following telegram text is to be entered in the ABB
Procontic programming system:
Temperature <CR> boiler 1
The following applies: <CR> = 013
The text input in the programming system is as follows:
#”temperature\013boiler 1
#n #” * ”#
TEXT
Correcting a character within a text input in terminal Receiving and processing telegrams
mode
An incorrectly entered character can not be corrected Receiving telegrams
when entering a text. To correct the text input it must be The QUIT input controls reception of telegrams and also
terminated with a text input end identifier “# and program serves the purpose of acknowledgement in the event of
input must be terminated by <CR>. Continue with pro- an error.
gram input at the address of the character to be cor-
rected. Text input then begins with the text input start ● QUIT = 0: Telegram reception enabled.
identifier #”.
● QUIT = 1: Telegram reception not enabled. Acknow-
ledgement after reception of an invalid tele-
Input of texts containing more than 80 characters on gram.
a terminal
When making a text input, no more than 80 characters The EMAS automatically assumes the “error” state if
can be displayed on each line of the screen. If the text is agreement with none of the stored comparison telegrams
longer than 80 characters, text input must be terminated is ascertained when comparing a telegram received. In
at the end of the screen line by means of the text input end this case, EMAS will not process any new telegram until
identifier “# and you must jump to the next line on the the error is acknowledged with a 1 signal at the QUIT in-
screen by means of the ; character. Now continue text in- put and reception of telegrams is enabled again (next
put with the text input start identifier #”. cycle) with a 0 signal at the QUIT input.
Important: For EMAS, the telegram end identifier indica- The following applies in this error case:
tes the end of the telegram to be received. MEUN = 1, because it has not been possible to
This is why the telegram end identifier must process the telegram properly
not occur within a telegram. This also applies
to user characters received on the basis of a RDY = 1, because a telegram has been
dummy parameter (# or *). received and processed
TELN = Text No. of the relevant comparison
Agreement
telegram
If the EMAS ascertains agreement between the received
telegram and one of its comparison telegrams, the follow- MW0... MWn = The part of the current user data
ing applies to the outputs: from the received telegram for
which the number of planned user
MEUN = 0, because it has been possible to information outputs suffices.
receive and process the telegram
properly
No agreement
RDY = 1, because a telegram has been The received telegram agrees with none of the stored
received and processed comparison telegrams.
The following then applies to the outputs:
TELN = Number of the relevant comparison
telegram MEUN = 1, because the received telegram is invalid
RDY = 1, because a telegram has been received and
MW0 ... MWn = Current user data from the te–
processing of it has been terminated
legram received
The EMAS is now in the “ERROR” state. In this case,
The coherent digits defined by a dummy digit group in the EMAS does not process any new telegram until the error
comparison telegram are read out of the received tele- is acknowledged with a 1 signal at the QUIT input and the
gram, are combined in one numerical value and this is reception of telegrams is enabled again (next cycle) with a
output to one word operand (user information output). 0 signal at the QUIT input.
Text characters marked by dummy text characters (*) in
the comparison text are read out of the received telegram
and each single character/byte is output without change Acknowledgement of the error
to a word operand (user information output). Set QUIT = 1 and then, in the next cycle QUIT = 0.
After reception of telegrams has been enabled, it may
The user information is allocated to the outputs
happen that still no telegram is available for reception or
MW0...MWn in the same sequence as the user informa-
that a telegram has not yet been received and evaluated
tion occurs in the currently received telegram (see also
completely.
examples).
In this case, the outputs are set as follows
The maximum number of user information word operands
to be output is specified at the input #ANU. The maximum ● MEUN = 1 and
number results from the telegram with the most user in- ● RDY = 0
formation word operands to be reserved (up to 256 word
operands, in which case the telegram would consist of until a telegram has been received and processed com-
user information only). pletely.
Dummy characters
(e.g. 3 characters/by-
tes)
Identifier #” for the
start of a text input
Terminate text
input and restart,
see also special case
Example 3 MEUN =0
RDY =1
CO–11AUTO<CR> TELN =4
MW0 =T
The number 3 is output through the TELN output. MW1 =E
MW2 =M
–11 is present at the output MW0 as the contents of a
MW3 =P
word flag.
MW4 =O
41H (A in ASCII) is present at the output MW1 as the con- MW5 = 120
tents of a word flag. MW6 =K
MW7 =M
55H (U in ASCII) is present at the output MW2 as the con- Example 5
tents of a word flag.
XY25OTTO<CR>
54H (T in ASCII) is present at the output MW3 as the con-
The received telegram has been evaluated, but agrees
tents of a word flag.
with none of the comparison telegrams.
4FH (O in ASCII) is present at the output MW4 as the con- Therefore the following applies:
tents of a word flag.
MEUN =1
As the received telegram has been evaluated and agrees RDY =1
with a comparison telegram, the following applies: TELN = is not allocated
Reception of further telegrams is blocked until reception Examples of end of telegram characters to be specified in
of the invalid telegram is acknowledged at the QUIT input. the SINIT block:
End of telegram character <ETX> = 03H = 3
<EOT> = 04H = 4
The receive driver of the EMAS block recognizes the end
of the received telegram by virtue of the end of telegram <CR> = 0DH = 13
character. <LF> = 0AH = 10
<SP> = 20H = 32
. . .
. . .
____________________________________________________________________________________________
Effective data transmission rate in the EMAS block
Not available for 07 KR 31.
The effective data transmission rate (characters actually
read through the serial interface) depends on the load on
the PLC and the set baud rate.
The following relationship roughly applies:
Baud
1000
900
800
700
600
500
400
300
200
100
10 20 30 40 50 60 70 80 90 100
Load in %
Example
FBD/LD IL
!BA 0
EMASm EMAS
M 00,00 QUIT M 00,00
MW 00,00 SSK MEUN M 01,00
MW 00,00
# 1 #ANU RDY M 02,00
# 1
MW 01,00
# 1 VT0 TELN M 01,00
#”KM### VT1 MW0 MW 05,00 M 02,00
MW 01,00
MW 05,00
# 1
#”KM###
EMASmVT
VT
VT
____________________________________________________________________________________________
Parameters
VT ALL Comparison telegram, input capable of duplication
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: not available
Additional runtime: not available
Output updating: not applicable
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Example
FBD/LD IL
!BA
EMASm
EMAS
M 00,00 QUIT
MW 00,00 SSK MEUN M 01,00 M 00,00 QUIT
# 2 #ANU RDY M 01,01 MW 00,00 SSK
MW 01,00 # 2 #ANU
# 1 VT0 TELN
MW 02,00 M 01,00 MEUN
# ”ABB#### VT1 MW0
MW 02,01 M 01,01 RDY
MW1
MW 01,00 TELN
MW 02,00 MW0
MW 02,01 MW1
# 1 Telegram No. 1
EMASmVT
#”ABB#### Text 1
# 2 VT0 # 2 Telegram No. 2
# ”CCC** VT1 # ”CCC** Text 2
# 3 VT2 # 3 Telegram No. 3
# ”DDD*## VT3 # ”DDD*## Text 3
CE FBD Definition
EMASmVT
VT
VT E X N P Y 1 0
CE IL Definition
[ 1
00000 PP 1 VT Input comparison telegrams
] 1
____________________________________________________________________________________________
Parameters
T I I0 BINARY E, M, A, S, K Input signal
ZD DOUBLE WORD MD, KD Delay time
Q BINARY M, A Delayed signal
____________________________________________________________________________________________
Description The inputs and the output can neither be duplicated nor
inverted.
The 0–1 edge of the input TI I0 is delayed by the time ZD
and is output as a 0–1 edge at the output Q.
Initialization
Example
FBD/LD IL
!BA 0
ESV ESV
E 01,00 TI I 0 E 01,00
KD 03,00 ZD Q M 07,01 KD 03,00
M 07,01
CE FBD Definition
ESV
TI I 0
ZD Q
TI I 0 E L N P Y 0 0
ZD E D N P Y 0 0
Q A L N P Y 0 0
CE IL Definition
Parameters
0/1 BINARY E, K , M, S Deletion of a data segment by a 0/1 edge
SEG WORD EW, MW Number of the data segment, valid values: 1...250
RDY BINARY A, M Deletion procedure completed
ERR BINARY A, M Error occurred, data segment cannot be deleted
ERNO WORD AW, MW Error number
CE data
Output updating: no
Number of historical values: 2 words
Graphic
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
FCDEL
BIT_IN Y N Y 0 00 0/1 RDY 00 0 Y N Y BIT_OUT_FB
WORT_IN Y N Y 0 00 SEG ERR 00 0 Y N Y BIT_OUT_FB
ERNO 00 0 Y N Y WORT_OUT
Source
SN ZN Command / Variable Symbol Long text
Parameters
0/1 BINARY E, K , M, S Storage of a data set by a 0/1 edge
SM BINARY A, E, K, M, S
WORD AW, EW, KW, MW
DOUBLE WORD KD, MD Start flag of the data set
nB WORD EW, KW, MW Number of data set blocks;
valid values: 1...128
SEG WORD EW, KW, MW Number of the data segment, valid values: 1...250
BNR WORD EW, KW, MW Number of the block in the data segment;
valid values: 0...127
RDY BINARY A, M Reading procedure completed
ERR BINARY A, M Error has occurred
ERNO WORD AW, MW Error number
CE data
Output updating: no
Number of historical values: 2 words
Description
The function block reads a data set from a data segment The following applies: Either 64 binary data or 32 word
of the SmartMedia Card and stores the read data set be- data are read per block. The data of each block are se-
ginning at the start flag defined by SM. The data of the cured by a checksum.
data set have been stored in the SmartMedia Card by the
function block FCWR or by the operation command FCWR. The reading procedure of a data record is carried out once
by a 0/1 edge at input 0/1. If no error occurred when read-
Important note: ing the data, the outputs RDY and ERNO are set to 0. The
The SmartMedia Card can only be accessed using the data set is stored beginning at the defined start flag SM.
function blocks FCWR and FCRD or via the programming Storing the data set can take several PLC cycles.
interface using the operating and test functions (for initial-
ization of the SmartMedia Card and operating function re- If an error occurs during the reading procedure, RDY and
fer to AC31 System description volume 7.3, chapter 2.4.1, ERR are both set to 1. The error type is indicated at output
commands FCINIT, FCWR, FCRD, FCDEL). ERNO.
The inputs SM and nB define which data are read from the The outputs RDY, ERR and ERNO are set to 0 by a 0
SmartMedia Card. The input SEG defines the SmartMedia signal at input 0/1.
Card data segment. The number of data which are read
from a block depends on input SM.
0/1 = 0/1 edge: The reading procedure of the data set is Output RDY indicates that the reading of the data record
carried out once. has been completed. This output has always to be consid-
ered together with output ERR. The following applies:
0/1 = 1: The block is not processed, i.e. it no
longer changes its outputs.
RDY = 1 and ERR = 0: The reading operation has been
completed. The data set is stored
SM BINARY/WORD/DOUBLE WORD beginning at the defined input SM.
Graphic
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
FCRD
BIT_IN Y N Y 0 00 0/1 RDY 00 0 Y N Y BIT_OUT_FB
ALLE Y N Y 0 00 SM ERR 00 0 Y N Y BIT_OUT_FB
WORT_IN Y N Y 0 00 nB ERNO 00 0 Y N Y WORT_OUT
WORT_IN Y N Y 0 00 SEG
WORT_IN Y N Y 0 00 BNR
Source
SN ZN Command / Variable Symbol Long text
FCWR
0/1 RDY
SM ERR
nB ERNO
SEG
BNR
Parameters
0/1 BINARY E, K , M, S Storage of a data set by a 0/1 edge
SM BINARY A, E, K, M, S
WORD AW, EW, KW, MW
DOUBLE WORD KD, MD Start flag of the data set
nB WORD EW, KW, MW Number of data set blocks;
valid values: 1...128
SEG WORD EW, KW, MW Number of the data segment, valid values: 1...250
BNR WORD EW, KW, MW Number of the block in the data segment;
valid values: 0...127
RDY BINARY A, M Writing procedure completed
ERR BINARY A, M Error has occurred
ERNO WORD AW, MW Error number
CE data
Output updating: no
Number of historical values: 2 words
Description
The function block writes a data set to a data segment in The inputs SM and nB define which data are written to the
the SmartMedia Card. For this purpose, there are 250 data SmartMedia Card. The input SEG defines the data seg-
segments (1...250) available in the SmartMedia Card. A ment in the SmartMedia Card. The number of data which
deletion procedure (function block FCDEL) always deletes can be stored in a block depends on input SM.
a complete data segment. Each data segment consists of
128 blocks (0...127). Each block consists of 32 words. The following applies: Either 64 binary data or 32 word
data or 16 double word data are written per block. The data
After a deletion procedure, each of these 128 data seg- of each block are secured by a checksum.
ment blocks can store data only once. If a block contain-
ing data is to be overwritten by new data, the entire data When a writing procedure of a data set is started
segment has to be deleted first. In doing so, all data in this (0/1 edge at input 0/1), the data of the data set must not
segment are lost. be changed until the end of the writing procedure (RDY =
TRUE). Storing a data set in the SmartMedia Card can
Important note: take several PLC cycles.
The SmartMedia Card can only be accessed using the
function blocks FCWR and FCRD or via the programming
interface using the operating and test functions (for initial-
ization of the SmartMedia Card and operating function re-
fer to AC31 System description volume 7.3, chapter 2.4.1,
commands FCINIT, FCWR, FCRD, FCDEL).
With a 0/1 edge at input 0/1 the data segment writing is Examples:
performed once. Until the writing procedure has not been
finished (RDY = 1), input 0/1 will not be evaluated again. - SM = M 01,00 and nB = 1: Writing the data from
M 01,00 to M 04,15
After the writing operation has been completed, the block (1 block = 64 binary data)
outputs RDY, ERR and ERNO are updated. The writing
operation was successful, if RDY = 1 and ERR = 0. For - SM = M 01,00 and nB = 2: Writing the data from
the outputs RDY = 1 and ERR = 1, an error occurred. The M 01,00 to M 08,15
error type is signalized at output ERNO. (2 blocks = 128 binary data)
After storing the data set in the SmartMedia Card, the block - SM = MW 02,00 and nB = 1: Writing the data from
outputs RDY, ERR and ERNO are set to 0 by a signal 0 at MW 02,00 to MW 03,15
input 0/1. A new 0/1 edge at input 0/1 starts a new writing (1 block = 32 word data)
procedure. Since without a previous deletion of the data - SM = MW 02,00 and nB = 2: Writing the data from
segment no new data can be written to blocks which al- MW 02,00 to MW 05,15
ready contain data, the input BNR must point to the next (2 blocks = 64 word data)
free block for the next writing procedure.
- SM = MD 03,00 and nB = 1: Writing the data from
MD 03,00 to MD 03,15
(1 block = 16 double word data)
- SM = MD 03,00 and nB = 2: Writing the data from
MD 03,00 to MD 04,15
0/1 BINARY (2 blocks = 32 double word data)
Processing of the block is controlled via input 0/1. The SEG WORD
following applies:
The number of the data segment in the SmartMedia Card
0/1 = 0: The outputs RDY, ERR and ERNO are is specified at input SEG. In the SmartMedia Card, 250
set to 0. This is not valid during a writing data segments are available.
procedure.
Valid values: 1...250.
BNR WORD
0/1 = 0/1 edge: Writing of the data set is started once.
Until the writing procedure has not been The block number in the data segment is specified at input
finished (RDY = 1), the input will not be BNR.
evaluated again. Valid values: 0...127
RDY BINARY
0/1 = 1: The block is not processed, i.e. it no
Output RDY indicates that writing of the data record has
longer changes its outputs. This is not
been completed. This output has always to be considered
valid during the writing procedure.
together with output ERR. The following applies:
SM BINARY/WORD/DOUBLE WORD RDY = 1 and ERR = 0: The writing operation has been
completed. The data set has been
The first binary/word/double word flag of the data set is
stored in the SmartMedia Card.
specified at input SM. When a writing procedure of a data
set is started (0/1 edge at input 0/1), the data of the data RDY = 1 and ERR = 1: An error occurred during the writ-
set must not be changed until the end of the writing proce- ing procedure. Output ERNO sig-
dure (RDY = 1). nalizes the error number.
nB WORD
The number of the data set blocks is specified at input nB. ERR BINARY
The number of data which can be stored in a block de- Output ERR indicates whether an error occurred during
pends on input SM. Either 64 binary data or 32 word data the writing procedure. This output has always to be consi-
or 16 double word data are stored per block. dered together with output RDY. If an error has occurred,
Valid values: 1...128 the following applies:
RDY = 1 and ERR = 1.
Output ERNO signalizes the error number.
Graphic
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
FCWR
BIT_IN Y N Y 0 00 0/1 RDY 00 0 Y N Y BIT_OUT_FB
ALLE Y N Y 0 00 SM ERR 00 0 Y N Y BIT_OUT_FB
WORT_IN Y N Y 0 00 nB ERNO 00 0 Y N Y WORT_OUT
WORT_IN Y N Y 0 00 SEG
WORT_IN Y N Y 0 00 BNR
Source
SN ZN Command / Variable Symbol Long text
FBD/LD IL
Parameters
0/1 BINARY E, M, A, K, S Deletion of one data segment by a 0/1 edge
#SEG DIRECT #, #H Number of the data segment in the FLASH EPROM
CONSTANT 0...3
RDY BINARY A, M Write procedure completed
ERR BINARY A, M Error occurred, data segment cannot be deleted
____________________________________________________________________________________________
CE data
Runtime: 07 KR 91 / 07 KT 92 / 07 KT 93 / 07 KP 62
Basic runtime: 23 – 53 µs
Additional runtime: –––
Updating of the outputs: no
Number of historical values: 2 words
Available as of: ABB Procontic CS31 07KT92 R202/R262, 07KT93 R171
ABB Procontic T200 07KP62 R202
____________________________________________________________________________________________
Parameters
FREI BINARY E, A, M, S, K Enable search
R BINARY E, A, M, S, K Reset
#n DIRECT #, #H Number of binary variables
CONSTANT
B0 BINARY E, A, M List of binary variables; the input can be duplicated
END BINARY A, M List end reached
NR WORD AW, MW List number of the variables found
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 90 µs
Additional runtime: 10 µs per binary variable at the inputs B0...Bn–1
Output updating: yes if FREI = 1
recommendation: Allocate the output directly to a flag or use a global
intermediate flag; see volume 3, chapter 2.5.3
Number of historical values: 4 words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description If a binary variable with the value 1 is found in the list, the
search is ended, the variable is deleted and its list number
This function block searches through a list of binary vari- is output through the output NR. The search is continued
ables (E, A, M, S) for set binary variables. If a set binary again when the block is called again (in the next program
variable is found, its serial number referred to the list is cycle). The binary variable directly following the one
indicated. The set binary variable at the input is deleted. found is now examined first.
The inputs and outputs cannot be negated/inverted. The
input B0 is capable of duplication. The search ends at the end of the list if no further set vari-
able is found.
FREI BINARY
The search for a set binary variable is enabled with the
The value 1 is then allocated to the END output and the
FREI input.
number of the variable found last during the search is indi-
FREI = 0 Search is not enabled
cated at the output NR.
FREI = 1 Search is enabled.
R BINARY NR WORD
By means of the input R, the function block is set to a de- The list number of the binary variable found last is output
fined state (reset) in order to be able to start a search from through the NR output.
the start of the variable list. The following affiliations apply:
R = 0 –> No reset of the block
R = 1 –> Reset of the block for preparation of a
search from the start of the list Variable at the input List number
Note: Even when the block is called for the very first B0 1
time after starting the PLC program, a reset must
B1 2
first of all be executed in order to create the cor-
rect marginal conditions for the first search. . .
. .
A reset of the block results in the following:
– Output END = 0 . .
– Output NR = 0 Bn–1 n
– The next search takes place from the start of the list
Priority: If the end of the list is reached during the search without a
The input R has higher priority than the input FREI, i. e. no set variable having been found, the number of the vari-
search is executed as long as there is a 1 signal at the in- able last found continues to be output through the output
put R. NR.
Searching from the start of the list without a variable being
#n DIRECT CONSTANT found:
The number of binary variables planned at the inputs If no set binary variable is found during a search from the
B0...Bn–1 is specified at the input #n. This is specified as start of the list, the state 1 is assigned to the output END
a direct constant. when the end of the list is reached and the value 0 is as-
signed to the output NR. When the block is called again in
B0..Bn–1 BINARY the next program cycle, the search automatically takes
The input B0 can be duplicated (B0...Bn–1). place again from the start of the list. Automatic searching
The list of binary variables to be examined is specified at from the start of the list continues until a set binary vari-
the inputs B0...Bn–1. Owing to the reset mechanism, step able is found once.
operands (S) and indirect constants (K) are not allowed.
END BINARY
Whether or not the end of the specified variable list has
been reached without a set binary variable having been
found in the search just carried out is signalled at the END
output. That is to say, if the last binary variable of the list is
recognized and reported as being “set” during a search,
the output END is not yet set to the value 1. Instead, this
does not take place until the next processing cycle.
END = 0 –> List end not reached
END = 1 –> List end reached without a set binary vari-
able having been found in the current
search
Example
FBD/LD IL
!BA 0
FEHSU
FEHSU M 00,04
M 00,00 FREI M 00,00
M 00,04 R # 3
# 3 #n END M 01,01 M 01,10
M 01,10 B0 NR AW 05,00 M 01,11
M 01,11 B1 M 01,12
M 01,12 B2 M 01,01
AW 05,00
CE FBD Definition
FEHSU
FREI
R
#n END
B NR
FREI E L N P Y 0 0
R E L N P Y 0 0
#n K W N P Y 0 0
B E L N P Y 1 0
END A L N P Y 0 0
NR A W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 FEHSU
00002 PP 0 R Input BINARY (Reset)
00003 PP 0 FREI Input BINARY (enable)
00004 PP 0 #n # CONSTANT (number of bits)
[ 1
00005 PP 0 B Input BINARY (element of the list of binary variables)
] 1
00006 PP 0 END Ausgang BINÄR (list end reached)
00007 PP 0 NR Ausgang WORT (No.)
!BA 0
FIFO FIFO
B/W R
LADE LADE
LESE LESE
R A E
E FST B/W
#L L #L
ANF V ANF
A
FST
L
V
____________________________________________________________________________________________
Parameters
B/W BINARY E, A, M, S, K Binary/word data
LADE BINARY E, A, M, S, K Load FIFO
LESE BINARY E, A, M, S, K Read FIFO
R BINARY E, A, M, S, K Reset FIFO, 0–>1 edge
E BINARY, E, A, M, S, K Input of data in the FIFO
WORD EW, AW, MW, KW
#L DIRECT #, #H Number of memory locations (bytes)
CONSTANT
ANF BINARY E, A, M, K Start of the FIFO in the flag area
WORD EW, AW, MW, KW
A BINARY, E, M Output of data from the FIFO
WORD AW, MW
FST WORD AW, MW Filling level of the FIFO
L BINARY A, M FIFO empty
V BINARY A, M FIFO full
____________________________________________________________________________________________
VE–Data
Runtime:
Basic runtime: 64 µs
Additional runtime: 0 ... 114 µs according to the function to be carried out
Output updating: no; recommendation: Allocate the output directly to a flag or use a global
intermediate flag; see volume 3, chapter 2.5.3
Number of historical values: 4 words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
This function block realizes a stack for binary or word data
from which the data written in first is again read out first
(first in/first out).
The inputs and outputs can neither be duplicated nor ne-
gated/inverted.
ANF BINARY/WORD
LADE and LESE The FIFO memory start address is specified as a binary
If load and read orders are present simultaneously, the or word flag at the input ANF. The FIFO begins with the
value to be loaded is forwarded directly from the input E to specified flag.
the output A provided the FIFO is empty.
A BINARY/WORD
If the FIFO is not empty, the current FIFO value is output
and the new load information is transferred to it. When the FIFO is read, the current value is available at
The FIFO does not change its filling level in this mode. the output A. If no read order is available, the value 0 is
The value output through the output FST remains con- output.
stant. If the FIFO is empty, the output L remains 1 and the FST WORD
output FST is set to 0.
The output FST indicates the current filling level of the
FIFO at any time. The filling level is the number of binary
R BINARY or word values stored in the FIFO.
A 0–>1 edge at the input R results in the reset of the block. L BINARY
Therefore, values read in before are no longer available.
The output L indicates whether or not the FIFO is empty.
L = 0 –> FIFO is not empty
The output L assumes the value 1 and the outputs FST L = 1 –> FIFO is empty
and A assume the value 0.
V BINARY
The output V indicates whether or not the FIFO is full.
R and LADE
V = 0 –> FIFO is not full
If R and LADE signals are present simultaneously the re- V = 1 –> FIFO is full
set is performed first and then directly afterwards the load
operation. Therefore, the FIFO is reset and the new value No more values can be read in if the FIFO is full. A value
to be read in is then immediately stored in the FIFO as the can only be read in once a value has been read out. This
first value. then takes place as from the start of the FIFO.
Example
FBD/LD IL
!BA 0
FIFO FIFO
K 00,01 B/W M 01,09
M 01,01 LADE M 01,01
M 01,05 LESE M 01,05
M 01,09 R A M 12,05 M 06,04
M 6,04 E FST MW 11,07 K 00,01
# 9 #L L A 00,01 # 9
M 01,10 ANF V A 01,15 M 01,10
M 12,05
MW 11,07
A 00,01
A 01,15
FBD/LD IL
!BA 0
FIFO FIFO
K 00,00 B/W M 02,00
M 01,00 LADE M 01,00
M 01,01 LESE M 01,01
M 02,00 R A MW 11,01 MW 03,01
MW 03,01 E FST MW 11,02 K 00,00
# 6 #L L M 03,00 # 6
MW 10,00 ANF V M 03,01 MW 10,00
MW 11,01
MW 11,02
M 03,00
M 03,01
CE FBD Definition
FIFO
B/W
LADE
LESE
R A
E FST
#L L
ANF V
B/W E L N P Y 0 0
LADE E L N P Y 0 0
LESE E L N P Y 0 0
R E L N P Y 0 0
E E X N P Y 0 0
#L K W N P Y 0 0
ANF E X N P Y 0 0
A A X N P Y 0 0
FST A W N P Y 0 0
L A L N P Y 0 0
V A L N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 FIFO
00002 PP 0 R Input BINARY (Reset)
00003 PP 0 LADE Input BINARY (load FIFO)
00004 PP 0 LESE Input BINARY (read FIFO)
00005 PP 0 E Input BINARY/WORD (input)
00006 PP 0 B/W Input BINARY (BINARY/WORD data)
00007 PP 0 #L # CONSTANT (number of memory locations)
00008 PP 0 ANF Input BINARY/WORD (start of memory locations)
00009 PP 0 A Output BINARY/WORD (ouput)
00010 PP 0 FST Output WORD (filling level)
00011 PP 0 L Output BINARY (FIFO empty)
00012 PP 0 V Output BINARY (FIFO full)
!BA 0
FKG FKG
x x
#2*n #2*n
XC0 XC0
YC0 y YC0
y
____________________________________________________________________________________________
Parameters
x WORD EW, AW, MW, KW Input for the x value of the polygon
#2*n DIRECT #, #H n: number of interpolation points
CONSTANT
XC0 WORD EW, AW, MW, KW
Input for x values of the interpolation points;
Input can be duplicated
YC0 WORD EW, AW, MW, KW Input for y values of the interpolation points;
Input can be duplicated
y WORD AW, MW Output for the y value of the polygon
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 136 µs
Additional runtime: 9 µs per interpolation point
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
X0 < X1 < X2 ... < Xn–1 Note: The result of division is always rounded down, i. e.
2 < n < 32767 any division remainder is ignored.
(X2/Y2)
(X1/Y1) (X3/Y3)
(Xn–1/Yn–1)
(X0/Y0)
x WORD
The current x coordinate is specified at the input x. The
block then defines the y coordinate affiliated by the poly-
gon.
XC0...XCn–1 WORD
The x coordinates of the n interpolation points are speci-
fied are the inputs XC0...XCn–1. The input XC0 is capa-
ble of duplication. If this input is duplicated, the input YCO
is automatically also duplicated.
YC0...YCn–1 WORD
The y coordinates of the n interpolation points are speci-
fied at the inputs YC0...YCn–1. The input YC0 is capable
of duplication. If this input is duplicated, the input XC0 is
automatically also duplicated.
y WORD
The y coordinate affiliated by the polygon of the specified
x coordinate is output through the output y.
Example
FBD/LD IL
!BA 0
FKG FKG
MW 00,00 x MW 00,00
# 6 #2*n # 6
KW 00,00 XC0 KW 00,00
KW 00,01 XC1 KW 00,01
MW 01,00 XC2 MW 01,00
KW 02,00 YC0 KW 02,00
KW 02,01 YC1 KW 02,01
MW 01,01 YC2 y AW 01,01 MW 01,01
AW 01,01
CE FBD Definition
FKG
x
#2*n
XC0
YC0 y
x E W N P Y 0 0
#2*n K W N P Y 0 0
XC0 E W N P Y 1 0
YC0 E W N P Y 1 0
y A W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 FKG
00002 PP 0 x Input WORD
00003 PP 0 #2*n Input # CONSTANT (n = number of interpolation points)
00004 [ 1
00005 PP 1 XC0 Input WORD (x coordinate)
00006 PP 1 YC0 Input WORD (y coordinate)
00007 ] 1
00008 PP 0 y Output WORD
FBD/LD IL
Parameters
0/1 BINARY E, M, A, K, S Reading of one data set by a 0/1 edge
SM BINARY E, M, A, K, S
WORD EW, MW, AW, KW
DOUBLE WORD MD, KD Start flag of the location of the data set
#nB DIRECT #, #H Number of blocks of the data set
CONSTANT 1...481
#SEG DIRECT #, #H Number of the data segment in the Flash EPROM
CONSTANT 0...3
BNR WORD EW, MW, AW, KW Number of the block in the data segment
valid values: 0 ... 480
RDY BINARY A, M Reading procedure completed
ERR BINARY A, M Occurred error
ERNO WORD AW, MW Error number
____________________________________________________________________________________________
This function block reads a data set from a data segment Either 32 binary data or 16 word data or 8 double word
in the Flash EPROM and stores the read data set begin- data are read per block. The data of each block are se-
ning at the start flag defined by SM. The data of the data cured by a checksum.
set had been stored in the Flash EPROM by the function
The reading procedure is carried out once by a 0/1 edge
block FWR or by the operating command FWR.
at the input 0/1. If there was no error when reading the
data, the output RDY is set to ”1” and the outputs ERR
Important note:
and ERNO are set to ”0”. The data set is stored beginning
An access to the Flash EPROM is only permitted by using at the defined start flag SM.
the function blocks FWR and FRD. It is not allowed to
access the Flash EPROM by other function blocks (WOL, Storing the data set can take several PLC cycles.
WOS, COPY,...). If an error occurs during the reading procedure, RDY and
ERR are both set to ”1”. The error type is indicated at the
The inputs SM and #nB define, which data are read from output ERNO.
the Flash EPROM. The input #SEG defines the data seg-
ment in the Flash EPROM. The number of data, which are The outputs RDY, ERR and ERNO are set to ”0” by a sig-
read from a block, depends on input SM. nal 0 at the input 0/1.
FBD/LD IL
Parameters
0/1 BINARY E, M, A, K, S Saving of one data set by a 0/1 edge
SM BINARY E, M, A, K, S
WORD EW, MW, AW, KW
DOUBLE WORD MD, KD Start flag of the data set
#nB DIRECT #, #H Number of blocks of the data set
CONSTANT 1...481
#SEG DIRECT #, #H Number of the data segment in the Flash EPROM
CONSTANT 0...3
BNR WORD EW, MW, AW, KW Number of the block in the data segment
valid values: 0...480
RDY BINARY A, M Writing procedure completed
ERR BINARY A, M Occurred error
ERNO WORD AW, MW Error number
____________________________________________________________________________________________
Description For each user data set, a separate function block FWR as
well as a separate function block FRD have to be planned
The function block writes a data set to a data segment in in the PLC program.
the Flash EPROM. For this purpose, there are 4 data seg- The inputs SM and #nB define, which data are written to
ments (0...3) available in the Flash EPROM. A deletion the Flash EPROM. The input #SEG defines the data seg-
procedure (function block FDEL) always deletes a com- ment in the Flash EPROM. The number of data, which
plete data segment. Each data segment consists of 481 can be stored in the block, depends on input SM.
blocks (0...480). After deletion, each of these 481 blocks
can store data only once. If a block containing data is to The following applies:
be overwritten by new data, the entire data segment has Either 32 binary data or 16 word data or 8 double word
to be deleted beforehand. In doing so, all data in this seg- data are written per block. The data of each block are se-
ment are lost. cured by a checksum.
When a writing procedure of a data set is started
Important note: (0/1 edge at input 0/1), the data of the data set must not
An access to the Flash EPROM is only permitted by using be changed until the end of the writing procedure (RDY =
the function blocks FWR and FRD. It is not allowed to 1).
access the Flash EPROM by other function blocks (WOL, Storing the data set in the Flash EPROM can take several
WOS, COPY,...). PLC cycles.
A 0/1 edge at input 0/1 starts the writing procedure of the Examples:
data set once. The input 0/1 is no longer evaluated until – SM = M 01,00 and #nB = 1:
the storing of the data set has been completed (RDY = 1). Writing of the data from M 01,00 to M 02,15
(1 block = 32 binary data)
– SM = M 01,00 and #nB = 2:
After completion of the writing procedure the block out- Writing of the data from M 01,00 to M 04,15
puts RDY, ERR and ERNO are updated. If RDY = 1 and (2 blocks = 64 binary data)
ERR = 0, the procedure was successful. If RDY = 1 and – SM = MW 02,00 and #nB = 1:
ERR = 1, an error had occurred. The output ERNO indica- Writing of the data from MW 02,00 to MW 02,15
tes the error type then. (1 block = 16 word data)
– SM = MW 02,00 and #nB = 2:
Writing of the data from MW 02,00 to MW 03,15
After storing the data set in the Flash EPROM, the block (2 blocks = 32 word data)
outputs RDY, ERR and ERNO are set to ”0” by a signal 0 – SM = MD 03,00 and #nB = 1:
at input 0/1. A new 0/1 edge at input 0/1 starts a new wri- Writing of the data from MD 03,00 to MD 03,07
ting procedure. Since without a previous deletion of the (1 block = 8 double word data)
data segment no new data can be written to blocks which – SM = MD 03,00 and #nB = 2:
already contain data, the input BNR must point to the next Writing of the data from MD 03,00 to MD 03,15
(2 blocks = 16 double word data)
free block for the next writing procedure.
#SEG DIRECT CONSTANT
The number of the data segment in the Flash EPROM is
0/1 BINARY given at the input SEG. In the Flash EPROM, 4 data seg-
The processing of the function block is controlled by the ments are available.
input 0/1. The following is valid:
0/1 = 0: The outputs RDY, ERR and ERNO – #0 corresponds to data segment 0
are set to ”0”. – #1 corresponds to data segment 1
This is not valid during a writing – #2 corresponds to data segment 2
procedure. – #3 corresponds to data segment 3
0/1= 0/1 edge: The writing procedure of the data set BNR WORD
is started once. The number of the block in the data segment is given at
The input 0/1 is no longer evaluated the input BNR.
until the writing procedure has been Valid values: 0...480
completed (RDY = 1). RDY BINARY
0/1 = 1: The function block is not processed, The output RDY indicates that the writing procedure of
i.e. it does not change its outputs any the data set has been completed. The output has always
more. This is not valid during a writing to be considered together with the output ERR.
procedure. The following applies:
RDY = 1 and ERR = 0: The writing procedure is
completed. The data set has
SM BINARY / WORD / DOUBLE WORD has been stored in the Flash
The first binary/word/double-word flag of the data set is EPROM.
given at input SM. When the writing procedure of a data RDY = 1 and ERR = 1: An error has occurred during
set has been started (0/1 edge at input 0/1), the data of the writing procedure. The
the data set must not be changed until the procedure has output ERNO indicates the
been completed (RDY = 1). error number.
ERR BINARY
The output ERR indicates whether or not an error has oc-
#nB DIRECT CONSTANT curred during the writing procedure. The output has al-
The number of blocks of the data set is given at input #nB. ways to be considered together with the output RDY.
The number of data, which can be stored in a block, de- If an error has occurred, the following is valid:
pends on input SM. Either 32 binary data or 16 word data RDY = 1 and ERR = 1.
or 8 double word data are stored per block. The output ERNO indicates the error number then.
CE data
Runtime: 07 KR 91 / 07 KT 92 / 07 KT 93 / 07 KP 62
Basic runtime: 22 – 67 µs
Additional runtime: –––
Updating of the outputs: no
Number of historical values: 2 words
Available as of: ABB Procontic CS31 07KT92 R202/R262, 07KT93 R171
ABB Procontic T200 07KP62 R202
____________________________________________________________________________________________
Parameters
0/1 BINARY E, A, M, S, K Selection of the setpoint 0 or the setpoint 1
0S WORD EW, AW, MW, KW Setpoint 0
1S WORD EW, AW, MW, KW Setpoint1
TH/T WORD EW, AW, MW, KW Start up time scaled to the cycle time
TR/T WORD EW, AW, MW, KW Return time scaled to the cycle time
STOP BINARY E, A, M, S, K Latching of the output at the current value
S BINARY E, A, M, S, K Setting of the output to the INIT value
INIT WORD EW, AW, MW, KW INIT value to which the output can be set
R BINARY E, A, M, S, K Reset of the output to the value 0
A1 WORD MW, AW Output
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 126 µs
Additional runtime: –––
Output updating: yes
Number of historical values: 2 words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description The inputs and the output can neither be duplicated nor
negated/inverted.
The ramp–function generator serves to provide ramp– The slope y’ of the ramp results from the specified time
shaped adaption of the current actual value at the output TH (start up time) or TR (return time) and the amount of
to a specified setpoint. the setpoint:
Example 1
The actual value is to be changed from 0 to the setpoint +
500 (setpoint amount 500) and then from +500 to the set-
point –1000 (setpoint amount 1000).
The start up time is TH and the return time TR.
0 S: 500
1 S: –1000
+ 500
t
TH
– 500
TR
– 1000
TR(*)
TR(*) is the actual time until the actual value has reached –1000.
During the time TH or TR, the actual value changes by the amount of the applied setpoint.
Example 2
The actual value is to be changed from 0 to the setpoint
+500 (setpoint amount 500) and then from +500 to the
setpoint 1500 (setpoint amount 1500).
+ 2000
+ 1500
+ 1000
Setpoint changeover
from 0 S –> 1 S
+ 500
t
TH1 TH2(*)
TH2
TR(*) is the actual time until the actual value has reached 1500.
During the time TH or TR, the actual value changes by the amount of the applied setpoint.
Example
FBD/LD IL
CE FBD Definition
HLG
0/1
0S
1S
TH/T
TR/T
STOP
S
INIT
R A1
0/1 E L N P Y 0 0
0S E W N P Y 0 0
1S E W N P Y 0 0
TH/T E W N P Y 0 0
TR/T E W N P Y 0 0
STOP E L N P Y 0 0
S E L N P Y 0 0
INIT E W N P Y 0 0
R E L N P Y 0 0
A1 A W N P N 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 HLG
00002 PP 0 0/1 Input BIT (setpoint selection)
00003 PP 0 0S Input WORD (setpoint No. 0)
00004 PP 0 1S Input WORD (setpoint No. 1)
00005 PP 0 TH/T Input WORD (start up time)
00006 PP 0 TR/T Input WORD (return time)
00007 PP 0 STOP Input BIT (stop ramp–function generator)
00008 PP 0 S Input BIT (set to INIT)
00009 PP 0 INIT Input WORD (initial value)
00010 PP 0 R Input BIT (reset to 0)
00011 PP 0 A1 Output WORD
IMPORTANT:
To some extent, functioning of this connection element ! 1–0
did not correspond to the description. The functional I– =S Q
scope has been modified as from 907 PC 31 Vers. 2.2 and 1–0 Q !N 1–0
now conforms to the description. PULS & Q
=R Q
= PULS
____________________________________________________________________________________________
Parameters
1–0 BINARY E, M, A, S, K Input for 1 – 0 edge
Q BINARY A, M Output for interrogation of the direct flag
PULS BINARY A, M Pulse output
____________________________________________________________________________________________
PULS BINARY
A pulse is present at this output for 1 program cycle time if
a 1–0 edge occurs at the input 1–0.
Duration of the pulse
From recognition of the 1–0 edge by the connection ele-
ment up to renewed processing of this connection ele-
ment in the next program cycle.
1–0
PULS
T T
Example
FBD/LD IL
M 10,00
! M 03,00
I– =S M 10,00
M 03,00 1–0 Q !N M 03,00
PULS M 05,05 & M 10,00
=R M 10,00
= M 05,05
CE FBD Definition
I–
1–0 Q
PULS
1–0 E L N P Y 0 0
Q A L N P Y 0 0
PULS A L N P Y 0 0
CE IL Definition
!N 0–1
I+ =R Q
0–1 Q ! 0–1
PULS &N Q
=S Q
= PULS
____________________________________________________________________________________________
Parameters
0–1 BINARY E, M, A, S, K Input for 0 – 1 edge
Q BINARY A, M Output for interrogation of the direct flag
PULS BINARY A, M Pulse output
____________________________________________________________________________________________
Q
Q BINARY
This additional auxiliary flag, which is specified as a direct PULS
flag above the connection element, is needed for edge T T
detection. This flag must not be used again in the PLC
program. It can be interrogated via the output Q. That is to
T: Program cycle time.
say, the output Q can be connected to another connection
element or a binary operand (A, M) can also be planned at The input and the outputs can neither be duplicated nor
the output Q. inverted.
Example
FBD/LD IL
M 08,06
!N E 01,00
I+ =R M 08,06
E 01,00 0–1 Q ! E 01,00
PULS M 08,07 &N M 08,06
=S M 08,06
= M 08,07
CE FBD Definition
I+
0–1 Q
PULS
0–1 E L N P Y 0 0
Q A L N P Y 0 0
PULS A L N P Y 0 0
CE IL Definition
IDENT
FREI TYP
RUB
VER
Parameters
FREI BINARY E,K , M, S Enabling of the block processing
TYP WORD AW, MW, Device type
RUB WORD AW, MW Category
VER WORD AW, MW Software version
CE data
Output updating: no
Number of historical values: none
VER WORD
FREI BINARY If FREI = 1, the software version is output at output VER.
Enabling the block with FREI = 1. For FREI = 0, the out- Example: VER = 105 → the device has the software version 1.5.
puts are not changed.
If FREI = 0, the block is not processed, i. e. the outputs
are not changed.
TYP WORD
If FREI = 1, the device type is output at output TYP.
Example: TYP = 94 →the device is a basic unit
07 KT 94.
Graphic
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
IDENT
Source
!BA 0
IDLB IDLB
FREI FREI
INDX INDX
BASI BASI
ZIEL ZIEL
____________________________________________________________________________________________
Parameters
FREI BINARY E, A, M, K, S Enable for the block
Frei = 0: Block is not processed
Frei = 1: The value of the source variable is read
and allocated to the target variable.
INDX WORD EW, AW, MW, KW The index and the basic variable result
in the source variable
BASI BINARY E, A, M, K Basic variable
ZIEL BINARY A, M Target variable
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 35 µs
Additional runtime: none
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / Communication Processor 07 KP 62
____________________________________________________________________________________________
Description Formula:
This function block serves the purpose of indexed reading
of binary variables. INDX
–––– = A Remainder B
The source variable to be read is obtained from indexing 16
the basic variable. The value of the source variable read is Group No. of the source flag:
allocated to the target variable. Group No. of the basic flag + A
Channel No. of the source flag:
The inputs and outputs can neither be duplicated nor in-
Channel No. of the basic flag + B
verted nor negated.
Example:
The group and channel numbers of the source flag
(source variable) are determined from the basic flag and Basic variable: M 00,00
the index INDX. INDX = 10 –> 10 : 16 = A = 0, Remainder B = 10
The source flag is: –>Source variable:
M (G_Basis + A) , (K_Basis + B) M(00+A),(00+B) = M(00+0),(00+10) = M 00,10
where:
FREI BINARY
Enable block
INDX WORD
The index value is specified at the input INDX. The source
variable (see above for a calculation) results from the in-
dex INDX and the basic variable.
Value range: –16383 < INDX < +16383
BASI BINRAY
The basic variable is specified at the input BASI. The
source variable (see above for a calculation) results from
the index INDX and the basic variable.
Example
FBD/LD IL
!BA 0
IDLB IDLB
M 00,00 FREI M 00,00
MW 00,00 INDX MW 00,00
M 00,01 BASI M 00,01
ZIEL M 00,02
M 00,02
!BA 0
IDLm IDL
FREI FREI
INDX INDX
BASI BASI
ZIEL ZIEL
____________________________________________________________________________________________
Parameters
FREI BINARY E, A, M, K, S Enable for the block
Frei = 0: Block is not processed
Frei = 1: The value of the source variable is read
and allocated to the target variable.
INDX WORD EW, AW, MW, KW The index and the basic variable result
in the source variable
BASI WORD EW, AW, MW, KW Basic variable
ZIEL WORD AW, MW Target variable
____________________________________________________________________________________________
CE Data Series 90 Series 30, 40, 50
Runtime:
Basic runtime: 35 µs 63 µs
Additional runtime: ––– –––
Output updating: yes yes
Number of historical values: none none
Available as of: ABB Procontic CS31 / 907 PC 331
907 PC 331 / 07 KR 31 V 1.0
07 CR 41, 07 CT 41, 07 KR 51, 07 KT 51
____________________________________________________________________________________________
Description Formula:
This function block serves the purpose of indexed reading
of word variables. INDX
–––– = A Remainder B
The source variable to be read is obtained from indexing 16
the basic variable. The value of the source variable read is Group No. of the source flag:
allocated to the target variable. Group No. of the basic flag + A
Channel No. of the source flag:
The inputs and outputs can neither be duplicated nor in- Channel No. of the basic flag + B
verted nor negated.
Example:
The group and channel numbers of the source flag
(source variable) are determined from the basic flag and Basic variable: MW 00,00
the index INDX. INDX = 10 –> 10 : 16 = A = 0, Remainder B = 10
The source flag is: –>Source variable:
MW (G_Basis + A) , (K_Basis + B) MW(00+A),(00+B) = MW(00+0),(00+10) = MW 00,10
where:
FREI BINARY
Enable block
INDX WORD
The index value is specified at the input INDX. The source
variable (see above for a calculation) results from the in-
dex INDX and the basic variable.
Value range: –16383 < INDX < +16383
If INDX is out of range, the function block is not pro-
cessed.
BASI WORD
The basic variable is specified at the input BASI. The
source variable (see above for a calculation) results from
the index INDX and the basic variable.
Example
FBD/LD IL
!BA 0
IDLm IDL
M 00,00 FREI M 00,00
MW 00,00 INDX MW 00,00
MW 00,01 BASI MW 00,01
ZIEL MW 00,02
MW 00,02
CE FBD Definition
IDLm
FREI
INDX
BASI
ZIEL
FREI E L N P Y 0 0
INDX E W N P Y 0 0
BASI E W N P Y 0 0
ZIEL E W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 IDL
00002 PP 0 FREI Enable (BINARY)
00003 PP 0 INDX Index relatet to basis (WORD)
00004 PP 0 BASI Basic variable (WORD)
00005 PP 0 ZIEL Target variable (WORD)
!BA 0
IDSB IDSB
FREI FREI
QUEL QUEL
INDX INDX
BASI
BASI
____________________________________________________________________________________________
Parameters
FREI BINARY E, A, M, K, S Enable block
FREI = 0: Block is not processed
FREI = 1: The value of the source variable is read
and allocated to the target variable
QUEL BINARY E, A, M, K Source variable
INDX WORD EW, AW, MW, KW The current target variable results from the index
and the basic variable
BASI BINARY A, M Basic variable
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 35 µs
Additional runtime: none
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / Communication Processor 07 KP 62
____________________________________________________________________________________________
Description Formula:
The inputs and outputs can neither be duplicated nor ne- Channel No. of the target flag:
gated nor inverted. Channel No. of the basic flag + B
The group and channel number of the target flag (target Example:
variable) are determined on the basis of the basic flag and
the index INDX. Basic variable: M 00,00
–> INDX = 10 –> 10 : 16 = A = 0, Remainder B = 10
The target flag is called: M (G_Basis+A),(K_Basis+B) –> Target variable:
where: M(00+A), (00+B) = M (00+0),(00+10) =
G_Basis: Group number of the basic flag M 00,10
K_Basis: Channel number of the basic flag –> Target variable: M 00,10
FREI BINARY
Enable block
FREI=0: –> Block is not processed
FREI=1: –> The value of the source variable is read
and allocated to the target variable
ZIEL.
QUEL BINARY
The source variable is specified at the input QUEL. The
value of this variable is read and allocated to the target
variable.
INDX WORD
The index value is specified at the input INDX. The target
variable (see above for a calculation) results from the in-
dex INDX and the basic variable.
Example
FBD/LD IL
!BA 0
IDSB IDSB
M 00,00 FREI M 00,00
M 09,00 QUEL M 09,00
MW 00,00 INDX MW 00,00
BASI M 00,01
M 00,01
CE FBD Definition
IDSB
FREI
QUEL
INDX
BASI
FREI E L N P J 0 0
QUEL E L N P J 0 0
INDX E W N P J 0 0
BASI A L N P J 0 0
CE IL Definition
00000 !BA 0 No. Block No. (preset to 0)
00001 IDSB
00002 PP 0 FREI Enable (BINARY)
00003 PP 0 QUEL Source variable (BINARY)
00004 PP 0 INDX Index related to basis (WORD)
00005 PP 0 BASI Basis variable for target (BINARY)
!BA 0
IDSm IDS
FREI FREI
QUEL QUEL
INDX INDX
BASI
BASI
____________________________________________________________________________________________
Parameters
FREI BINARY E, A, M, K, S Enable block
FREI = 0: Block is not processed
FREI = 1: The value of the source variable is read
and allocated to the target variable
QUEL WORD EW, AW, MW, KW Source variable
INDX WORD EW, AW, MW, KW The current target variable results from the index
and the basic variable
BASI WORD AW, MW Basic variable
____________________________________________________________________________________________
Description Formula:
The inputs and outputs can neither be duplicated nor ne- Channel No. of the target flag:
gated nor inverted. Channel No. of the basic flag + B
The group and channel number of the target flag (target Example:
variable) are determined on the basis of the basic flag and
the index INDX. Basic variable: MW 00,00
–> INDX = 10 –> 10 : 16 = A = 0, Remainder B = 10
The target flag is called: MW (G_Basis+A),(K_Basis+B) –> Target variable:
where: MW(00+A), (00+B) = MW (00+0),(00+10) =
G_Basis: Group number of the basic flag MW 00,10
K_Basis: Channel number of the basic flag –> Target variable: MW 00,10
FREI BINARY
Enable block
FREI=0: –> Block is not processed
FREI=1: –> The value of the source variable is read
and allocated to the target variable
ZIEL.
QUEL WORD
The source variable is specified at the input QUEL. The
value of this variable is read and allocated to the target
variable.
INDX WORD
The index value is specified at the input INDX. The target
variable (see above for a calculation) results from the in-
dex INDX and the basic variable.
Example
FBD/LD IL
!BA 0
IDSm IDS
M 00,00 FREI M 00,00
MW 09,00 QUEL MW 09,00
MW 00,00 INDX MW 00,00
BASI MW 00,01
MW 00,01
CE FBD Definition
IDSm
FREI
QUEL
INDX
BASI
FREI E L N P Y 0 0
QUEL E W N P Y 0 0
INDX E W N P Y 0 0
BASI A W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 IDS
00002 PP 0 FREI Enable (BINARY)
00003 PP 0 QUEL Source variable (WORD)
00004 PP 0 INDX Index relatet to basis (WORD)
00005 PP 0 BASI Basic variable for target (WORD)
____________________________________________________________________________________________
Parameters
–––
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 4 µs
Additional runtime: –––
Output updating: –––
Number of historical values: –––
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
IF THEN is a basic function in the manufacturer library.
The element’s name in the library is :=
The element cannot be called in the CE and CE IL editors.
The programming unit uses this element to realize con-
nection lines.
____________________________________________________________________________________________
Example
FBD/LD IL
____________________________________________________________________________________________
CE FBD Definition
not defined
CE IL Definition
00000 ! PP 0 inp
00002 = PP 0 outp
____________________________________________________________________________________________
Parameters
–––
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 4 µs
Additional runtime: –––
Output updating: –––
Number of historical values: –––
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
IF THEN, WORD is a basic function in the manufacturer
library. The element’s name in the library is :=WO
This element cannot be called in the CE and CE IL edi-
tors.
The programming unit uses this element to realize con-
necting lines.
____________________________________________________________________________________________
Example
FBD/LD IL
CE FBD Definition
not defined
CE IL Definition
00000 ! PP 0 inp
00002 = PP 0 outp
!BA 0
INITS
INITS
0–1 0–1
#n #n
VAR VAR
____________________________________________________________________________________________
Parameters
0–1 BINARY E, A, M, S Enabling for non–recurring processing of the block
(0/1 edge)
#n DIRECT #, #H Quantity (n) of memory words to be initialized
CONSTANT
VAR BINARY, E, A, M, K, S, The n memory words specified at the input #n are
WORD, EW, AM, MW, KW, initialized as from this variable.
DOUBLE WORD MD, KD
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 40 µs
Additional runtime: 2.6 µs per memory word to be initialized
Output updating: not applicable
Number of historical values: 1 word
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
#n DIRECT CONSTANT
Quantity (n) of words to be initialized.
Example
M 03,01
M 03,02
M 03,03
M 03,04
FBD/LD IL
!BA 0
INITS
INITS
M 00,00 0–1 M 00,00
# 2 #n # 2
M 03,01 VAR M 03,01
CE FBD Definition
INITS
0–1
#n
VAR
0–1 E L N P Y 0 0
#n K W N P Y 0 0
VAR E X N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 INITS
00001 PP 0 0–1 Enable edge (BINARY)
00002 PP 0 #n Number (DIRECT CONSTANT)
00003 PP 0 VAR Start variable (BINARY, WORD, DOUBLE WORD)
!BA 0
INITV
INITV
0–1
0–1
#W/B
#W/B
#n
#n
#W0
#W0
VR0
VR0
____________________________________________________________________________________________
Parameters
0–1 BINARY E, A, M, S Enabling for non–recurring processing of the block
(0/1 edge)
#W/B DIRECT #, #H Format specification
CONSTANT #W/B = 1: Initialization of WORD variables
#W/B = 0: Initialization of BINARY variables
#n DIRECT #, #H Number of variables to be initialized
CONSTANT
#W0 DIRECT #, #H Initialization value for the subsequent variable;
CONSTANT The inputs #W0 and VR0 can be duplicated in pairs
VR0 BINARY, WORD E, A, M, Variable to be initialized;
EW, AW, MW The inputs VR0 and #W0 can be duplicated in pairs
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 34 µs
Additional runtime: 11 µs per additional variable VR1 ... VRn–1 to be initialized
Output updating: not applicable
Number of historical values: 1 word
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
The initialization values are specified as direct constants. #W/B = 1: Word variable (EW, AW, MW)
The block is run through precisely once when a 0/1 edge #W/B = 0: Binary variable (E, A, M)
appears at the input 0–1.
0–1 BINARY #n DIRECT CONSTANT
The block is run through precisely once when a 0/1 edge The quantity n of variables to be initialized is specified as
appears at the input 0–1. a direct constant at the input #n.
VR0 BINARY/WORD
The first variable to be initialized is specified at the input
VR0.
Example
MW 00,09 = 4853
MW 03,07 = 12
MW 02,15 = 8
FBD/LD IL
!BA 0
INITV
INITV
M 00,00 0–1 M 00,00
# 1 #W/B # 1
# 3 #n # 3
# 4853 #W0 # 4853
MW 00,09 VR0 MW 00,09
# 12 #W1 # 12
MW 03,07 VR1 MW 03,07
# 8 #W2 # 8
MW 02,15 VR2 MW 02,15
CE FBD Definition
INITV
0–1
#W/B
#n
#W0
VR0
0–1 E L N P Y 0 0
#W/B K W N P Y 0 0
#n K W N P Y 0 0
#W K W N P Y 1 1
VR E X N P Y 1 1
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 INITV
00002 PP 0 0–1 Enable edge (BINARY)
00003 PP 0 #W/B Format für Variable (#)
00004 PP 0 #n Number (#)
[ 1
00005 PP 1 #W Initial value for variable (#)
00006 PP 1 VR Variable to be initialized (BINARY/WORD)
] 1
!BA 0
INTK INTK
x x
K TI/T
TI/T R
OG STOP
UG S
STOP INIT
S y=OG K
INIT y=UG OG
R y UG
y
y=OG
y=UG
____________________________________________________________________________________________
Parameters
x WORD EW, AW, MW, KW Controlled variable
K WORD EW, AW, MW, KW Proportional coefficient, output as a percentage
TI/T WORD EW, AW, MW, KW Integration time scaled to the cycle time
OG WORD EW, AW, MW, KW High limit for the manipulated variable y
UG WORD EW, AW, MW, KW Low limit for the manipulated variable y
STOP BINARY E, A, M, S, K Integrator stop
S BINARY E, A, M, S, K Set output to INIT value
INIT WORD EW, AW, MW, KW Initial value
R BINARY E, A, M, S, K Reset output y to the value 0
y=OG BINARY A, M Output y has reached top limit
y=UG BINARY A, M Output y has reached low limit
y WORD AW, MW Manipulated variable
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 189 – 197 µs
Additional runtime: –––
Output updating: yes
Number of historical values: 3 words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Transfer function ● 100 percent means that the block multiplies the value
at input x by the factor 1
K
F(s) = s*T ● 1000 percent means that the block multiplies the value
at input x by the factor 10
Transfer function
TI/T WORD
x The integration time is specified at the input TI/T. It must
be scaled to the cycle time. During the time TI the output y
of the integrator changes by the value K * x.
1
OG WORD
The manipulated variable y can be limited to a value
K
range. The high limit for the manipulated variable y is spe-
cified at the input OG.
INIT
TI
UG UG WORD
The manipulated variable y can be limited to a value
range. The low limit for the manipulated variable y is spe-
t cified at the input UG.
x WORD
The operand for the controlled variable is specified at the STOP BINARY *)
input x. Integration can be stopped with the STOP input.
Example
FBD/LD IL
!BA 0
INTK INTK
EW 00,01 x EW 00,01
AW 00,08 K KW 01,00
KW 01,00 TI/T S 05,12
AW 02,04 OG A 04,00
EW 06,10 UG M 07,09
A 04,00 STOP MW 12,03
M 07,09 S y=OG A 08,09
MW 12,03 INIT y=UG AW 00,08
M 11,13
S 05,12 R y AW 08,03 AW 02,04
EW 06,10
AW 08,03
A 08,09
M 11,13
CE FBD Definition
INTK
x
K
TI/T
OG
UG
STOP
S y=OG
INIT y=UG
R y
x E W N P Y 0 0
K E W N P Y 0 0
TI/T E W N P Y 0 0
OG E W N P Y 0 0
UG E W N P Y 0 0
STOP E L N P Y 0 0
S E L N P Y 0 0
INIT E W N P Y 0 0
R E L N P Y 0 0
y=OG A L N P Y 0 0
y=UG A L N P Y 0 0
y A W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 INTK
00002 PP 0 x Input WORD (controlled variable)
00003 PP 0 TI/T Input WORD (integration time)
00004 PP 0 R Input BINARY (reset to 0)
00005 PP 0 STOP Input BINARY (integrator stop)
00006 PP 0 S Input BINARY (set to INIT)
00007 PP 0 INIT Input WORD (initial value)
00008 PP 0 K Input WORD (proportinal coefficient)
00009 PP 0 OG Input WORD (high limit)
00010 PP 0 UG Input WORD (low limit)
00011 PP 0 y Output WORD (manipulated variable)
00012 PP 0 y=OG Output BINARY (OG reached)
00013 PP 0 y=UG Output BINARY (UG reached)
FBD/LD IL
The outputs A 04,04 ... A 06,03 are output, even if their names
are not configured in the PLC program.
Parameters
BASE BINARY E, A Base of input or output identifier
#OFF DIRECT #, #H Offset of the desired group number
CONSTANT (related to BASE)
#ANZ DIRECT #, #H Number of channels to be configured
CONSTANT
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: ca. 0 µs
Additional runtime: –––
Output updating: –––
Number of historical values: 0 words
Available as of: ABB Procontic CS31, 07 KR 91 g, 07 KT 92 g, 07 KT 93
____________________________________________________________________________________________
Description function is, for instance, required, when binary inputs are
to be read with the IDLB function block or binary outputs
The PLC processor only operates those binary inputs and are to be written with the IDSB function block, respec-
outputs whose identifier are explicitly configured in the tively.
PLC program.
The IOCON function block can enable a defined range of The input or output range is specified at the function
binary inputs or outputs for operation, whose identifier do block. The range is configured at the program start in con-
not exist in the PLC program. Normally, those inputs and junction with the program preparation. The IOCON block
outputs are not processed automatically. This enable has no function within the program cycle itself.
Example
configured: The result is:
BASE : A 01,04 Beginning of range: A (01+#OFF),04 = A 04,04
#OFF : 3 End of range: A 06,03
#ANZ : 32
A00,00 A00,00
A01,00 A01,00
A01,01 A01,01
A01,02 A01,02
A01,03 BASE = A 01,04 A01,03
A01,04 A01,04
A01,05 A01,05
A02,00 A02,00
#OFF = 3
A03,00 A03,00
A04,00 A04,00
A04,01
A04,02
Beginning of range = A04,04 A04,03
A04,04
A05,00 A05,00
#ANZ = 32
A06,00 A06,00
A06,01 A06,01
A06,02 A06,02
A06,03 A06,03
A06,04 End of range = A 06,03 A06,04
This function block reads a byte out of the I/O area and
allocates it to the operand at the output.
FBD/LD IL
!BA 0
IOR IOR
ADR A1 ADR
A1
____________________________________________________________________________________________
Parameters
ADR WORD EW, AW, MW, KW Address from the I/O area whose BYTE value is to be
read.
A1 WORD AW, MW The BYTE value read is allocated to the output A1.
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 24 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
This function block reads a byte out of the I/O area and
allocates it to the operand at the output.
ADR WORD
The value of the operand at the input ADR represents the
I/O address to be read.
A1 WORD
The byte read out of the I/O area is allocated to the LOW
BYTE of the operand at the output A1.
Example
FBD/LD IL
!BA 0
IOR IOR
KW 00,00 ADR AW 02,00 KW 00,00
AW 02,00
CE FBD Definition
IOR
ADR A1
ADR E W N P Y 0 0
A1 A W N P N 0 0
CE IL Definition
!BA 0
IOW IOW
E1 E1
ADR ADR
____________________________________________________________________________________________
Parameters
E1 WORD EW, AW, MW, KW Operand whose LOW byte is read and written into the
I/O area
ADR WORD EW, AW, MW, KW I/O address to which the value of the operand is
written.
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 24 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
This function block writes the byte specified at the input
E1 into the I/O area.
E1 WORD
The LOW BYTE of the operand at the input E1 is written
into the I/O area.
ADR WORD
The value of the operand at the input ADR represents the
I/O address to which the value is written.
Example
FBD/LD IL
!BA 0
IOW IOR
EW 00,00 EW 00,00
KW 01,00 ADR KW 01,00
CE FBD Definition
IOW
E1
ADR
E1 E W N P N 0 0
ADR E W N P Y 0 0
CE IL Definition
!BA 0
LDT
LDT
EIN EIN
AUS AUS
E A E
R EINI R
AUSI A
EINI
AUSI
____________________________________________________________________________________________
Parameters
EIN BINARY E, A, M, K, SDynamic input for activating output A
AUS BINARY E, A, M, K, SDynamic input for deactivating output A
E BINARY E, A, M, K, SDynamic input for activating and deactivating output A
R BINARY E, A, M, K, SStatic input for deactivating output A
A BINARY A, M Output
EINI BINARY A, M Pulse for the duration of one PLC program cycle when
activating output A
AUSI BINARY A, M Pulse for the duration of one PLC program cycle when
deactivating output A
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 79...83 µs
Additional runtime: none
Output updating: yes
Number of historical values: 1 word
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
This function block changes the state at the output A with EIN AUS E R A NA: Inverting of the
every 0/1 edge at the input E (like a toggle flip–flop). How- previous state of A
X X X H L
X: State is ignored
ever, this only applies if the input R is inactive. The output X X > L NA >: 0/1 edge
A can be influenced additionally with the inputs EIN, AUS X > < L L <: no 0/1 edge
and R. > < < L H L: State 0
H: State 1
All inputs except R are edge–controlled, i. e. they react
only to a 0/1 edge. The input R is active for as long as a
static 1 signal is present at it. Brief pulses are available at
the output EINI and AUSI when a status change of the
output A occurs.
Example
FBD/LD IL
!BA 0
LDT
LDT
M 00,00 EIN M 00,00
M 09,07 AUS M 09,07
M 09,08 E A M 00,01 M 09,08
M 04,02 R EINI M 00,02 M 04,02
AUSI M 00,03 M 00,01
M 00,02
M 00,03
CE FBD Definition
LDT
EIN
AUS
E A
R EINI
AUSI
EIN E L N P Y 0 0
AUS E L N P Y 0 0
E E L N P Y 0 0
R E L N P Y 0 0
A A L N P Y 0 0
EINI A L N P Y 0 0
AUSI A L N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 LDT
00002 PP 0 EIN 0/1: Activating A (BINARY)
00003 PP 0 AUS 0/1: Deactivating A (BINARY)
00004 PP 0 E 0/1: Activating/deactivating A (BINARY)
00005 PP 0 R Statically: deactivating A (BINARY)
00006 PP 0 A Output (BINARY)
00007 PP 0 EINI Activating pulse (BINARY)
00008 PP 0 AUSI Deactivating pulse (BINARY)
!BA 0
LIFO LIFO
B/W R
LADE LADE
LESE LESE
R A E
E FST B/W
#L L #L
ANF V ANF
A
FST
L
V
____________________________________________________________________________________________
Parameters
B/W BINARY E, A, M, S, K Binary data/word data
LADE BINARY E, A, M, S, K Load LIFO
LESE BINARY E, A, M, S, K Read LIFO
R BINARY E, A, M, S, K Reset LIFO, 0/1 edge
E BINARY E, A, M, S, K Enter data in the LIFO
WORD EW, AW, MW, KW
#L DIRECT #, #H Number of memory locations (bytes)
CONSTANT
ANF BINARY E, A, M, K Start of the LIFO in the flag area
WORD EW, AW, MW, KW
A BINARY E, M Output of data from the LIFO
WORD AW, MW
FST WORD AW, MW Filling level of the LIFO
L BINARY A, M LIFO empty
V BINARY A, M LIFO full
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 64 µs
Additional runtime: 0–114 µs according to the function to be carried out
Output updating: no; recommendation: Allocate the output directly to a flag or use a global
intermediate flag; see volume 3, chapter 2.5.3
Number of historical values: 3 words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
This function block realizes a stack for binary or word data
from which the data written in last is read out first (last in/
first out).
V BINARY
R and LADE
The output V indicates whether or not the LIFO is full.
If R and LADE signals are present simultaneously the re- V = 0 –> LIFO is not full
set is performed first and then directly afterwards the load V = 1 –> LIFO is full
operation. Therefore, the LIFO is reset and the new value No more values can be read in if the LIFO is full. A value
to be read in is then immediately stored in the LIFO as the can only be read in again once a value has been read out.
first value. This then takes place as from the start of the LIFO.
Example
FBD/LD IL
!BA 0
LIFO LIFO
K 00,01 B/W M 01,09
M 01,01 LADE M 01,01
M 01,05 LESE M 01,05
M 01,09 R A M 12,05 M 06,04
M 06,04 E FST MW 11,07 K 00,01
# 9 #L L A 00,01 # 9
M 01,10 ANF V A 01,15 M 01,10
M 12,05
MW 11,07
A 00,01
A 01,15
FBD/LD IL
!BA 0
LIFO LIFO
K 00,00 B/W M 02,00
M 01,00 LADE M 01,00
M 01,01 LESE M 01,01
M 02,00 R A MW 11,01 MW 03,01
MW 03,01 E FST MW 11,02 K 00,00
# 6 #L L M 03,00 # 6
M 10,00 ANF V M 03,01 MW 10,00
MW 11,01
MW 11,02
M 03,00
M 03,01
CE FBD Definition
LIFO
B/W
LADE
LESE
R A
E FST
#L L
ANF V
B/W E L N P Y 0 0
LADE E L N P Y 0 0
LESE E L N P Y 0 0
R E L N P Y 0 0
E E X N P Y 0 0
#L K W N P Y 0 0
ANF E X N P Y 0 0
A A X N P Y 0 0
FST A W N P Y 0 0
L A L N P Y 0 0
V A L N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (presest to 0)
00001 LIFO
00002 PP 0 R Input BINARY (R)
00003 PP 0 LADE Input BINARY (load LIFO)
00004 PP 0 LESE Input BINARY (read LIFO)
00005 PP 0 E Input BINARY/WORD (input)
00006 PP 0 B/W Input BINARY (BINARY/WORD data)
00007 PP 0 #L # CONSTANT (number of memory locations)
00008 PP 0 ANF Input BINARY/WORD (start of memory locations)
00009 PP 0 A Output BINARY/WORD (output)
00010 PP 0 FST Output WORD (filling level)
00011 PP 0 L Output BINARY (LIFO empty)
00012 PP 0 V Output BINARY (LIFO full)
!BA 0
LIZU LIZU
ZEIG ZEIG
#n A=#E #n
#E0 A #E0
A=#E
A
____________________________________________________________________________________________
Parameters
ZEIG WORD AW, EW, MW, KW Pointer to the list of direct constants
#n DIRECT #, #H Number of direct constants in the list
CONSTANT
#E0 DIRECT #, #H List of direct constants; the input is capable of
CONSTANT duplication
A WORD AW, MW Selected direct constant
A=#E BINARY A, M 0 < ZEIG < #n, i. e. pointer in the valid range
____________________________________________________________________________________________
A=#E BINARY
Whether the value of the list pointer (input ZEIG) is within
the allowed range is specified at the output A=#E.
Allowed range:
0 < ZEIG < n–1
where n: Number of the direct constants at #E0...#En–1.
The following applies:
ZEIG in the allowed range –> A=#E = 1
ZEIG in the forbidden range –> A=#E = 0
If the list pointer has a forbidden value, no allocation of a
constant to the output A takes place because no constant
can be selected. In this case, the output A is not updated.
A WORD
The value of the selected direct constant is allocated to
the operand at the output A.
Example
FBD/LD IL
!BA 0
LIZU LIZU
MW 09,00 ZEIG MW 09,00
# 3 #n A=#E A 00,01
# 3
# 131 #E0 A AW 01,05
# 131
# 150 #E1
# 150
# 380 #E2
# 380
A 00,01
AW 01,05
CE FBD Definition
LIZU
ZEIG
#n A=#E
#E A
ZEIG E W N P Y 0 0
#n K W N P Y 0 0
#E K W N P Y 1 0
A=#E A L N P Y 0 0
A A W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 LIZU
00002 PP 0 ZEIG Input WORD (pointer)
00003 PP 0 #n # CONSTANT (number of #Es)
[ 1
00004 PP 1 #E # CONSTANT (input values)
] 1
00005 PP 0 A=#E0 Output BINARY (0 < ZEIG < #n)
00006 PP 0 A Output WORD (output value)
____________________________________________________________________________________________
Parameters
E1 WORD EW, MW, AW, KW Run number
MRK SPECIAL MRK Target label
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 29 µs
Additional runtime: –––
Output updating: not applicable
Number of historical values: 1 word
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description IL
This function block controls processing of a program part. Designation of the target label: MA No.
This program part is called run number block and begins Where: MA Key word
with the function block LZB and ends with the affiliated 0 < Nr < 999 Number of the label
target label specified at the input MRK. This program part
is processed as follows depending on the value of the op-
The PLC automatically calculates:
erand at the input E1:
– The number of historical values to be skipped
E1 = 0: Program part is not processed – The address of the target label
E1 = 1: Program part is processed during every cycle – The pointer to the own historical value
E1 = 2: Program part is processed during every
The PLC enters the 3 computed values in the intended
second cycle
positions of the LZB block. When planned in IL, the user
E1 = n: Program part is processed during every nth
can basically fill these 3 program words with any con-
cycle
tents. However, it is suggested that the numeric value 0
be entered here.
FBD/LD
Caution:
Designation of the target label: MRK No.
The 3 program words should not be written with NOPs be-
Where: MRK Key word cause these are removed when optimizing the user pro-
0 < Nr < 999 Number of the label gram.
Example
FBD/LD IL
!BA 0
LZB LZB
MW 01,00 MW 01,00
MRK 10 MRK MA 10
#0
. #0
.
. #0
. .
.
MRK .
.
MRK 10 MA 10
CE FBD Definition
LZB
E1
MRK
E1 E W N P N 0 0
MRK S S N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 LZB
00002 PP 0 E1 Input WORD (run number)
00003 MA PP 0 MRK Targel Label
00004 # 0
00005 # 0
00006 # 0
FBD/LD IL
! BA 0
MAJ MAJ
E1 E1
E2 E2
E3 MAJ E3
MAJ
____________________________________________________________________________________________
Parameters
E1 BINARY E, M, A, S, K Operand 1
E2 BINARY E, M, A, S, K Operand 2
E3 BINARY E, M, A, S, K Operand 3
CE Data
Runtime:
Basic runtime: 36 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
Example
FBD/LD IL
! BA 0
MAJ MAJ
E 00,00 E 00,00
E 03,11 E 03,11
M 00,00 MAJ A 02,00 M 00,00
A 02,00
CE FBD Definition
MAJ
E1
E2
E3 MAJ
E1 E L N P N 0 0
E2 E L N P N 0 0
E3 E L N P N 0 0
MAJ A L N P Y 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
E1 WORD EW, AW, MW, KW Input value
MASK WORD EW, AW, MW, KW Mask
ALLE BINARY A, M All bits agree
KEIN BINARY A, M No bit agrees
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 35 – 38 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description If only some of the bits are set on the operand at the input
E1 which are set on the operand at the input MASK, the
The individual bits of the operand at the input E1 are com-
following applies to the outputs:
pared to the bits of the operand at the input MASK.
ALLE =0
KEIN =0
The result of the comparison is signalled at the outputs
ALLE and KEIN. The inputs and outputs can neither be duplicated nor ne-
gated nor inverted.
If at least all bits are set on the operand at the input E1
which are set on the operand at the input MASK, the fol- Example
lowing applies to the outputs:
ALLE = 1 E1 : X1111XX11XXXX11X ALLE = 1
KEIN = 0 MASK : 0111100110000110 KEIN = 0
If none of the bits are set on the operand at the input E1 E1 : 00XXXXX0XXX0XXXX ALLE = 0
which are set on the operand at the input MASK, the fol- MASK : 1100000100010000 KEIN = 1
lowing applies to the outputs:
ALLE = 0 E1 : 1X1X1XXX10XXXX10 ALLE = 0
MASK : 0010100011000011 KEIN = 0
KEIN =1
X: These bits may have any value (don’t care)
Example
FBD/LD IL
!BA 0
MASKE MASKE
MW 08,02 MW 08,02
KW 03,00 MASK KW 03,00
ALLE M 08,11 M 08,11
KEIN M 08,12 M 08,12
CE FBD Definition
MASKE
E1
MASK
ALLE
KEIN
E1 E W N P N 0 0
MASK E W N P Y 0 0
ALLE A L N P Y 0 0
KEIN A L N P Y 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
E1 DOUBLE WORD MD, KD Input value
MASK DOUBLE WORD MD, KD Mask
ALLE BINARY A, M All bits agree
KEIN BINARY A, M No bit agrees
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 42 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description If only some of the bits are set on the operand at the input
The individual bits of the operand at the input E1 are com- E1 which are set on the operand at the input MASK, the
pared to the bits of the operand at the input MASK. following applies to the outputs:
ALLE = 0
The result of the comparison is signalled at the outputs KEIN = 0
ALLE and KEIN.
The inputs and outputs can neither be duplicated nor ne-
If at least all bits are set on the operand at the input E1 gated nor inverted.
which are set on the operand at the input MASK, the fol-
lowing applies to the outputs:
ALLE = 1
KEIN = 0
Example
Example
FBD/LD IL
!BA 0
MASKED MASKED
MD 08,02 MD 08,02
KD 03,00 MASK KD 03,00
ALLE M 08,11 M 08,11
KEIN M 08,12 M 08,12
CE FBD Definition
MASKED
E1
MASK
ALLE
KEIN
E1 E D N P N 0 0
MASK E D N P Y 0 0
ALLE A L N P Y 0 0
KEIN A L N P Y 0 0
CE IL Definition
!BA 0
MAX MAX
#n #n
E1 MAX E1
MAX
____________________________________________________________________________________________
Parameters
#n DIRECT #, #H Number of inputs
CONSTANT
E1 WORD EW, MW, AW, KW 1st input value; the input is capable of duplication
MAX WORD AW, MW Output (maximum value)
____________________________________________________________________________________________
E1 WORD
The input must be duplicated as many times as neces-
sary until the number of inputs specified at the input #n
exists. On the basis of the values of the operands at these
inputs, the maximum value is determined and is allocated
to the output MAX.
Example
FBD/LD IL
!BA 0
MAX MAX
#2 #n #2
MW 05,00 MAX MW 09,03 MW 05,00
MW 05,01 MW 05,01
MW 09,03
CE FBD Definition
MAX
#n
E1 MAX
#n K W N P Y 0 0
E1 E W N P N 1 0
MAX A W N P Y 0 0
CE IL Definition
!BA 0
MAXD MAXD
#n #n
E1 MAX E1
MAX
____________________________________________________________________________________________
Parameters
#n DIRECT #, #H Number of inputs
CONSTANT
E1 DOUBLE WORD MD, KD 1st input value; the input is capable of duplication
MAX DOUBLE WORD MD Output (maximum value)
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 29 µs
Additional runtime: 13 µs per planned input E1
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
E1 DOUBLE WORD
The input must be duplicated as many times as neces-
sary until the number of inputs specified at the input #n
exists. On the basis of the values of the operands at these
inputs, the maximum value is determined and is allocated
to the output MAX.
Example
FBD/LD IL
!BA 0
MAXD MAXD
#2 #n #2
MD 05,00 MAX MD 09,03 MD 05,00
MD 05,01 MD 05,01
MD 09,03
CE FBD Definition
MAXD
#n
E1 MAX
#n K W N P Y 0 0
E1 E D N P N 1 0
MAX A D N P Y 0 0
CE IL Definition
!BA 0
MAZ MAZ
E1 E1
S S
INIT MAZ INIT
MAZ
____________________________________________________________________________________________
Parameters
E1 WORD EW, MW, AW, KW Input value whose time maximum is to be determined
S BINARY E, M, A, S, K Set input
INIT WORD EW, MW, AW, KW Initial value
MAZ WORD AW, MW Maximum value
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 36 ... 40 µs
Additional runtime: –––
Output updating: yes
Number of historical values: 2 words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description The output MAZ is set to the value of the operand at the
input INIT (initial value) with the 0–>1 edge at the binary
This function block determines, on the basis of the time
input S.
progression of a signal, its maximum value occurring up
to the current point in time.
The following applies:
The value of the operand at the input E1 is compared to
E1 < MAZ –> MAZ = MAZ
the previously occurring maximum value. If the input val-
E1 > MAZ –> MAZ = E1
ue E1 is higher than the previously occurring maximum,
the input value is the new maximum value and is allocated S = 0–>1 edge –> MAZ = INIT
to the operand at the output MAZ.
If the input value E1 is less than the previously occurring
maximum value, the previous maximum value is allo- The inputs and the output can neither be duplicated nor
cated to the output. negated/inverted.
Example
FBD/LD IL
!BA 0
MAZ MAZ
MW 05,00 MW 05,00
E 01,00 S E 01,00
KW 00,00 INIT MAZ MW 09,05 KW 00,00
MW 09,05
CE FBD Definition
MAZ
E1
S
INIT MAZ
E1 E W N P N 0 0
S E L N P Y 0 0
INIT E W N P Y 0 0
MAZ A W N P Y 0 0
CE IL Definition
!BA 0
MAZD MAZD
E1 E1
S S
INIT MAZ INIT
MAZ
____________________________________________________________________________________________
Parameters
E1 DOUBLE WORD MD, KD Input value whose time maximum is to be determined
S BINARY E, M, A, S, K Set input
INIT DOUBLE WORD MD Initial value
MAZ DOUBLE WORD MD Maximum value
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 49 ... 58 µs
Additional runtime: –––
Output updating: yes
Number of historical values: 3 words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Example
FBD/LD IL
!BA 0
MAZD MAZD
MD 05,00 MD 05,00
E 01,00 S E 01,00
KD 03,00 INIT MAZ MD 09,05 KD 03,00
MD 09,05
CE FBD Definition
MAZD
E1
S
INIT MAZ
E1 E D N P N 0 0
S E L N P Y 0 0
INIT E D N P Y 0 0
MAZ A D N P Y 0 0
CE IL Definition
!BA 0
MIN MIN
#n #n
E1 MIN E1
MIN
____________________________________________________________________________________________
Parameter
#n DIRECT #, #H Number of inputs
CONSTANT
E1 WORD EW, MW, AW, KW 1st input value; the input is capable of duplication
MIN WORD AW, MW Output (minimum value)
____________________________________________________________________________________________
E1 WORD
The input E1 must be duplicated as often as the number
of inputs specified at the input #n exists. On the basis of
the values of the operands at these inputs, the minimum
value is determined and is allocated to the output MIN.
Example
FBD/LD IL
!BA 0
MIN MIN
#2 #n #2
MW 05,00 MIN MW 09,03 MW 05,00
MW 05,01 MW 05,01
MW 09,03
CE FBD Definition
MIN
#n
E1 MIN
#n K W N P Y 0 0
E1 E W N P N 1 0
MIN A W N P Y 0 0
CE IL Definition
!BA 0
MIND MIND
#n #n
E1 MIN E1
MIN
____________________________________________________________________________________________
Parameters
#n DIRECT #, #H Number of inputs
CONSTANT
E1 DOUBLE WORD MD, KD 1st input value; the input is capable of duplication
MIN DOUBLE WORD MD Output (minimum value)
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 24 µs
Additional runtime: 14 µs per planned input E1
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
E1 DOUBLE WORD
The input E1 must be duplicated until the number of in-
puts specified at the input #n exists. On the basis of the
values of the operands at these inputs, the minimum val-
ue is determined and is allocated to the output MIN.
Example
FBD/LD IL
!BA 0
MIND MIND
#2 #n #2
MD 05,00 MIN MD 09,04 MD 05,00
MD 05,01 MD 05,01
MD 09,04
CE FBD Definition
MIND
#n
E1 MIN
#n K W N P Y 0 0
E1 E D N P N 1 0
MIN A D N P Y 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
1 BINARY E, M, A, S, K Input signal
ZD DOUBLE WORD MD, KD Pulse length
Q BINARY M, A Output signal
____________________________________________________________________________________________
Description
A 0–1 edge at the input 1 produces a 0–1 edge at the
output Q. If the input 1 remains at 1 level, a 1–0 edge is 1
output on output Q after duration ZD has elapsed.
Initialization
Example
FBD/LD IL
!BA 0
MOA MOA
E 01,00 1 E 01,00
KD 03,00 ZD Q M 07,03 KD 03,00
M 07,03
CE FBD Definition
MOA
1
ZD Q
1 E L N P Y 0 0
ZD E D N P Y 0 0
Q A L N P Y 0 0
CE IL Definition
Parameters
IN BINARY E, M, A, S, K Input signal
PT WORD/DOUBLE WORD MW&MW+1, MD, KW&KW+1, KD, Pulse length
EW&EW+1, AW&AW+1
Q BINARY M, A Output signal
ET WORD/DOUBLE WORD MW&MW+1, MD Time display
Description
A 0/1 edge at input IN produces a 0/1 edge at output Q. If IN
input IN remains at 1 level, a 1/0 edge is applied at output
Q after the duration PT has elapsed. Q
t t
Output Q is also immediately set back to 0 level if input IN
returns to 0 level before the time period PT has expired. t0 PT t0 t<PT
The output ET indicates the current time.
For times less than 65 s, variables of the type WORD can
General behaviour
be used at input PT and output ET: flags, constants, other
WORD functions (+, -, AWT) and the potentiometer inputs • Started timers are processed by the PLC’s operating
of the basic unit. In this case MW, KW, EW and AW as- system and are therefore completely independent of
sign two successive addresses. MW+1, KW+1, EW+1 the PLC program processing. The operating system
and AW+1 must no longer be used in the program. does not issue a corresponding message to the corre-
sponding timer block in the PLC program until the timer
Time is entered in milliseconds.
has elapsed.
Valid time range: 5 ms ... 24,8 days.
• The timer processing in the PLC operating system is
For the indirect constant KD, the value for the pulse length not affected by the following commands:
is entered in long text.
- Abort program
Maximum time offset at the output: < 1 cycle time. - Start program
- Stop program
Sensible range for PT: > 1 cycle time - Continue program
The inputs and the output can neither be duplicated nor This means: If a timer is started, its processing in the PLC
inverted. operating system is also continued if the corresponding
PLC program is aborted, started or stopped again or con-
tinued.
Graphic
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
MOAT
BIT_IN Y N Y 0 00 IN Q 00 0 Y N Y BIT_OUT
ALLE Y N Y 0 00 PT ET 00 0 Y N Y ALLE
Source
SN ZN Command / Variable Symbol Long text
The function MODBUS MASTER in the central unit is val- Several function blocks MODBUS can be used in one
ided by: user program.
____________________________________________________________________________________________
Parameters
FREI BINARY E,A,M,K,S Enable signal for one communication (rising edge)
SLAV WORD EW,AW,MW,KW Slave number
FCT WORD EW,AW,MW,KW Function code
TIME WORD EW,AW,MW,KW Time-out for MODBUS communication
ADDR WORD EW,AW,MW,KW Address in the slave
NB WORD EW,AW,MW,KW Number of data to send or to read
DATA WORD EW,AW,MW,KW
BINARY E,A,M Data to send to the slave or to write
with the data received from a slave MODBUS
RDY BINARY A,M Ready, communication in progress
ERR BINARY A,M Communication error
ERN WORD AW,MW Communication error, detail of error
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: not available
Additional runtime: not available
Output updating: yes
Number of historical values: 1 word
Available as of: ABB Procontic CS31 / 07 KR 31 V 2.0
07 CR 41, 07 CT 41, 07 KR 51, 07 KT 51
____________________________________________________________________________________________
The MODBUS protocol is a master/slave protocol. The Address of the slave which receives the request.
master sends a frame to a slave and waits for the answer Value: 0 < ADDR < 255
(a time-out is defined). Binary or numeric data can be re- In case of address 0 (ADDR = 0), all slaves on the MOD-
ad or written in a slave. BUS network will read the frame.
FCT WORD
The area of data in the master is chosen by the address of
the first variable. The size of area is necessary for send- The function depends on the type of parameters and if it is
ing or receiving. Reading or writing data are done auto- reading or writing.
matically from these areas.
Value: 1: reading n bits
2: reading n bits
FREI BINARY 3: reading n words
4: reading n words
A rising edge at the FREI input leads to an output of a re- 5: writing one bit
quest to a slave MODBUS, provided that the block is 6: writing one word
ready to do this (RDY = 1). 7: fast reading
15: writing n bits
If a rising edge appears at the FREI input although the
16: writing n words
RDY output is equal to 0, i.e. the block is not ready for a
new MODBUS communication, the rising edge will be ig- The other function codes are not supported by the 07 KR
nored. Therefore, no new MODBUS communication can 31. In case of a wrong function code, an error 1 is gener-
be started as long as the RDY output is 0. ated in the word ERN.
Address of data in the slave memory to read or write. The output RDY (ready) indicates whether a MODBUS
communication is in progress or not. As long as a commu-
NB WORD nication is in progress, the output RDY is equal to 0. The
function block can only be used if RDY = 1.
Number of data to read or write in the slave.
ERR BINARY
This number defines also the size of the data area in the
master to send to the slave or to receive from the slave. The output ERR indicates an error occurred during com-
munication. The word output ERN indicates the details of
DATA WORD, BINARY the error.
DATA defines the first variable of the data area in the mas- If ERR = 1 –> error,
ter. The size of this area depends on the NB parameter. ERR = 0 –> no error or
communication in progress.
Different cases are possible according to the function
code and the operand: The error is clear after one cycle time.
Reading:
ERN WORD
ADDR DATA result
Details of error:
word word idem
bit bit idem 0: no error
bit word same as the function 1: unknown function code
block PACK 2: address error
word bit The first bit of the word is 3: data error
ranged in the first bit of the 9: time-out
group number. 10: checksum error
Example: data = M 00,07 The error is clear after one cycle time.
The first bit of the read word
will be written in M 00,00. Graphic:
Plaus. group Dty Inv Dpl Mod No No Mod Dpl Inv Dty Plaus. group
MODBUS
BIT_IN N Y Y 0 00 FREI
WORT_IN N N Y 0 00 SLAV RDY 00 0 Y N Y BIT_OUT
WORT_IN Y N Y 0 00 FCT ERR 00 0 Y N Y BIT_OUT
ALLE Y N Y 0 00 TIME ERN 00 0 Y N Y WORT_OUT
ALLE Y N Y 0 00 ADDR
WORT_IN Y N Y 0 00 NB
ALLE Y N Y 0 00 DATA
Source:
SN LN Command / Variable Symbol Long text
00000 00000 ;MODBUS MASTER
00001 !BA 000
00002 CALLUP
00003 PP 00 FREI
00004 #H 0300 OFFSET
00005 #H 0000 SEGMENT
00006 #H 0000 NB HIST
00007 # +00009 NB DATA
00008 PP 00 SLAV
00009 PP 00 FCT
00010 PP 00 TIME
00011 PP 00 ADDR
00012 PP 00 NB
00013 PP 00 DATA
00014 PP 00 RDY
00015 PP 00 ERR
00016 PP 00 ERN
00017 ;MODBUS MASTER END
____________________________________________________________________________________________
Parameters
1 V BINARY E, M, A, S, K Input signal
ZD DOUBLE WORD MD, KD Pulse length
Q BINARY M, A Output signal
____________________________________________________________________________________________
Description
A 0–1 edge at the input 1 produces a 0–1 edge at the
output Q. The output Q is reset to 0 level after expiry of the 1 V
period ZD.
Initialization
The timers are always initialized in the event of a cold or
warm start of the PLC. Therefore, a running timer is al-
ways aborted by a cold or warm start of the PLC.
Cold start:
– KALT <CR> command
– Activation of the power for the first time
Warm start:
– WARM <CR> command
– Activation of the power
– RESET switch
Example
FBD/LD IL
!BA 0
MOK MOK
E 01,00 1 V E 01,00
KD 03,00 ZD Q M 07,05 KD 03,00
M 07,05
CE FBD Definition
MOK
1 V
ZD Q
1 V E L N P Y 0 0
ZD E D N P Y 0 0
Q A L N P Y 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
MRK SPECIAL MRK Target label
____________________________________________________________________________________________
Description
In the PLC program, the branch target of a branch block or
run number block is defined by a label.
Example
FBD/LD IL
MA MRK 0
MRK
MRK 0
CE FBD Definition
MRK
MRK
MRK S S N P N 0 0
CE IL Definition
00000 MA PP 0 MRK Target label
____________________________________________________________________________________________
Parameters
E1 WORD EW, MW, AW, KW Input operand
N WORD EW, MW, AW, KW Quantity
A1 WORD MW, AW Result
____________________________________________________________________________________________
Examples:
1. Input value E1 = 5498 (157AH)
Exponent N = 2 –> 2 * Left shift
Bit 15 0
Input value
0.0.0.1 0.1.0.1 0.1.1.1 1.0.1.0 157AH before the left shift
Bit 15 0
Bit 15 0
7F64H Input value
(32612) 0.1.1.1 1.1.1.1 0.1.1.0 0.1.0.0
before the right shift
Bit 15 0
0FECH Result after
0.0.0.0 1.1.1.1 1.1.1.0 1.1.0.0
(4076) 3 right shifts
Bit 15 0
8008 H Input value
(–32760) 1.0.0.0 0.0.0.0 0.0.0.0 1.0.0.0
before the right shift
Bit 15 0
F001 H Result after
1.1.1.1 0.0.0.0 0.0.0.0 0.0.0.1
(–4095) 3 right shifts
Example
FBD/LD IL
!BA 0
MUL2N MUL2N
EW 00,00 EW 00,00
MW 03,11 N AW 02,00 MW 03,11
AW 02,00
CE FBD Definition
MUL2N
E1
N A1
E1 E W N P N 0 0
N E W N P Y 0 0
A1 A W N P N 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 MUL2N
00002 PP 0 E1 Input WORD
00003 PP 0 N Input WORD (number of shifts)
00004 PP 0 A1 Output WORD
____________________________________________________________________________________________
Parameters
E1 DOUBLE WORD MD, KD Input operand
N WORD EW, AW, MW, KW Quantity
A1 DOUBLE WORD MD Result
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 34 µs
Additional runtime: 6 µs per shift
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Examples
1. Input value E1 = 58350926 (37A5D4EH)
Exponent N = 4 ––> 4 * Left shift
31 0 Bit
37A5D4E0H
0011 0111 1010 0101 1101 0100 1110 0000
(933614816)
31 0 Bit
0137A5D4H
0000 0001 0011 0111 1010 0101 1101 0100
(20424148)
31 0 Bit
FEC85A2BH
1111 1110 1100 1000 0101 1010 0010 1011
(–20424149)
Example
FBD/LD IL
!BA 0
MUL2ND MUL2ND
MD 00,00 MD 00,00
KW 03,11 N MD 01,00 KW 03,11
MD 01,00
CE FBD Definition
MUL2ND
E1
N A1
E1 E D N P N 0 0
N E W N P Y 0 0
A1 A D N P N 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 MUL2ND
00002 PP 0 E1 Input DOUBLE WORD
00003 PP 0 N Input WORD (number of shifts)
00004 PP 0 A1 Output DOUBLE WORD
!BA 0
MUXR
MUXR
E E
INDX INDX
#n INOK #n
A0 INOK
A0
____________________________________________________________________________________________
Parameters
E WORD EW, AW, MW, KW Input
INDX WORD EW, AW, MW, KW Index input
#n DIRECT #,#H Quantity n of word outputs A0 ... An–1
CONSTANT
INOK BINARY A, M Range monitoring for input INDX
A0 WORD AW, MW Word outputs A0 ... An–1; the output A0 is capable of
duplication
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 44.5 µs
Additional runtime: 7.5 µs per additional word output A1 ... An–1
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description E WORD
This function block connects the input E to one of the out- Input which is switched through to one of the outputs
puts A0...An–1 depending on the input INDX. A0...An–1.
The word outputs that are not connected are set to 0. The INDX WORD
validity of the value at the input INDX is checked.
Index input for selection of one of the outputs A0...An–1.
Relationship between E, INDX and A0...An–1: Value range: 1 < INDX < n
The input INDX is used to define with which of the outputs
A0...An–1 the input E is connected.
Note:
The following apply: INDX = 1 : E –> A0
INDX = 0 can be used to initialize the outputs
INDX = 2 : E –> A1
A0 ... An–1 (A0 ... An–1 = 0).
INDX = 3 : E –> A2
: :: :
INDX = n : E –> An–1 #n DIRECT CONSTANT
where 1 < INDX < n < 32767 (theoretically) Quantity n of word outputs A0 ... An–1.
Example
FBD/LD IL
!BA 0
MUXR
MUXR
MW 00,00 E MW 00,00
MW 00,01 INDX MW 00,01
# 2 #n INOK M 00,00 # 2
A0 MW 00,02 M 00,00
A1 MW 00,03 MW 00,02
MW 00,03
CE FBD Definition
MUXR
E
INDX
#n INOK
A
E E W N P Y 0 0
INDX E W N P Y 0 0
#n K W N P Y 0 0
INOK A L N P Y 0 0
A A W N P Y 1 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 MUXR
00002 PP 0 E Input (WORD)
00003 PP 0 INDX Index (WORD)
00004 PP 0 #n Number of outputs (#)
00005 PP 0 INOK Output index valid (BINARY)
[ 1
00006 PP 1 A Output (WORD)
] 1
!BA 0
MUXRD
MUXR
E E
INDX INDX
#n INOK #n
A0 INOK
A0
____________________________________________________________________________________________
Parameters
E DOUBLE WORD MD, KD Input
INDX WORD EW, AW, MW, KW Index input
#n DIRECT #,#H Quantity n of double word outputs A0 ... An–1
CONSTANT
INOK BINARY A, M Range monitoring for input INDX
A0 WORD MD Double word outputs A0 ... An–1; the output A0 is
capable of duplication
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 43 µs
Additional runtime: 10 µs per additional double word output A1 ... An–1
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
The double word outputs that are not connected are set to
0. The validity of the value at the input INDX is checked. INDX WORD
Index input for selection of one of the outputs A0...An–1.
Relationship between E, INDX and A0...An–1:
Value range: 1 < INDX < n
The input INDX is used to define with which of the outputs
A0...An–1 the input E is connected.
The following applies: INDX = 1 : E –> A0 Note:
INDX = 2 : E –> A1 INDX = 0 can be used to initialize the outputs A0...An–1
INDX = 3 : E –> A2 (A0...An–1 = 0).
: : : :
INDX = n : E –> An–1
#n DIRECT CONSTANT
where: 1 < INDX < n < 32767 (theoretically) Quantity n of double word outputs A0...An–1.
Example
FBD/LD IL
!BA 0
MUXRD
MUXR
MD 00,00 E MD 00,00
MW 00,01 INDX MW 00,01
# 2 #n INOK M 00,00 # 2
A0 MD 00,02 M 00,00
A1 MD 00,03 MD 00,02
MD 00,03
CE FBD Definition
MUXRD
E
INDX
#n INOK
A
E E D N P Y 0 0
INDX E W N P Y 0 0
#n K W N P Y 0 0
INOK A L N P Y 0 0
A A D N P Y 1 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 MUXRD
00002 PP 0 E Input (DOUBLE WORD)
00003 PP 0 INDX Index (WORD)
00004 PP 0 #n Number of outputs (#)
00005 PP 0 INOK Output index valid (BINARY)
[ 1
00006 PP 1 A Output (DOUBLE WORD)
] 1
!BA 0
NEGD NEGD
E1 A1 E1
A1
____________________________________________________________________________________________
Parameters
E1 DOUBLE WORD MD, KD Input value
A1 DOUBLE WORD MD Negated value
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 34 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
The input and the output can neither be duplicated nor ne-
gated.
Example
FBD/LD IL
!BA 0
NEGD
NEGD MD 00,00
MD 00,00 MD 02,00 MD 02,00
CE FBD Definition
NEGD
E1 A1
E1 E D N P N 0 0
A1 A D N P N 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 NEGD
00002 PP 0 E1 Input DOUBLE WORD
00003 PP 0 A1 Output DOUBLE WORD
____________________________________________________________________________________________
Parameters
–––
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 4 µs
Additional runtime: –––
Output updating: –––
Number of historical values: –––
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
NOTBIT is a basic function in the manufacturer library.
The name of the element in the library is NOTBIT. This
element cannot be called in the CE and CE–IL editors.
The programming unit uses this element to realize con-
necting lines.
____________________________________________________________________________________________
Example
FBD/LD IL
CE FBD Definition
not defined
CE IL Definition
00000 ! PP 0 inp
00002 =N PP 0 outp
Parameters
VAL BINARY E, A, M, S Enabling
RES BINARY E, A, M, S Reset
FREQ WORD EW, AW, MW, KW Frequency
NB WORD EW, AW, MW, KW Number of pulses
RDY BINARY A, M Ready
VALP WORD AW, MW Number of processed pulses
The function block generates pulse sequences with speci- Frequency of the pulse sequence:
fic frequencies and specific number of pulses. Thus, it can Frequency range: 10 Hz to 2,6 kHz
be used for the activation of stepper motors. The pulse Formula for frequency calculation:
sequences are available at output A 62,00. Frequency [Hz = 1000000/((256 - FREQ) • 384)
VALP WORD
Number of currently generated pulses.
In case of an error: +/-1.
Graphic
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
NPULSE
BIT_IN Y N Y 0 00 VAL RDY 00 0 Y N Y BIT_OUT
BIT_IN Y N Y 0 00 RES VALP 00 0 Y N Y WORT_OUT
WORT_IN Y N Y 0 00 FREQ
WORT_IN Y N Y 0 00 NB
Source
SN ZN Command / Variable Symbol Long text
!BA 0
PACK PACK
#n #n
BI0 WORT BI0
WORT
____________________________________________________________________________________________
Parameters
#n DIRECT #,#H Number of binary variables to be packed
CONSTANT
BI0 BINARY E, M, A, K, S 1st binary variable to be packed; the input is capable of
duplication
WORT WORD AW, MW Word variable
____________________________________________________________________________________________
Example
FBD/LD IL
!BA 0
PACK PACK
#2 #n #2
E 01,00 BI0 WORT MW 07,05 E 01,00
E 01,01 BI1 E 01,01
MW 07,05
CE FBD Definition
PACK
#n
BI WORT
#n K W N P Y 0 0
BI E L N P Y 1 0
WORT A W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 PACK
00002 PP 0 #n # CONSTANT (number of bits)
[ 1
00003 PP 1 BI Input BINARY
] 1
00004 PP 0 WORT Output WORD
!BA 0
PACKD PACKD
#n #n
BI0 DW BI0
DW
____________________________________________________________________________________________
Parameters
#n DIRECT #, #H Number of binary variables to be packed
CONSTANT
BI0 BINARY E, M, A, K, S 1st binary variable to be packed; the input is capable of
duplication
DW DOUBLE WORD MD Double word variable
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 31 µs
Additional runtime: 9 µs, per planned binary variable
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Affiliations
#n DIRECT CONSTANT (#, #H)
BI0 –> bit 0 of the output variable
The number of binary variables to be packed is specified
at the input #n. This is specified as a direct constant. BI1 –> bit 1 of the output variable
The following applies: 1 < n < 32 . .
n = 0 is forbidden! . .
BI31 –> bit 31 of the output variable
BI0 BINARY
The input BI0 is capable of duplication (BI0...BI31). The Note: If the user plans less than 32 binary input vari-
binary variables to be packed are specified at the inputs ables, the bits of the output variables not needed
BI0...BIn–1. are occupied with the value 0.
Example
FBD/LD IL
!BA 0
PACKD PACKD
#2 #n #2
E 01,00 BI0 DW MD 07,05 E 01,00
E 01,01 BI1 E 01,01
MD 07,05
CE FBD Definition
PACKD
#n
BI DW
#n K W N P Y 0 0
BI E L N P Y 1 0
DW A D N P Y 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
t/ta WORD EW, MW, AW, KW Duty ratio
ta/T WORD EW, MW, AW, KW Period referred to the cycle time
PULS BINARY A, M Pulse duration modulated signal
____________________________________________________________________________________________
This function block generates a pulse duration–modu- That is to say, the required duty cycle of the output signal
lated binary signal at its PULS output. must be higher than the cycle time of the PLC program.
The duty ratio is specified at the t/ta input and the period
for the output signal is specified at the ta/T input.
The required duty ratio for the output signal PULS is spe-
cified at the input t/ta. At the same time, ta is the period of
ta t
the signal at the output PULS and t is the time within the
period ta during which the output signal assumes a 1
level. The specified value for the required duty ratio at the T T T T T T T T
input t/ta must be specified in scaled form. To do this, the
required duty ratio must be multiplied by the value 32767
and rounded to a whole number. The resulting numerical
value is then specified at the input t/ta.
The following relationship applies to specification of the Combination of the PDM block with a controller
keying ratio at the input t/ta: If the PDM function block is connected to the output of a
controller in order to realize a “switching” controller, the
following marginal conditions apply:
Scaled value at Results in duty ratio
the t/ta input at the output PULS
– Period ta of the PDM = sampling time of the controller –
Period of the pulse signal must be synchronous with the
Negative value 0 ( 0 %)
period of the controller’s sampling time.
0 (0 * 32 767) 0 ( 0 %)
. . .
These marginal conditions are fulfilled by planning the
. . .
controller in the same PLC program as the PDM, but
16384 (0,5 * 32 767) 0,5 ( 50 %) within one run number block. By means of the run number
. . . block, the sampling time of the controller is prolonged by
. . . an integral multiple of the cycle time. Therefore, the con-
32767 (1 * 32 767) 1 (100 %) troller is processed less frequently within the run number
block than the PDM outside of the run number block.
Example:
ta/T WORD
Required:
The required period ta for the signal at the output PULS is – Duty ratio: t/ta = 0,25 (25 %)
specified at the input ta/T. At the same time, the period ta
– Period: ta = 800 ms (only an integral
must be scaled to the cycle time T.
multiple of the PLC cycle time is possible)
– Cycle time: T = 100 ms
Marginal condition for ta:
– ta must be an integral multiple of T Block parameters to be specified:
(ta = n * T)
– ta >> T > 0; the higher ta is in relation to T, – Value at the input t/ta: 8192 (0,25 * 32767)
the more exactly the required duty ratio is kept – Value at the input ta/T: 8 (800 ms/100 ms)
to
E.g. ta > 10 * T –> inaccuracy of the duty ratio at
the output PULS < 10%. PULS
t
If a value ta/T < 0 is specified for ta/T, the function block
automatically replaces this meaningless value by 32767.
PULS BINARY ta t
The pulse duration modulated signal is available at the
T T T T T T T T
PULS output.
Example
FBD/LD IL
!BA 0
PDM PDM
MW 00,00 t/ta MW 00,00
KW 00,01 ta/T KW 00,01
PULS M 07,07 M 07,07
CE FBD Definition
PDM
t/ta
ta/T
PULS
t/ta E W N P Y 0 0
ta/T E W N P Y 0 0
PULS A L N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 PDM
00002 PP 0 t/ta Input WORD (Duty ratio)
00003 PP 0 ta/T Input WORD (period)
00004 PP 0 PULS Output BINARY
! PE
PE
____________________________________________________________________________________________
Parameters
–––
____________________________________________________________________________________________
Description
The program end identifies the end of the PLC program.
Commands located after this end identifier are not pro-
cessed by the PLC.
Example
FBD/LD IL
! PE
PE
CE FBD Definition
PE
CE IL Definition
00000 !PE
____________________________________________________________________________________________
Parameters
w WORD EW, AW, MW, KW
Command variable (setpoint)
x WORD EW, AW, MW, KW
Controlled variable (actual value)
KP WORD EW, AW, MW, KW
Proportional coefficient; specified as a %
TN/T WORD EW, AW, MW, KW
Integral action time scaled to the PLC cycle time
OG WORD EW, AW, MW, KW
High limit for the manipulated variable y
UG WORD EW, AW, MW, KW
Low limit for the manipulated variable y
S BINARY E, A, M, S, K
Enabling for setting the manipulated variable y to the
initial value INIT
INIT WORD EW, AW, MW, KW Initial value for the manipulated variable y
R BINARY E, A, M, S, K Reset of the manipulated variable y to the value 0
y=OG BINARY A, M High limit has been reached
y=UG BINARY A, M Low limit has been reached
y WORD AW, MW Output for the manipulated variable y
____________________________________________________________________________________________
CE Data Series 90 Series 30, 40, 50
Runtime:
Basic runtime: 280 µs 3600 µs
Additional runtime: ––– –––
Output updating: yes yes
Number of historical values: 4 words 6 words
Available as of: ABB Procontic CS31 / 907 PC 331
907 PC 331 / 07 KR 31 V 2.0
07 CR 41, 07 CT 41, 07 KR 51, 07 KT 51
____________________________________________________________________________________________
Description Transfer function:
The PI controller changes the value at its output y (manip- 1
ulated variable) until the value at the input x (controlled F(s) = KP * (1+ –––––––)
variable) is equal to the value at the input w (command s * TN
variable). The inputs and outputs can neither be duplicated nor ne-
Control algorithm: Simple rectangle rule gated/inverted.
KP w–x KP
Y = –––– * –––––– + YI(z–1) + –––– * (w–x)
100 TN/T 100
XD=w–x XD=w–x
1 1
t1 t1 t
t
S S
1 1
t1 t
t1 t
KP KP
KP(t1)
t1 t1 t
t
INIT INIT
t1 t1 t
t
KP*XD
Y Y
OG OG
Y1 = INIT + KP * XD
Y1
Integr.comp. limited
because Y = OG
INIT TN
Integral
component
Integr.component
INIT Integr.comp.(t1)=INIT
TN
Integr.comp.(t1)= INIT–KP * XD
t1 t
t1 t
PI controller: Surge–free transition from the specified PI controller: Surging transition from the specified ini-
initial value to control operation tial value to control operation
TN/T WORD – The output y of the controller is set to the initial value
The integral action time TN is scaled to the PLC cycle time specified at the input INIT by means of a 1 signal at the
T and is specified at the input TN/T. binary input S (set).
– A 1 signal at the input R (reset) is equivalent to speci-
Value range: 0 < TN/T < 328 fying the initial value 0.
In doing so, adjustment to the initial value takes place
● If values are specified which are beyond the admissible internally in the controller. This adjustment is a shift of
value range the PLC uses the value 328. the controller output from the momentary value to the
required initial value. Now, the controller continues
● A large integral action time TN can be achieved by operating from this initial value precisely as it would
choosing a great cycle time T, too. If the block is used have done at the old operating point before the shift, i.e.
within a run number block, the cycle time of the run without surges. The controller’s I component is defined
number block is valid for block PI and not the cycle time so that the sum of the P component and the I compo-
(KD 0,0) of the PLC program. nent just results in the initial value.
Surging setting/resetting
y=UG BINARY
– The output y of the controller is set to the initial value The output y=UG signals whether or not the value at the
specified at the INIT input by means of a 1 signal at the output y has reached the specified low limit.
input S (set).
– A 1 signal at the input R (reset) is equivalent to speci- y=UG = 0 limit has not been reached.
fying the initial value 0. y=UG = 1 limit has been reached.
In the event of surging setting or resetting of the controller
the I component is set equal to the initial value. To do this,
the P component must be suppressed during setting.
Where: I component = INIT
Surging setting to an initial value is achieved by the follow-
ing measure during setting:
Example
FBD/LD IL
!BA 0
PI PI
EW 00,01 w EW 00,01
AW 00,08 x AW 00,08
KW 01,00 KP KW 01,00
AW 02,04 TN/T AW 02,04
MW 03,00 OG EW 05,03
MW 04,00 UG S 05,12
S 05,12 S y=OG A 08,00 M 02,00
EW 05,03 INIT y=UG M 01,00 MW 03,00
M 02,00 R y AW 08,03 MW 04,00
AW 08,03
A 08,03
M 01,00
CE FBD Definition
PI
w
x
KP
TN/T
OG
UG
S y=OG
INIT y=UG
R y
w E W N P Y 0 0
x E W N P Y 0 0
KP E W N P Y 0 0
TN/T E W N P Y 0 0
OG E W N P Y 0 0
UG E W N P Y 0 0
S E L N P Y 0 0
INIT E W N P Y 0 0
R E L N P Y 0 0
y=OG A L N P Y 0 0
y=UG A L N P Y 0 0
y A W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 PI
00002 PP 0 w Input WORD (command variable)
00003 PP 0 x Input WORD (controlled variable)
00004 PP 0 KP Input WORD (proportional coefficient)
00005 PP 0 TN/T Input WORD (integral action time)
00006 PP 0 INIT Input WORD (initial value)
00007 PP 0 S Input BIT (set to INIT)
00008 PP 0 R Input BIT (reset to 0)
00009 PP 0 OG Input WORD (high limit)
00010 PP 0 UG Input WORD (low limit)
00011 PP 0 y Output BINARY (manipulated variable)
00012 PP 0 y=OG Output BINARY (OG reached)
00013 PP 0 y=UG Output BINARY (UG reached)
____________________________________________________________________________________________
Parameters
w WORD EW, AW, MW, KW Command variable (setpoint)
x WORD EW, AW, MW, KW Controlled variable (actual value)
KP WORD EW, AW, MW, KW Proportional coefficient, specified as a percentage
TN/T WORD EW, AW, MW, KW Integral action time scaled to the PLC cycle time
TV/T WORD EW, AW, MW, KW Derivative action time scaled to the PLC cycle time
T1/T WORD EW, AW, MW, KW Returning time scaled to the PLC cycle time
D–FR BINARY E, A, M, K Enable DT1 component
OG WORD EW, AW, MW, KW High limit for the manipulated variable y
UG WORD EW, AW, MW, KW Low limit for the manipulated variable y
S BINARY E, A, M, S, K Enable for setting to initial value INIT
INIT WORD EW, AW, MW, KW Initial value for the manipulated variable y
R BINARY E, A, M, S, K Reset the manipulated variable y to the value 0
y=OG BINARY A, M High value has been reached
y=UG BINARY A, M Low value has been reached
y WORD AW, MW Output for manipulated variable y
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 318 µs without DT1 component, 564 µs with DT1 component
Additional runtime: no
Output updating: yes
Number of historical values: 9 words
Available as of: ABB Procontic CS31 / 907 PC 331
Description
The PI controller changes its output y (manipulated vari-
able) until the input x (controlled variable) is equal to the
input w (command variable).
Transfer function:
1 s * TV
F(s) = KP * (1 + +
s * TN 1 + (s * T1)
KP XD T1/TZ 1 TV KP
y = KP * XD + * + YI(z–1) + * (YDT1(z – 1) + * * * (XD–XD(z–1)))
100 100 TN/TZ 1 + (T1/TZ) T1/TZ TZ 100
where:
XD=w–x XD=w–x
1 1
t1 t t1 t
S S
1 1
t1 t1
t t
D–FR D–FR
1 1
t1 t t1 t
KP KP
KP(T1) KP(T1)
t1 t t1 t
INIT INIT
t1 t1 t
t
Y Y
OG OG
TV
__
Y2 = Y1 + KP * * XD
T1
INIT Y2
Integr.compon. limi– Integr. comp. limi–
ted because Y=OG ted because Y=OG
TN Integr.comp.(t1)+KP*XD Y1 TN Y1 = INIT + KP * XD
P Comp P Comp.
TV
__ INIT Integr.component(t1) = INIT
Integr.comp.(t1)=INIT–KP*XD*(1+ )
T1
t1 t t1 t
PIDT1 controller: Surge–free transition from the speci- PIDT1 controller: Surging transition from the specified
fied intitial value to control mode initial value to control mode
x WORD The returning time is the time in which the DT1 compo-
nent has decreased to approximately 37% of its initial va-
The controlled variable (actual value) is specified at the lue.
input x.
Inadmissible time parameters
KP WORD Every time value is set to the maximum positive value
32767 if the time value at the input is erroneously speci-
The proportional coefficient is specified at the input KP.
fied as less than or equal to “0”.
This value is specified as a percentage and may be positi-
ve or negative. D–FR WORD
The DT1 component of the controller can be connected or
Example: deactivated by means of the D–FR input.
1 = 1 Percent D–FR Meaning
55 = 55 Percent
100 = 100 Percent 0 DT1–Comp. is deactivated –> pure PI
1000 = 1000 Percent controller
–500 = –500 Percent 1 DT1–Comp. is connected –> PIDT1
controller
● 1 percent means that the block multiplies the system
In the following cases, from the control point of view it is
deviation by the factor 0.01 (see also control algoritm)
often disturbing and not meaningful for the DT1 compo-
nent to be active:
● 100 percent means that the block multiplies the system – During activations
deviation by the factor 1 (see also control algoritm) – In the event of large system deviations
– When setting the controller to a specified initial value
● 1000 percent means that the block multiplies the sys- – When resetting the controller to the value 0
tem deviation by the factor 10 (see also control algo- The command and controlled variables can be compared
ritm) outside of the controller. Depending on this comparison,
the DT1 component can be activated or deactivated spe-
Generally, proportional coefficients of more than 1000% cifically by way of the D–FR input.
are not meaningful in control systems.
For example, activation can be restricted to ensuring that
the system deviation is within a required bandwidth. That
TN/T WORD is to say, the DT1 component is only active if the con-
The integral action time TN is scaled to the PLC cycle time trolled variable fluctuates around the setpoint within a
T and is specified at the input TN/T. specific bandwidth. The DT1 component is deactivated if
the controlled variable leaves this tolerance band.
Value range: 0 < TN/T < 328 Limiting the maniulated variable y
OG WORD
● If values are specified which are beyond the admissible UG WORD
value range the PLC uses the value 328. The output y (manipulated variable) of the controller can
be limited
● A large integral action time TN can be achieved by – To a maximum value by specifying a limit at the input
choosing a great cycle time T, too. If the block is used OG (high limit);
within a run number block, the cycle time of the run
number block is valid for block PIDT1 and not the cycle – To a minimum value by specifying a limit at the input UG
time (KD 0,0) of the PLC program. (low limit)
The high and low limits also apply to the controller’s inter-
TV/T WORD nal I component. That is to say, the I component can only
The derivative action time TV is scaled to the PLC cycle assume values between the high and low limits. If the ma-
time T and is specified at the input TV/T nipulated variable y reaches one of the two limits, the con-
(0 < TV/T < 32767). troller’s I component is no longer altered.
This prevents the I component from running amock in the Surging setting/resetting
event of limiting of the controller output y, assuming
meaningless values from the point of view of control and, – The output y of the controller is set to the initial value
in certain circumstances, not returning to the operating specified at the INIT input by means of a 1 signal at the
range until after a very long time. This response of a con- input S (set).
troller is also referred to as a “special anti–reset windup – A 1 signal at the input R (reset) is equivalent to specify-
measure (ARW)”. ing the initial value 0.
– In the event of surging setting or resetting of the con-
Setting and resetting the controller troller, the I component is set equal to the initial value.
To do this, the P and DT1 components must be sup-
pressed during setting.
S BINARY
INIT WORD Where: I component = INIT
R BINARY
Surging setting to an initial value is achieved by the follow-
ing measures during setting:
Setting the controller to an initial value
– Deactivation of the DT1 component via the D–FR con-
– The output y of the controller is set to the initial value trol input and
specified at the INIT input by means of a 1 signal at the
– Specifying the value 0 at the input KP.
input S (set).
These measures render the P component and the DT1
– A 1 signal at the input R (reset) is equivalent to specify- component inactive during setting of the controller.
ing the initial value 0 (see above).
The controller output assumes the initial value during the
set cycle.
Surge–free setting/resetting
The P and DT1 components are enabled again after the
– The output y of the controller is set to the initial value set cycle. From the initial value, the controller output y
specified at the input INIT by means of a 1 signal at the jumps according to the P and DT1 components of the
binary input S (set). controller.
Advantage of surging setting:
– A 1 signal at the input R (reset) is equivalent to specify-
ing the initial value 0. – The I component is not set to “wrong” values from the
In doing so, adjustment to the initial value takes place point of view of control.
internally in the controller. This adjustment is a shift of Disadvantage of surging setting:
the controller output from the momentary value to the
required initial value. Now, the controller continues op- – No freedom from surging
erating from this initial value precisely as it would have
done at the old operating point before the shift, i.e. with-
y WORD
out surges. The controller’s I component is defined so
The controller’s manipulated variable y is output through
that the sum of the P component, I component and DT1
the output y.
component just results in the initial value.
Example
FBD/LD IL
!BA 0
PIDT1 PIDT1
EW 00,00 w EW 00,00
MW 01,01 x MW 01,01
MW 02,00 KP MW 02,00
KW 02,13 TN/T KW 02,13
KW 04,01 TV/T KW 04,01
KW 07,03 T1/T KW 07,03
E 03,09 D–FR E 03,09
MW 13,00 OG MW 11,11
MW 09,01 UG A 03,03
A 03,03 S y=OG A 01,00 M 02,06
MW 11,11 INIT y=UG M 02,01 MW 13,00
M 02,06 R y MW 04,02 MW 09,01
MW 04,02
A 01,00
M 02,01
CE FBD Definition
PIDT1
w
x
KP
TN/T
TV/T
T1/T
D–FR
OG
UG
S y=OG
INIT y=UG
R y
w E W N P Y 0 0
x E W N P Y 0 0
KP E W N P Y 0 0
TN/T E W N P Y 0 0
TV/T E W N P Y 0 0
T1/T E W N P Y 0 0
D–FR E L N P Y 0 0
OG E W N P Y 0 0
UG E W N P Y 0 0
S E L N P Y 0 0
INIT E W N P Y 0 0
R E L N P Y 0 0
y=OG A L N P Y 0 0
y=UG A L N P Y 0 0
y A W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 PIDT1
00002 PP 0 w Input WORD (command variable)
00003 PP 0 x Input WORD (controlled variable)
00004 PP 0 KP Input WORD (proportional coefficient)
00005 PP 0 TN/T Input WORD (integral action time)
00006 PP 0 TV/T Input WORD (derivative time)
00007 PP 0 T1/T Input WORD (returning time)
00008 PP 0 D–FR Input BINARY (enable DT1 component)
00009 PP 0 INIT Input WORD (initial value)
00010 PP 0 S Input BINARY (set to INIT)
00011 PP 0 R Input BINARY (reset to 0)
00012 PP 0 OG Input WORD (high limit)
00013 PP 0 UG Input WORD (low limit)
00014 PP 0 y Output BINARY (manipulated variable)
00015 PP 0 y=OG Output BINARY (OG reached)
00016 PP 0 y=UG Output BINARY (UG reached)
!BA 0
PT1 PT1
x x
T1/T y T1/T
y
____________________________________________________________________________________________
Parameters
x WORD EW, AW, MW, KW Controlled variable
T1/T WORD EW, AW, MW, KW Time constant
y WORD AW, MW Manipulated variable
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 106 µs
Additional runtime: –––
Output updating: yes
Number of historical values: 2 words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
T1 t
x WORD
The controlled variable is specified at the input x.
T1/T WORD
The delay time T1 is specified at the input T1/T. At the
same time, the delay time T1 must be scaled to the cycle
time T.
y WORD
The result of the delay element (manipulated variable) is
output through the output y.
Example
FBD/LD IL
!BA 0
PT1
PT1
MW 00,01 x MW 00,01
MW 02,00 T1/T y AW 03,06 MW 02,00
AW 03,06
CE FBD Definition
PT1
x
T1/T y
x E W N P Y 0 0
T1/T E W N P Y 0 0
y A W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 PT1
00002 PP 0 x Input WORD (controlled variable)
00003 PP 0 T1/T Input WORD (time constant)
00004 PP 0 y Output WORD (manipulated variable)
____________________________________________________________________________________________
Parameters
#n DIRECT #, #H Number of outputs BI0 ... BIn–1
CONSTANT
BI0 BINARY A, M Output for the binary values, capable of
duplication (BI0 ... BIn–1)
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 48 µs. The runtime of the WRB block is already contained.
Additional runtime: 14 µs per variable
Output updating: yes
Number of historical values: #n even –> #n/2 words; #n odd –> (#n + 1)/2 words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
#n DIRECT CONSTANT
Note:
Example
FBD/LD IL
!BA 0
RDB RDB
#3 #n BI0 M 03,00 #3
BI1 M 03,01 M 03,00
BI2 M 03,02 M 03,01
M 03,02
!BA 0
WRB WRB
#3 #n #0
M 03,00 BI0 #3
M 03,01 BI1 M 03,00
M 03,02 BI2 M 03,01
M 03,02
CE FBD Definition
RDB
#n BI
#n K W N P Y 0 0
BI A L N P Y 1 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 RDB
00002 PP 0 #n # DIRECT CONSTANT (number of bits)
[ 1
00003 PP 1 BI Output BINARY
] 1
____________________________________________________________________________________________
Parameters
#n DIRECT #, #H Number of outputs DW0 ... DWn–1
CONSTANT
DW0 DOUBLE WORD MD Output for the double word values, capable of duplica–
tion (DW0 ... DWn–1)
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 34 µs. The runtime of the WRDW block is already contained here.
Additional runtime: 28 µs per additional output DW1 ... DWn–1
Output updating: yes
Number of historical values: 2 * #n words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
#n DIRECT CONSTANT
The number of the outputs DW0...DWn–1 is specified at
the input #n. This is specified as a direct constant.
Note:
The value specified at the input #n must also agree with
the number of inputs of the affiliated WRDW block.
Example
FBD/LD IL
!BA 0
RDDW RDDW
#3 #n DW0 MD 03,00 # 3
DW1 MD 03,01 MD 03,00
DW2 MD 03,02 MD 03,01
MD 03,02
!BA 0
WRDW WRDW
#3 #n # 0
MD 00,00 DW0 # 3
MD 00,01 DW1 MD 00,00
MD 00,02 DW2 MD 00,01
MD 00,02
CE FBD Definition
RDDW
#n DW
#n K W N P Y 0 0
DW A D N P Y 1 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 RDDW
00002 PP 0 #n # CONSTANT (number of double words)
[ 1
00003 PP 1 DW Output DOUBLE WORD
] 1
____________________________________________________________________________________________
Parameters
#n DIRECT #, #H Number of outputs WO0 ... WOn–1
CONSTANT
WO0 WORD AW, MW Output for the word values,
capable of duplication (WO0 ... WOn–1)
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 38 µs. The runtime of the WRW block is already contained here.
Additional runtime: 19 µs per additional output WO1 ... WOn–1
Output updating: yes
Number of historical values: #n words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
#n DIRECT CONSTANT
The number of outputs WO0...WOn–1 is specified at the
input #n. This is specified as a direct constant.
Note:
The value specified at the input #n must agree with the
number of inputs of the affiliated WRW block.
Example
FBD/LD IL
!BA 0
RDW RDW
#3 #n WO0 MW 03,00 #3
WO1 MW 03,01 MW 03,00
WO2 MW 03,02 MW 03,01
MW 03,02
!BA 0
WRW WRW
#3 #n # 0
MW 03,00 WO0 # 3
MW 03,01 WO1 MW 03,00
MW 03,02 WO2 MW 03,01
MW 03,02
CE FBD Definition
RDW
#n WO
#n K W N P Y 0 0
WO A W N P Y 1 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 RDW
00002 PP 0 #n DIRECT CONSTANT
[ 1
00003 PP 1 WO Output
] 1
Parameters
R BINARY E, M, A, S, K Reset input
S BINARY E, M, A, S, K Set input
Q BINARY M, A Flip–flop output
____________________________________________________________________________________________
Description
The operand Q, which performs the storage function, is
entered above the graphical symbol. The status of the op-
erand Q is allocated to the operand at the output Q.
Example
FBD/LD IL
M 00,00
! E 00,00
RS =R M 00,00
E 00,00 R ! E 03,11
E 03,11 S Q A 02,00 =S M 00,00
! M 00,00
= A 02,00
CE FBD Definition
RS
R
S Q
R E L Y P Y 0 0
S E L Y P Y 0 0
Q A L N P Y 0 0
CE IL Definition
Parameters
E BINARY E, K , M, S Input
#BIT DIRECT #,#H Bit position; admissible values: 0...31
CONSTANT
A WORD AW, EW, MW Output
DOUBLE WORD MD
CE data
Output updating: yes
Number of historical values: none
Description
The bit at input #BIT is set (E = 1) or reset (E = 0) in the A WORD/DOUBLE WORD
word/double word A depending on input E.
The corresponding bit is set or reset at output A. If a word
variable is entered at output A and #BIT is greater than 15,
E BINARY the corresponding bit of the following word variable is set
or reset.
For E = 0, the corresponding bit in output A is reset, for
E = 1 it is set. Example: A = MW 00,02 and #BIT = 18 → bit 2 of MW 00,03
is set or reset depending on input E.
#BIT DIRECT CONSTANT (#, #H)
At input #BIT, the position of the corresponding bit is spe-
cified.
Admissible values: 0...31
Graphic
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
SETB
BIT_IN Y N Y 0 00 E
DIREKT-KONS Y N Y 0 00 #BIT A 00 0 Y N Y WORT_DW_OUT
Source
____________________________________________________________________________________________
Parameters
S BINARY E, A, M, S, K Set
R BINARY E, A, M, S, K Reset
FSU BINARY E, A, M, S, K Enable search
FKOP BINARY E, A, M, S, K Enable copy
#n DIRECT #, #H Number of binary variables
CONSTANT
B0 BINARY E, A, M, S, K List of binary variables; the input can be duplicated
END BINARY A, M List end reached
NR WORD AW, MW List number of the variable found
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 83 µs
Additional runtime: 22 µs per input B0...Bn–1
Output updating: yes
Number of historical values: 3 words + #n/16 words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description S BINARY
This function block successively searches through a list A 1 signal at the input S results in the following:
of binary variables (E, A, M, S) for set binary variables. If a - All set binary variables of the input list are additionally
set binary variable is found, its number is output through entered in the internal list (ORed with the internal list).
the output NR. In doing so, the block does not directly
search through the input list for the set binary variables, - The block is prepared for a search from the start of the
but through its image, which it stores in an internal list. Af- internal list, i. e. the internal list’s pointer is set to its start.
ter a set binary variable has been found in the internal list - The output END (list end reached) is set to 1 and the
and its number has been output through the output NR, output NR (number of the binary variable) is set to 0.
this binary variable is deleted from the internal list.
- If a set variable has been found during the previous
The inputs and outputs cannot be negated. The input B0 search in the internal list, this is deleted from the internal
can be duplicated (B0...Bn–1). list in order to avoid a double message.
NR WORD
The list number of the variable found last is output through
the output NR. The following affiliations apply:
Example
FBD/LD IL
!BA 0
SFEHSU SFEHSU
M 00,01 S M 00,01
E 00,03 R E 00,03
E 00,07 FSU E 00,07
M 01,00 FKOP M 01,00
# 3 #n END A 00,08 # 3
M 10,00 B0 NR AW 05,00 M 10,00
M 10,01 B1 M 10,01
M 10,02 B2 M 10,02
A 00,08
AW 05,00
CE FBD Definition
SFEHSU
S
R
FSU
FKOP
#n END
B NR
S E L N P Y 0 0
R E L N P Y 0 0
FSU E L N P Y 0 0
FKOP E L N P Y 0 0
#n K W N P Y 0 0
B0 E L N P Y 1 0
END A L N P Y 0 0
NR A W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 SFEHSU
00002 PP 0 S Input BINARY (Set)
00003 PP 0 R Input BINARY (Reset)
00004 PP 0 FSU Input BINARY (enable search)
00005 PP 0 FKOP Input BINARY (enable copy)
00006 PP 0 #n # CONSTANT (number of bits)
[ 1
00007 PP 0 B Input BINARY (element of the list of binary variables)
] 1
00008 PP 0 END Output BINARY (list end reached)
00009 PP 0 NR Output WORD (No.)
!BA 0
SHIFT
SHIFT
E E
D/W D/W
ANZ ANZ
LKS LKS
ROT ROT
ROTC ROTC
SLOG SLOG
SARI SARI
CY_E CY_A CY_E
A CY_A
A
____________________________________________________________________________________________
Parameters
E WORD EW, AW, MW, KW Operand to be shifted
DOUBLE WORD KD, MD Word or double word
D/W BINARY E, A, M, K, S Format selection, double word or word
D/W = 0 –> Word
D/W = 1 –> Double word
ANZ WORD EW, AW, MW, KW Number of bit positions to be shifted
LKS BINARY E, A, M, K, S Shift direction, left or right
LKS = 0 –> shift to right
LKS = 1 –> shift to left
ROT BINARY E, A, M, K, S Shift–Art: ROTATE
ROTC BINARY E, A, M, K, S Shift–Art: ROTATE by the CARRY FLAG
SLOG BINARY E, A, M, K, S SHIFT type: LOGICAL SHIFT
SARI BINARY E, A, M, K, S SHIFT type: ARITHMETIC SHIFT
CY_E BINARY E, A, M, K, S Initial value for the CARRY FLAG in the case of
shift type ROTC
CY_A BINARY A, M Status of the CARRY FLAG after the shift
A WORD AW, MW Result of the shift
DOUBLE WORD MD
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 37 ... 78 µs according to the shift type
Additional runtime: 1 µs per bit position to be shifted
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
The block can shift both word and also double word oper-
ands. C MSB ..... ................ LSB
Important: In certain circumstances, the value 8000H or
8000 0000H forbidden for arithmetic operations may be LSB: Least significant bit
present at this block’s output. MSB: Most significant bit
ROTC BINARY
The inputs and outputs can neither be duplicated nor in- Shift type: ROTATE by the CARRY FLAG
verted nor negated. The bit position released by the shift is replaced by the
contents of the CARRY FLAG. The CARRY FLAG is then
replaced by the bit shifted out. After the shift, the result
E WORD/DOUBLE WORD and the contents of the CARRY FLAG are available at the
Operand to be shifted block’s outputs.
The planned SHIFT operation is applied to the input oper-
and, which is not changed. ROTC to the right:
D/W BINARY
Format selection for the input operand
D/W = 0 –> WORD MSB ..... ................ LSB C
D/W = 1 –> DOUBLE WORD
Example
FBD/LD IL
SHIFT
!BA 0
MD 00,00 E SHIFT
M 00,00 D/W MD 00,00
MW 00,00 ANZ M 00,00
M 00,01 LKS MW 00,00
M 00,02 ROT M 00,01
M 00,03 ROTC M 00,02
M 00,04 SLOG M 00,03
M 00,05 SARI M 00,04
M 00,06 CY_E CY_A M 00,07 M 00,05
A MD 00,01 M 00,06
M 00,07
MD 00,01
CE FBD Definition
SHIFT
E
D/W
ANZ
LKS
ROT
ROTC
SLOG
SARI
CY_E CY_A
A
E E X N P Y 0 0
D/W E L N P Y 0 0
ANZ E W N P Y 0 0
LKS E L N P Y 0 0
ROT E L N P Y 0 0
ROTC E L N P Y 0 0
SLOG E L N P Y 0 0
SARI E L N P Y 0 0
CY_E E L N P Y 0 0
CY_A A L N P Y 0 0
A A X N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 SHIFT
00002 PP 0 E Operand to be shifted (WORD/DOUBLE WORD)
00003 PP 0 D/W Format selection (BINARY)
00004 PP 0 ANZ Number of bit positions (WORD)
00005 PP 0 LKS Shift direction (BINARY)
00006 PP 0 ROT Rotate (BINÄR)
00007 PP 0 ROTC Rotate by the Carry flag (BINARY)
00008 PP 0 SLOG Logical shift (BINARY)
00009 PP 0 SARI Arithmetic shift (BINARY)
00010 PP 0 CY_E Carry input (BINARY)
00011 PP 0 CY_A Carry output (BINARY)
00012 PP 0 A Result of the shift (WORD/DOUBLE WORD)
FBD/LD IL
SIN1 SIN1
!BA 0
ANG AD MW 00,02 ANG AD MD 04,00 SIN1
ERR ERR M 05,00 MW 00,02
MD 04,00
M 05,00
Parameters
ANG WORD EW, AW, MW Angle 0...3600 (corresponds to 0.0o....360.0o)
AD DOUBLE WORD MD Sine of the input value
ERR BINARY M, A Error, if input value is negative or greater than 3600
____________________________________________________________________________________________
CE data
Runtime: 07 KR 91 / 07 KT 92 / 07 KT 93 / 07 KP 62
Basic runtime: 47 – 69 µs
Additional runtime: –––
Updating of the outputs: yes
Number of historical values: 0 words
Available as of: ABB Procontic CS31 07KT92 R202/R262, 07KT93 R171
ABB Procontic T200 07KP62 R202
SINIT !BA 0
SINIT
FREI
FREI
SSK
SSK
BAUD
BAUD
STOP
STOP
ZL
ZL
PTY
PTY
E/O
E/O
ECHO
ECHO
SBRK
SBRK
FEND
FEND
ENDS
ENDS
ENDE
ENDE
____________________________________________________________________________________________
Parameters
FREI BINARY A, E, S, M, K Enable processing of the block, 0 –> 1 edge
SSK WORD AW, EW, MW, KW Interface identifier (1 or 2)
BAUD WORD AW, EW, MW, KW Baud rate; 300 ... 9600 Baud
STOP WORD AW, EW, MW, KW Number of stop bits; input has no effect
ZL WORD AW, EW, MW, KW Character length, 7 or 8 data bits per character
PTY BINARY A, E, S, M, K Parity, enable/disable
E/O BINARY A, E, S, M, K Parity even/odd
ECHO BINARY A, E, S, M, K Echo, on/off
SBRK BINARY A, E, S, M, K Send break character
FEND BINARY A, E, S, M, K Enable end of text character for transmitting direction
ENDS WORD AW, EW, MW, KW End of text character for transmitting direction
ENDE WORD AW, EW, MW, KW End of text character for receiving direction
____________________________________________________________________________________________
BAUD WORD
The value for the baud rate is specified at the BAUD input. ENDS WORD
Baudrate: 300 ... 9600 Baud A freely selectable end of text character for the transmit-
ting direction can be specified at the ENDS input. This
end character is then appended automatically to every
STOP WORD
text (telegram) which the DRUCK block sends to the out-
The number of stop bits is set to 1 and can not be modi-
side world through the serial interface. However, a pre-
fied. The value for the number of stop bits specified at the
condition is that input FEND is enabled.
input STOP has no significance.
Example
FBD/LD IL
!BA 0
SINIT SINIT
M 00,00
M 00,00 FREI
MW 06,00
MW 06,00 SSK
MW 07,05
MW 07,05 BAUD
MW 10,01
MW 10,01 STOP
MW 12,00
MW 12,00 ZL
M 01,00
M 01,00 PTY
M 01,05
M 01,05 E/O
M 01,08
M 01,08 ECHO
M 01,07
M 01,07 SBRK
M 02,00
M 02,00 FEND
MW 11,00
MW 11,00 ENDS
MW 13,09
MW 13,09 ENDE
CE FBD Definition
SINIT
FREI
SSK
BAUD
STOP
ZL
PTY
E/O
ECHO
SBRK
FEND
ENDS
ENDE
FREI E L N P Y 0 0
SSK E W N P Y 0 0
BAUD E W N P Y 0 0
STOP E W N P Y 0 0
ZL E W N P Y 0 0
PTY E L N P Y 0 0
E/O E L N P Y 0 0
ECHO E L N P Y 0 0
SBRK E L N P Y 0 0
FEND E L N P Y 0 0
ENDS E W N P Y 0 0
ENDE E W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (vorbelegt 0)
00001 SINIT
00002 PP 0 FREI Input BINARY (block enable)
00003 PP 0 SSK Input WORD (interfaces)
00004 PP 0 BAUD Input WORD (baud rate)
00005 PP 0 STOP Input WORD (number of stop bits)
0006 PP 0 ZL Input WORD (character length)
0007 PP 0 PTY Input BINARY (parity)
0008 PP 0 E/O Input BINARY (parity even/odd)
0009 PP 0 ECHO Input BINARY (echo)
00010 PP 0 SBRK Input BINARY (send break)
00011 PP 0 FEND Input BINARY (output ENDS)
00012 PP 0 ENDS Input WORD (send end of text character)
00013 PP 0 ENDE Input WORD (receive end of text character)
!BA 0
SPBM SPRUNG
E E
MRK MA NR
#0
#0
____________________________________________________________________________________________
Parameters
E BINARY E, M, A, K, S Jump condition
MRK SPECIAL MRK Target label
____________________________________________________________________________________________
!E0,0
&E0,1
/M0,0
=M0,1
!BA 123
SPRUNG Jump block
M0,1 Jump condition
MA 99 Target label’s name
#0 Free space for number of historical
values to be skipped
(not used in 07 KR 31)
#0 Free space for target address
!E1,5
&E4,9
=A6,8
=M9,7
.
.
.
MA 99 Target label, jump target for the jump
block
!E10,12
/E10,13
&E10,14
=A14,15
!PE
Example
FBD/LD IL
!BA 0
SPBM SPRUNG
E 01,00 E E 01,00
MRK 0 MRK MA 0
#0
#0
CE FBD Definition
SPBM
E
MRK
E E L N P Y 0 0
MRK S S N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 SPRUNG
00002 PP 0 E Jump condition BINARY
00003 MA PP 0 MRK Target lable
00004 # 0
00005 # 0
Parameters
CE Data
Runtime:
Basic runtime: 55 µs ... 193 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
E WORD/DOUBLE WORD
The square root of the value at the input operand E is ge-
nerated and is available as a value of the output operand
A.
D/W BINARY
The input D/W defines the format of the input/output oper-
and.
D/W = 0 –> WORD
D/W = 1 –> DOUBLE WORD
Example
FBD/LD IL
SQRT !BA 0
SQRT
MD 00,00 E MD 00,00
K 00,00 D/W K 00,00
A MD 00,01 MD 00,01
ERR A 00,00 A 00,00
CE FBD Definition
SQRT
E
D/W
A
ERR
E E X N P Y 0 0
D/W E L N P Y 0 0
A A X N P Y 0 0
ERR A L N P Y 0 0
CE IL Definition
Parameters
S BINARY E, M, A, S, K Set input
R BINARY E, M, A, S, K Reset input
Q BINARY M, A Flip–flop output
____________________________________________________________________________________________
Example
FBD/LD IL
M 00,00
! E 00,00
SR =S M 00,00
E 00,00 S ! E 03,11
E 03,11 R Q A 02,00 =R M 00,00
! M 00,00
= A 02,00
CE FBD Definition
SR
S
R Q
S E L Y P Y 0 0
R E L Y P Y 0 0
Q A L N P Y 0 0
CE IL Definition
Parameters
E WORD EW, MW Input
DOUBLE WORD MD
#BIT DIRECT #,#H Bit position; admissible values: 0...31
CONSTANT
A BINARY A, M Output
CE data
Output updating: yes
Number of historical values: none
Description
E WORD/DOUBLE WORD #BIT Direct constant (#,#H)
The bit at input #BIT (#) is tested in word/double word E At input #BIT, the position of the corresponding bit is spec-
and assigned to the binary variable A. ified.
If a word variable is entered at input E and #BIT is greater Admissible values: 0...31
than 15, the corresponding bit of the following word vari-
able is tested and assigned to output A.
Example: E = MW 00,02 and #BIT = 18 → bit 2 of A BINARY
MW 00,03 is assigned to output A. Output A is set (Bit = 1) or reset (Bit = 0) depending on the
corresponding bit in E.
Graphic
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
TESTB
WORT_IN Y N Y 0 00 E
Source
Parameters
IN BINARY E, M, A, S, K Input signal
PT WORD/DOUBLE WORD MW&MW+1, MD, Delay time
KW&KW+1, KD
EW&EW+1, AW&AW+1
Q BINARY M, A Delayed signal
ET WORD/DOUBLE WORD MW&MW+1, MD Time display
Description
The 1/0 edge at input IN is delayed by the time PT and
output as a 1/0 edge at output Q. IN
Time is entered in milliseconds. - Started timers are processed by the PLC operating
Valid time range: 5 ms ... 24,8 days. system and are therefore completely independent
of the PLC program processing. The operating system
For the indirect constant KD, the value for the pulse length does not issue a corresponding message to the corre-
sponding timer block in the PLC program until the tim-
is entered in long text.
er has elapsed.
- The timer processing in the PLC operating system is
not affected by the following commands:
- Abort program
- Start program
- Stop program
- Continue program
That means if a timer is started, its processing in the PLC Cold start:
operating system is also continued if the corresponding
PLC program is aborted, started or stopped again or con- - Command KALT <CR>
tinued. - First switching-on of the voltage
Warm start:
Initialization - Command WARM <CR>
The timers are generally initialized with each PLC cold or - Switching on voltage
warm start. Therefore a running timer is always aborted by
a PLC cold or warm start.
Graphic
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
TOF
BIT_IN Y N Y 0 00 IN Q 00 0 Y N Y BIT_OUT
ALLE Y N Y 0 00 PT ET 00 0 Y N Y ALLE
Source
Parameters
IN BINARY E, M, A, S, K Input signal
PT WORD/DOUBLE WORD MW&MW+1, MD,, Delay time
KW&KW+1, KD,
EW&EW+1, AW&AW+1
Q BINARY M, A Delayed signal
ET WORD/DOUBLE WORD MW&MW+1, MD Time display
Description
The 0/1 edge at input IN is delayed by the time PT and
output as a 0/1 edge at output Q. IN
Time is entered in milliseconds. - Started timers are processed by the PLC operating
Valid time range: 5 ms ... 24,8 days. system and are therefore completely independent
of the PLC program processing. The operating system
does not issue a corresponding message to the corre-
For the indirect constant KD, the value for the pulse length
sponding timer block in the PLC program until the tim-
is entered in long text.
er has elapsed.
- The timer processing in the PLC operating system is
not affected by the following commands:
- Abort program
- Start program
- Stop program
- Continue program
That means if a timer is started, its processing in the PLC Cold start:
operating system is also continued if the corresponding
PLC program is aborted, started or stopped again or con- - Command KALT <CR>
tinued. - First switching-on of the voltage
Warm start:
Initialization - Command WARM <CR>
The timers are generally initialized with each PLC cold or - Switching on voltage
warm start. Therefore a running timer is always aborted by
a PLC cold or warm start.
Graphic
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
TON
BIT_IN Y N Y 0 00 IN Q 00 0 Y N Y BIT_OUT
ALLE Y N Y 0 00 PT ET 00 0 Y N Y ALLE
Source
Parameters
IN BINARY E, M, A, S, K Input signal
PT WORD/DOUBLE WORD MW&MW+1, MD, Pulse duration
KW&KW+1, KD,
EW&EW+1, AW&AW+1
Q BINARY M, A Pulse
ET WORD/DOUBLE WORD MW&MW+1, MD Time display
Description
The 0/1 edge at input IN produces a 0/1 edge at output Q.
After the time PT has expired, output Q is reset to the 0 IN
level. A second 0/1 edge at input IN which occurs before
the time period PT has elapsed is ignored.
Q PT PT
The output ET indicates the current time.
For times less than 65 s, variables of the type WORD can
be used at input PT and output ET: flags, constants, other
WORD functions (+, -, AWT) and the potentiometer inputs Maximum time offset at the output: < 1 cycle time
of the CPU.
Sensible range for PT: > 1 cycle time
In this case MW, KW, EW and AW assign two successive
addresses. MW+1, KW+1, EW+1 and AW+1 must no The inputs and the output can neither be duplicated nor
longer be used in the program. inverted.
That means if a timer is started, its processing in the PLC Cold start:
operating system is also continued if the corresponding
PLC program is aborted, started or stopped again or con- - Command KALT <CR>
tinued. - First switching-on of the voltage
Warm start:
Initialization - Command WARM <CR>
The timers are generally initialized with each PLC cold or - Switching on voltage
warm start. Therefore a running timer is always aborted by - RESET switch
a PLC cold or warm start.
Graphic
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
TP
BIT_IN Y N Y 0 00 IN Q 00 0 Y N Y BIT_OUT
ALLE Y N Y 0 00 PT ET 00 0 Y N Y ALLE
Source
This function block allows users to set and display the cur-
rent time and the current date.
FBD/LD IL
!BA 0
UHR
UHR
FREI AKT FREI
S FEHL S
SEC ASEC SEC
MIN AMIN MIN
H AH H
TAG ATAG TAG
MON AMON MON
JHR AJHR JHR
WTG AWTG WTG
AKT
FEHL
ASEC
AMIN
AH
ATAG
AMON
AJHR
AWTG
____________________________________________________________________________________________
Parameters
FREI BINARY E, A, M, K, S Enable block processing
S BINARY E, A, M, K, S 0/1 edge sets the time and date
SEC WORD EW, AW, MW, KW Set input for the seconds
MIN WORD EW, AW, MW, KW Set inputs for the minutes
H WORD EW, AW, MW, KW Set inputs for the hours
TAG WORD EW, AW, MW, KW Set inputs for the days
MON WORD EW, AW, MW, KW Set inputs for the months
JHR WORD EW, AW, MW, KW Set inputs for the years
WTG WORD EW, AW, MW, KW Set inputs for the weekdays
AKT BINARY A, M Topicality (usefulness) of the data at the outputs
FEHL WORD AW, MW Error identifier
ASEC WORD AW, MW Seconds output
AMIN WORD AW, MW Minutes output
AH WORD AW, MW Hours output
ATAG WORD AW, MW Days output
AMON WORD AW, MW Months output
AJHR WORD AW, MW Years output
AWTG WORD AW, MW Weekday No. output
____________________________________________________________________________________________
The inputs and outputs can neither be duplicated nor in- H WORD
verted nor negated. Set input for the hours.
The clock is set by means of the set inputs for the time and The clock operates in 24 hour mode, i.e. it changes from
date. The values present at the set inputs are adopted by 23:59:59 h to 0:0:0 h.
a 0/1 edge at the input S. As long as a 1 signal is present Value range: 0...23.
at the FREI input, the current date and time are indicated
at the block’s outputs. TAG WORD
Set input for the days (which day of the month)
FREI BINARY
Block enable Not The clock knows the number of days depend-
for ing on the months and leap years. For the
07 clock, a leap year exists when the year num-
FREI = 0: The block is not processed. The AKT
KR 31 ber is an integral multiple of 4. The maximum
and FEHL outputs are set to 0. The time
value for the days (28, 29, 30, 31) depends
and date outputs are no longer changed
on the month.
by the block.
Value range: 1...28, 29, 30, 31.
0/1 edge –> the clock is set to the values present at the
time and date inputs. JHR WORD
Set input for the years.
During the setting, the time and date at the block’s output
are invalid (output AKT = 0). The clock only indicates the years and decades.
Value range: 0...99.
Set inputs for date and time WTG WORD
Set input for the number of the weekday.
In the event of a 0/1 edge at the input S, the clock is set to
the values present at the set inputs. If the specified set This input specifies which day of the week the day is on
values are inadmissible, the AKT output is set to 0 and an which input is made. That is to say, it is possible to deter-
error message appears at the FEHL output. The values mine which day of the week the day with the number 1 is to
present at the time and date outputs are invalid in this be (e. g. Sunday or Monday).
case. The clock has to be set again. Value range: 1...7.
Example:
SEC WORD The clock is set on Friday, 01.07.88. If the value 6 is en-
Set input for the seconds. tered for the week day number, Friday is now the 6th day
Value range: 0...59. of the week and Sunday is defined as the 1st day of the
week.
AKT BINARY FEHL = 10: Date/time are currently being set; this
Indication of the topicality (usefulness) of the outputs. may take several PLC cycles.
– The values at the outputs are consistent, i.e. none of FEHL = 13: Setting was not successful, please
the values at the date or time outputs has changed du- repeat (request code cannot be
ring updating. They all originate from the same clock excecuted).
pulse;
– Error when displaying date and time:
– The clock was set correctly; FEHL = 9: Date/time at the outputs are invalid.
FEHL = 4: 1 < TAG < 28, 29, 30, 31 (depending on ATAG WORD
the month, not tested in 07 KR 31) has Days output.
not been obeyed Value range: 1...28, 29, 30, 31.
The following errors are not used in the 07 KR 31: AJHR WORD
Years output.
FEHL = 8: The transmission mailbox is currently Value range: 0...99.
occupied by another user. The block
waits till the mailbox is free and thereafter
sets date/time. AWTG WORD
Weekday No. output.
FEHL = 9: Date/time at the outputs are invalid. Value range: 1...7.
Example
FBD/LD IL
!BA 0
UHR
UHR
M 00,00 FREI AKT M 00,01 M 00,00
M 00,02 S FEHL MW 00,03 M 00,02
MW 00,04 SEC ASEC MW 00,05 MW 00,04
MW 00,06 MIN AMIN MW 00,07 MW 00,06
MW 00,08 H AH MW 00,09 MW 00,08
MW 00,10 TAG ATAG MW 00,11 MW 00,10
MW 00,12 MON AMON MW 00,13 MW 00,12
MW 00,14 JHR AJHR MW 00,15 MW 00,14
MW 01,00 WTG AWTG MW 01,01 MW 01,00
M 00,01
MW 00,03
MW 00,05
MW 00,07
MW 00,09
MW 00,11
MW 00,13
MW 00,15
MW 01,01
!BA 0
UNPACK UNPACK
WORT WORT
#n BI0 #n
BI0
____________________________________________________________________________________________
Parameters
WORT WORD EW, AW, MW, KW Word variable to be unpacked
#n DIRECT #, #H Number of output variables BI0 ... BIn–1
CONSTANT
BI0 BINARY A, M 1st binary output variable; the output can be duplicated
____________________________________________________________________________________________
CE Data Series 90 Series 30, 40, 50
Runtime:
Basic runtime: 23.5 µs 32 µs
Additional runtime: 9.5 µs per planned binary variable
33 µs per
planned binary variable
Output updating: yes yes
Number of historical values: none none
Available as of: ABB Procontic CS31 / 907 PC 331 907 PC 331 / 07 KR 31 V 1.0
07 CR 41, 07 CT 41, 07 KR 51, 07 KT 51
____________________________________________________________________________________________
Description Affiliation
Input variable Bit0 –> BI0
This function block unpacks the word variable at the input Input variable Bit1 –> BI1
WORT. Each bit of the input variable is allocated to one . . . .
binary variable each (BI0...BIn–1) at the output. . . . .
Input variable Bit15 –> BI15
WORT WORD
The variable to be unpacked is specified at the input
WORT. Each bit (bit 0...bit 15) of this input variable is allo-
cated to the affiliated output variable (BI0...BIn–1).
Example
FBD/LD IL
!BA 0
UNPACK UNPACK
MW 07,05 WORT MW 07,05
#2 #n BI0 M 08,03 #2
BI1 M 08,04 M 08,03
M 08,04
CE FBD Definition
UNPACK
WORT
#n BI
WORT E W N P Y 0 0
#n K W N P Y 0 0
BI A L N P Y 1 0
CE IL Definition
!BA 0
UNPACKD UNPAD
DW DW
#n BI0 #n
BI
____________________________________________________________________________________________
Parameters
DW DOUBLE WORD MD, KD Double word variable to be unpacked
#n WORD #,#H Number of output variables at BIO... BIn–1
BI0 BINARY A, M 1st binary output variable; the output can be duplicated
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 40 µs
Additional runtime: 9 µs per output
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description Affiliation
Input variable Bit0 –> BI0
Input variable Bit1 –> BI1
This function block unpacks the double word variable at . . . .
the input DW. Each bit of the input variable is allocated to . . . .
one binary variable each (BI0...BIn–1) at the output. Input variable Bit31 –> BI31
DW DOUBLE WORD
The variable to be unpacked is specified at the input DW.
Each bit (bit 0...bit 31) of this input variable is allocated to
the affiliated output variable (BI0...BIn–1).
#n DIRECT CONSTANT (#,#H)
The number of planned binary outputs (BI0...BIn–1) is
specified at the input #n. This is specified as a direct con-
stant. The following applies: 1 < n < 32
BI0 BINARY
The output BI0 is capable of duplication (BI0...BIn–1).
The affiliated bits of the variable at the input DW are allo-
cated to the binary outputs BI0...BIn.
Example
FBD/LD IL
!BA 0
UNPACKD UNPAD
MD 07,05 DW MD 07,05
#2 #n BI0 M 08,03 #2
BI1 M 08,04 M 08,03
M 08,04
CE FBD Definition
UNPACKD
DW
#n BI
DW E D N P Y 0 0
#n K W N P Y 0 0
BI A L N P Y 1 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 UNPAD
00002 PP 0 DW Input DOUBLE WORD
00003 PP 0 #n # CONSTANT (number of BITs)
[ 1
00004 PP 1 BI Output BINARY
] 1
____________________________________________________________________________________________
Parameters
ADR WORD EW, AW, MW, KW Indirect address of the operand to be written
E WORD AW, MW Value to be allocated to the operand
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 225 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
This function block allocates the value from the input E to
an operand, using the method of indirect addressing.
Note: The USM block can only be used meaningfully in
conjunction with the ADRWA block.
The value of the operand at the input ADR is interpreted
as the address of the operand to be written (indirect ad-
dressing).
Therefore, the operand at the input ADR and its value rep-
resent an indirect address. This indirect address is gener-
ated by the ADRWA function block.
The inputs can neither be duplicated nor negated.
Note: Refer to the function block ADRWA for an explana-
tion of the method of indirect addressing and the
possibilities of using the USM function block.
Example
FBD/LD IL
!BA 0
USM USM
AW 09,00
AW 09,00 ADR EW 10,02
EW 10,02
CE FBD Definition
USM
ADR A
E
ADR E W N P Y 0 0
E E W N P N 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 USM
00002 PP 0 ADR Input WORD (operand address)
00003 PP 0 E Input WORD (operand value)
A 1 signal at the binary input 0/1 allocates the value of the !BA 0
word operand at the input E1 to the word operand at the UST UST
output 1. 0/1 0/1
E1 0 E1
The respective output that is not allocated retains its old 1 0
value, but the old value is not updated. 1
____________________________________________________________________________________________
Parameters
0/1 BINARY E, M, A, S, K Switchover input
E1 WORD EW, MW, AW, KW Input
0 WORD AW, MW Output for 0/1 = 0
1 WORD AW, MW Output for 0/1 = 1
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 31 µs
Additional runtime: –––
Output updating: no; recommendation: Allocate the output directly to a flag or use a global
intermediate flag; see volume 3, chapter 2.5.3
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
A 0 signal at the binary input 0/1 allocates the value of the
word operand at the input E1 to the word operand at the
output 0.
A 1 signal at the binary input 0/1 allocates the value of the
word operand at the input E1 to the word operand at the
output 1.
The respective output that is not allocated retains its old
value, but the old value is not updated.
The inputs and outputs can neither be duplicated nor ne-
gated/inverted.
Example
FBD/LD IL
!BA 0
UST UST
E 01,00 0/1 E 01,00
MW 05,00 0 MW 08,15 MW 05,00
1 MW 09,00 MW 08,15
MW 09,00
CE FBD Definition
UST
0/1
E1 0
1
0/1 E L N P Y 0 0
E1 E W N P N 0 0
0 A W N P Y 0 0
1 A W N P Y 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
0/1 BINARY E, M, A, S, K Switchover input
E1 DOUBLE WORD MD, KD Input
0 DOUBLE WORD MD Output for 0/1 = 0
1 DOUBLE WORD MD Output for 0/1 = 1
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 35 µs
Additional runtime: –––
Output updating: no; recommendation: Allocate the output directly to a flag or use a global
intermediate flag; see volume 3, chapter 2.5.3
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
A 0 signal at the binary input 0/1 allocates the value of the
double word operand at the input E1 to the double word
operand at the output 0.
Example
FBD/LD IL
!BA 0
USTD USTD
E 01,00 0/1 E 01,00
MD 05,00 0 MD 08,15 MD 05,00
1 MD 09,00 MD 08,15
MD 09,00
CE FBD Definition
USTD
0/1
E1 0
1
0/1 E L N P Y 0 0
E1 E D N P N 0 0
0 A D N P Y 0 0
1 A D N P Y 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
0/1 BINARY E, M, A, S, K Switchover input
E1 WORD EW, MW, AW, KW Input
0 WORD AW, MW Output for 0/1 = 0
1 WORD AW, MW Output for 0/1 = 1
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 35 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
A 0 signal at the binary input 0/1 allocates the value of the
word operand at the input E1 to the word operand at the
output 0.
Example
FBD/LD IL
!BA 0
USTR USTR
E 01,00 0/1 E 01,00
MW 05,00 0 MW 08,15 MW 05,00
1 MW 09,00 MW 08,15
MW 09,00
CE FBD Definition
USTR
0/1
E1 0
1
0/1 E L N P Y 0 0
E1 E W N P N 0 0
0 A W N P Y 0 0
1 A W N P Y 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
0/1 BINARY E, M, A, S, K Switchover input
E1 DOUBLE WORD MD, KD Input
0 DOUBLE WORD MD Output for 0/1 = 0
1 DOUBLE WORD MD Output for 0/1 = 1
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 43 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
A 0 signal at the binary input 0/1 allocates the value of the
double word operand at the input E1 to the double word
operand at the output 0.
Example
FBD/LD IL
!BA 0
USTRD USTRD
E 01,00 0/1 E 01,00
MD 05,00 0 MD 08,15 MD 05,00
1 MD 09,00 MD 08,15
MD 09,00
CE FBD Definition
USTRD
0/1
E1 0
1
0/1 E L N P Y 0 0
E1 E D N P N 0 0
0 A D N P Y 0 0
1 A D N P Y 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
E WORD EW, MW, AW, KW Input value
OG WORD EW, MW, AW, KW High limit
UG WORD EW, MW, AW, KW Low limit
E>OG BINARY A, M Value > high limit
E<UG BINARY A,M Value < low limit
Q BINARY A,M Low limit < input value < high limit
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 48 µs
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
Number range
Integer word (16 bits)
The following especially applies here to the non–
negated inputs:
– Low level 8000H –32768
– High level 7FFFH +32767
The following generally applies:
– Low limit: 8001H – 32767
– High limit: 7FFFH + 32767
– Inadmissible value: 8000H –––
In the two’s complement arithmetic, the value 8000H
(–32768) lies outside of the number range and is neither
generated nor processed correctly by the PLC. If this for-
bidden value reaches the PLC
– by bit manipulations of the user or
– by being read from outside the PLC or
– by an indirect word constant
under no circumstances may negation or subtraction be
carried out on this value.
An admissible value is generated again by means of an
allocation (=), addition (+), multiplication (*) or division (:).
On allocation (=), the forbidden value 8000H (–32768) is
corrected to the allowed value 8001H (–32767).
Example
FBD/LD IL
!BA 0
VGL3P VGL3P
EW 00,00 E EW 00,00
MW 01,00 OG MW 01,00
KW 00,00 UG E>OG A 00,00 KW 00,00
E<UG M 02,00 A 00,00
Q M 00,00 M 02,00
M 00,00
CE FBD Definition
VGL3P
E
OG
UG E>OG
E<UG
Q
E E W N P Y 0 0
OG E W N P Y 0 0
UG E W N P Y 0 0
E>OG A L N P Y 0 0
E<UG A L N P Y 0 0
Q A L N P Y 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
E1 WORD EW, MW, AW, KW Input value 1
E2 WORD EW, MW, AW, KW Input value 2
HYS WORD EW, MW, AW, KW Hysteresis
Q BINARY A, M Result of the comparison
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 56 µs
Additional runtime: –––
Output updating: yes
Number of historical values: 1 word
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
Q
E1 > E2 –––> Q = 1
E1 < E2 – HYS –––> Q = 0 HYS
E2 – HYS < E1 < E2 –––> Q as in the previous
cycle 0
E2–HYS E2 E1
Number range
Integer word (16 bits)
Example
FBD/LD IL
!BA 0
VGLEH VGLEH
EW 00,00 E1 EW 00,00
MW 01,00 E2 MW 01,00
KW 00,00 HYS Q A 02,00 KW 00,00
A 02,00
CE FBD Definition
VGLEH
E1
E2
HYS Q
E1 E W N P Y 0 0
E2 E W N P Y 0 0
HYS E W N P Y 0 0
Q A L N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 VGLEH
00002 PP 0 E1 Input WORD
00003 PP 0 E2 Input WORD
00004 PP 0 HYS Input WORD (hysteresis)
00005 PP 0 Q Output BINARY
____________________________________________________________________________________________
Parameters
E1 WORD EW, MW, AW, KW Input value 1
E2 WORD EW, MW, AW, KW Input value 2
OHYS WORD EW, MW, AW, KW High hysteresis
UHYS WORD EW, MW, AW, KW Low hysteresis
Q BINARY A, M Output
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 58 ... 63 µs
Additional runtime: –––
Output updating: yes
Number of historical values: 1 word
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
Q
The values of the operands at the inputs E1 and E2 are
compared to each other. Taking the hystereses at the in-
puts OHYS (high hysteresis) and UHYS (low hysteresis)
into account, the result is signalled at the output Q.
1
The following applies:
Number range
Integer word (16 bits)
The following especially applies here:
E1 > 8000H (– 32768)
E2 – UHYS > 8001H (– 32767)
The following generally applies:
– Low limit: 8001H – 32767
– High limit: 7FFFH + 32767
– Inadmissible value: 8000H –––
In the two’s complement arithmetic, the value 8000H
(–32768) lies outside of the number range and is neither
generated nor processed correctly by the PLC. If this for-
bidden value reaches the PLC
– by bit manipulations of the user or
– by being read from outside the PLC or
– by an indirect word constant
under no circumstances may negation or subtraction be
carried out on this value.
An admissible value is generated again by means of an
allocation (=), addition (+), multiplication (*) or division (:).
On allocation (=), the forbidden value 8000H (–32768) is
corrected to the allowed value 8001H (–32767).
Example
FBD/LD IL
!BA 0
VGLUH VGLUH
EW 00,00 E1 EW 00,00
MW 01,00 E2 MW 01,00
KW 00,00 OHYS KW 00,00
MW 00,00 UHYS Q A 02,00 MW 00,00
A 02,00
CE FBD Definition
VGLUH
E1
E2
OHYS
UHYS Q
E1 E W N P Y 0 0
E2 E W N P Y 0 0
OHYS E W N P Y 0 0
UHYS E W N P Y 0 0
Q A L N P Y 0 0
CE IL Definition
____________________________________________________________________________________________
Parameters
FREI BINARY E, M, A, K, S Enable block processing
ZV BINARY E, M, A, K, S Pulse input, up counting
ZR BINARY E, M, A, K, S Pulse input, down counting
DIFF WORD EW, MW, AW, KW Counter content change per positive edge
(increment)
S BINARY E, M, A, K, S Set counter to an intermediate value
ZW WORD EW, MW, AW, KW Intermediate value
R BINARY E, M, A, K, S Reset counter
Z WORD AW, MW Output for counter content
____________________________________________________________________________________________
Description ZV BINARY
Each positive edge (0–>1 edge) at the input ZV increases
This function block serves to count pulses. During count- the current counter content by the increment specified at
ing, the positive edge of the pulse is evaluated in each the DIFF input.
case. The counter is capable of counting both up and
down and the counting increment can be specified. It is ZR BINARY
possible to preset the counter content to an intermediate
Each positive edge (0–>1 edge) at the input ZR de-
value.
creases the current counter content by the increment
specified at the DIFF input.
S BINARY
By means of a 1 signal at the input S, the counter content
is set to the value specified at the input ZW. Counting is
blocked as long as 1 signal is present at the input S. Set-
ting is also effective when a 1 signal is present at the FREI
input.
ZW WORD
The value to which the counter content is set by a 1 signal
at the input S is specified at the input ZW.
R BINARY
A 1 signal at the input R sets the counter content to the
value 0. The reset input R has the highest priority of all in-
puts.
Z WORD
The current counter content is available at the output Z.
Number range
Integer word (16 bits)
– Low limit: 8001H – 32767
– High limit: 7FFFH + 32767
– Inadmissible value: 8000H –––
In the two’s complement arithmetic, the value 8000H
(–32768) lies outside of the number range and is neither
generated nor processed correctly by the PLC. If this for-
bidden value reaches the PLC
– by bit manipulations of the user or
– by being read from outside the PLC or
– by an indirect word constant
under no circumstances may negation or subtraction be
carried out on this value.
An admissible value is generated again by means of an
allocation (=), addition (+), multiplication (*) or division (:).
On allocation (=), the forbidden value 8000H (–32768) is
corrected to the allowed value 8001H (–32767).
Example
FBD/LD IL
!BA 0
VRZ VRZ
E 01,00 FREI E 01,04
E 01,01 ZV KW 00,00
E 01,02 ZR E 01,03
KW 00,00 DIFF KW 00,01
E 01,03 S E 01,00
KW 00,01 ZW E 01,01
E 01,04 R Z MW 07,00 E 01,02
MW 07,00
CE FBD Definition
VRZ
FREI
ZV
ZR
DIFF
S
ZW
R Z
FREI E L N P Y 0 0
ZV E L N P Y 0 0
ZR E L N P Y 0 0
DIFF E W N P Y 0 0
S E L N P Y 0 0
ZW E W N P Y 0 0
R E L N P Y 0 0
Z A W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 VRZ
00002 PP 0 R Input BINARY (Reset counter = 0)
00003 PP 0 DIFF Input WORT (change per edge)
00004 PP 0 S Input BINARY (set counter = ZW)
00005 PP 0 ZW Input WORT (initial value)
00006 PP 0 FREI Input BINARY (block enable)
00007 PP 0 ZV Input BINARY (counter input, upward)
00008 PP 0 ZR Input BINARY (counter input, downward)
00009 PP 0 Z Output WORD (counter content)
____________________________________________________________________________________________
Parameters
FREI BINARY E, M, A, K, S Enable block processing
ZV BINARY E, M, A, K, S Pulse input, up counting
ZR BINARY E, M, A, K, S Pulse input, down counting
DIFF DOUBLE WORD MD, KD Counter content change per positive edge
(increment)
S BINARY E, M, A, K, S Set counter to an intermediate value
ZW DOUBLE WORD MD, KD Intermediate value
R BINARY E, M, A, K, S Reset counter
Z DOUBLE WORD MD Output for counter content
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 38 ... 113 µs (according to the mode)
Additional runtime: –––
Output updating: yes if FREI = 1
Number of historical values: 3 words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
S BINARY
By means of a 1 signal at the input S, the counter content
is set to the value specified at the input ZW. Counting is
blocked as long as 1 signal is present at the input S. Set-
ting is also effective when a 1 signal is present at the FREI
input.
ZW DOUBLE WORD
The value to which the counter content is set by a 1 signal
at the input S is specified at the input ZW.
R BINARY
A 1 signal at the input R sets the counter content to the
value 0. The reset input R has the highest priority of all in-
puts.
Z DOUBLE WORD
The current counter content is available at the output Z.
Number range
Integer double word (32 bits)
– Low limit: 8000 0001H –2 147 483 647
– High limit: 7FFF FFFFH +2 147 483 647
– Inadmissible value: 8000 0000H –––
All blocks for double word arithmetic subject values to be
processed for admissibility. If the inadmissible value oc-
curs, it is corrected to the admissible value 8000 0001H
(–2 147 483 647)
Example
FBD/LD IL
!BA 0
VRZD VRZD
E 00,00 FREI K 00,00
M 01,00 ZV MD 00,00
A 02,00 ZR M 00,00
MD 00,00 DIFF KD 01,00
M 00,00 S E 00,00
KD 01,00 ZW M 01,00
K 00,00 R Z MD 02,00 A 02,00
MD 02,00
CE FBD Definition
VRZD
FREI
ZV
ZR
DIFF
S
ZW
R Z
FREI E L N P Y 0 0
ZV E L N P Y 0 0
ZR E L N P Y 0 0
DIFF E D N P Y 0 0
S E L N P Y 0 0
ZW E D N P Y 0 0
R E L N P Y 0 0
Z A D N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 VRZD
00002 PP 0 R Input BINARY (Reset counter = 0)
00003 PP 0 DIFF Input DOUBLE WORD (change/pulse)
00004 PP 0 S Input BINARY (set counter = ZW)
00005 PP 0 ZW Input DOUBLE WORD (initial value)
00006 PP 0 FREI Input BINARY (block enable)
00007 PP 0 ZV Input BINARY (counter input, upward)
00008 PP 0 ZR Input BINARY (counter input, downward)
00009 PP 0 Z Output DOUBLE WORD (counter content)
____________________________________________________________________________________________
Parameters
t I IT BINARY E, M, A, S, K Input signal
tD DOUBLE WORD MD, KD Delay time 0–1 edge
TD DOUBLE WORD MD, KD Delay time 1–0 edge
Q BINARY M, A Output signal
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 46 µs, 0–1 edge 566 µs, 1–0 edge 283 µs
Additional runtime: –––
Output updating: yes
Number of historical values: 2 words
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
A 0–1 edge at the input t I I T is delayed by the time tD
and output through the output Q. A subsequent 1–0 edge T
t
at the input t I I T is delayed by the time TD and output
through the output Q.
Q
If the input t I I T changes again to 0 level before the time
tD has elapsed, the output Q retains 0 level. tD TD tD
Initialization
The timers are always initialized each time a cold or warm
start of the PLC is executed. A running timer will always
be aborted by a cold or warm start of the PLC.
Cold start:
– KALT <CR> command
S Activating the voltage for the first time
Warm start:
– WARM <CR> command
– Activating the voltage
– RESET switch
Example
FBD/LD IL
!BA 0
VVZ VVZ
E 01,00 t I IT E 01,00
KD 03,00 tD KD 03,00
KD 03,01 TD Q M 07,06 KD 03,01
M 07,06
CE FBD Definition
VVZ
t I IT
tD
TD Q
t I IT E L N P Y 0 0
tD E D N P Y 0 0
TD E D N P Y 0 0
Q A L N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 VVZ
00002 PP 0 t I IT Input BINARY (start time)
00003 PP 0 tD Constant DOUBLE WORD (time value)
00004 PP 0 TD Constant DOUBLE WORD (time value)
00005 PP 0 Q Output BINARY (time)
!BA 0
WAES WAES
E1 E1
#OFF #OFF
#SEG #SEG
____________________________________________________________________________________________
Parameters
E1 WORD EW, MW, AW, KW Input for the operand to be read
#OFF DIRECT #, #H Offset address of the memory location to which the
CONSTANT value of E1 must be written in the event of a change.
#SEG DIRECT #, #H Segment address of the memory location to which the
CONSTANT value of E1 must be written in the event of a change.
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 23 µs, no reading; 33 µs, reading
Additional runtime: –––
Output updating: yes
Number of historical values: 1 word
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description E1 WORD
If the operand at the input E1 changes, its value is written
to the address specified at the inputs #OFF and #SEG.
If the value of the operand at the input E1 compared to the
value during previous processing of the block changes,
the value of the operand at the input E1 is written to the #OFF DIRECT CONSTANT (#, #H)
specified physical address. The offset of the address to be written is specified at the
input #OFF. This is specified as a direct constant.
The physical address consists of a segment and offset.
#SEG DIRECT CONSTANT (#, #H)
The segment of the address to be written is specified at
The inputs can neither be duplicated nor negated. the input #SEG. This is specified as a direct constant.
Example
FBD/LD IL
!BA 0
WAES WAES
MW 08,03 MW 08,03
#H ABE0 #OFF #H ABE0
#H 8800 #SEG #H 8800
CE FBD Definition
WAES
E1
#OFF
#SEG
E1 E W N P N 0 0
#OFF K W N P Y 0 0
#SEG K W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 WAES
00002 PP 0 E1 Input WORD (value)
00003 PP 0 #OFF # CONSTANT (offset address)
00004 PP 0 #SEG # CONSTANT (segment address)
!BA 0
WAND WAND
E1 E1
E2 A1 E2
A1
____________________________________________________________________________________________
Parameters
E1 WORD EW, MW, AW, KW Operand 1
E2 WORD EW, MW, AW, KW Operand 2
A1 WORD MW, AW Result of the AND combination
____________________________________________________________________________________________
Description Example:
This function block generates, bit by bit, the AND combi-
nation of the operands present at the inputs E1 and E2.
The result is allocated to the operand at the output A1. E1 0.0.0.0 0.0.1.1 0.0.1.0 0.1.1.0
Example
FBD/LD IL
!BA 0
WAND WAND
MW 00,00 MW 00,00
KW 00,01 MW 08,00 KW 00,01
MW 08,00
CE FBD Definition
WAND
E1
E2 A1
E1 E W N P N 0 0
E2 E W N P N 0 0
A1 A W N P N 0 0
CE IL Definition
!BA 0
WDEC WDEC
E E
#n #n
EC0 E=EC EC
NR E=EC
NR
____________________________________________________________________________________________
Parameters
E WORD EW, AW, MW, KW Input
#n DIRECT #, #H Number of reference values
CONSTANT
EC0 WORD EW, AW, MW, KW Reference value; input can be duplicated
E=EC BINARY A, M Coincidence indication
NR WORD AW, MW Number of the reference value in the event of coincidence
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 22 µs
Additional runtime: 4 µs (max.) per entered reference value
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description E WORD
The operand whose value is to be compared to the refer-
This function block compares the value of the operand at
ence values at the inputs EC0...ECn–1 is specified at the
the input E to the reference values of the operands at the
input E.
inputs EC0...ECn–1. The result of the comparison is sig-
nalled at the outputs.
If the input E agrees with at least 1 of the n reference val- #n DIRECT CONSTANT (#, #H)
ues EC, the output E=EC is set to 1. The number of the
1st reference value EC agreeing with the input E is allo- The number n of planned reference values is specified at
cated to the operand at the output NR. Therefore, the the input #n. This is specified as a direct constant.
number may assume a value from 1 to n.
E=EC BINARY
Coincidence of the operand value at the input E with one
of the reference values is signalled at the output E=EC.
The following applies: E=EC = 0 –> No coincidence
E=EC = 1 –> Coincidence
NR WORD
The number of the reference value that agrees with the
value of the operand at the input E is signalled at the out-
put NR.
No coincidence –> NR = 0
Coincidence–> NR = n where n > 1
E = EC0 –> NR = 1
E = EC1 –> NR = 2
. . .
. . .
E = ECn–1 –> NR = n
Example
FBD/LD IL
!BA 0
WDEC WDEC
MW 08,03 E MW 08,03
#2 #n #2
MW 05,00 EC0 E=EC M 08,13 MW 05,00
MW 05,01 EC1 NR MW 08,13 MW 05,01
M 08,13
MW 08,13
CE FBD Definition
WDEC
E
#n
EC E=EC
NR
E E W N P Y 0 0
#n K W N P Y 0 0
EC E W N P Y 1 0
E=EC A L N P Y 0 0
NR A W N P Y 0 0
CE IL Definition
!BA
WDW WDW
E1 A1 E1
A1
____________________________________________________________________________________________
Parameters
E1 WORD EW, AW, MW, KW Word quantity to be converted
A1 DOUBLE WORD MD Result of conversion, double word quantity
____________________________________________________________________________________________
Description
The value of the word operand at the input E1 is conver-
ted to a double word quantity and the result is allocated to
the double word operand at the output A1.
The input and the output can neither be duplicated nor ne-
gated.
Example
FBD/LD IL
!BA 0
WDW WDW
EW 00,00 MD 02,00 EW 00,00
MD 02,00
CE FBD Definition
WDW
E1 A1
E1 E W N P N 0 0
A1 A D N P N 0 0
CE IL Definition
When the FREI input has a 1 signal, the value of the spe-
cified physical address is read and is allocated to the op-
erand at the output A1. FBD/LD IL
!BA 0
WOL WOL
FREI FREI
#OFF #OFF
#SEG A1 #SEG
A1
____________________________________________________________________________________________
Parameters
FREI BINARY E, M, A, S, K Enable block
#OFF DIRECT #, #H Offset address of the memory location whose value
CONSTANT must be read
#SEG DIRECT #, #H Segment address of the memory location whose value
CONSTANT must be read
A1 WORD AW, MW Output to which the read value is allocated.
____________________________________________________________________________________________
CE Data Series 90 Series 30, 40, 50
Runtime:
Basic runtime: 20 µs, no reading; 33 µs, reading
146 µs
Additional runtime: ––– 48 µs reading
Output updating: yes yes
Number of historical values: none none
Available as of: ABB Procontic CS31 / 907 PC 331
907 PC 331 / 07 KR 31 V 2.0
07 CR 41, 07 CT 41, 07 KR 51, 07 KT 51
____________________________________________________________________________________________
Description #OFF DIRECT CONSTANT (#,#H)
When the FREI input has a 1 signal, the value of the spe-
cified physical address is read and is allocated to the op- The offset of the address to be read is specified at the in-
erand at the output A1. put #OFF. This is specified as a direct constant.
The physical address consists of a segment and offset. The segment of the address to be read is specified at the
Thus, the attainable address space is 1 MByte. input #SEG. This is specified as a direct constant.
The inputs and the output can neither be duplicated nor A1 WORD
negated.
Example
FBD/LD IL
!BA 0
WOL WOL
E 01,00 FREI E 01,00
#H E500 #OFF #H E500
#H 2000 #SEG MW 08,03 #H 2000
MW 08,03
CE FBD Definition
WOL
FREI
#OFF
#SEG A1
FREI E L N P Y 0 0
#OFF K W N P Y 0 0
#SEG K W N P Y 0 0
A1 A W N P N 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 WOL
00002 PP 0 FREI Input BINARY (block enable)
00003 PP 0 #OFF # CONSTANT (offset address)
00004 PP 0 #SEG # CONSTANT (segment address)
00005 PP 0 A1 Output WORD (value)
!BA 0
WOR WOR
E1 E1
E2 A1 E2
A1
____________________________________________________________________________________________
Parameters
E1 WORD EW, MW, AW, KW Operand 1
E2 WORD EW, MW, AW, KW Operand 2
A1 WORD MW, AW Result of the OR combination
____________________________________________________________________________________________
Description Example
This function block generates the bit–by–bit OR combina-
tion of the operands present at the inputs E1 and E2. The
result is allocated to the operand at the output A1. E1 0.0.0.0 0.0.1.1 0.0.1.0 0.1.1.0
Example
FBD/LD IL
!BA 0
WOR WOR
MW 00,00 MW 00,00
KW 00,01 MW 08,01 KW 00,01
MW 08,01
CE FBD Definition
WOR
E1
E2 A1
E1 E W N P N 0 0
E2 E W N P N 0 0
A1 A W N P N 0 0
CE IL Definition
When the input FREI has a 1 signal, the value of the oper-
and at the input E1 is read and is then written to the speci-
fied physical address. FBD/LD IL
!BA 0
WOS WOS
FREI FREI
E1 E1
#OFF #OFF
#SEG #SEG
____________________________________________________________________________________________
Parameters
FREI BINARY E, M, A, S, K Enable block
E1 WORD EW, MW, AW, KW Input for the operand to be written
#OFF DIRECT #, #H Offset address of the memory location to which the
CONSTANT value of E1 must be written
#SEG DIRECT #, #H Segment address of the memory location to which the
CONSTANT value of E1 must be written
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 25 µs, no writing; 39 µs, writing
Additional runtime: –––
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description E1 WORD
When the input FREI has a 1 signal, the value of the oper- The operand at the input E1 is read and its value is written
and at the input E1 is read and is then written to the speci- to the address defined by the inputs #OFF and #SEG.
fied physical address.
#OFF DIRECT CONSTANT (#,#H)
The block is not processed if there is a 0 signal at the FREI The offset of the address to be written is specified at the
input. input #OFF. This is specified as a direct constant.
FREI BINARY
Processing of the block is enabled or disabled with the
operand at the input FREI.
The following applies:
FREI = 0 –> Processing disabled
FREI = 1 –> Processing enabled
Example
FBD/LD IL
!BA 0
WOS WOS
E 01,00 FREI E 01,00
MW 08,03 MW 08,03
#H FFF0 #OFF #H FFF0
#H 2000 #SEG #H 2000
CE FBD Definition
WOS
FREI
E1
#OFF
#SEG
FREI E L N P Y 0 0
E1 E W N P N 0 0
#OFF K W N P Y 0 0
#SEG K W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 WOS
00002 PP 0 FREI Input BINARY (block enable)
00003 PP 0 E1 Input WORD (value)
00004 PP 0 #OFF # CONSTANT (offset address)
00005 PP 0 #SEG # CONSTANT (segment address)
____________________________________________________________________________________________
Parameters
#n DIRECT #, #H Number of inputs BI0 ... BIn–1
CONSTANT
BI0 BINARY A, M Input for the binary values to be written, capable of
duplication (BI0 ... BIn–1)
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: see RDB block
Additional runtime: –––
Output updating: not applicable
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description
This function block stores the values of the operands at values of the binary inputs in the historical values memory
the input BI0...BIn–1 in the historical values memory. The of the affiliated RDB block. The number of binary inputs is
affiliated function block RDB reads these values out of the specified as a direct constant at the input #n. This quantity
historical values memory again. The function blocks must agree with the quantity of outputs belonging to the
WRB and RDB always occur in pairs. affiliated RDB block. At the intended input, the editing pro-
gram “PA” enters the pointer to the historical values
To be able to use ready–made program parts several memory of the affiliated RDB block in the instruction list of
times in one user program (e. g. 907 PC 31/32 connection the WRB block.
elements), it may be necessary to work with local vari-
ables within this part of the program. These local vari-
ables lose their validity outside of this program part. At the #0 DIRECT CONSTANT
end of the program part, the values of these local vari-
ables are stored in the historical values memory of the af- This input does not exist in FBD/LD. In the instruction list,
filiated RDB block by the WRB block and are allocated to the value 0 is specified as a direct constant at this point.
the local variables at the start of the program part by the The PLC then enters the pointer to the historical values of
RDB block. For this purpose, the WRB block stores the the affiliated RDB block at this point.
The number of inputs BI0...BIn–1 is specified at the input The input BI0 is capable of duplication (BI0...BIn–1). The
#n. This is specified as a direct constant. values of the operands specified at the inputs BI0...BIn–1
Note: are written into the historical values memory of the affili-
ated RDB block.
The value specified at the input #n must also agree with
the number of outputs belonging to the affiliated RDB
block.
____________________________________________________________________________________________
Example
FBD/LD IL
!BA 0
RDB RDB
#3 #n BI0 M 03,00 #3
BI1 M 03,01 M 03,00
BI2 M 03,02 M 03,01
M 03,02
!BA 0
WRB WRB
#3 #n #0
M 03,00 BI0 #3
M 03,01 BI1 M 03,00
M 03,02 BI2 M 03,01
M 03,02
CE FBD Definition
WRB
#n
BI
#n K W N P Y 0 0
BI E L N P Y 1 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 WRB
00002 # 0
00003 PP 0 #n DIRECT CONSTANT (number of bits)
[ 1
00004 PP 1 BI Input BINARY
] 1
____________________________________________________________________________________________
Parameters
#n DIRECT #, #H Number of inputs DW0 ... DWn–1
CONSTANT
DW0 DOUBLE WORD MD Input for the double word values to be written
capable of duplication (DW0 ... DWn–1)
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: see RDDW block
Additional runtime: –––
Output updating: not applicable
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description the WRDW block stores the values of the double word in-
puts in the historical values memory of the affiliated
This function block stores the values of the operands at RDDW block. The number of double word inputs is speci-
the inputs DW0...DWn–1 in the historical values memory. fied as a direct constant at the input #n. This quantity must
The affiliated function block RDDW reads these values agree with the number of outputs belonging to the affili-
out of the historical values memory again. The WRDW ated RDDW block. The editing program “PA” enters the
and RDDW function blocks always occur in pairs. pointer to the historical values memory of the affiliated
To be able to use ready–made program parts multiply in a RDDW block at the input provided for this purpose in the
user program (e.g. 907 PC 31/32 connection elements), it instruction list of the WRDW block.
may be necessary to work with local variables within this
part of the program. These local variables lose their validi- #0 DIRECT CONSTANT
ty outside of this program part. At the end of the program
part, the WRDW block stores the values of these local This input does not exist in FBD/LD. In the instruction list,
variables in the historical values memory of the affiliated the value 0 is specified here as a direct constant. At this
RDDW block and the RDDW block allocates them to the point, the PLC then enters the pointer to the historical val-
local variables at the start of the program part. To do this, ues of the affiliated RDDW block.
Example
FBD/LD IL
!BA 0
RDDW RDDW
#3 #n DW0 MD 03,00 # 3
DW1 MD 03,01 MD 03,00
DW2 MD 03,02 MD 03,01
MD 03,02
!BA 0
WRDW WRDW
#3 #n # 0
MD 00,00 DW0 # 3
MD 00,01 DW1 MD 00,00
MD 00,02 DW2 MD 00,01
MD 00,02
CE FBD Definition
WRDW
#n
DW
#n K W N P Y 0 0
DW E D N P Y 1 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 WRDW
00002 #0
00003 PP 0 #n # CONSTANT (number of double words)
[ 1
00004 PP 1 DW Input DOUBLE WORD
] 1
____________________________________________________________________________________________
Parameters
#n DIRECT #, #H Number of inputs WO0 ... WOn–1
CONSTANT
WO0 WORD AW, MW Input for the word values to be written, capable
of duplication (WO0 ... WOn–1)
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: see RDW block
Additional runtime: –––
Output updating: not applicable
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description stores the values of these local variables at the end of the
program part in the historical values memory of the affili-
This function block stores the values of the operands at ated RDW block and the RDW block allocates them to the
the inputs WO0...WOn–1 in the historical values memory. local variables at the start of the program part. To do this,
The affiliated function block RDW reads these values out the WRW block stores the values of the word inputs
of the historical values memory again. The function WO0...WOn–1 in the historical values memory of the affil-
blocks WRW and RDW always occur in pairs. iated RDW block. The number of word inputs is specified
as a direct constant at the input #n. This number must
To be able to use ready–made program parts multiply in a agree with the number of outputs belonging to the affili-
user program (e.g. 907 PC 31/32 connection elements), it ated RDW block. At the intended input in the instruction
may be necessary to work with local variables within the list of the WRW block, the editing program “PA” enters the
program part. These local variables lose their validity out- pointer to the historical values memory of the affiliated
side of the program part concerned. The WRW block RDW block.
#n DIRECT CONSTANT
The number of the inputs WO0...WOn–1 is specified at
the input #n. This is specified as a direct constant.
Note:
The value specified at the input #n must also agree with
the number of the outputs belonging to the affiliated block
RDW.
____________________________________________________________________________________________
Example
FBD/LD IL
!BA 0
RDW RDW
#3 #n WO0 MW 03,00 #3
WO1 MW 03,01 MW 03,00
WO2 MW 03,02 MW 03,01
MW 03,02
!BA 0
WRW WRW
#3 #n # 0
MW 03,00 WO0 # 3
MW 03,01 WO1 MW 03,00
MW 03,02 WO2 MW 03,01
MW 03,02
CE FBD Definition
WRW
#n
WO
#n K W N P Y 0 0
WO E W N P Y 1 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 WRW
00002 #0
00003 PP 0 #n #CONSTANT (number of words)
[ 1
00004 PP 1 WO Input WORD
] 1
____________________________________________________________________________________________
Parameters
E WORD EW, AW, MW, KW Input
#2*n DIRECT #, #H Quantity n of reference values (multiplied by 2)
CONSTANT
EC0 WORD EW, AW, MW, KW Reference value; input can be duplicated
AC0 WORD EW, AW, MW, KW Output code; input can be duplicated
E=EC BINARY A, M Coincidence indication
A WORD AW, MW Output of the output code’s value
____________________________________________________________________________________________
CE Data
Runtime:
Basic runtime: 40.0 µs
Additional runtime: 7.5 µs per entered comparison value
Output updating: yes
Number of historical values: none
Available as of: ABB Procontic CS31 / 907 PC 331
____________________________________________________________________________________________
Description E WORD
This function block compares the value of the operand at The operand whose value is to be compared to the values
the input E to the reference values of the operands at the of the n reference values (EC0...ECn–1) is specified at
inputs EC0...ECn–1. If the input E agrees with at least the input E.
one of the reference values EC, the output E=EC is set to #2*n DIRECT CONSTANT (#, #H)
1. The output A receives the value of the output code AC,
which is allocated to the reference value EC found. The total number (2*n) of the reference values
(EC0...ECn–1) and output codes (AC0...ACn–1) is speci-
Each reference value at the inputs ECi is assigned an op- fied at the input #2*n. This is specified as an indirect con-
erand for the output code ACi. The affiliation of EC to AC stant.
is recognizable by the index i. The index begins with 0 and
is generated automatically in the event of duplication. EC0 ... ECn–1 WORD
The input EC0 must be duplicated according to the re-
The number of inputs EC and AC must be specified as a quired number of reference values. The operands for the
direct constant at the input #2*n. reference values are specified at the inputs
EC0...ECn–1. The value of the operand at the input E1 is
The inputs and outputs cannot be negated/inverted. compared to the reference values.
E=EC BINARY
Agreement between the operand value of the input E and
one of the reference values is signalled at the output
E=EC.
The following applies: E=EC = 0 –> No coincidence
E=EC = 1 –> Coincidence
A WORD
The output code ACi is output through the output A if the
input E agrees with one of the reference values ECi.
The following applies: A=0 –> No coincidence
A = ACi –> Coincidence
Example
FBD/LD IL
!BA 0
WUMC WUMC
MW 08,03 E MW 08,03
#4 #2*n #4
MW 05,00 EC0 E=EC M 08,14 MW 05,00
MW 05,01 EC1 A MW 08,14 MW 05,01
MW 05,02 AC0 MW 05,02
MW 05,03 AC1 MW 05,03
M 08,14
MW 08,14
CE FBD Definition
WUMC
E
#2*n
EC E=EC
AC A
E E W N P Y 0 0
#2*n K W N P Y 0 0
EC E W N P Y 1 0
AC E W N P Y 1 0
E=EC A L N P Y 0 0
A A W N P Y 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 WUMC
00002 PP 0 E Input WORD (input value)
00003 PP 0 #2*n # CONSTANT (number of EC and AC)
[ 1
00004 PP 1 EC Input WORD (reference value)
] 1
[ 1
00005 PP 1 AC Input WORD (output code)
] 1
00006 PP 0 E=EC Output BINARY (input value=Ecode)
00007 PP 0 A Output WORD (output value)
WWDW
E1
E2 A
Parameters
E1 WORD EW, MW Input E1 becomes the low word of output A
E2 WORD EW, MW Input E2 becomes the high word of output A
A DOUBLE WORD MD Double word output
CE data
Output updating: yes
Number of historical values: none
Description E1 WORD
The function block packs 2 16 bit words into one 32 bit The value of E1 becomes the low word (bit 0 to bit 15) of
double word. The value of E1 becomes the low word of output A.
output A and the value of E2 becomes the high word of
output A (double word). E2 WORD
The value of E2 becomes the high word (bit 16 to bit 31) of
output A.
A DOUBLE WORD
Generated double word from E1 and E2
Graphic
Plaus group Dty Inv Disp Mode No. No. Mode Disp Inv Dty Plaus group
WWDW
WORD_IN Y N Y 0 00 E1
WORD_IN Y N Y 0 00 E2 A 00 0 Y N Y DWORT_OUT
Source
SN ZN Command / Variable Symbol Long text
!BA 0
WXOR WXOR
E1 E1
E2 A1 E2
A1
____________________________________________________________________________________________
Parameters
E1 WORD EW, MW, AW, KW Operand 1
E2 WORD EW, MW, AW, KW Operand 2
A1 WORD MW, AW Result of the XOR combination
____________________________________________________________________________________________
Description Example
This function block generates the bit–by–bit XOR combi-
nation of the operands present at the inputs E1 and E2.
The result is allocated to the operand at the output A1. E1 0.0.0.0 0.0.1.1 0.0.1.0 0.1.1.0
Example
FBD/LD IL
!BA 0
WXOR WXOR
MW 00,00 MW 00,00
KW 00,01 MW 08,02 KW 00,01
MW 08,02
CE FBD Definition
WXOR
E1
E2 A1
E1 E W N P N 0 0
E2 E W N P N 0 0
A1 A W N P N 0 0
CE IL Definition
00000 !BA 0 Nr Block No. (preset to 0)
00001 WXOR
00002 PP 0 E1 Input WORD
00003 PP 0 E2 Input WORD
00004 PP 0 A1 Output WORD
!BA 0
ZUDKW ZUDKW
#
# V V
____________________________________________________________________________________________
Parameters
# DIRECT #, #H Numerical value which is to be allocated to the word
KONSTANT variable at output V
V WORD EW, MW, AW Word variable to which the numerical value of input # is
to be allocated
____________________________________________________________________________________________
Description
The function block serves to allocate a numerical value to
a word variable. The numerical value is specified as a di-
rect constant.
V WORD
Word variable to which the numerical value of input # is
allocated.
Example
FBD/LD IL
!BA 0
ZUDKW ZUDKW
# 1234
#1234 # V MW 00,01 MW 00,01