Landis & Gyr Ultraheat_UH50 WZU-485D
Detaljer
Beskrivning
.
Bruksanvisning
Läs inte oftare än var 5e sekund
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
% Skapad med Modbus Creator
% - OBS! Användaren ansvarar själv för att samma TYPID inte används flera gånger i samma apparat.
% TYPID 10000-19999 är för användardefinierade enheter
DEVICETYPE UH50 NAMED "LG_Ultraheat_UH50" TYPEID 17562 IS
PARAMETER
Id : "Adress";
PUBLIC
V1 : "Tp" ["°C"]DEC2;
V2 : "Tv" ["°C"]DEC2;
V3 : "dT" ["K"]DEC2;
V4 : "Q" ["m3/h"]DEC3;
V5 : "P" ["kW"]DEC2;
V6 : "Echl" [""];
V7 : "Time" [""];
V8 : "F" [""];
V9 : "header" [""];
V10 : "E" [""];
V11 : "V" [""];
V12 : "N" [""];
V13 : "EM" [""];
V14 : "VM" [""];
V15 : "A1" [""]DEC1;
V16 : "A2" [""]DEC1;
V17 : "I1" [""]DEC4;
V18 : "I2" [""]DEC4;
V19 : "N1" [""];
V20 : "N2" [""];
PRIVATE
Tmp;
BAUDRATE 9600;
PARITY EVEN;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Read4 NAMED "Read 3" IS
QUESTION
DATA[0] := BYTE(Id); % Enhetens Modbus adress
DATA[1] := HEX(03); % Modbus kommando för att läsa register
DATA[2] := RWORD(0); % Start address
DATA[4] := RWORD(34); % Antal register att läsa
ANSWER SIZE 73 % (Antal register * 2) + 5
DATA[0] = BYTE(Id);
DATA[1] = BYTE(03);
DATA[2] = BYTE(68); % Antal Bytes
DATA[3] -> RWORD(IF (DATA>=32768) THEN V1:=(DATA-65536)/100; ELSE V1:=DATA/100; ENDIF;);
DATA[5] -> RWORD(IF (DATA>=32768) THEN V2:=(DATA-65536)/100; ELSE V2:=DATA/100; ENDIF;);
DATA[7] -> RWORD(IF (DATA>=32768) THEN V3:=(DATA-65536)/100; ELSE V3:=DATA/100; ENDIF;);
DATA[9] -> RWORD(Tmp := DATA*65536;);
DATA[11] -> RWORD(V4:=(DATA+Tmp)/1000;);
DATA[13] -> RWORD(Tmp := DATA*65536;);
DATA[15] -> RWORD(V5 := (DATA+Tmp)/100;);
DATA[17] -> RWORD(Tmp := DATA*65536;);
DATA[19] -> RWORD(V6 := DATA+Tmp;);
DATA[21] -> RWORD(Tmp := DATA*65536;);
DATA[23] -> RWORD(V7 := DATA+Tmp;);
DATA[25] -> RWORD(V8 := DATA;);
DATA[27] -> RWORD(V9 := DATA;);
DATA[29] -> RWORD(Tmp := DATA*65536;);
DATA[31] -> RWORD(V10 := DATA+Tmp;);
DATA[33] -> RWORD(Tmp := DATA*65536;);
DATA[35] -> RWORD(V11 := DATA+Tmp;);
DATA[37] -> RWORD(Tmp := DATA*65536;);
DATA[39] -> RWORD(V12 := DATA+Tmp;);
DATA[41] -> RWORD(Tmp := DATA*65536;);
DATA[43] -> RWORD(V13 := DATA+Tmp;);
DATA[45] -> RWORD(Tmp := DATA*65536;);
DATA[47] -> RWORD(V14 := DATA+Tmp;);
DATA[49] -> RWORD(Tmp := DATA*65536;);
DATA[51] -> RWORD(V15 := (DATA+Tmp)/10;);
DATA[53] -> RWORD(Tmp := DATA*65536;);
DATA[55] -> RWORD(V16 := (DATA+Tmp)/10;);
DATA[57] -> RWORD(Tmp := DATA*65536;);
DATA[59] -> RWORD(V17 := (DATA+Tmp)/10000;);
DATA[61] -> RWORD(Tmp := DATA*65536;);
DATA[63] -> RWORD(V18 := (DATA+Tmp)/10000;);
DATA[65] -> RWORD(Tmp := DATA*65536;);
DATA[67] -> RWORD(V19 := DATA+Tmp;);
DATA[69] -> RWORD(Tmp := DATA*65536;);
DATA[71] -> RWORD(V20 := DATA+Tmp;);
TIMEOUT 5000
END;
END;
% - OBS! Användaren ansvarar själv för att samma TYPID inte används flera gånger i samma apparat.
% TYPID 10000-19999 är för användardefinierade enheter
DEVICETYPE UH50 NAMED "LG_Ultraheat_UH50" TYPEID 17562 IS
PARAMETER
Id : "Adress";
PUBLIC
V1 : "Tp" ["°C"]DEC2;
V2 : "Tv" ["°C"]DEC2;
V3 : "dT" ["K"]DEC2;
V4 : "Q" ["m3/h"]DEC3;
V5 : "P" ["kW"]DEC2;
V6 : "Echl" [""];
V7 : "Time" [""];
V8 : "F" [""];
V9 : "header" [""];
V10 : "E" [""];
V11 : "V" [""];
V12 : "N" [""];
V13 : "EM" [""];
V14 : "VM" [""];
V15 : "A1" [""]DEC1;
V16 : "A2" [""]DEC1;
V17 : "I1" [""]DEC4;
V18 : "I2" [""]DEC4;
V19 : "N1" [""];
V20 : "N2" [""];
PRIVATE
Tmp;
BAUDRATE 9600;
PARITY EVEN;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Read4 NAMED "Read 3" IS
QUESTION
DATA[0] := BYTE(Id); % Enhetens Modbus adress
DATA[1] := HEX(03); % Modbus kommando för att läsa register
DATA[2] := RWORD(0); % Start address
DATA[4] := RWORD(34); % Antal register att läsa
ANSWER SIZE 73 % (Antal register * 2) + 5
DATA[0] = BYTE(Id);
DATA[1] = BYTE(03);
DATA[2] = BYTE(68); % Antal Bytes
DATA[3] -> RWORD(IF (DATA>=32768) THEN V1:=(DATA-65536)/100; ELSE V1:=DATA/100; ENDIF;);
DATA[5] -> RWORD(IF (DATA>=32768) THEN V2:=(DATA-65536)/100; ELSE V2:=DATA/100; ENDIF;);
DATA[7] -> RWORD(IF (DATA>=32768) THEN V3:=(DATA-65536)/100; ELSE V3:=DATA/100; ENDIF;);
DATA[9] -> RWORD(Tmp := DATA*65536;);
DATA[11] -> RWORD(V4:=(DATA+Tmp)/1000;);
DATA[13] -> RWORD(Tmp := DATA*65536;);
DATA[15] -> RWORD(V5 := (DATA+Tmp)/100;);
DATA[17] -> RWORD(Tmp := DATA*65536;);
DATA[19] -> RWORD(V6 := DATA+Tmp;);
DATA[21] -> RWORD(Tmp := DATA*65536;);
DATA[23] -> RWORD(V7 := DATA+Tmp;);
DATA[25] -> RWORD(V8 := DATA;);
DATA[27] -> RWORD(V9 := DATA;);
DATA[29] -> RWORD(Tmp := DATA*65536;);
DATA[31] -> RWORD(V10 := DATA+Tmp;);
DATA[33] -> RWORD(Tmp := DATA*65536;);
DATA[35] -> RWORD(V11 := DATA+Tmp;);
DATA[37] -> RWORD(Tmp := DATA*65536;);
DATA[39] -> RWORD(V12 := DATA+Tmp;);
DATA[41] -> RWORD(Tmp := DATA*65536;);
DATA[43] -> RWORD(V13 := DATA+Tmp;);
DATA[45] -> RWORD(Tmp := DATA*65536;);
DATA[47] -> RWORD(V14 := DATA+Tmp;);
DATA[49] -> RWORD(Tmp := DATA*65536;);
DATA[51] -> RWORD(V15 := (DATA+Tmp)/10;);
DATA[53] -> RWORD(Tmp := DATA*65536;);
DATA[55] -> RWORD(V16 := (DATA+Tmp)/10;);
DATA[57] -> RWORD(Tmp := DATA*65536;);
DATA[59] -> RWORD(V17 := (DATA+Tmp)/10000;);
DATA[61] -> RWORD(Tmp := DATA*65536;);
DATA[63] -> RWORD(V18 := (DATA+Tmp)/10000;);
DATA[65] -> RWORD(Tmp := DATA*65536;);
DATA[67] -> RWORD(V19 := DATA+Tmp;);
DATA[69] -> RWORD(Tmp := DATA*65536;);
DATA[71] -> RWORD(V20 := DATA+Tmp;);
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.