DUEMMEGI
MCP 4 – User's manual
Contatto
2.2.11- Management of the external counter modules (ModCNT)
The counter module (code number ModCNT)
is an external module
(connected to the
Contatto
bus) which
counts the pulses applied to its inputs; it stores the total amount of the counting in its non volatile memory.
The management of this module by MCP 4 needs a special function, specified by an equation very similar to
that one for the management of the internal counters. Each ModCNT counter module features 4 counting
channels, thus the equation must specify the channel to be managed.
MCP 4, through a threshold equation, can continuously read the content of each external counter and it can
compare it to the threshold value; the result of the comparison controls a digital (real or virtual) output.
Allowed comparison operators are:
<
lower than
<=
lower or equal to
==
equal to
!=
not equal to
>
greater than
>=
greater or equal to
It is also possible to specify a real or virtual input which, when activated, reset to the value 0 the counter
specified in the equation; this is however an optional input and must be linked by the operator “
&
”.
The threshold value also can be the content of a register.
Examples:
O1.1
=
AI10:2
>= 100 & Z
I1.1
The output is controlled by channel 2 of ModCNT module, addressed
10; the output will be activated if the counting is greater or equal to
100. The input
I1.1
, when activated, will reset the counter to 0.
V10
=
AI10:4
>
R0
The virtual point
V10
will be activated if the counting of the channel 4
of ModCNT module addressed 10 is greate than the content of
register
R0
.
2.2.12- Management of DALI module (ModDALI)
This equation allows to simplify the management of ModDALI module, especially in systems where the
automatic brightness regulation has to be implemented. The syntax of DALI equation is the following:
AOUT
=
DALI
(Code, AIN(offset))
where:
AOUT
output (address:channel of ModDALI to be managed) or register where the result of equation
will be sent
Code
DALI command type (broadcast, single ballast or group)
AIN
analog input whose value must be transferred (typically address:channel of ModLC sensor)
or register containing the value to be transferred
offset
value or register containing a value in the range -100 to 100; this value will be algebraically
added to
AIN
; this is useful, for instance, when the brightness regulation from a unique
sensor must be differentiated between rows of lamps depending on the distance from
windows
At every change of one of the
AIN
values inside the
DALI
block, the related value will be transferred to the
specified channel of ModDALI module and, by this one, to all ballasts, or to a single ballast, or to a group
depending on the value of
Code
.
DUEMMEGI
s.r.l. - Via Longhena, 4 – 20139 MILANO
Tel. 02/57300377 - Fax 02/55213686 –
www.duemmegi.it
Rel.: 1.2 October 2018
Page 25 of 87