IV AHU skriv Börväden plus del 1
Detaljer
- Typ
- Drivrutin
- Upplaggd av
- Ove Jansson, Abelko Innovation
- Version
- 2
- Uppdaterad
- 2018-11-21
- Skapad
- 2015-04-22
- Kategori
- Modbus, Ventilation
- Visningar
- 2055
Beskrivning
Observera att detta är för kommunikation med den enklare standardstyrningen på IV aggregaten. Du kan också beställa aggregat från IV för styrning direkt från IMSE WMPro eller IMSE Ultra.
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 AHUwSPplus NAMED "AHUwSPplus" TYPEID 16465 IS
PARAMETER
Id : "Adress";
V1 : "BMSCtrl" [""]; % 0=Auto, 1=Off, 2=Stage 1, 3=Stage 2, 4=Stage 3
V2 : "ComfTempSP" ["°C"]DEC1;
V3 : "ComfDeadzone" ["°C"]DEC1;
V4 : "ComfHeatSP" ["°C"]DEC1;
V5 : "ComfCoolSP" ["°C"]DEC1;
V6 : "SumWintChSP" ["°C"]DEC1; % Summer/winter changeover supply temp compensation
V7 : "SupTempMin" ["°C"]DEC1;
V8 : "SupTempMax" ["°C"]DEC1;
V9 : "SupFanStep1SP" [""]; % %, Pa or l/s depending on configuration
V10 : "SupFanStep2SP" [""];
V11 : "SupFanStep3SP" [""];
V12 : "SupFanMax" [""];
V13 : "ExhFanStep1SP" [""];
V14 : "ExhFanStep2SP" [""];
V15 : "ExhFanStep3SP" [""];
V16 : "ExhFanMax" [""];
V17 : "OutsideTemp" ["°C"]DEC1;
V18 : "RoomTemp" ["°C"]DEC1;
V19 : "NightCoolMinTemp" ["°C"]DEC1;
V20 : "NightCoolOnDelta" ["°C"]DEC1;
PUBLIC
PRIVATE
count6;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM WriteRegister NAMED "Write Register" IS
QUESTION
DATA[0] := BYTE(Id); % Enhetens Modbus adress
DATA[1] := HEX(06); % Modbus kommando för att skriva ett register
DATA[2] <- RWORD(
IF(count6>19) THEN count6 := 0; ENDIF;
IF (count6=0) THEN DATA := 4;
ELSIF (count6=1) THEN DATA := 19;
ELSIF (count6=2) THEN DATA := 20;
ELSIF (count6=3) THEN DATA := 21;
ELSIF (count6=4) THEN DATA := 22;
ELSIF (count6=5) THEN DATA := 31;
ELSIF (count6=6) THEN DATA := 35;
ELSIF (count6=7) THEN DATA := 36;
ELSIF (count6=8) THEN DATA := 49;
ELSIF (count6=9) THEN DATA := 50;
ELSIF (count6=10) THEN DATA := 51;
ELSIF (count6=11) THEN DATA := 52;
ELSIF (count6=12) THEN DATA := 53;
ELSIF (count6=13) THEN DATA := 54;
ELSIF (count6=14) THEN DATA := 55;
ELSIF (count6=15) THEN DATA := 56;
ELSIF (count6=16) THEN DATA := 59;
ELSIF (count6=17) THEN DATA := 61;
ELSIF (count6=18) THEN DATA := 69;
ELSIF (count6=19) THEN DATA := 70;
ENDIF;
); % Register adress
DATA[4] <- RWORD(
IF (count6=0) THEN DATA := V1;
ELSIF (count6=1) THEN IF (V2<0) THEN DATA := ROUND((V2*10)+65536); ELSE DATA := ROUND(V2*10); ENDIF;
ELSIF (count6=2) THEN IF (V3<0) THEN DATA := ROUND((V3*10)+65536); ELSE DATA := ROUND(V3*10); ENDIF;
ELSIF (count6=3) THEN IF (V4<0) THEN DATA := ROUND((V4*10)+65536); ELSE DATA := ROUND(V4*10); ENDIF;
ELSIF (count6=4) THEN IF (V5<0) THEN DATA := ROUND((V5*10)+65536); ELSE DATA := ROUND(V5*10); ENDIF;
ELSIF (count6=5) THEN IF (V6<0) THEN DATA := ROUND((V6*10)+65536); ELSE DATA := ROUND(V6*10); ENDIF;
ELSIF (count6=6) THEN IF (V7<0) THEN DATA := ROUND((V7*10)+65536); ELSE DATA := ROUND(V7*10); ENDIF;
ELSIF (count6=7) THEN IF (V8<0) THEN DATA := ROUND((V8*10)+65536); ELSE DATA := ROUND(V8*10); ENDIF;
ELSIF (count6=8) THEN DATA := V9;
ELSIF (count6=9) THEN DATA := V10;
ELSIF (count6=10) THEN DATA := V11;
ELSIF (count6=11) THEN DATA := V12;
ELSIF (count6=12) THEN DATA := V13;
ELSIF (count6=13) THEN DATA := V14;
ELSIF (count6=14) THEN DATA := V15;
ELSIF (count6=15) THEN DATA := V16;
ELSIF (count6=16) THEN IF (V17<0) THEN DATA := ROUND((V17*10)+65536); ELSE DATA := ROUND(V17*10); ENDIF;
ELSIF (count6=17) THEN IF (V18<0) THEN DATA := ROUND((V18*10)+65536); ELSE DATA := ROUND(V18*10); ENDIF;
ELSIF (count6=18) THEN IF (V19<0) THEN DATA := ROUND((V19*10)+65536); ELSE DATA := ROUND(V19*10); ENDIF;
ELSIF (count6=19) THEN IF (V20<0) THEN DATA := ROUND((V20*10)+65536); ELSE DATA := ROUND(V20*10); ENDIF;
ENDIF;
count6 := count6+1;
);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = BYTE(06);
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 AHUwSPplus NAMED "AHUwSPplus" TYPEID 16465 IS
PARAMETER
Id : "Adress";
V1 : "BMSCtrl" [""]; % 0=Auto, 1=Off, 2=Stage 1, 3=Stage 2, 4=Stage 3
V2 : "ComfTempSP" ["°C"]DEC1;
V3 : "ComfDeadzone" ["°C"]DEC1;
V4 : "ComfHeatSP" ["°C"]DEC1;
V5 : "ComfCoolSP" ["°C"]DEC1;
V6 : "SumWintChSP" ["°C"]DEC1; % Summer/winter changeover supply temp compensation
V7 : "SupTempMin" ["°C"]DEC1;
V8 : "SupTempMax" ["°C"]DEC1;
V9 : "SupFanStep1SP" [""]; % %, Pa or l/s depending on configuration
V10 : "SupFanStep2SP" [""];
V11 : "SupFanStep3SP" [""];
V12 : "SupFanMax" [""];
V13 : "ExhFanStep1SP" [""];
V14 : "ExhFanStep2SP" [""];
V15 : "ExhFanStep3SP" [""];
V16 : "ExhFanMax" [""];
V17 : "OutsideTemp" ["°C"]DEC1;
V18 : "RoomTemp" ["°C"]DEC1;
V19 : "NightCoolMinTemp" ["°C"]DEC1;
V20 : "NightCoolOnDelta" ["°C"]DEC1;
PUBLIC
PRIVATE
count6;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM WriteRegister NAMED "Write Register" IS
QUESTION
DATA[0] := BYTE(Id); % Enhetens Modbus adress
DATA[1] := HEX(06); % Modbus kommando för att skriva ett register
DATA[2] <- RWORD(
IF(count6>19) THEN count6 := 0; ENDIF;
IF (count6=0) THEN DATA := 4;
ELSIF (count6=1) THEN DATA := 19;
ELSIF (count6=2) THEN DATA := 20;
ELSIF (count6=3) THEN DATA := 21;
ELSIF (count6=4) THEN DATA := 22;
ELSIF (count6=5) THEN DATA := 31;
ELSIF (count6=6) THEN DATA := 35;
ELSIF (count6=7) THEN DATA := 36;
ELSIF (count6=8) THEN DATA := 49;
ELSIF (count6=9) THEN DATA := 50;
ELSIF (count6=10) THEN DATA := 51;
ELSIF (count6=11) THEN DATA := 52;
ELSIF (count6=12) THEN DATA := 53;
ELSIF (count6=13) THEN DATA := 54;
ELSIF (count6=14) THEN DATA := 55;
ELSIF (count6=15) THEN DATA := 56;
ELSIF (count6=16) THEN DATA := 59;
ELSIF (count6=17) THEN DATA := 61;
ELSIF (count6=18) THEN DATA := 69;
ELSIF (count6=19) THEN DATA := 70;
ENDIF;
); % Register adress
DATA[4] <- RWORD(
IF (count6=0) THEN DATA := V1;
ELSIF (count6=1) THEN IF (V2<0) THEN DATA := ROUND((V2*10)+65536); ELSE DATA := ROUND(V2*10); ENDIF;
ELSIF (count6=2) THEN IF (V3<0) THEN DATA := ROUND((V3*10)+65536); ELSE DATA := ROUND(V3*10); ENDIF;
ELSIF (count6=3) THEN IF (V4<0) THEN DATA := ROUND((V4*10)+65536); ELSE DATA := ROUND(V4*10); ENDIF;
ELSIF (count6=4) THEN IF (V5<0) THEN DATA := ROUND((V5*10)+65536); ELSE DATA := ROUND(V5*10); ENDIF;
ELSIF (count6=5) THEN IF (V6<0) THEN DATA := ROUND((V6*10)+65536); ELSE DATA := ROUND(V6*10); ENDIF;
ELSIF (count6=6) THEN IF (V7<0) THEN DATA := ROUND((V7*10)+65536); ELSE DATA := ROUND(V7*10); ENDIF;
ELSIF (count6=7) THEN IF (V8<0) THEN DATA := ROUND((V8*10)+65536); ELSE DATA := ROUND(V8*10); ENDIF;
ELSIF (count6=8) THEN DATA := V9;
ELSIF (count6=9) THEN DATA := V10;
ELSIF (count6=10) THEN DATA := V11;
ELSIF (count6=11) THEN DATA := V12;
ELSIF (count6=12) THEN DATA := V13;
ELSIF (count6=13) THEN DATA := V14;
ELSIF (count6=14) THEN DATA := V15;
ELSIF (count6=15) THEN DATA := V16;
ELSIF (count6=16) THEN IF (V17<0) THEN DATA := ROUND((V17*10)+65536); ELSE DATA := ROUND(V17*10); ENDIF;
ELSIF (count6=17) THEN IF (V18<0) THEN DATA := ROUND((V18*10)+65536); ELSE DATA := ROUND(V18*10); ENDIF;
ELSIF (count6=18) THEN IF (V19<0) THEN DATA := ROUND((V19*10)+65536); ELSE DATA := ROUND(V19*10); ENDIF;
ELSIF (count6=19) THEN IF (V20<0) THEN DATA := ROUND((V20*10)+65536); ELSE DATA := ROUND(V20*10); ENDIF;
ENDIF;
count6 := count6+1;
);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = BYTE(06);
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.