ABB DAM13000 Energimätare
Detaljer
- Typ
- Drivrutin
- Upplaggd av
- Ove Jansson, Abelko Innovation
- Version
- 3
- Uppdaterad
- 2013-09-02
- Skapad
- 2013-08-27
- Kategori
- M-bus, Mätare, Övriga protokoll
- Visningar
- 3288
Beskrivning
Drivrutin
Bruksanvisning
Hur man installerar typdefinitionerna och driftsätter modulerna finns beskrivet i användarmanualen, kapitel 18.7.
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
% 100219 Ställ ANSWER SIZE 69 ellet 73 beroende på givare
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEVICETYPE ABB_DAM13000 NAMED "ABB_DAM13000" TYPEID 19439
IS
% --- Device created 10:07:31 2008-10-20
PARAMETER
Id :"Address"INT;
PUBLIC
IDNr : "ID number"INT;
rec1 : "Energy"["kWh"]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 69 % Eller 73 för vissa givare
DATA[0] = HEX(68);
%DATA[1] = HEX(3F);
%DATA[2] = HEX(3F);
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(02);
DATA[21] -> BYTE(rec1 := (DATA & HEX(F)) + 10*(DATA & HEX(F0))/16;);
DATA[22] -> BYTE(rec1 := rec1 + 100*(DATA & HEX(F)) + 1000*(DATA & HEX(F0))/16;);
DATA[23] -> BYTE(rec1 := rec1 + 10000*(DATA & HEX(F)) + 100000*(DATA & HEX(F0))/16;);
DATA[24] -> BYTE(rec1 := rec1 + 1000000*(DATA & HEX(F)) + 10000000*(DATA & HEX(F0))/16;);
DATA[25] -> BYTE(rec1 := rec1 + 100000000*(DATA & HEX(F)) + 1000000000*(DATA & HEX(F0))/16;);
DATA[26] -> BYTE(rec1 := rec1 + 10000000000*(DATA & HEX(F)) + 100000000000*(DATA & HEX(F0))/16;);
DATA[20] -> BYTE(Exp := (DATA & 7) - 6; rec1 := rec1*10^Exp;); % -6 ger kWh
TIMEOUT 5000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEVICETYPE ABB_DAM13000 NAMED "ABB_DAM13000" TYPEID 19439
IS
% --- Device created 10:07:31 2008-10-20
PARAMETER
Id :"Address"INT;
PUBLIC
IDNr : "ID number"INT;
rec1 : "Energy"["kWh"]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 69 % Eller 73 för vissa givare
DATA[0] = HEX(68);
%DATA[1] = HEX(3F);
%DATA[2] = HEX(3F);
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(02);
DATA[21] -> BYTE(rec1 := (DATA & HEX(F)) + 10*(DATA & HEX(F0))/16;);
DATA[22] -> BYTE(rec1 := rec1 + 100*(DATA & HEX(F)) + 1000*(DATA & HEX(F0))/16;);
DATA[23] -> BYTE(rec1 := rec1 + 10000*(DATA & HEX(F)) + 100000*(DATA & HEX(F0))/16;);
DATA[24] -> BYTE(rec1 := rec1 + 1000000*(DATA & HEX(F)) + 10000000*(DATA & HEX(F0))/16;);
DATA[25] -> BYTE(rec1 := rec1 + 100000000*(DATA & HEX(F)) + 1000000000*(DATA & HEX(F0))/16;);
DATA[26] -> BYTE(rec1 := rec1 + 10000000000*(DATA & HEX(F)) + 100000000000*(DATA & HEX(F0))/16;);
DATA[20] -> BYTE(Exp := (DATA & 7) - 6; rec1 := rec1*10^Exp;); % -6 ger kWh
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.