Lufft Ventus Vindmätare V200
Detaljer
Beskrivning
Beställs med uppgifterna:
Modbus, RTU
8N1
19200 baudrate
ID # (modbus adress)
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for LUFFT Ventus
%
% Settings module:
% Parity: None
% Bits: 8+1
% Baud: 19600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: Ove Jansson, ABELKO AB Luleå
% Original: 2014-09-02
%
DEVICETYPE Ventus NAMED "Ventus" TYPEID 21467 IS
PARAMETER
Id : "Address";
PUBLIC
R10 : "Air Pressure act." ["hPa"] ; % Factor 10, s
R11 : "Air Pressure min." ["hPa"] ; % Factor 10, s
R12 : "Air Pressure max." ["hPa"] ; % Factor 10, s
R13 : "Air Pressure avg." ["hPa"] ; % Factor 10, s
R14 : "Wind Direction act." ["°"] ; % Factor 10, s
R15 : "Wind Direction min." ["°"] ; % Factor 10, s
R16 : "Wind Direction max." ["°"] ; % Factor 10, s
R17 : "Wind Direction avg." ["°"] ; % Factor 10, s
R18 : "Wind Meas. Quality" ["%"] ; % Factor 1, s
R19 : "Air Temperature act." ["°C"] ; % Factor 10, s
R20 : "Air Temperature min." ["°C"] ; % Factor 10, s
R21 : "Air Temperature max." ["°C"] ; % Factor 10, s
R22 : "Air Temperature avg." ["°C"] ; % Factor 10, s
R23 : "Heating Temp Top" ["°C"] ; % Factor 10, s
R24 : "Heating Temp Bottom" ["°C"] ; % Factor 10, s
R25 : "Wind Speed act" ["m/s"] ; % Factor 10, s
R26 : "Wind Speed min" ["m/s"] ; % Factor 10, s
R27 : "Wind Speed max" ["m/s"] ; % Factor 10, s
R28 : "Wind Speed avg" ["m/s"] ; % Factor 10, s
R29 : "Wind Speed vct" ["m/s"] ; % Factor 10, s
PRIVATE
BAUDRATE 19200;
CHECKSUM MODBUS SWAPPED;
TELEGRAM read NAMED "Register 10-22" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(04); % Modbus command "04h" Read registers
DATA[2] := RWORD(10); % Start address register
DATA[4] := RWORD(20); % Number of registers
ANSWER SIZE 45
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
DATA[2] = BYTE(40); % Byte count
DATA[3] -> RWORD(R10:=DATA/10;); %Factor 10, s
DATA[5] -> RWORD(R11:=DATA/10;); %Factor 10, s
DATA[7] -> RWORD(R12:=DATA/10;); %Factor 10, s
DATA[9] -> RWORD(R13:=DATA/10;); %Factor 10, s
DATA[11] -> RWORD(R14:=DATA/10;); %Factor 10, s
DATA[13] -> RWORD(R15:=DATA/10;); %Factor 10, s
DATA[15] -> RWORD(R16:=DATA/10;); %Factor 10, s
DATA[17] -> RWORD(R17:=DATA/10;); %Factor 10, s
DATA[19] -> RWORD(R18:=DATA;); %Factor 1, s
DATA[21] -> RWORD(IF (DATA>=32768) THEN R19:=(DATA-65536)/10; ELSE R19:=DATA/10; ENDIF;); %Factor 10, s
DATA[23] -> RWORD(IF (DATA>=32768) THEN R20:=(DATA-65536)/10; ELSE R20:=DATA/10; ENDIF;); %Factor 10, s
DATA[25] -> RWORD(IF (DATA>=32768) THEN R21:=(DATA-65536)/10; ELSE R21:=DATA/10; ENDIF;); %Factor 10, s
DATA[27] -> RWORD(IF (DATA>=32768) THEN R22:=(DATA-65536)/10; ELSE R22:=DATA/10; ENDIF;); %Factor 10, s
DATA[29] -> RWORD(IF (DATA>=32768) THEN R23:=(DATA-65536)/10; ELSE R23:=DATA/10; ENDIF;); %Factor 10, s
DATA[31] -> RWORD(IF (DATA>=32768) THEN R24:=(DATA-65536)/10; ELSE R24:=DATA/10; ENDIF;); %Factor 10, s
DATA[33] -> RWORD(R25:=DATA/10;); %Factor 10, s
DATA[35] -> RWORD(R26:=DATA/10;); %Factor 10, s
DATA[37] -> RWORD(R27:=DATA/10;); %Factor 10, s
DATA[39] -> RWORD(R28:=DATA/10;); %Factor 10, s
DATA[41] -> RWORD(R29:=DATA/10;); %Factor 10, s
TIMEOUT 1000
END;
END;
% Device definition for LUFFT Ventus
%
% Settings module:
% Parity: None
% Bits: 8+1
% Baud: 19600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: Ove Jansson, ABELKO AB Luleå
% Original: 2014-09-02
%
DEVICETYPE Ventus NAMED "Ventus" TYPEID 21467 IS
PARAMETER
Id : "Address";
PUBLIC
R10 : "Air Pressure act." ["hPa"] ; % Factor 10, s
R11 : "Air Pressure min." ["hPa"] ; % Factor 10, s
R12 : "Air Pressure max." ["hPa"] ; % Factor 10, s
R13 : "Air Pressure avg." ["hPa"] ; % Factor 10, s
R14 : "Wind Direction act." ["°"] ; % Factor 10, s
R15 : "Wind Direction min." ["°"] ; % Factor 10, s
R16 : "Wind Direction max." ["°"] ; % Factor 10, s
R17 : "Wind Direction avg." ["°"] ; % Factor 10, s
R18 : "Wind Meas. Quality" ["%"] ; % Factor 1, s
R19 : "Air Temperature act." ["°C"] ; % Factor 10, s
R20 : "Air Temperature min." ["°C"] ; % Factor 10, s
R21 : "Air Temperature max." ["°C"] ; % Factor 10, s
R22 : "Air Temperature avg." ["°C"] ; % Factor 10, s
R23 : "Heating Temp Top" ["°C"] ; % Factor 10, s
R24 : "Heating Temp Bottom" ["°C"] ; % Factor 10, s
R25 : "Wind Speed act" ["m/s"] ; % Factor 10, s
R26 : "Wind Speed min" ["m/s"] ; % Factor 10, s
R27 : "Wind Speed max" ["m/s"] ; % Factor 10, s
R28 : "Wind Speed avg" ["m/s"] ; % Factor 10, s
R29 : "Wind Speed vct" ["m/s"] ; % Factor 10, s
PRIVATE
BAUDRATE 19200;
CHECKSUM MODBUS SWAPPED;
TELEGRAM read NAMED "Register 10-22" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(04); % Modbus command "04h" Read registers
DATA[2] := RWORD(10); % Start address register
DATA[4] := RWORD(20); % Number of registers
ANSWER SIZE 45
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
DATA[2] = BYTE(40); % Byte count
DATA[3] -> RWORD(R10:=DATA/10;); %Factor 10, s
DATA[5] -> RWORD(R11:=DATA/10;); %Factor 10, s
DATA[7] -> RWORD(R12:=DATA/10;); %Factor 10, s
DATA[9] -> RWORD(R13:=DATA/10;); %Factor 10, s
DATA[11] -> RWORD(R14:=DATA/10;); %Factor 10, s
DATA[13] -> RWORD(R15:=DATA/10;); %Factor 10, s
DATA[15] -> RWORD(R16:=DATA/10;); %Factor 10, s
DATA[17] -> RWORD(R17:=DATA/10;); %Factor 10, s
DATA[19] -> RWORD(R18:=DATA;); %Factor 1, s
DATA[21] -> RWORD(IF (DATA>=32768) THEN R19:=(DATA-65536)/10; ELSE R19:=DATA/10; ENDIF;); %Factor 10, s
DATA[23] -> RWORD(IF (DATA>=32768) THEN R20:=(DATA-65536)/10; ELSE R20:=DATA/10; ENDIF;); %Factor 10, s
DATA[25] -> RWORD(IF (DATA>=32768) THEN R21:=(DATA-65536)/10; ELSE R21:=DATA/10; ENDIF;); %Factor 10, s
DATA[27] -> RWORD(IF (DATA>=32768) THEN R22:=(DATA-65536)/10; ELSE R22:=DATA/10; ENDIF;); %Factor 10, s
DATA[29] -> RWORD(IF (DATA>=32768) THEN R23:=(DATA-65536)/10; ELSE R23:=DATA/10; ENDIF;); %Factor 10, s
DATA[31] -> RWORD(IF (DATA>=32768) THEN R24:=(DATA-65536)/10; ELSE R24:=DATA/10; ENDIF;); %Factor 10, s
DATA[33] -> RWORD(R25:=DATA/10;); %Factor 10, s
DATA[35] -> RWORD(R26:=DATA/10;); %Factor 10, s
DATA[37] -> RWORD(R27:=DATA/10;); %Factor 10, s
DATA[39] -> RWORD(R28:=DATA/10;); %Factor 10, s
DATA[41] -> RWORD(R29:=DATA/10;); %Factor 10, s
TIMEOUT 1000
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.