Kamstrup multical 602 (04h Heat)
Detaljer
- Typ
- Drivrutin
- Upplaggd av
- Marcus Willander, Abelko Innovation
- Version
- 3
- Uppdaterad
- 2018-05-16
- Skapad
- 2016-05-24
- Kategori
- Energioptimering, M-bus, Mätare, Värme
- Visningar
- 3717
Beskrivning
Detta skript har det mesta som energimätaren tillhandahåller. Det är därför för många värden för att det ska fungera i en WMP.
Bruksanvisning
Med skriptet kan du hämta ut historiska värden. Ange om det ska vara års eller månadsvärden och hur många år/månader bakåt i tiden.
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 Kamstrup_602 NAMED "Kamstrup_602_adv"
IS
% --- Device created 15:42:10 2016-05-17
PARAMETER
Id :"Address"INT;
ReadMonth : "Month stats"INT;
YearMonth :"Number of Years/Months back"INT;
PUBLIC
MeterNr : "Meter number"INT;
IDNr : "Fabrication number"INT;
rec2 : "Energy "["kWh"]INT;
rec3 : "Volume "["m³"]DEC2;
rec4 : "Running hours"["h"]INT;
rec5 : "Flow Temperature"["°C"]DEC2;
rec6 : "Return Temperature"["°C"]DEC2;
rec7 : "Temperature Difference"["°K"]DEC2;
rec8 : "Power"["kW"]DEC1;
rec9 : "Peak Power"["kW"]DEC1;
rec10 : "Volume Flow"["l/h"]INT;
rec11 : "Peak Volume Flow"["l/h"]INT;
rec12 : "Energy TA2"["kWh"]INT;
rec13 : "Energy TA3"["kWh"]INT;
rec14 : "Volume PC A"["m³"]DEC2;
rec15 : "Volume PC B"["m³"]DEC2;
rec16 : "Energy 3"["kWh"]INT;
DTYear : "Year"INT;
DTMonth : "Month"INT;
DTDay : "Day"INT;
DTHour : "Hour"INT;
DTMinute : "Minute"INT;
rec18 : "Hist: Energy"["kWh"]INT;
rec19 : "Hist: Volume"["m³"]DEC2;
rec20 : "Hist: Peak Power"["kW"]DEC1;
rec21 : "Hist: Peak Volume Flow"["l/h"]INT;
rec22 : "Hist: Energy TA2"["kWh"]INT;
rec23 : "Hist: Energy TA3"["kWh"]INT;
rec24 : "Hist: Volume PC A"["m³"]DEC2;
rec25 : "Hist: Volume PC B"["m³"]DEC2;
rec26 : "Hist: Energy 3"["kWh"]INT;
DYear : "Hist: Year "INT;
DMonth : "Hist: Month "INT;
DDay : "Hist: Day "INT;
PRIVATE
Exp;
tmp;
BAUDRATE 2400;
PARITY EVEN;
CHRGAPTIMEOUT 32;
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 Config NAMED "Config" IS
QUESTION
DATA[0] := HEX(68);
DATA[1] := HEX(09);
DATA[2] := HEX(09);
DATA[3] := HEX(68);
DATA[4] := HEX(53);
DATA[5] := BYTE(Id);
DATA[6] := HEX(51);
DATA[7] := HEX(08);
DATA[8] := HEX(7F);
DATA[9] := HEX(01);
DATA[10] := BYTE(ReadMonth);
DATA[11] := BYTE(YearMonth);
DATA[12] := HEX(00);
DATA[14] := 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(MeterNr := (DATA & HEX(F)) + 10*(DATA & HEX(F0))/16;);
DATA[8] -> BYTE(MeterNr := MeterNr + 100*(DATA & HEX(F)) + 1000*(DATA & HEX(F0))/16;);
DATA[9] -> BYTE(MeterNr := MeterNr + 10000*(DATA & HEX(F)) + 100000*(DATA & HEX(F0))/16;);
DATA[10] -> BYTE(MeterNr := MeterNr + 1000000*(DATA & HEX(F)) + 10000000*(DATA & HEX(F0))/16;);
DATA[14] = HEX(04);
DATA[21] -> BYTE(IDNr := (DATA & HEX(F)) + 10*(DATA & HEX(F0))/16;);
DATA[22] -> BYTE(IDNr := IDNr + 100*(DATA & HEX(F)) + 1000*(DATA & HEX(F0))/16;);
DATA[23] -> BYTE(IDNr := IDNr + 10000*(DATA & HEX(F)) + 100000*(DATA & HEX(F0))/16;);
DATA[24] -> BYTE(IDNr := IDNr + 1000000*(DATA & HEX(F)) + 10000000*(DATA & HEX(F0))/16;);
DATA[25] = HEX(04);
% 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) - 6; 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;);
DATA[39] -> WORD(tmp:=DATA;);
DATA[41] -> WORD(rec4:=tmp + 65536*DATA;);
% 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) - 6; 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) - 6; 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) - 3; 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) - 3; 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) - 6; 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) - 6; 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) - 6; rec16 := rec16*10^Exp;);
DATA[124] -> BYTE(DTMinute:=DATA & HEX(3F););
DATA[125] -> BYTE(DTHour:=DATA & HEX(1F););
DATA[126] -> BYTE(DTDay:=DATA & HEX(1F); DTYear:=(DATA & HEX(E0))/32;);
DATA[127] -> BYTE(DTMonth:=DATA & HEX(F); DTYear:=DTYear+((DATA & HEX(F0))/2););
% 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) - 6; 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) - 6; 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) - 3; 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) - 6; 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) - 6; 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) - 6; rec26 := rec26*10^Exp;);
DATA[191] -> BYTE(DDay:=DATA & HEX(1F); DYear:=(DATA & HEX(E0))/32;);
DATA[192] -> BYTE(DMonth:=DATA & HEX(F); DYear:=DYear+((DATA & HEX(F0))/2););
TIMEOUT 5000
END;
END;
IS
% --- Device created 15:42:10 2016-05-17
PARAMETER
Id :"Address"INT;
ReadMonth : "Month stats"INT;
YearMonth :"Number of Years/Months back"INT;
PUBLIC
MeterNr : "Meter number"INT;
IDNr : "Fabrication number"INT;
rec2 : "Energy "["kWh"]INT;
rec3 : "Volume "["m³"]DEC2;
rec4 : "Running hours"["h"]INT;
rec5 : "Flow Temperature"["°C"]DEC2;
rec6 : "Return Temperature"["°C"]DEC2;
rec7 : "Temperature Difference"["°K"]DEC2;
rec8 : "Power"["kW"]DEC1;
rec9 : "Peak Power"["kW"]DEC1;
rec10 : "Volume Flow"["l/h"]INT;
rec11 : "Peak Volume Flow"["l/h"]INT;
rec12 : "Energy TA2"["kWh"]INT;
rec13 : "Energy TA3"["kWh"]INT;
rec14 : "Volume PC A"["m³"]DEC2;
rec15 : "Volume PC B"["m³"]DEC2;
rec16 : "Energy 3"["kWh"]INT;
DTYear : "Year"INT;
DTMonth : "Month"INT;
DTDay : "Day"INT;
DTHour : "Hour"INT;
DTMinute : "Minute"INT;
rec18 : "Hist: Energy"["kWh"]INT;
rec19 : "Hist: Volume"["m³"]DEC2;
rec20 : "Hist: Peak Power"["kW"]DEC1;
rec21 : "Hist: Peak Volume Flow"["l/h"]INT;
rec22 : "Hist: Energy TA2"["kWh"]INT;
rec23 : "Hist: Energy TA3"["kWh"]INT;
rec24 : "Hist: Volume PC A"["m³"]DEC2;
rec25 : "Hist: Volume PC B"["m³"]DEC2;
rec26 : "Hist: Energy 3"["kWh"]INT;
DYear : "Hist: Year "INT;
DMonth : "Hist: Month "INT;
DDay : "Hist: Day "INT;
PRIVATE
Exp;
tmp;
BAUDRATE 2400;
PARITY EVEN;
CHRGAPTIMEOUT 32;
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 Config NAMED "Config" IS
QUESTION
DATA[0] := HEX(68);
DATA[1] := HEX(09);
DATA[2] := HEX(09);
DATA[3] := HEX(68);
DATA[4] := HEX(53);
DATA[5] := BYTE(Id);
DATA[6] := HEX(51);
DATA[7] := HEX(08);
DATA[8] := HEX(7F);
DATA[9] := HEX(01);
DATA[10] := BYTE(ReadMonth);
DATA[11] := BYTE(YearMonth);
DATA[12] := HEX(00);
DATA[14] := 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(MeterNr := (DATA & HEX(F)) + 10*(DATA & HEX(F0))/16;);
DATA[8] -> BYTE(MeterNr := MeterNr + 100*(DATA & HEX(F)) + 1000*(DATA & HEX(F0))/16;);
DATA[9] -> BYTE(MeterNr := MeterNr + 10000*(DATA & HEX(F)) + 100000*(DATA & HEX(F0))/16;);
DATA[10] -> BYTE(MeterNr := MeterNr + 1000000*(DATA & HEX(F)) + 10000000*(DATA & HEX(F0))/16;);
DATA[14] = HEX(04);
DATA[21] -> BYTE(IDNr := (DATA & HEX(F)) + 10*(DATA & HEX(F0))/16;);
DATA[22] -> BYTE(IDNr := IDNr + 100*(DATA & HEX(F)) + 1000*(DATA & HEX(F0))/16;);
DATA[23] -> BYTE(IDNr := IDNr + 10000*(DATA & HEX(F)) + 100000*(DATA & HEX(F0))/16;);
DATA[24] -> BYTE(IDNr := IDNr + 1000000*(DATA & HEX(F)) + 10000000*(DATA & HEX(F0))/16;);
DATA[25] = HEX(04);
% 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) - 6; 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;);
DATA[39] -> WORD(tmp:=DATA;);
DATA[41] -> WORD(rec4:=tmp + 65536*DATA;);
% 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) - 6; 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) - 6; 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) - 3; 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) - 3; 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) - 6; 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) - 6; 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) - 6; rec16 := rec16*10^Exp;);
DATA[124] -> BYTE(DTMinute:=DATA & HEX(3F););
DATA[125] -> BYTE(DTHour:=DATA & HEX(1F););
DATA[126] -> BYTE(DTDay:=DATA & HEX(1F); DTYear:=(DATA & HEX(E0))/32;);
DATA[127] -> BYTE(DTMonth:=DATA & HEX(F); DTYear:=DTYear+((DATA & HEX(F0))/2););
% 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) - 6; 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) - 6; 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) - 3; 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) - 6; 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) - 6; 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) - 6; rec26 := rec26*10^Exp;);
DATA[191] -> BYTE(DDay:=DATA & HEX(1F); DYear:=(DATA & HEX(E0))/32;);
DATA[192] -> BYTE(DMonth:=DATA & HEX(F); DYear:=DYear+((DATA & HEX(F0))/2););
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.