Armatec HRI-B4 Fjärravläsnings modul
Detaljer
- Typ
- Drivrutin
- Upplaggd av
- Ove Jansson, Abelko Innovation
- Version
- 3
- Uppdaterad
- 2013-12-18
- Skapad
- 2013-12-18
- Kategori
- M-bus
- Visningar
- 3618
Beskrivning
Inskickat av Mats Lindberg, T-Service
Teknisk Fastighetsservice AB
info@tfservice.se
www.tfservice.se
Aseavägen 1
821 30 Bollnäs
Telefon 0278-243 00
Fax 0278-253 50
Mobilnr 070−257 79 66
Bruksanvisning
.
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 MBus NAMED "MBus" TYPEID 1
IS
% --- Device created 4:36:43 PM 12/17/2013
PARAMETER
Id :"Address"INT;
PUBLIC
IDNr : "ID number"INT;
rec2 : "Volume"["m³"]DEC2;
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 33
DATA[0] = HEX(68);
DATA[1] = HEX(1B);
DATA[2] = HEX(1B);
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(07);
DATA[27] -> BYTE(rec2 := (DATA & HEX(F)) + 10*(DATA & HEX(F0))/16;);
DATA[28] -> BYTE(rec2 := rec2 + 100*(DATA & HEX(F)) + 1000*(DATA & HEX(F0))/16;);
DATA[29] -> BYTE(rec2 := rec2 + 10000*(DATA & HEX(F)) + 100000*(DATA & HEX(F0))/16;);
DATA[30] -> BYTE(rec2 := rec2 + 1000000*(DATA & HEX(F)) + 10000000*(DATA & HEX(F0))/16;);
DATA[26] -> BYTE(Exp := DATA & 7 - 6; rec2 := rec2*10^Exp;);
TIMEOUT 5000
END;
END;
IS
% --- Device created 4:36:43 PM 12/17/2013
PARAMETER
Id :"Address"INT;
PUBLIC
IDNr : "ID number"INT;
rec2 : "Volume"["m³"]DEC2;
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 33
DATA[0] = HEX(68);
DATA[1] = HEX(1B);
DATA[2] = HEX(1B);
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(07);
DATA[27] -> BYTE(rec2 := (DATA & HEX(F)) + 10*(DATA & HEX(F0))/16;);
DATA[28] -> BYTE(rec2 := rec2 + 100*(DATA & HEX(F)) + 1000*(DATA & HEX(F0))/16;);
DATA[29] -> BYTE(rec2 := rec2 + 10000*(DATA & HEX(F)) + 100000*(DATA & HEX(F0))/16;);
DATA[30] -> BYTE(rec2 := rec2 + 1000000*(DATA & HEX(F)) + 10000000*(DATA & HEX(F0))/16;);
DATA[26] -> BYTE(Exp := DATA & 7 - 6; rec2 := rec2*10^Exp;);
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.