Brunata HGQ
Detaljer
Beskrivning
Brunata HGQ
Bruksanvisning
Hur man installerar typdefinitionerna och driftsätter modulerna finns beskrivet i användarmanualen, kapitel 18.7.
M-bus protokoll till Brunata HG-mätare (pdf) på engelska.
Juridisk information
Alla skript tillhandahålls i befintligt skick och all användning sker på eget ansvar. Felaktig använding kan leda till skadad eller förstörd utrustning.
Skript kod
DEVICETYPE Brunata_HGQ NAMED "Brunata_HGQ" TYPEID 19438
IS
% --- Device created 15:13:31 2008-10-06
PARAMETER
Id :"Address"INT;
PUBLIC
IDNr : "ID number"INT;
rec1 : "Energy"["kWh"]INT;
rec2 : "Volume"["m³"]DEC2;
rec4 : "Flow Temperature"["°C"]DEC2;
rec5 : "Return Temperature"["°C"]DEC2;
rec6 : "Temperature Difference"["°K"]DEC2;
rec7 : "Volume Flow"["m³/h"]DEC2;
rec8 : "Power"["kW"]DEC2;
rec9 : "Cold Water"["m³"]INT;
rec10 : "Hot Water"["m³"]INT;
PRIVATE
Exp;
BAUDRATE 2400;
PARITY EVEN;
CHECKSUM SUM8 SKIP 4;
POSTBYTES 1;
TELEGRAM Init NAMED "Init" IS
QUESTION
DATA[0] := HEX(10);
DATA[1] := HEX(40);
DATA[2] := BYTE(Id);
DATA[3] <- BYTE(DATA :=Id+91;);
DATA[4] := HEX(16);
ANSWER SIZE 1
DATA[0] = HEX(E5);
TIMEOUT 5000
END;
TELEGRAM Read NAMED "Read" IS
QUESTION
DATA[0] := HEX(10);
DATA[1] := HEX(5B);
DATA[2] := BYTE(Id);
DATA[3] <- BYTE(DATA :=Id+91;);
DATA[4] := HEX(16);
ANSWER SIZE 99
DATA[0] = HEX(68);
DATA[1] = HEX(5D);
DATA[2] = HEX(5D);
DATA[3] = HEX(68);
DATA[4] = HEX(08);
DATA[5] = BYTE(Id);
DATA[6] = HEX(72);
DATA[7] -> BYTE(IDNr := (DATA & HEX(F)) + 10*(DATA & HEX(F0))/16;);
DATA[8] -> BYTE(IDNr := IDNr + 100*(DATA & HEX(F)) + 1000*(DATA & HEX(F0))/16;);
DATA[9] -> BYTE(IDNr := IDNr + 10000*(DATA & HEX(F)) + 100000*(DATA & HEX(F0))/16;);
DATA[10] -> BYTE(IDNr := IDNr + 1000000*(DATA & HEX(F)) + 10000000*(DATA & HEX(F0))/16;);
DATA[14] = HEX(0C);
DATA[21] -> WORD(rec1:=DATA;);
DATA[23] -> WORD(rec1:=rec1 + 65536*DATA;);
DATA[25] -> WORD(rec1:=rec1 + 4294967296*DATA;);
DATA[20] -> BYTE(Exp := DATA & 7 - 3; rec1 := rec1*10^Exp;rec1:=rec1/1000;);
DATA[29] -> WORD(rec2:=DATA;);
DATA[31] -> WORD(rec2:=rec2 + 65536*DATA;);
DATA[28] -> BYTE(Exp := DATA & 7 - 6; rec2 := rec2*10^Exp;);
DATA[42] -> WORD(rec4:=DATA;);
DATA[41] -> BYTE(Exp := DATA & 3 - 3; rec4 := rec4*10^Exp;);
DATA[46] -> WORD(rec5:=DATA;);
DATA[45] -> BYTE(Exp := DATA & 3 - 3; rec5 := rec5*10^Exp;);
DATA[50] -> WORD(rec6:=DATA;);
DATA[49] -> BYTE(Exp := DATA & 3 - 3; rec6 := rec6*10^Exp;);
DATA[54] -> WORD(rec7:=DATA;);
DATA[56] -> BYTE(rec7:=rec7 + 65536*DATA;);
DATA[53] -> BYTE(Exp := DATA & 7 - 6; rec7 := rec7*10^Exp;);
DATA[59] -> WORD(rec8:=DATA;);
DATA[61] -> WORD(rec8:=rec8 + 65536*DATA;);
DATA[58] -> BYTE(Exp := DATA & 7 - 3; rec8 := rec8*10^Exp;rec8:=rec8/1000;);
DATA[66] -> WORD(rec9:=DATA;);
DATA[68] -> WORD(rec9:=rec9 + 65536*DATA;);
DATA[74] -> WORD(rec10:=DATA;);
DATA[76] -> WORD(rec10:=rec10 + 65536*DATA;);
TIMEOUT 5000
END;
END;
IS
% --- Device created 15:13:31 2008-10-06
PARAMETER
Id :"Address"INT;
PUBLIC
IDNr : "ID number"INT;
rec1 : "Energy"["kWh"]INT;
rec2 : "Volume"["m³"]DEC2;
rec4 : "Flow Temperature"["°C"]DEC2;
rec5 : "Return Temperature"["°C"]DEC2;
rec6 : "Temperature Difference"["°K"]DEC2;
rec7 : "Volume Flow"["m³/h"]DEC2;
rec8 : "Power"["kW"]DEC2;
rec9 : "Cold Water"["m³"]INT;
rec10 : "Hot Water"["m³"]INT;
PRIVATE
Exp;
BAUDRATE 2400;
PARITY EVEN;
CHECKSUM SUM8 SKIP 4;
POSTBYTES 1;
TELEGRAM Init NAMED "Init" IS
QUESTION
DATA[0] := HEX(10);
DATA[1] := HEX(40);
DATA[2] := BYTE(Id);
DATA[3] <- BYTE(DATA :=Id+91;);
DATA[4] := HEX(16);
ANSWER SIZE 1
DATA[0] = HEX(E5);
TIMEOUT 5000
END;
TELEGRAM Read NAMED "Read" IS
QUESTION
DATA[0] := HEX(10);
DATA[1] := HEX(5B);
DATA[2] := BYTE(Id);
DATA[3] <- BYTE(DATA :=Id+91;);
DATA[4] := HEX(16);
ANSWER SIZE 99
DATA[0] = HEX(68);
DATA[1] = HEX(5D);
DATA[2] = HEX(5D);
DATA[3] = HEX(68);
DATA[4] = HEX(08);
DATA[5] = BYTE(Id);
DATA[6] = HEX(72);
DATA[7] -> BYTE(IDNr := (DATA & HEX(F)) + 10*(DATA & HEX(F0))/16;);
DATA[8] -> BYTE(IDNr := IDNr + 100*(DATA & HEX(F)) + 1000*(DATA & HEX(F0))/16;);
DATA[9] -> BYTE(IDNr := IDNr + 10000*(DATA & HEX(F)) + 100000*(DATA & HEX(F0))/16;);
DATA[10] -> BYTE(IDNr := IDNr + 1000000*(DATA & HEX(F)) + 10000000*(DATA & HEX(F0))/16;);
DATA[14] = HEX(0C);
DATA[21] -> WORD(rec1:=DATA;);
DATA[23] -> WORD(rec1:=rec1 + 65536*DATA;);
DATA[25] -> WORD(rec1:=rec1 + 4294967296*DATA;);
DATA[20] -> BYTE(Exp := DATA & 7 - 3; rec1 := rec1*10^Exp;rec1:=rec1/1000;);
DATA[29] -> WORD(rec2:=DATA;);
DATA[31] -> WORD(rec2:=rec2 + 65536*DATA;);
DATA[28] -> BYTE(Exp := DATA & 7 - 6; rec2 := rec2*10^Exp;);
DATA[42] -> WORD(rec4:=DATA;);
DATA[41] -> BYTE(Exp := DATA & 3 - 3; rec4 := rec4*10^Exp;);
DATA[46] -> WORD(rec5:=DATA;);
DATA[45] -> BYTE(Exp := DATA & 3 - 3; rec5 := rec5*10^Exp;);
DATA[50] -> WORD(rec6:=DATA;);
DATA[49] -> BYTE(Exp := DATA & 3 - 3; rec6 := rec6*10^Exp;);
DATA[54] -> WORD(rec7:=DATA;);
DATA[56] -> BYTE(rec7:=rec7 + 65536*DATA;);
DATA[53] -> BYTE(Exp := DATA & 7 - 6; rec7 := rec7*10^Exp;);
DATA[59] -> WORD(rec8:=DATA;);
DATA[61] -> WORD(rec8:=rec8 + 65536*DATA;);
DATA[58] -> BYTE(Exp := DATA & 7 - 3; rec8 := rec8*10^Exp;rec8:=rec8/1000;);
DATA[66] -> WORD(rec9:=DATA;);
DATA[68] -> WORD(rec9:=rec9 + 65536*DATA;);
DATA[74] -> WORD(rec10:=DATA;);
DATA[76] -> WORD(rec10:=rec10 + 65536*DATA;);
TIMEOUT 5000
END;
END;
Användarnas noteringar
Du måste vara inloggad för att göra en notering. Bli medlem eller logga in. Vi använder en moderator som godkänner noteringarna innan de visas.