Kamstrup MC 801 Värmemängdsmätare
Detaljer
Beskrivning
Fungerar även på IMSE Ultra
Till Multicall 801 med Mbus modul
Bruksanvisning
Kom ihåg att beställa m-bus modulen tillsamans med mätaren (den är extra)
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 "Kamstrup_MC801" TYPEID 20001 IS
% --- Device created 1:25:49 PM 10/28/2014
PARAMETER
Id :"Address"INT;
PUBLIC
IDNr : "ID number"INT;
rec1 : "Fabrication No"[""]INT;
rec2 : "Energy"["Wh"]INT;
rec3 : "Volume"["m³"]DEC2;
rec5 : "Flow Temperature"["°C"]DEC2;
rec6 : "Return Temperature"["°C"]DEC2;
rec7 : "Temperature Difference"["°K"]DEC2;
rec8 : "Power"["W"]DEC2;
rec9 : "Power"["W"]DEC2;
rec10 : "Volume Flow"["m³/h"]DEC2;
rec11 : "Volume Flow"["m³/h"]DEC2;
rec12 : "Energy"["Wh"]INT;
rec13 : "Energy"["Wh"]INT;
rec14 : "Volume"["m³"]DEC2;
rec15 : "Volume"["m³"]DEC2;
rec16 : "Energy"["Wh"]INT;
rec18 : "Energy"["Wh"]INT;
rec19 : "Volume"["m³"]DEC2;
rec20 : "Power"["W"]DEC2;
rec21 : "Volume Flow"["m³/h"]DEC2;
rec22 : "Energy"["Wh"]INT;
rec23 : "Energy"["Wh"]INT;
rec24 : "Volume"["m³"]DEC2;
rec25 : "Volume"["m³"]DEC2;
rec26 : "Energy"["Wh"]INT;
rec29 : "Energy"["Wh"]INT;
rec30 : "Energy"["J"]INT;
rec31 : "Energy"["Wh"]INT;
rec32 : "Energy"["Wh"]INT;
rec33 : "Energy"["Wh"]INT;
PRIVATE
Exp;
tmp;
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+64;);
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 253
DATA[0] = HEX(68);
DATA[1] = HEX(F7);
DATA[2] = HEX(F7);
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(04);
% 8 digit BCD
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;);
% 32 bit integer
DATA[27] -> WORD(tmp:=DATA;);
DATA[29] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec2:=tmp-4294967296; ELSE rec2:=tmp; ENDIF;);
DATA[26] -> BYTE(Exp := (DATA & 7) - 3; rec2 := rec2*10^Exp;);
% 32 bit integer
DATA[33] -> WORD(tmp:=DATA;);
DATA[35] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec3:=tmp-4294967296; ELSE rec3:=tmp; ENDIF;);
DATA[32] -> BYTE(Exp := (DATA & 7) - 6; rec3 := rec3*10^Exp;);
% 32 bit integer
DATA[45] -> WORD(tmp:=DATA;);
DATA[47] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec5:=tmp-4294967296; ELSE rec5:=tmp; ENDIF;);
DATA[44] -> BYTE(Exp := (DATA & 3) - 3; rec5 := rec5*10^Exp;);
% 32 bit integer
DATA[51] -> WORD(tmp:=DATA;);
DATA[53] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec6:=tmp-4294967296; ELSE rec6:=tmp; ENDIF;);
DATA[50] -> BYTE(Exp := (DATA & 3) - 3; rec6 := rec6*10^Exp;);
% 32 bit integer
DATA[57] -> WORD(tmp:=DATA;);
DATA[59] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec7:=tmp-4294967296; ELSE rec7:=tmp; ENDIF;);
DATA[56] -> BYTE(Exp := (DATA & 3) - 3; rec7 := rec7*10^Exp;);
% 32 bit integer
DATA[63] -> WORD(tmp:=DATA;);
DATA[65] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec8:=tmp-4294967296; ELSE rec8:=tmp; ENDIF;);
DATA[62] -> BYTE(Exp := (DATA & 7) - 3; rec8 := rec8*10^Exp;);
% 32 bit integer
DATA[69] -> WORD(tmp:=DATA;);
DATA[71] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec9:=tmp-4294967296; ELSE rec9:=tmp; ENDIF;);
DATA[68] -> BYTE(Exp := (DATA & 7) - 3; rec9 := rec9*10^Exp;);
% 32 bit integer
DATA[75] -> WORD(tmp:=DATA;);
DATA[77] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec10:=tmp-4294967296; ELSE rec10:=tmp; ENDIF;);
DATA[74] -> BYTE(Exp := (DATA & 7) - 6; rec10 := rec10*10^Exp;);
% 32 bit integer
DATA[81] -> WORD(tmp:=DATA;);
DATA[83] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec11:=tmp-4294967296; ELSE rec11:=tmp; ENDIF;);
DATA[80] -> BYTE(Exp := (DATA & 7) - 6; rec11 := rec11*10^Exp;);
% 32 bit integer
DATA[88] -> WORD(tmp:=DATA;);
DATA[90] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec12:=tmp-4294967296; ELSE rec12:=tmp; ENDIF;);
DATA[87] -> BYTE(Exp := (DATA & 7) - 3; rec12 := rec12*10^Exp;);
% 32 bit integer
DATA[95] -> WORD(tmp:=DATA;);
DATA[97] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec13:=tmp-4294967296; ELSE rec13:=tmp; ENDIF;);
DATA[94] -> BYTE(Exp := (DATA & 7) - 3; rec13 := rec13*10^Exp;);
% 32 bit integer
DATA[102] -> WORD(tmp:=DATA;);
DATA[104] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec14:=tmp-4294967296; ELSE rec14:=tmp; ENDIF;);
DATA[101] -> BYTE(Exp := (DATA & 7) - 6; rec14 := rec14*10^Exp;);
% 32 bit integer
DATA[110] -> WORD(tmp:=DATA;);
DATA[112] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec15:=tmp-4294967296; ELSE rec15:=tmp; ENDIF;);
DATA[109] -> BYTE(Exp := (DATA & 7) - 6; rec15 := rec15*10^Exp;);
% 32 bit integer
DATA[118] -> WORD(tmp:=DATA;);
DATA[120] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec16:=tmp-4294967296; ELSE rec16:=tmp; ENDIF;);
DATA[117] -> BYTE(Exp := (DATA & 7) - 3; rec16 := rec16*10^Exp;);
% 32 bit integer
DATA[130] -> WORD(tmp:=DATA;);
DATA[132] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec18:=tmp-4294967296; ELSE rec18:=tmp; ENDIF;);
DATA[129] -> BYTE(Exp := (DATA & 7) - 3; rec18 := rec18*10^Exp;);
% 32 bit integer
DATA[136] -> WORD(tmp:=DATA;);
DATA[138] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec19:=tmp-4294967296; ELSE rec19:=tmp; ENDIF;);
DATA[135] -> BYTE(Exp := (DATA & 7) - 6; rec19 := rec19*10^Exp;);
% 32 bit integer
DATA[142] -> WORD(tmp:=DATA;);
DATA[144] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec20:=tmp-4294967296; ELSE rec20:=tmp; ENDIF;);
DATA[141] -> BYTE(Exp := (DATA & 7) - 3; rec20 := rec20*10^Exp;);
% 32 bit integer
DATA[148] -> WORD(tmp:=DATA;);
DATA[150] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec21:=tmp-4294967296; ELSE rec21:=tmp; ENDIF;);
DATA[147] -> BYTE(Exp := (DATA & 7) - 6; rec21 := rec21*10^Exp;);
% 32 bit integer
DATA[155] -> WORD(tmp:=DATA;);
DATA[157] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec22:=tmp-4294967296; ELSE rec22:=tmp; ENDIF;);
DATA[154] -> BYTE(Exp := (DATA & 7) - 3; rec22 := rec22*10^Exp;);
% 32 bit integer
DATA[162] -> WORD(tmp:=DATA;);
DATA[164] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec23:=tmp-4294967296; ELSE rec23:=tmp; ENDIF;);
DATA[161] -> BYTE(Exp := (DATA & 7) - 3; rec23 := rec23*10^Exp;);
% 32 bit integer
DATA[169] -> WORD(tmp:=DATA;);
DATA[171] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec24:=tmp-4294967296; ELSE rec24:=tmp; ENDIF;);
DATA[168] -> BYTE(Exp := (DATA & 7) - 6; rec24 := rec24*10^Exp;);
% 32 bit integer
DATA[177] -> WORD(tmp:=DATA;);
DATA[179] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec25:=tmp-4294967296; ELSE rec25:=tmp; ENDIF;);
DATA[176] -> BYTE(Exp := (DATA & 7) - 6; rec25 := rec25*10^Exp;);
% 32 bit integer
DATA[185] -> WORD(tmp:=DATA;);
DATA[187] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec26:=tmp-4294967296; ELSE rec26:=tmp; ENDIF;);
DATA[184] -> BYTE(Exp := (DATA & 7) - 3; rec26 := rec26*10^Exp;);
% 48 bit integer
DATA[214] -> WORD(tmp:=DATA;);
DATA[216] -> WORD(tmp:=tmp + 65536*DATA;);
DATA[218] -> WORD(tmp:=tmp + 4294967296*DATA; IF (tmp>140737488355327) THEN rec29:=tmp-281474976710656; ELSE rec29:=tmp; ENDIF;);
DATA[213] -> BYTE(Exp := (DATA & 7) - 3; rec29 := rec29*10^Exp;);
% 16 bit integer
DATA[225] -> WORD(tmp:=DATA; IF (tmp>32767) THEN rec30:=tmp-65536; ELSE rec30:=tmp; ENDIF;);
DATA[222] -> BYTE(Exp := (DATA & 7) - 0; rec30 := rec30*10^Exp;);
% 16 bit integer
DATA[230] -> WORD(tmp:=DATA; IF (tmp>32767) THEN rec31:=tmp-65536; ELSE rec31:=tmp; ENDIF;);
DATA[229] -> BYTE(Exp := (DATA & 7) - 3; rec31 := rec31*10^Exp;);
TIMEOUT 5000
END;
END;
% --- Device created 1:25:49 PM 10/28/2014
PARAMETER
Id :"Address"INT;
PUBLIC
IDNr : "ID number"INT;
rec1 : "Fabrication No"[""]INT;
rec2 : "Energy"["Wh"]INT;
rec3 : "Volume"["m³"]DEC2;
rec5 : "Flow Temperature"["°C"]DEC2;
rec6 : "Return Temperature"["°C"]DEC2;
rec7 : "Temperature Difference"["°K"]DEC2;
rec8 : "Power"["W"]DEC2;
rec9 : "Power"["W"]DEC2;
rec10 : "Volume Flow"["m³/h"]DEC2;
rec11 : "Volume Flow"["m³/h"]DEC2;
rec12 : "Energy"["Wh"]INT;
rec13 : "Energy"["Wh"]INT;
rec14 : "Volume"["m³"]DEC2;
rec15 : "Volume"["m³"]DEC2;
rec16 : "Energy"["Wh"]INT;
rec18 : "Energy"["Wh"]INT;
rec19 : "Volume"["m³"]DEC2;
rec20 : "Power"["W"]DEC2;
rec21 : "Volume Flow"["m³/h"]DEC2;
rec22 : "Energy"["Wh"]INT;
rec23 : "Energy"["Wh"]INT;
rec24 : "Volume"["m³"]DEC2;
rec25 : "Volume"["m³"]DEC2;
rec26 : "Energy"["Wh"]INT;
rec29 : "Energy"["Wh"]INT;
rec30 : "Energy"["J"]INT;
rec31 : "Energy"["Wh"]INT;
rec32 : "Energy"["Wh"]INT;
rec33 : "Energy"["Wh"]INT;
PRIVATE
Exp;
tmp;
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+64;);
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 253
DATA[0] = HEX(68);
DATA[1] = HEX(F7);
DATA[2] = HEX(F7);
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(04);
% 8 digit BCD
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;);
% 32 bit integer
DATA[27] -> WORD(tmp:=DATA;);
DATA[29] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec2:=tmp-4294967296; ELSE rec2:=tmp; ENDIF;);
DATA[26] -> BYTE(Exp := (DATA & 7) - 3; rec2 := rec2*10^Exp;);
% 32 bit integer
DATA[33] -> WORD(tmp:=DATA;);
DATA[35] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec3:=tmp-4294967296; ELSE rec3:=tmp; ENDIF;);
DATA[32] -> BYTE(Exp := (DATA & 7) - 6; rec3 := rec3*10^Exp;);
% 32 bit integer
DATA[45] -> WORD(tmp:=DATA;);
DATA[47] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec5:=tmp-4294967296; ELSE rec5:=tmp; ENDIF;);
DATA[44] -> BYTE(Exp := (DATA & 3) - 3; rec5 := rec5*10^Exp;);
% 32 bit integer
DATA[51] -> WORD(tmp:=DATA;);
DATA[53] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec6:=tmp-4294967296; ELSE rec6:=tmp; ENDIF;);
DATA[50] -> BYTE(Exp := (DATA & 3) - 3; rec6 := rec6*10^Exp;);
% 32 bit integer
DATA[57] -> WORD(tmp:=DATA;);
DATA[59] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec7:=tmp-4294967296; ELSE rec7:=tmp; ENDIF;);
DATA[56] -> BYTE(Exp := (DATA & 3) - 3; rec7 := rec7*10^Exp;);
% 32 bit integer
DATA[63] -> WORD(tmp:=DATA;);
DATA[65] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec8:=tmp-4294967296; ELSE rec8:=tmp; ENDIF;);
DATA[62] -> BYTE(Exp := (DATA & 7) - 3; rec8 := rec8*10^Exp;);
% 32 bit integer
DATA[69] -> WORD(tmp:=DATA;);
DATA[71] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec9:=tmp-4294967296; ELSE rec9:=tmp; ENDIF;);
DATA[68] -> BYTE(Exp := (DATA & 7) - 3; rec9 := rec9*10^Exp;);
% 32 bit integer
DATA[75] -> WORD(tmp:=DATA;);
DATA[77] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec10:=tmp-4294967296; ELSE rec10:=tmp; ENDIF;);
DATA[74] -> BYTE(Exp := (DATA & 7) - 6; rec10 := rec10*10^Exp;);
% 32 bit integer
DATA[81] -> WORD(tmp:=DATA;);
DATA[83] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec11:=tmp-4294967296; ELSE rec11:=tmp; ENDIF;);
DATA[80] -> BYTE(Exp := (DATA & 7) - 6; rec11 := rec11*10^Exp;);
% 32 bit integer
DATA[88] -> WORD(tmp:=DATA;);
DATA[90] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec12:=tmp-4294967296; ELSE rec12:=tmp; ENDIF;);
DATA[87] -> BYTE(Exp := (DATA & 7) - 3; rec12 := rec12*10^Exp;);
% 32 bit integer
DATA[95] -> WORD(tmp:=DATA;);
DATA[97] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec13:=tmp-4294967296; ELSE rec13:=tmp; ENDIF;);
DATA[94] -> BYTE(Exp := (DATA & 7) - 3; rec13 := rec13*10^Exp;);
% 32 bit integer
DATA[102] -> WORD(tmp:=DATA;);
DATA[104] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec14:=tmp-4294967296; ELSE rec14:=tmp; ENDIF;);
DATA[101] -> BYTE(Exp := (DATA & 7) - 6; rec14 := rec14*10^Exp;);
% 32 bit integer
DATA[110] -> WORD(tmp:=DATA;);
DATA[112] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec15:=tmp-4294967296; ELSE rec15:=tmp; ENDIF;);
DATA[109] -> BYTE(Exp := (DATA & 7) - 6; rec15 := rec15*10^Exp;);
% 32 bit integer
DATA[118] -> WORD(tmp:=DATA;);
DATA[120] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec16:=tmp-4294967296; ELSE rec16:=tmp; ENDIF;);
DATA[117] -> BYTE(Exp := (DATA & 7) - 3; rec16 := rec16*10^Exp;);
% 32 bit integer
DATA[130] -> WORD(tmp:=DATA;);
DATA[132] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec18:=tmp-4294967296; ELSE rec18:=tmp; ENDIF;);
DATA[129] -> BYTE(Exp := (DATA & 7) - 3; rec18 := rec18*10^Exp;);
% 32 bit integer
DATA[136] -> WORD(tmp:=DATA;);
DATA[138] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec19:=tmp-4294967296; ELSE rec19:=tmp; ENDIF;);
DATA[135] -> BYTE(Exp := (DATA & 7) - 6; rec19 := rec19*10^Exp;);
% 32 bit integer
DATA[142] -> WORD(tmp:=DATA;);
DATA[144] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec20:=tmp-4294967296; ELSE rec20:=tmp; ENDIF;);
DATA[141] -> BYTE(Exp := (DATA & 7) - 3; rec20 := rec20*10^Exp;);
% 32 bit integer
DATA[148] -> WORD(tmp:=DATA;);
DATA[150] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec21:=tmp-4294967296; ELSE rec21:=tmp; ENDIF;);
DATA[147] -> BYTE(Exp := (DATA & 7) - 6; rec21 := rec21*10^Exp;);
% 32 bit integer
DATA[155] -> WORD(tmp:=DATA;);
DATA[157] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec22:=tmp-4294967296; ELSE rec22:=tmp; ENDIF;);
DATA[154] -> BYTE(Exp := (DATA & 7) - 3; rec22 := rec22*10^Exp;);
% 32 bit integer
DATA[162] -> WORD(tmp:=DATA;);
DATA[164] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec23:=tmp-4294967296; ELSE rec23:=tmp; ENDIF;);
DATA[161] -> BYTE(Exp := (DATA & 7) - 3; rec23 := rec23*10^Exp;);
% 32 bit integer
DATA[169] -> WORD(tmp:=DATA;);
DATA[171] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec24:=tmp-4294967296; ELSE rec24:=tmp; ENDIF;);
DATA[168] -> BYTE(Exp := (DATA & 7) - 6; rec24 := rec24*10^Exp;);
% 32 bit integer
DATA[177] -> WORD(tmp:=DATA;);
DATA[179] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec25:=tmp-4294967296; ELSE rec25:=tmp; ENDIF;);
DATA[176] -> BYTE(Exp := (DATA & 7) - 6; rec25 := rec25*10^Exp;);
% 32 bit integer
DATA[185] -> WORD(tmp:=DATA;);
DATA[187] -> WORD(tmp:=tmp + 65536*DATA; IF (tmp>2147483647) THEN rec26:=tmp-4294967296; ELSE rec26:=tmp; ENDIF;);
DATA[184] -> BYTE(Exp := (DATA & 7) - 3; rec26 := rec26*10^Exp;);
% 48 bit integer
DATA[214] -> WORD(tmp:=DATA;);
DATA[216] -> WORD(tmp:=tmp + 65536*DATA;);
DATA[218] -> WORD(tmp:=tmp + 4294967296*DATA; IF (tmp>140737488355327) THEN rec29:=tmp-281474976710656; ELSE rec29:=tmp; ENDIF;);
DATA[213] -> BYTE(Exp := (DATA & 7) - 3; rec29 := rec29*10^Exp;);
% 16 bit integer
DATA[225] -> WORD(tmp:=DATA; IF (tmp>32767) THEN rec30:=tmp-65536; ELSE rec30:=tmp; ENDIF;);
DATA[222] -> BYTE(Exp := (DATA & 7) - 0; rec30 := rec30*10^Exp;);
% 16 bit integer
DATA[230] -> WORD(tmp:=DATA; IF (tmp>32767) THEN rec31:=tmp-65536; ELSE rec31:=tmp; ENDIF;);
DATA[229] -> BYTE(Exp := (DATA & 7) - 3; rec31 := rec31*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.