hi I’m a beginner, I would like to make appear on the same line the date that is read in the home automation system to the word
640 Day of the week Beginning of the Date and Time map of DFCK bus module (Note 6)
641 Hour (Note 6)
642 Minutes (Note 6)
643 Date (Note 6)
644 Month (Note 6)
645 Year (Note 6)
Note 6: The Words from 640 to 645 contains a copy of the current date and time of DFCK or DFCKII module (if connected and if its ID
is set to 1); these Words may be also written, and in this case the clock of DFCK or DFCKII module will be updated according to the
new parameters. This feature allows the reading and the writing of the clock using the reading and writing functions of the RAM
registers. The change of each one of these parameters will reset the field of the seconds of DFCK or DFCKII module. The day of the
week is coded as number in the range 0 to 6, where 0=Sunday, 1=Monday and so on. The Words related to Hour, Minutes, Date, Month
and Year are coded in BCD format
I can see the data on the same line but with incorrect values.
My configuration is as follows:
#DFCK - GIORNO DELLA SETTIMANA
#bit0=Domenica, bit1=Lunedi, bit2=Martedi, bit3=Mercoledi, bit4=Giovedi, bit5=Venerdi, bit6=Sabato
modbus:serial.dfckgiorno.connection=COM1:19200:8:none:1:rtu
modbus:serial.dfckgiorno.id=1
modbus:serial.dfckgiorno.start=640
modbus:serial.dfckgiorno.length=1
modbus:serial.dfckgiorno.type=holding
#modbus:serial.dfckgiorno.valuetype=bit
#DFCK - ORA
modbus:serial.dfckora.connection=COM1:19200:8:none:1:rtu
modbus:serial.dfckora.id=1
modbus:serial.dfckora.start=641
modbus:serial.dfckora.length=1
modbus:serial.dfckora.type=holding
#DFCK - MINUTI
modbus:serial.dfckminuti.connection=COM1:19200:8:none:1:rtu
modbus:serial.dfckminuti.id=1
modbus:serial.dfckminuti.start=642
modbus:serial.dfckminuti.length=1
modbus:serial.dfckminuti.type=holding
#DFCK - DATA
modbus:serial.dfckdata.connection=COM1:19200:8:none:1:rtu
modbus:serial.dfckdata.id=1
modbus:serial.dfckdata.start=643
modbus:serial.dfckdata.length=1
modbus:serial.dfckdata.type=holding
#DFCK - MESE
modbus:serial.dfckmese.connection=COM1:19200:8:none:1:rtu
modbus:serial.dfckmese.id=1
modbus:serial.dfckmese.start=644
modbus:serial.dfckmese.length=1
modbus:serial.dfckmese.type=holding
#DFCK - ANNO
modbus:serial.dfckanno.connection=COM1:19200:8:none:1:rtu
modbus:serial.dfckanno.id=1
modbus:serial.dfckanno.start=645
modbus:serial.dfckanno.length=1
modbus:serial.dfckanno.type=holding
rule "Giorno/Mese/Anno changed"
when
Item DATA changed
or Item MESE changed
or Item ANNO changed
then
Data_Mese_Anno.postUpdate(DATA.state.toString + “/” + MESE.state.toString + “/” + ANNO.state.toString)
end
rule "Ora/Minuti changed"
when
Item ORA changed
or Item MINUTI changed
then
Ora_Minuti.postUpdate(ORA.state.toString + “:” + MINUTI.state.toString)
end
Number GIORNO “Giorno [MAP(giorno.map):%s]” (Statobus) { modbus = “dfckgiorno:0” }
Number DecimalType
Number ORA “Ora [%s]” (Statobus) { modbus = “dfckora:0” }
Number MINUTI “Minuti [%s]” (Statobus) { modbus = “dfckminuti:0” }
Number DATA “Data [%s]” (Statobus) { modbus = “dfckdata:0” }
Number MESE “Mese [%s]” (Statobus) { modbus = “dfckmese:0” }
Number ANNO “Anno [%s]” (Statobus) { modbus = “dfckanno:0” }
String Ora_Minuti “Ora / Minuti [%s]” (Statobus)
String Data_Mese_Anno “Data / Mese / Anno [%s]” (Statobus)
#Sitemap
Group item=Statobus label="Stato Impianto BUS" icon="keyring"
thank you for the help answers