SenseAirHolding
Detaljer
- Typ
- Drivrutin
- Upplaggd av
- Ove Jansson, Abelko Innovation
- Version
- 1
- Uppdaterad
- 2016-05-23
- Skapad
- 2016-05-23
- Kategori
- Modbus, Ventilation
- Visningar
- 2401
Beskrivning
.
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 SenseAirHolding NAMED "SenseAirHolding" TYPEID 11124 IS
PARAMETER
Id : "Adress";
PUBLIC
V1 : "CO2 Calibration status" [""]; % bit1= bg calibration performed, bit2=zero calibration performed
V2 : "CO2 calibration" [""]; %31750=background calibration, 31751=zero calibration
V3 : "CO2 value override" [""]; %32767=no override
V4 : "Temperaure override" [""]; %32767=no override
V5 : "RH override" [""]; %32767=no override
V6 : "Out 1 min value" ["V"];
V7 : "Out 2 min value" ["V"];
V8 : "Out 3 min value" ["V"];
V9 : "Out 4 min value" ["V"];
V10 : "Out 1 max value" ["V"];
V11 : "Out 2 max value" ["V"];
V12 : "Out 3 max value" ["V"];
V13 : "Out 4 max value" ["V"];
V14 : "Out 1 override" ["V"];
V15 : "Out 2 override" ["V"];
V16 : "Out 3 override" ["V"];
V17 : "Out 4 override" ["V"];
V18 : "RH offset" ["%RH"]DEC2;
V19 : "Temperature offset" ["°C"]DEC2;
V20 : "ABC period" ["h"]DEC2;
V21 : "Out1 RDB" ["ppm"]DEC2;
V22 : "Out2 RDB" ["ppm"]DEC2;
V23 : "Out3 RDB" ["ppm"]DEC2;
V24 : "Out4 RDB" ["ppm"]DEC2;
V25 : "Out1 sec RDB" ["ppm"]DEC2;
V26 : "Out2 sec RDB" ["ppm"]DEC2;
V27 : "Out3 sec RDB" ["ppm"]DEC2;
V28 : "Out4 sec RDB" ["ppm"]DEC2;
V29 : "Out1 PRC" ["ppm"]DEC2;
V30 : "Out2 PRC" ["ppm"]DEC2;
V31 : "Out3 PRC" ["ppm"]DEC2;
V32 : "Out4 PRC" ["ppm"]DEC2;
V33 : "Out1 sec PRC" ["ppm"]DEC2;
V34 : "Out2 sec PRC" ["ppm"]DEC2;
V35 : "Out3 sec PRC" ["ppm"]DEC2;
V36 : "Out4 sec PRC" ["ppm"]DEC2;
V37 : "Out1 OOS override" ["V"]DEC2;
V38 : "Out2 OOS override" ["V"]DEC2;
V39 : "Out3 OOS override" ["V"]DEC2;
V40 : "Out4 OOS override" ["V"]DEC2;
V41 : "Out1 Error demand" ["V"]DEC2;
V42 : "Out2 Error demand" ["V"]DEC2;
V43 : "Out3 Error demand" ["V"]DEC2;
V44 : "Out4 Error demand" [""]DEC2;
PRIVATE
BAUDRATE 19200;
PARITY EVEN;
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(0); % Start address
DATA[4] := RWORD(56); % Antal register att läsa
ANSWER SIZE 117 % (Antal register * 2) + 5
DATA[0] = BYTE(Id);
DATA[1] = BYTE(03);
DATA[2] = BYTE(112); % Antal Bytes
DATA[3] -> RWORD(V1 := DATA;);
DATA[5] -> RWORD(V2 := DATA;);
DATA[9] -> RWORD(V3 := DATA;);
DATA[11] -> RWORD(V4 := DATA;);
DATA[13] -> RWORD(V5 := DATA;);
DATA[29] -> RWORD(V6 := DATA/16383*10;);
DATA[31] -> RWORD(V7 := DATA/16383*10;);
DATA[33] -> RWORD(V8 := DATA/16383*10;);
DATA[35] -> RWORD(V9 := DATA/16383*10;);
DATA[37] -> RWORD(V10 := DATA/16383*10;);
DATA[39] -> RWORD(V11 := DATA/16383*10;);
DATA[41] -> RWORD(V12 := DATA/16383*10;);
DATA[43] -> RWORD(V13 := DATA/16383*10;);
DATA[45] -> RWORD(V14 := DATA;);
DATA[47] -> RWORD(V15 := DATA;);
DATA[49] -> RWORD(V16 := DATA;);
DATA[51] -> RWORD(V17 := DATA;);
DATA[61] -> RWORD(V18 := DATA/100;);
DATA[63] -> RWORD(V19 := DATA/100;);
DATA[65] -> RWORD(V20 := DATA;);
DATA[67] -> RWORD(V21 := DATA;);
DATA[69] -> RWORD(V22 := DATA;);
DATA[71] -> RWORD(V23 := DATA;);
DATA[73] -> RWORD(V24 := DATA;);
DATA[75] -> RWORD(V25 := DATA;);
DATA[77] -> RWORD(V26 := DATA;);
DATA[79] -> RWORD(V27 := DATA;);
DATA[81] -> RWORD(V28 := DATA;);
DATA[83] -> RWORD(V29 := DATA;);
DATA[85] -> RWORD(V30 := DATA;);
DATA[87] -> RWORD(V31 := DATA;);
DATA[89] -> RWORD(V32 := DATA;);
DATA[91] -> RWORD(V33 := DATA;);
DATA[93] -> RWORD(V34 := DATA;);
DATA[95] -> RWORD(V35 := DATA;);
DATA[97] -> RWORD(V36 := DATA;);
DATA[99] -> RWORD(V37 := DATA/16383*10;);
DATA[101] -> RWORD(V38 := DATA/16383*10;);
DATA[103] -> RWORD(V39 := DATA/16383*10;);
DATA[105] -> RWORD(V40 := DATA/16383*10;);
DATA[107] -> RWORD(V41 := DATA/16383*10;);
DATA[109] -> RWORD(V42 := DATA/16383*10;);
DATA[111] -> RWORD(V43 := DATA/16383*10;);
DATA[113] -> RWORD(IF DATA=16383 THEN V44:=1; ELSE V44:=0;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 SenseAirHolding NAMED "SenseAirHolding" TYPEID 11124 IS
PARAMETER
Id : "Adress";
PUBLIC
V1 : "CO2 Calibration status" [""]; % bit1= bg calibration performed, bit2=zero calibration performed
V2 : "CO2 calibration" [""]; %31750=background calibration, 31751=zero calibration
V3 : "CO2 value override" [""]; %32767=no override
V4 : "Temperaure override" [""]; %32767=no override
V5 : "RH override" [""]; %32767=no override
V6 : "Out 1 min value" ["V"];
V7 : "Out 2 min value" ["V"];
V8 : "Out 3 min value" ["V"];
V9 : "Out 4 min value" ["V"];
V10 : "Out 1 max value" ["V"];
V11 : "Out 2 max value" ["V"];
V12 : "Out 3 max value" ["V"];
V13 : "Out 4 max value" ["V"];
V14 : "Out 1 override" ["V"];
V15 : "Out 2 override" ["V"];
V16 : "Out 3 override" ["V"];
V17 : "Out 4 override" ["V"];
V18 : "RH offset" ["%RH"]DEC2;
V19 : "Temperature offset" ["°C"]DEC2;
V20 : "ABC period" ["h"]DEC2;
V21 : "Out1 RDB" ["ppm"]DEC2;
V22 : "Out2 RDB" ["ppm"]DEC2;
V23 : "Out3 RDB" ["ppm"]DEC2;
V24 : "Out4 RDB" ["ppm"]DEC2;
V25 : "Out1 sec RDB" ["ppm"]DEC2;
V26 : "Out2 sec RDB" ["ppm"]DEC2;
V27 : "Out3 sec RDB" ["ppm"]DEC2;
V28 : "Out4 sec RDB" ["ppm"]DEC2;
V29 : "Out1 PRC" ["ppm"]DEC2;
V30 : "Out2 PRC" ["ppm"]DEC2;
V31 : "Out3 PRC" ["ppm"]DEC2;
V32 : "Out4 PRC" ["ppm"]DEC2;
V33 : "Out1 sec PRC" ["ppm"]DEC2;
V34 : "Out2 sec PRC" ["ppm"]DEC2;
V35 : "Out3 sec PRC" ["ppm"]DEC2;
V36 : "Out4 sec PRC" ["ppm"]DEC2;
V37 : "Out1 OOS override" ["V"]DEC2;
V38 : "Out2 OOS override" ["V"]DEC2;
V39 : "Out3 OOS override" ["V"]DEC2;
V40 : "Out4 OOS override" ["V"]DEC2;
V41 : "Out1 Error demand" ["V"]DEC2;
V42 : "Out2 Error demand" ["V"]DEC2;
V43 : "Out3 Error demand" ["V"]DEC2;
V44 : "Out4 Error demand" [""]DEC2;
PRIVATE
BAUDRATE 19200;
PARITY EVEN;
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(0); % Start address
DATA[4] := RWORD(56); % Antal register att läsa
ANSWER SIZE 117 % (Antal register * 2) + 5
DATA[0] = BYTE(Id);
DATA[1] = BYTE(03);
DATA[2] = BYTE(112); % Antal Bytes
DATA[3] -> RWORD(V1 := DATA;);
DATA[5] -> RWORD(V2 := DATA;);
DATA[9] -> RWORD(V3 := DATA;);
DATA[11] -> RWORD(V4 := DATA;);
DATA[13] -> RWORD(V5 := DATA;);
DATA[29] -> RWORD(V6 := DATA/16383*10;);
DATA[31] -> RWORD(V7 := DATA/16383*10;);
DATA[33] -> RWORD(V8 := DATA/16383*10;);
DATA[35] -> RWORD(V9 := DATA/16383*10;);
DATA[37] -> RWORD(V10 := DATA/16383*10;);
DATA[39] -> RWORD(V11 := DATA/16383*10;);
DATA[41] -> RWORD(V12 := DATA/16383*10;);
DATA[43] -> RWORD(V13 := DATA/16383*10;);
DATA[45] -> RWORD(V14 := DATA;);
DATA[47] -> RWORD(V15 := DATA;);
DATA[49] -> RWORD(V16 := DATA;);
DATA[51] -> RWORD(V17 := DATA;);
DATA[61] -> RWORD(V18 := DATA/100;);
DATA[63] -> RWORD(V19 := DATA/100;);
DATA[65] -> RWORD(V20 := DATA;);
DATA[67] -> RWORD(V21 := DATA;);
DATA[69] -> RWORD(V22 := DATA;);
DATA[71] -> RWORD(V23 := DATA;);
DATA[73] -> RWORD(V24 := DATA;);
DATA[75] -> RWORD(V25 := DATA;);
DATA[77] -> RWORD(V26 := DATA;);
DATA[79] -> RWORD(V27 := DATA;);
DATA[81] -> RWORD(V28 := DATA;);
DATA[83] -> RWORD(V29 := DATA;);
DATA[85] -> RWORD(V30 := DATA;);
DATA[87] -> RWORD(V31 := DATA;);
DATA[89] -> RWORD(V32 := DATA;);
DATA[91] -> RWORD(V33 := DATA;);
DATA[93] -> RWORD(V34 := DATA;);
DATA[95] -> RWORD(V35 := DATA;);
DATA[97] -> RWORD(V36 := DATA;);
DATA[99] -> RWORD(V37 := DATA/16383*10;);
DATA[101] -> RWORD(V38 := DATA/16383*10;);
DATA[103] -> RWORD(V39 := DATA/16383*10;);
DATA[105] -> RWORD(V40 := DATA/16383*10;);
DATA[107] -> RWORD(V41 := DATA/16383*10;);
DATA[109] -> RWORD(V42 := DATA/16383*10;);
DATA[111] -> RWORD(V43 := DATA/16383*10;);
DATA[113] -> RWORD(IF DATA=16383 THEN V44:=1; ELSE V44:=0;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.