Ventronic FTX
Detaljer
- Typ
- Drivrutin
- Upplaggd av
- Ove Jansson, Abelko Innovation
- Version
- 10
- Uppdaterad
- 2015-03-27
- Skapad
- 2014-09-26
- Kategori
- Modbus, Ventilation
- Visningar
- 2656
Beskrivning
Summalarm, Aktuella värden, drift status och sättning av börvärde till Ventronic FTX aggregat med EXO styrning
Bruksanvisning
Kommunikationen är inställd på 9600-8-N-1.
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 XFTX NAMED "XVentronic FTX" TYPEID 21468 IS
PARAMETER
Id :"Adress";
PUBLIC
Larm :"Summa larm";
V18 :"Temp tilluft" ["°C"];
V19 :"Temp efter VVX" ["°C"];
V20 :"Temp frånluft" ["°C"];
V21 :"Temp avluft" ["°C"];
V22 :"Temp frysskydd" ["°C"];
V23 :"Tryck tilluft" ["Pa"];
V24 :"Styr tilluft" [""];
V25 :"Tryck frånluft" ["Pa"];
V26 :"Temp ute" ["°C"];
V27 :"Styr frånluft" [""];
V28 :"Styr Värmevent" [""];
V29 :"Styr VVX" [""];
V30 :"Styr kompenser" [""];
V31 :"Driftläge" [""]; %0=stop, 1=starting, 2=starting fan, 3=running, 4=night cooling, 5= night heating, 6=defrosting, 7=fan stop, 8=manual 1/2 speed, 9=manual 1/1 speed, 10= recirculation
V32 :"Verkgrad VVX" [""];
Frys :"Larm frysskydd" [""]INT;
Rok :"Larm rök" [""]INT;
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM ReadAlarm NAMED "Läs larm" IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(04); % "04h" Läs input registers
DATA[2] := RWORD(1); % Start address register
DATA[4] := RWORD(18); % Number of registers
ANSWER SIZE 41
DATA[0] = BYTE(Id);
DATA[1] = HEX(04);
DATA[3] -> RWORD(Larm := 0; Frys := 0; Rok := 0; IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[5] -> RWORD(IF (DATA=7) THEN Larm := 1; Frys := 1; ENDIF;);
DATA[7] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[9] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[11] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[13] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[15] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[17] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[19] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[21] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[23] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[25] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[27] -> RWORD(IF (DATA=7) THEN Larm := 1; Rok := 1;ENDIF;);
DATA[29] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[31] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[33] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[35] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[37] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
TIMEOUT 2000
END;
TELEGRAM ReadInput NAMED "Läs input reg" IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(04); % "04h" Läs input registers
DATA[2] := RWORD(17); % Start address register
DATA[4] := RWORD(10); % 16 Number of registers
ANSWER SIZE 25
DATA[0] = BYTE(Id);
DATA[1] = HEX(04);
DATA[3] -> RWORD(IF (DATA>=32768) THEN V18:=(DATA-65536)/10; ELSE V18:=DATA/10; ENDIF;);
DATA[5] -> RWORD(IF (DATA>=32768) THEN V19:=(DATA-65536)/10; ELSE V19:=DATA/10; ENDIF;);
DATA[7] -> RWORD(IF (DATA>=32768) THEN V20:=(DATA-65536)/10; ELSE V20:=DATA/10; ENDIF;);
DATA[9] -> RWORD(IF (DATA>=32768) THEN V21:=(DATA-65536)/10; ELSE V21:=DATA/10; ENDIF;);
DATA[11] -> RWORD(IF (DATA>=32768) THEN V22:=(DATA-65536)/10; ELSE V22:=DATA/10; ENDIF;);
DATA[13] -> RWORD(V23:=DATA/10;);
DATA[15] -> RWORD(V24:=DATA/10;);
DATA[17] -> RWORD(V25:=DATA/10;);
DATA[19] -> RWORD(IF (DATA>=32768) THEN V26:=(DATA-65536)/10; ELSE V26:=DATA/10; ENDIF;);
DATA[21] -> RWORD(V27:=DATA/10;);
TIMEOUT 2000
END;
TELEGRAM ReadInput2 NAMED "Läs input reg2" IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(04); % "04h" Läs input registers
DATA[2] := RWORD(27); % Start address register
DATA[4] := RWORD(5); % 16 Number of registers
ANSWER SIZE 15
DATA[0] = BYTE(Id);
DATA[1] = HEX(04);
DATA[3] -> RWORD(V28:=DATA/10;);
DATA[5] -> RWORD(V29:=DATA/10;);
DATA[7] -> RWORD(V30:=DATA/10;);
DATA[9] -> RWORD(V31:=DATA;);
DATA[11] -> RWORD(V32:=DATA/10;);
TIMEOUT 2000
END;
END;
DEVICETYPE XFTX2 NAMED "XVentronicFTXBV" TYPEID 21469 IS
PARAMETER
Id :"Adress";
H22w :"Skriv tempbv" ["°C"];
PUBLIC
H18 :"BV TF" ["Pa"]INT;
H19 :"BV FF" ["Pa"]INT;
H22 :"Tempkbv till" ["°C"]DEC1;
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM ReadSP NAMED "Läs BV" IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(03); % "03h" Läs holding registers
DATA[2] := RWORD(18); % Start address register
DATA[4] := RWORD(5); % Number of registers
ANSWER SIZE 15
DATA[0] = BYTE(Id);
DATA[1] = HEX(03);
DATA[3] -> RWORD(H18:=DATA;);
DATA[5] -> RWORD(H19:=DATA;);
DATA[11] -> RWORD(IF (DATA>=32768) THEN H22:=(DATA-65536)/10; ELSE H22:=DATA/10; ENDIF;);
TIMEOUT 2000
END;
TELEGRAM WriteSP NAMED "Skriv BV" IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(06); % "06h" skriv holding register
DATA[2] := RWORD(22); % Start address register
DATA[4] <- RWORD( DATA := ROUND(H22w*10););
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = BYTE(6);
TIMEOUT 2000
END;
END;
PARAMETER
Id :"Adress";
PUBLIC
Larm :"Summa larm";
V18 :"Temp tilluft" ["°C"];
V19 :"Temp efter VVX" ["°C"];
V20 :"Temp frånluft" ["°C"];
V21 :"Temp avluft" ["°C"];
V22 :"Temp frysskydd" ["°C"];
V23 :"Tryck tilluft" ["Pa"];
V24 :"Styr tilluft" [""];
V25 :"Tryck frånluft" ["Pa"];
V26 :"Temp ute" ["°C"];
V27 :"Styr frånluft" [""];
V28 :"Styr Värmevent" [""];
V29 :"Styr VVX" [""];
V30 :"Styr kompenser" [""];
V31 :"Driftläge" [""]; %0=stop, 1=starting, 2=starting fan, 3=running, 4=night cooling, 5= night heating, 6=defrosting, 7=fan stop, 8=manual 1/2 speed, 9=manual 1/1 speed, 10= recirculation
V32 :"Verkgrad VVX" [""];
Frys :"Larm frysskydd" [""]INT;
Rok :"Larm rök" [""]INT;
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM ReadAlarm NAMED "Läs larm" IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(04); % "04h" Läs input registers
DATA[2] := RWORD(1); % Start address register
DATA[4] := RWORD(18); % Number of registers
ANSWER SIZE 41
DATA[0] = BYTE(Id);
DATA[1] = HEX(04);
DATA[3] -> RWORD(Larm := 0; Frys := 0; Rok := 0; IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[5] -> RWORD(IF (DATA=7) THEN Larm := 1; Frys := 1; ENDIF;);
DATA[7] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[9] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[11] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[13] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[15] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[17] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[19] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[21] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[23] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[25] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[27] -> RWORD(IF (DATA=7) THEN Larm := 1; Rok := 1;ENDIF;);
DATA[29] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[31] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[33] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[35] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
DATA[37] -> RWORD(IF (DATA=7) THEN Larm := 1; ENDIF;);
TIMEOUT 2000
END;
TELEGRAM ReadInput NAMED "Läs input reg" IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(04); % "04h" Läs input registers
DATA[2] := RWORD(17); % Start address register
DATA[4] := RWORD(10); % 16 Number of registers
ANSWER SIZE 25
DATA[0] = BYTE(Id);
DATA[1] = HEX(04);
DATA[3] -> RWORD(IF (DATA>=32768) THEN V18:=(DATA-65536)/10; ELSE V18:=DATA/10; ENDIF;);
DATA[5] -> RWORD(IF (DATA>=32768) THEN V19:=(DATA-65536)/10; ELSE V19:=DATA/10; ENDIF;);
DATA[7] -> RWORD(IF (DATA>=32768) THEN V20:=(DATA-65536)/10; ELSE V20:=DATA/10; ENDIF;);
DATA[9] -> RWORD(IF (DATA>=32768) THEN V21:=(DATA-65536)/10; ELSE V21:=DATA/10; ENDIF;);
DATA[11] -> RWORD(IF (DATA>=32768) THEN V22:=(DATA-65536)/10; ELSE V22:=DATA/10; ENDIF;);
DATA[13] -> RWORD(V23:=DATA/10;);
DATA[15] -> RWORD(V24:=DATA/10;);
DATA[17] -> RWORD(V25:=DATA/10;);
DATA[19] -> RWORD(IF (DATA>=32768) THEN V26:=(DATA-65536)/10; ELSE V26:=DATA/10; ENDIF;);
DATA[21] -> RWORD(V27:=DATA/10;);
TIMEOUT 2000
END;
TELEGRAM ReadInput2 NAMED "Läs input reg2" IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(04); % "04h" Läs input registers
DATA[2] := RWORD(27); % Start address register
DATA[4] := RWORD(5); % 16 Number of registers
ANSWER SIZE 15
DATA[0] = BYTE(Id);
DATA[1] = HEX(04);
DATA[3] -> RWORD(V28:=DATA/10;);
DATA[5] -> RWORD(V29:=DATA/10;);
DATA[7] -> RWORD(V30:=DATA/10;);
DATA[9] -> RWORD(V31:=DATA;);
DATA[11] -> RWORD(V32:=DATA/10;);
TIMEOUT 2000
END;
END;
DEVICETYPE XFTX2 NAMED "XVentronicFTXBV" TYPEID 21469 IS
PARAMETER
Id :"Adress";
H22w :"Skriv tempbv" ["°C"];
PUBLIC
H18 :"BV TF" ["Pa"]INT;
H19 :"BV FF" ["Pa"]INT;
H22 :"Tempkbv till" ["°C"]DEC1;
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM ReadSP NAMED "Läs BV" IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(03); % "03h" Läs holding registers
DATA[2] := RWORD(18); % Start address register
DATA[4] := RWORD(5); % Number of registers
ANSWER SIZE 15
DATA[0] = BYTE(Id);
DATA[1] = HEX(03);
DATA[3] -> RWORD(H18:=DATA;);
DATA[5] -> RWORD(H19:=DATA;);
DATA[11] -> RWORD(IF (DATA>=32768) THEN H22:=(DATA-65536)/10; ELSE H22:=DATA/10; ENDIF;);
TIMEOUT 2000
END;
TELEGRAM WriteSP NAMED "Skriv BV" IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(06); % "06h" skriv holding register
DATA[2] := RWORD(22); % Start address register
DATA[4] <- RWORD( DATA := ROUND(H22w*10););
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = BYTE(6);
TIMEOUT 2000
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.