DUEMMEGI
MCP 4 – User's manual
Contatto
Example 3:
Switch on the virtual point V751 using the function 16. As said before for the function 3, the Word containing
the status of virtual point
Vx
is given by:
1153 + INT[(x - 1) / 16]
while the bit is:
(x – 1)%16
As option, see the tables at the end of this manual or use the already mentioned program WordFinder.
The virtual point V751 is the bit 14 of the Word 1199; the following parameters have to be passed to the
MODBUS driver:
Start:
1199
Number:
1
(normally, in this case, this parameter is not required by the driver)
Bit:
14
Value:
1
(or ON, it depends on the used driver)
The execution of this function, as described before, implies that the MODBUS driver read the Word 1199
using the function 3, then it changes the bit 14 to the read value and finally it sends the resulting value to the
same Word 1199 using the function 16. This procedure is mandatory, because the Word 1199 contains the
status of the virtual points from V737 to V752; since the status of the other virtual points does not be
changed, then the preliminary reading of this Word is needed. This procedure, however, is normally executed
automatically by the MODBUS driver of the MASTER system.
Example 4:
Write the value 157 into counter C22 (remember that, for the
Contatto
system, the counter are numbered
from 0 to 1023). Use the function 16. The address of the Word containing the value of the counter
Cn
is
given by
3072+n
(see RAM map or the tables at the end of this manual or use WordFinder); thus, concerning
the counter C22 , the following parameters have to be passed to the MODBUS driver:
Start:
3094
Number:
1
Value:
157
In this case the value 157 will be directly written into the Word 3094.
Example 5:
Set to 36 the minutes of the MCP 4 timekeeper; from the RAM map of MCP, the Word related to the minutes
is the 1921. the following parameters have to be passed to the MODBUS driver:
Start:
1921
Number:
1
Value:
54
In this case the value 54 will be directly written into the Word 1921. The timekeeper will be updated with the
new minutes value.
Note that the passed value is 54 (decimal), because the register of the minutes, as for all registers related to
the timekeeper parameters, needs the BCD format; in facts, 36 in BCD format corresponds to 54 in decimal
format.
DUEMMEGI
s.r.l. - Via Longhena, 4 – 20139 MILANO
Tel. 02/57300377 - Fax 02/55213686 –
www.duemmegi.it
Rel.: 1.2 October 2018
Page 77 of 87