Mitsubishi värmepump med Procon A1M Modbus modul del 1
Detaljer
- Typ
- Drivrutin
- Upplaggd av
- Ove Jansson, Abelko Innovation
- Version
- 3
- Uppdaterad
- 2016-09-06
- Skapad
- 2016-09-06
- Kategori
- Kyla, Modbus, Värme, Ventilation
- Visningar
- 3405
Beskrivning
Detta skript är skapat för IMSE UltraBase30/IPX3
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
% 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 ProconA1Mp1 NAMED "ProconA1Mp1" TYPEID 13029 IS
PARAMETER
Id : "Adress" [""]INT;
PUBLIC
V1 : "Fault Code (decimal) " [""]; % 8000 = No error 6999 = Bad communication with indoor unit (Refer to indoor unit documentation for description of other fault code values)
V2 : "System Type Detected" [""]; % 0 = ATA 1 = ATW
V3 : "Deadband enabled state" [""]; % 0=off 1=on
V4 : "BMS Room Temperature (signed)" ["°C"]DEC1;
V5 : "BMS Virtual Setpoint" ["°C"]DEC1;
V6 : "Deadband Heating Setpoint" ["°C"]DEC1; % Temperature in ºC (default 19ºC). Value must be at least 2ºC lower than the Deadband Cooling Setpoint.
V7 : "Deadband Cooling Setpoint" ["°C"]DEC1; % Temperature in ºC (default 23ºC). Value must be at least 2ºC higher than the Deadband Heating Setpoint
V8 : "System On/Off" [""]; % 0 = System OFF 1 = System ON 2 = Emergency Run (read only value) 3 = Test Run (read only value)
V9 : "Operating Mode" [""]; % 0 = Stop 1 = Hot Water 2 = Heating 3 = Cooling 5 = Freeze Stat 6 = Legionella 7 = Heating-Eco
V10 : "Operating Mode (DHW)" [""]; % 0 = Normal 1 = Eco
V11 : "A/C Mode – Zone 1" [""]; % 0 = Heating Room Temp 1 = Heating Flow Temp 2 = Heating Heat Curve 3 = Cooling Room Temp (not on 13K model) 4 = Cooling Flow Temp 5 = Floor Dryup
V12 : "A/C Mode – Zone 2" [""]; % 0 = Heating Room Temp 1 = Heating Flow Temp 2 = Heating Heat Curve 3 = Cooling Room Temp (not on 13K model) 4 = Cooling Flow Temp 5 = Floor Dryup
V13 : "Set Tank Water Temperature (signed)" ["ºC"]DEC2;
V14 : "H/C Thermostat Target Temperature – Zone 1 (signed)" ["ºC"]DEC2;
V15 : "H/C Thermostat Target Temperature – Zone 2 (signed)" ["ºC"]DEC2;
V16 : "MRC Prohibit " [""]; % Bit packed value: Bit 0 – System On/Off (0 = ON, 1 = Prohibit) Bit 1 – Running Mode (0 = ON, 1 = Prohibit) Bit 2 – Setting Temp (0 = ON, 1 = Prohibit) Bit 3 – Undefined (always 0) Bit 4 – Function Setting (0 = Normal, 1 = Function Setting) Bits 5, 6 and 7 – Undefined (always 0) (Before using this register see note ††)
V17 : "Force DHW" [""]; % 8 0 = Normal 1 = Force DHW
V18 : "Holiday" [""]; % 0 = Normal 1 = Holiday
V19 : "DHW On Prohibit" [""]; % 0 = On 1 = Prohibit
V20 : "Heating On Prohibit – Zone 1" [""]; % 0 = On 1 = Prohibit
V21 : "Cooling On Prohibit – Zone 1" [""]; % 0 = On 1 = Prohibit
V22 : "Heating On Prohibit – Zone 2" [""];
V23 : "Cooling On Prohibit – Zone 2" [""];
V24 : "Capacity Mode" [""]; % 6 0 = COP priority 1 = Capacity priority
V25 : "Capacity Control Ratio" ["%"];
V26 : "Fan Mode" [""]; % 0 = Ordinary 1 = Coercion
V27 : "Current Hour" [""];
V28 : "Current Minute" [""];
V29 : "Outdoor Temperature By BMS (signed)" ["ºC"]DEC1;
V30 : "Setting Water Temperature (signed)" ["ºC"]DEC2;
V31 : "Thermostat Target Temperature – Zone 1 (signed)" ["ºC"]DEC2;
V32 : "Thermostat Target Temperature – Zone 2 (signed)" ["ºC"]DEC2;
V33 : "HC Control Type" [""]; % 0 = Heating 1 = Cooling
V34 : "Defrost" [""]; % 0 = Normal 1 = Standby 2 = Defrost 3 = Waiting Restart
V35 : "Residual Heat Removal" [""]; % 0 = Normal 1 = Prepared 2 = Residual Heat Removal
V36 : "Refrigerant Error Info" [""]; % 0 = Normal 1 = Error (System) 2 = Error (Startup) 3 = Maintenance Error
V37 : "7-Segment Display Error Code Digit 1" [""];
V38 : "7-Segment Display Error Code Digit 2" [""];
V39 : "Status Of Heating" [""]; % 0 = No type 1 = Heating C1 2 = Heating C2 3 = Heating C3 0 = No type 1 = Heating/Cooling A1, Heating/Cooling B1, Heating/Cooling C1 2 = Heating/Cooling A2, Heating/Cooling B2, Heating/Cooling C2 3 = Heating/Cooling A3, Heating/Cooling B3, Heating/Cooling C3
V40 : "Heat Pump Frequency – Master" ["Hz"];
V41 : "Heat Pump Frequency – Slave 1" ["Hz"];
V42 : "Heat Pump Frequency – Slave 2" ["Hz"];
V43 : "Heat Pump Frequency – Slave 3" ["Hz"];
V44 : "Heat Pump Frequency – Slave 4" ["Hz"];
V45 : "Heat Pump Frequency – Slave 5" ["Hz"];
V46 : "Heat Pump Frequency – Slave 6" ["Hz"];
V47 : "Heat Source Status" ["Hz"]; % 0 = H/P 1 = IH 2 = BH 3 = IH + BH 4 = Boiler
V48 : "Temperature Setpoint – Zone 1 (signed)" ["ºC"]DEC2;
V49 : "Temperature Setpoint – Zone 2 (signed)" ["ºC"]DEC2;
V50 : "Flow Temperature Setpoint – Zone 1 (signed)" ["ºC"]DEC2;
V51 : "Flow Temperature Setpoint – Zone 2 (signed)" ["ºC"]DEC2;
V52 : "Legionella Temperature Setpoint (signed)" ["ºC"]DEC2;
V53 : "DHW Temperature Drop (signed)" ["ºC"]DEC2;
V54 : "Room Temperature – Zone 1 (signed)" ["ºC"]DEC2;
V55 : "Room Temperature – Zone 2 (signed)" ["ºC"]DEC2;
V56 : "Refrigerant Liquid Temperature (signed)" ["ºC"]DEC2;
V57 : "Outdoor Ambient Temperature (signed)" ["ºC"]DEC2;
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Read3 NAMED "Read 3" IS
QUESTION
DATA[0] := BYTE(Id); % Enhetens Modbus adress
DATA[1] := HEX(03); % Modbus kommando för att läsa register kod 03
DATA[2] := RWORD(12); % Start address
DATA[4] := RWORD(88); % Antal register att läsa
ANSWER SIZE 181 % (Antal register * 2) + 5
DATA[0] = BYTE(Id);
DATA[1] = BYTE(03);
DATA[2] = BYTE(176); % Antal Bytes
DATA[3] -> RWORD(V1 := DATA;);
DATA[5] -> RWORD(V2 := DATA;);
DATA[7] -> RWORD(V3 := DATA;);
DATA[9] -> RWORD(IF (DATA>=32768) THEN V4:=(DATA-65536)/10; ELSE V4:=DATA/10; ENDIF;);
DATA[13] -> RWORD(V5 := DATA/10;);
DATA[15] -> RWORD(V6 := DATA/10;);
DATA[17] -> RWORD(V7 := DATA/10;);
DATA[29] -> RWORD(V8 := DATA;);
DATA[31] -> RWORD(V9 := DATA;);
DATA[33] -> RWORD(V10 := DATA;);
DATA[35] -> RWORD(V11 := DATA;);
DATA[37] -> RWORD(V12 := DATA;);
DATA[39] -> RWORD(IF (DATA>=32768) THEN V13:=(DATA-65536)/100; ELSE V13:=DATA/100; ENDIF;);
DATA[43] -> RWORD(IF (DATA>=32768) THEN V14:=(DATA-65536)/100; ELSE V14:=DATA/100; ENDIF;);
DATA[47] -> RWORD(IF (DATA>=32768) THEN V15:=(DATA-65536)/100; ELSE V15:=DATA/100; ENDIF;);
DATA[51] -> RWORD(V16 := DATA;);
DATA[53] -> RWORD(V17 := DATA;);
DATA[55] -> RWORD(V18 := DATA;);
DATA[57] -> RWORD(V19 := DATA;);
DATA[59] -> RWORD(V20 := DATA;);
DATA[61] -> RWORD(V21 := DATA;);
DATA[63] -> RWORD(V22 := DATA;);
DATA[65] -> RWORD(V23 := DATA;);
DATA[69] -> RWORD(V24 := DATA;);
DATA[71] -> RWORD(V25 := DATA;);
DATA[73] -> RWORD(V26 := DATA;);
DATA[75] -> RWORD(V27 := DATA;);
DATA[77] -> RWORD(V28 := DATA;);
DATA[79] -> RWORD(IF (DATA>=32768) THEN V29:=(DATA-65536)/10; ELSE V29:=DATA/10; ENDIF;);
DATA[83] -> RWORD(IF (DATA>=32768) THEN V30:=(DATA-65536)/100; ELSE V30:=DATA/100; ENDIF;);
DATA[87] -> RWORD(IF (DATA>=32768) THEN V31:=(DATA-65536)/100; ELSE V31:=DATA/100; ENDIF;);
DATA[91] -> RWORD(IF (DATA>=32768) THEN V32:=(DATA-65536)/100; ELSE V32:=DATA/100; ENDIF;);
DATA[95] -> RWORD(V33 := DATA;);
DATA[113] -> RWORD(V34 := DATA;);
DATA[115] -> RWORD(V35 := DATA;);
DATA[117] -> RWORD(V36 := DATA;);
DATA[119] -> RWORD(V37 := DATA;);
DATA[121] -> RWORD(V38 := DATA;);
DATA[123] -> RWORD(V39 := DATA;);
DATA[125] -> RWORD(V40 := DATA;);
DATA[127] -> RWORD(V41 := DATA;);
DATA[129] -> RWORD(V42 := DATA;);
DATA[131] -> RWORD(V43 := DATA;);
DATA[133] -> RWORD(V44 := DATA;);
DATA[135] -> RWORD(V45 := DATA;);
DATA[137] -> RWORD(V46 := DATA;);
DATA[139] -> RWORD(V47 := DATA;);
DATA[141] -> RWORD(IF (DATA>=32768) THEN V48:=(DATA-65536)/100; ELSE V48:=DATA/100; ENDIF;);
DATA[145] -> RWORD(IF (DATA>=32768) THEN V49:=(DATA-65536)/100; ELSE V49:=DATA/100; ENDIF;);
DATA[149] -> RWORD(V50 := DATA/100;);
DATA[153] -> RWORD(V51 := DATA/100;);
DATA[157] -> RWORD(V52 := DATA/100;);
DATA[161] -> RWORD(V53 := DATA/100;);
DATA[165] -> RWORD(V54 := DATA/100;);
DATA[169] -> RWORD(V55 := DATA/100;);
DATA[173] -> RWORD(V56 := DATA/100;);
DATA[177] -> RWORD(IF (DATA>=32768) THEN V57:=(DATA-65536)/10; ELSE V57:=DATA/10; ENDIF;);
TIMEOUT 300
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 ProconA1Mp1 NAMED "ProconA1Mp1" TYPEID 13029 IS
PARAMETER
Id : "Adress" [""]INT;
PUBLIC
V1 : "Fault Code (decimal) " [""]; % 8000 = No error 6999 = Bad communication with indoor unit (Refer to indoor unit documentation for description of other fault code values)
V2 : "System Type Detected" [""]; % 0 = ATA 1 = ATW
V3 : "Deadband enabled state" [""]; % 0=off 1=on
V4 : "BMS Room Temperature (signed)" ["°C"]DEC1;
V5 : "BMS Virtual Setpoint" ["°C"]DEC1;
V6 : "Deadband Heating Setpoint" ["°C"]DEC1; % Temperature in ºC (default 19ºC). Value must be at least 2ºC lower than the Deadband Cooling Setpoint.
V7 : "Deadband Cooling Setpoint" ["°C"]DEC1; % Temperature in ºC (default 23ºC). Value must be at least 2ºC higher than the Deadband Heating Setpoint
V8 : "System On/Off" [""]; % 0 = System OFF 1 = System ON 2 = Emergency Run (read only value) 3 = Test Run (read only value)
V9 : "Operating Mode" [""]; % 0 = Stop 1 = Hot Water 2 = Heating 3 = Cooling 5 = Freeze Stat 6 = Legionella 7 = Heating-Eco
V10 : "Operating Mode (DHW)" [""]; % 0 = Normal 1 = Eco
V11 : "A/C Mode – Zone 1" [""]; % 0 = Heating Room Temp 1 = Heating Flow Temp 2 = Heating Heat Curve 3 = Cooling Room Temp (not on 13K model) 4 = Cooling Flow Temp 5 = Floor Dryup
V12 : "A/C Mode – Zone 2" [""]; % 0 = Heating Room Temp 1 = Heating Flow Temp 2 = Heating Heat Curve 3 = Cooling Room Temp (not on 13K model) 4 = Cooling Flow Temp 5 = Floor Dryup
V13 : "Set Tank Water Temperature (signed)" ["ºC"]DEC2;
V14 : "H/C Thermostat Target Temperature – Zone 1 (signed)" ["ºC"]DEC2;
V15 : "H/C Thermostat Target Temperature – Zone 2 (signed)" ["ºC"]DEC2;
V16 : "MRC Prohibit " [""]; % Bit packed value: Bit 0 – System On/Off (0 = ON, 1 = Prohibit) Bit 1 – Running Mode (0 = ON, 1 = Prohibit) Bit 2 – Setting Temp (0 = ON, 1 = Prohibit) Bit 3 – Undefined (always 0) Bit 4 – Function Setting (0 = Normal, 1 = Function Setting) Bits 5, 6 and 7 – Undefined (always 0) (Before using this register see note ††)
V17 : "Force DHW" [""]; % 8 0 = Normal 1 = Force DHW
V18 : "Holiday" [""]; % 0 = Normal 1 = Holiday
V19 : "DHW On Prohibit" [""]; % 0 = On 1 = Prohibit
V20 : "Heating On Prohibit – Zone 1" [""]; % 0 = On 1 = Prohibit
V21 : "Cooling On Prohibit – Zone 1" [""]; % 0 = On 1 = Prohibit
V22 : "Heating On Prohibit – Zone 2" [""];
V23 : "Cooling On Prohibit – Zone 2" [""];
V24 : "Capacity Mode" [""]; % 6 0 = COP priority 1 = Capacity priority
V25 : "Capacity Control Ratio" ["%"];
V26 : "Fan Mode" [""]; % 0 = Ordinary 1 = Coercion
V27 : "Current Hour" [""];
V28 : "Current Minute" [""];
V29 : "Outdoor Temperature By BMS (signed)" ["ºC"]DEC1;
V30 : "Setting Water Temperature (signed)" ["ºC"]DEC2;
V31 : "Thermostat Target Temperature – Zone 1 (signed)" ["ºC"]DEC2;
V32 : "Thermostat Target Temperature – Zone 2 (signed)" ["ºC"]DEC2;
V33 : "HC Control Type" [""]; % 0 = Heating 1 = Cooling
V34 : "Defrost" [""]; % 0 = Normal 1 = Standby 2 = Defrost 3 = Waiting Restart
V35 : "Residual Heat Removal" [""]; % 0 = Normal 1 = Prepared 2 = Residual Heat Removal
V36 : "Refrigerant Error Info" [""]; % 0 = Normal 1 = Error (System) 2 = Error (Startup) 3 = Maintenance Error
V37 : "7-Segment Display Error Code Digit 1" [""];
V38 : "7-Segment Display Error Code Digit 2" [""];
V39 : "Status Of Heating" [""]; % 0 = No type 1 = Heating C1 2 = Heating C2 3 = Heating C3 0 = No type 1 = Heating/Cooling A1, Heating/Cooling B1, Heating/Cooling C1 2 = Heating/Cooling A2, Heating/Cooling B2, Heating/Cooling C2 3 = Heating/Cooling A3, Heating/Cooling B3, Heating/Cooling C3
V40 : "Heat Pump Frequency – Master" ["Hz"];
V41 : "Heat Pump Frequency – Slave 1" ["Hz"];
V42 : "Heat Pump Frequency – Slave 2" ["Hz"];
V43 : "Heat Pump Frequency – Slave 3" ["Hz"];
V44 : "Heat Pump Frequency – Slave 4" ["Hz"];
V45 : "Heat Pump Frequency – Slave 5" ["Hz"];
V46 : "Heat Pump Frequency – Slave 6" ["Hz"];
V47 : "Heat Source Status" ["Hz"]; % 0 = H/P 1 = IH 2 = BH 3 = IH + BH 4 = Boiler
V48 : "Temperature Setpoint – Zone 1 (signed)" ["ºC"]DEC2;
V49 : "Temperature Setpoint – Zone 2 (signed)" ["ºC"]DEC2;
V50 : "Flow Temperature Setpoint – Zone 1 (signed)" ["ºC"]DEC2;
V51 : "Flow Temperature Setpoint – Zone 2 (signed)" ["ºC"]DEC2;
V52 : "Legionella Temperature Setpoint (signed)" ["ºC"]DEC2;
V53 : "DHW Temperature Drop (signed)" ["ºC"]DEC2;
V54 : "Room Temperature – Zone 1 (signed)" ["ºC"]DEC2;
V55 : "Room Temperature – Zone 2 (signed)" ["ºC"]DEC2;
V56 : "Refrigerant Liquid Temperature (signed)" ["ºC"]DEC2;
V57 : "Outdoor Ambient Temperature (signed)" ["ºC"]DEC2;
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Read3 NAMED "Read 3" IS
QUESTION
DATA[0] := BYTE(Id); % Enhetens Modbus adress
DATA[1] := HEX(03); % Modbus kommando för att läsa register kod 03
DATA[2] := RWORD(12); % Start address
DATA[4] := RWORD(88); % Antal register att läsa
ANSWER SIZE 181 % (Antal register * 2) + 5
DATA[0] = BYTE(Id);
DATA[1] = BYTE(03);
DATA[2] = BYTE(176); % Antal Bytes
DATA[3] -> RWORD(V1 := DATA;);
DATA[5] -> RWORD(V2 := DATA;);
DATA[7] -> RWORD(V3 := DATA;);
DATA[9] -> RWORD(IF (DATA>=32768) THEN V4:=(DATA-65536)/10; ELSE V4:=DATA/10; ENDIF;);
DATA[13] -> RWORD(V5 := DATA/10;);
DATA[15] -> RWORD(V6 := DATA/10;);
DATA[17] -> RWORD(V7 := DATA/10;);
DATA[29] -> RWORD(V8 := DATA;);
DATA[31] -> RWORD(V9 := DATA;);
DATA[33] -> RWORD(V10 := DATA;);
DATA[35] -> RWORD(V11 := DATA;);
DATA[37] -> RWORD(V12 := DATA;);
DATA[39] -> RWORD(IF (DATA>=32768) THEN V13:=(DATA-65536)/100; ELSE V13:=DATA/100; ENDIF;);
DATA[43] -> RWORD(IF (DATA>=32768) THEN V14:=(DATA-65536)/100; ELSE V14:=DATA/100; ENDIF;);
DATA[47] -> RWORD(IF (DATA>=32768) THEN V15:=(DATA-65536)/100; ELSE V15:=DATA/100; ENDIF;);
DATA[51] -> RWORD(V16 := DATA;);
DATA[53] -> RWORD(V17 := DATA;);
DATA[55] -> RWORD(V18 := DATA;);
DATA[57] -> RWORD(V19 := DATA;);
DATA[59] -> RWORD(V20 := DATA;);
DATA[61] -> RWORD(V21 := DATA;);
DATA[63] -> RWORD(V22 := DATA;);
DATA[65] -> RWORD(V23 := DATA;);
DATA[69] -> RWORD(V24 := DATA;);
DATA[71] -> RWORD(V25 := DATA;);
DATA[73] -> RWORD(V26 := DATA;);
DATA[75] -> RWORD(V27 := DATA;);
DATA[77] -> RWORD(V28 := DATA;);
DATA[79] -> RWORD(IF (DATA>=32768) THEN V29:=(DATA-65536)/10; ELSE V29:=DATA/10; ENDIF;);
DATA[83] -> RWORD(IF (DATA>=32768) THEN V30:=(DATA-65536)/100; ELSE V30:=DATA/100; ENDIF;);
DATA[87] -> RWORD(IF (DATA>=32768) THEN V31:=(DATA-65536)/100; ELSE V31:=DATA/100; ENDIF;);
DATA[91] -> RWORD(IF (DATA>=32768) THEN V32:=(DATA-65536)/100; ELSE V32:=DATA/100; ENDIF;);
DATA[95] -> RWORD(V33 := DATA;);
DATA[113] -> RWORD(V34 := DATA;);
DATA[115] -> RWORD(V35 := DATA;);
DATA[117] -> RWORD(V36 := DATA;);
DATA[119] -> RWORD(V37 := DATA;);
DATA[121] -> RWORD(V38 := DATA;);
DATA[123] -> RWORD(V39 := DATA;);
DATA[125] -> RWORD(V40 := DATA;);
DATA[127] -> RWORD(V41 := DATA;);
DATA[129] -> RWORD(V42 := DATA;);
DATA[131] -> RWORD(V43 := DATA;);
DATA[133] -> RWORD(V44 := DATA;);
DATA[135] -> RWORD(V45 := DATA;);
DATA[137] -> RWORD(V46 := DATA;);
DATA[139] -> RWORD(V47 := DATA;);
DATA[141] -> RWORD(IF (DATA>=32768) THEN V48:=(DATA-65536)/100; ELSE V48:=DATA/100; ENDIF;);
DATA[145] -> RWORD(IF (DATA>=32768) THEN V49:=(DATA-65536)/100; ELSE V49:=DATA/100; ENDIF;);
DATA[149] -> RWORD(V50 := DATA/100;);
DATA[153] -> RWORD(V51 := DATA/100;);
DATA[157] -> RWORD(V52 := DATA/100;);
DATA[161] -> RWORD(V53 := DATA/100;);
DATA[165] -> RWORD(V54 := DATA/100;);
DATA[169] -> RWORD(V55 := DATA/100;);
DATA[173] -> RWORD(V56 := DATA/100;);
DATA[177] -> RWORD(IF (DATA>=32768) THEN V57:=(DATA-65536)/10; ELSE V57:=DATA/10; ENDIF;);
TIMEOUT 300
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.