Contatto
MCP 4 – User's manual
DUEMMEGI
Examples:
AO1:1
=
AI1:4
+ 128
R12
=
AI1:4
+ 12 &
0x00F0
+
R1
& P(30)
I23.5
R54
=
R52
/
R53
+
R54
* 2
A mathematical equation can also be made by one or more Preset terms only; this is useful to load a value in
a register or to an output at the activation (or de-activation) of a control input:
R0
= P(1527)
V1
R1
= P(
0x1AB7
)
I1.8
& P(0)!
I1.8
AO23:2
= P(12000)
V148
& P(
0b11000011
)
I12.1
& PL(0)!
I32.7
Exclusively for real outputs
(thus registers, counters etc. are excluded),
it is possible to define multiple
Presets activated by the same digital point
; in this case, at the activation of the common digital point, the
values defined by the Preset will be sent sequentially to the output, in the order in which they have been
entered into the equation (from left to right). The following examples show some possibilities.
When
V1
goes ON, the values 10, 20 and 30 will be sequentially sent to the output:
AO1:1
= P(10)
V1
& P(20)
V1
& P(30)
V1
When
V1
goes ON, the values 10 and 20 and 30 will be sequentially sent to the output; when
V2
goes ON,
the values 30 and 40 will be sequentially sent to the output:
AO1:1
= PL(10)
V1
& P(20)
V1
& P(30)
V2
& P(40)
V2
When
V1
goes ON, only the value 20 will be sent to the output, because it is a Preset on level:
AO1:1
= P(10)
V1
& PL(20)
V1
& P(30)
V1
When
V1
goes ON, only the value 10 will be sent to the output, because it is the Preset on level placed on the
leftmost side in the equation:
AO1:1
= PL(10)
V1
& PL(20)
V1
& P(30)
V1
2.2.8- Equations for binary code generation
Keyword:
SENDn(Tr)
Send the specified code to output
n
at the activation of the related input (or de-
activation if complemented), with refresh time
Tr
seconds (when more inputs are
activated)
SENDRn(Tr)
Send the specified code to register
Rn
at the activation of the related input (or de-
activation if complemented), with refresh time
Tr
seconds (when more inputs are
activated)
The sent code (Bx) must be in the range 0 to 255. If the refresh time has been omitted, then it will be set to 2
seconds. The refresh time must be in the range 1 to 254 seconds; it is possible to disable the refresh by
specifying the value 255. In this case the sent code will be always that related to last change of one among
the inputs listed in the SEND block.
The input points causing the sending of the related binary code may be real and virtual ones; they can be also
complemented.
Page 22 of 87
Rel.: 1.2 October 2018
DUEMMEGI
s.r.l. - Via Longhena, 4 – 20139 MILANO
Tel. 02/57300377 - Fax 02/55213686 –
www.duemmegi.it