Ouman EH-100 Regulator
Detaljer
- Typ
- Drivrutin
- Upplaggd av
- Ove Jansson, Abelko Innovation
- Version
- 2
- Uppdaterad
- 2013-08-28
- Skapad
- 2013-08-27
- Kategori
- Modbus, Övrig utrustning, Ventilation
- Visningar
- 2491
Beskrivning
Drivrutin baserad på MODBUS-100 v.1.30 svenska 20070124
Bruksanvisning
Hur man installerar typdefinitionerna och driftsätter modulerna finns beskrivet i användarmanualen, kapitel 18.7.
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 OUMAN read input registers 51-70
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanAnalog1 NAMED "Ouman Reg.51-70" TYPEID 21351 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
R51 : "Rumsfuktighet" ["%"] ; % Rumsfuktighet 0…100 [%]
R52 : "Tilluftstemp" ["°C"] ; % Tilluftstemperatur -30.00…100.00 [°C]
R53 : "Frånluftstemp" ["°C"] ; % Frånluftstemperatur -30.00…100.00 [°C]
R54 : "Returvattentemp" ["°C"] ; % Returvattentemp värmeslinga -30.00…100.00 [°C]
R55 : "Rumstemp 2" ["°C"] ; % Rumstemperatur 2 -30.00…100.00 [°C]
R56 : "Utetemp" ["°C"] ; % Utetemperatur -50.00…100.00 [°C]
R57 : "Tilluftstemp 2" ["°C"] ; % Tilluftstemperatur 2 -30.00…100.00 [°C]
R58 : "Rumstemp" ["°C"] ; % Rumstemperatur -30.00…100.00 [°C]
R59 : "VVX temp Frysv." ["°C"] ; % VVX Frysvakt -30.00…100.00 [°C]
R60 : "VVX temp Tillu." ["°C"] ; % Tilluftstemperatur efter VVX -30.00…100.00 [°C]
R61 : "Yttre BV-förskj" ["°C"] ; % Yttre börvärdesomställare -5.00…4.00 [°C]
R62 : "Fri temp" ["°C"] ; % Fri temperaturmätning -30.00…100.00 [°C]
R63 : "Tilluftstryck" ["Pa"] ; % Tilluftstryck 0…999 [Pa]
R64 : "Frånluftstryck" ["Pa"] ; % Frånluftstryck 0…999 [Pa]
R65 : "CO2-halt" ["ppm"]; % CO2-halt 0…2000 [ppm]
R66 : "Tilluftsflöde" ["m/s"]; % Tilluftsflöde 0.0…10.0 [m/s]
R67 : "Frånluftsflöde" ["m/s"]; % Frånluftsflöde 0.0…10.0 [m/s]
R68 : "Diff.tryck TF" ["Pa"] ; % Diff.tryck filter tilluft 0…999 [Pa]
R69 : "Diff.tryck FF" ["Pa"] ; % Diff.tryck filter frånluft 0…999 [Pa]
R70 : "Diff.tryck VVX" ["Pa"] ; % Diff.tryck VVX 0…999 [Pa]
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM AnalogInput1 NAMED "Läs reg.51-70" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(51); % Start address register
DATA[4] := RWORD(20); % Number of registers
ANSWER SIZE 45
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
DATA[2] = BYTE(40); % Byte count
DATA[3] -> RWORD(R51 := DATA;); % 0…100
DATA[5] -> RWORD(IF DATA>32767 THEN %-30.00…100.00
R52 := (DATA-65536)/100;
ELSE
R52 := DATA/100;
ENDIF;
);
DATA[7] -> RWORD(IF DATA>32767 THEN %-30.00…100.00
R53 := (DATA-65536)/100;
ELSE
R53 := DATA/100;
ENDIF;
);
DATA[9] -> RWORD(IF DATA>32767 THEN %-30.00…100.00
R54 := (DATA-65536)/100;
ELSE
R54 := DATA/100;
ENDIF;
);
DATA[11] -> RWORD(IF DATA>32767 THEN %-30.00…100.00
R55 := (DATA-65536)/100;
ELSE
R55 := DATA/100;
ENDIF;
);
DATA[13] -> RWORD(IF DATA>32767 THEN %-50.00…100.00
R56 := (DATA-65536)/100;
ELSE
R56 := DATA/100;
ENDIF;
);
DATA[15] -> RWORD(IF DATA>32767 THEN %-30.00…100.00
R57 := (DATA-65536)/100;
ELSE
R57 := DATA/100;
ENDIF;
);
DATA[17] -> RWORD(IF DATA>32767 THEN %-30.00…100.00
R58 := (DATA-65536)/100;
ELSE
R58 := DATA/100;
ENDIF;
);
DATA[19] -> RWORD(IF DATA>32767 THEN %-30.00…100.00
R59 := (DATA-65536)/100;
ELSE
R59 := DATA/100;
ENDIF;
);
DATA[21] -> RWORD(IF DATA>32767 THEN %-30.00…100.00
R60 := (DATA-65536)/100;
ELSE
R60 := DATA/100;
ENDIF;
);
DATA[23] -> RWORD(IF DATA>32767 THEN %-5.00…4.00
R61 := (DATA-65536)/100;
ELSE
R61 := DATA/100;
ENDIF;
);
DATA[25] -> RWORD(IF DATA>32767 THEN %-30.00…100.00
R62 := (DATA-65536)/100;
ELSE
R62 := DATA/100;
ENDIF;
);
DATA[27] -> RWORD(R63 := DATA;); % 0…999
DATA[29] -> RWORD(R64 := DATA;); % 0…999
DATA[31] -> RWORD(R65 := DATA;); % 0…2000
DATA[33] -> RWORD(R66 := DATA/10;); % 0.0…10.0
DATA[35] -> RWORD(R67 := DATA/10;); % 0.0…10.0
DATA[37] -> RWORD(R68 := DATA;); % 0…999
DATA[39] -> RWORD(R69 := DATA;); % 0…999
DATA[41] -> RWORD(R70 := DATA;); % 0…999
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read input registers 71-79
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanAnalog2 NAMED "Ouman Reg.71-79" TYPEID 21352 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
R71 : "VVX Verkningsg."["%"]; % Verkningsgrad VVX 0…100 [%]
R72 : "Utsignal spjäll"["%"]; % Utsignal till spjäll 0…100 [%]
R73 : "Utsignal VVX" ["%"]; % Utsignal till VVX 0…100 [%]
R74 : "Utsignal värme" ["%"]; % Utsignal till värme 0…100 [%]
R75 : "Utsignal kyla" ["%"]; % Utsignal till kyla 0…100 [%]
R76 : "Fläktstyrning" ["%"]; % Fläktstyrning 0…100 [%]
R77 : "Hastighet TF" ["%"]; % Hastighet TF 0…100 [%]
R78 : "Hastighet FF" ["%"]; % Hastighet FF 0…100 [%]
R79 : "Drifttid TF/FF" ["h"]; % Drifttid TF/FF 0…999 [h]
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM AnalogInput2 NAMED "Läs reg.71-79" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(71); % Start address register
DATA[4] := RWORD(9); % Number of registers
ANSWER SIZE 23
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(18); % Byte count
DATA[3] -> RWORD(R71 := DATA;); %0…100
DATA[5] -> RWORD(R72 := DATA;); %0…100
DATA[7] -> RWORD(R73 := DATA;); %0…100
DATA[9] -> RWORD(R74 := DATA;); %0…100
DATA[11] -> RWORD(R75 := DATA;); %0…100
DATA[13] -> RWORD(R76 := DATA;); %0…100
DATA[15] -> RWORD(R77 := DATA;); %0…100
DATA[17] -> RWORD(R78 := DATA;); %0…100
DATA[19] -> RWORD(R79 := DATA;); %0…999
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read input status 80-87
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanAnalog3 NAMED "Ouman DI/DU" TYPEID 21353 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
%R80 % Bit 0…6: Digitala ingångar 0…FFh P1 03 (r)
% Bit 7…9: Digitala utgångar
% Bit 10…12: 24V utgångar
% Bit 13: Driftinfo TF/FF 230V
% Bit 14: Regulators styrn. TF/FF
DI01: "Digital IN1";
DI02: "Digital IN2";
DI03: "Digital IN3";
DI04: "Digital IN4";
DI05: "Digital IN5";
DI06: "Digital IN6";
DI07: "Digital UT1";
DI08: "Digital UT2";
DI09: "Digital UT3";
DI10: "Digital UT4 24V";
DI11: "Digital UT5 24V";
DI12: "Digital UT6 24V";
DI13: "Driftinfo TF/FF";
DI14: "Reg.styr TF/FF";
%R81 : % Kategori avsökning Bit 9…15 0…FFh P1 03 (r)
% 0000001=N1-förfrågan TILL
% 0000010=N2-förfrågan TILL
% …
% 1000000=N7-förfrågan TILL
R82 : "TF difftryck" ["Pa"]; % TF difftryck 0…5000 [Pa]
R83 : "FF difftryck" ["Pa"]; % FF difftryck 0…5000 [Pa]
R84 : "TF luftmängd" ["m3/s"]; % TF luftmängd R84-85 0.0… [m3/s]
R86 : "FF luftmängd" ["m3/s"]; % FF luftmängd R86-87 0.0… [m3/s]
PRIVATE
tmp;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM AnalogInput3 NAMED "Läs DI/DU" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(80); % Start address register
DATA[4] := RWORD(8); % Number of registers
ANSWER SIZE 21
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(16); % Byte count
DATA[3] -> BYTE(IF (DATA & 1) THEN DI01:= 1; ELSE DI01:= 0; ENDIF;
IF (DATA & 2) THEN DI02:= 1; ELSE DI02:= 0; ENDIF;
IF (DATA & 4) THEN DI03:= 1; ELSE DI03:= 0; ENDIF;
IF (DATA & 8) THEN DI04:= 1; ELSE DI04:= 0; ENDIF;
IF (DATA & 16) THEN DI05:= 1; ELSE DI05:= 0; ENDIF;
IF (DATA & 32) THEN DI06:= 1; ELSE DI06:= 0; ENDIF;
IF (DATA & 64) THEN DI07:= 1; ELSE DI07:= 0; ENDIF;
IF (DATA & 128) THEN DI08:= 1; ELSE DI08:= 0; ENDIF;
);
DATA[4] -> BYTE(IF (DATA & 1) THEN DI09:= 1; ELSE DI09:= 0; ENDIF;
IF (DATA & 2) THEN DI10:= 1; ELSE DI10:= 0; ENDIF;
IF (DATA & 4) THEN DI11:= 1; ELSE DI11:= 0; ENDIF;
IF (DATA & 8) THEN DI12:= 1; ELSE DI12:= 0; ENDIF;
IF (DATA & 16) THEN DI13:= 1; ELSE DI13:= 0; ENDIF;
IF (DATA & 32) THEN DI14:= 1; ELSE DI14:= 0; ENDIF;
%IF (DATA & 64) THEN DI15:= 1; ELSE DI15:= 0; ENDIF;
%IF (DATA & 128) THEN DI16:= 1; ELSE DI16:= 0; ENDIF;
);
%DATA[5] -> RWORD(R81 := DATA;);
DATA[7] -> RWORD(R82 := DATA;); % 0…5000
DATA[9] -> RWORD(R83 := DATA;); % 0…5000
DATA[11]-> RWORD(tmp := DATA;); %
DATA[13]-> RWORD(R84 := (tmp + (DATA*65536)) / 10;); % 0.0…
DATA[15]-> RWORD(tmp := DATA;); %
DATA[17]-> RWORD(R86 := (tmp + (DATA*65536)) / 10;); % 0.0…
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read input status 140-159
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanAnalog4 NAMED "OumanReg140-159" TYPEID 21354 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
R140 : "Rumstemp" ["°C"]; % Rumstemperatur [°C]
R141 : "Frånluftstemp" ["°C"]; % Frånluftstemperatur [°C]
R142 : "BV Rum/Frånluft" ["°C"]; % Rum/Frånluftstemperatur börvär. [°C]
R143 : "Tilluftstemp" ["°C"]; % Tilluftstemperatur [°C]
R144 : "BV Tilluft" ["°C"]; % Tilluftstemperatur börvärde [°C]
R145 : "Temperatur 2" ["°C"]; % Temperatur 2 [°C]
R146 : "Börvärde extern" ["°C"]; % Extern börvärdesinställning [°C]
R147 : "Inverkan Rum/FL" ["°C"]; % Rum/Frånlufts kompensation inv. [°C]
R148 : "Inverkan värme" ["°C"]; % Inverkan av max.temp.diff värme [°C]
R149 : "Inverkan kyla" ["°C"]; % Inverkan av max.temp.diff kyla [°C]
R150 : "Max °C inverkan" ["°C"]; % Max.begr. inverkan [°C]
R151 : "Min °C inverkan" ["°C"]; % Min.begr. inverkan [°C]
R152 : "Starthöjning" ["°C"]; % Starthöjning [°C]
R153 : "Inverkan frysv." ["%"]; % Frysvakt antagen inverkan% [%]
R154 : "Start av kyla" ["°C"]; % Start av kyla [°C]
R155 : "Kylbehov" ["°C"]; % Kylbehov [°C]
R156 : "P-verkan Rum/FL" ["%"]; % P-verkan Rums/frånluftsstyrn.% [%]
R157 : "I-verkan Rum/FL" ["%"]; % I-verkan Rums/frånluftsstyrn.% [%]
R158 : "Min % inverkan" ["%"]; % Min.begr. inverkan % [%]
R159 : "Kylnivå regl." ["%"]; % Kylnivå % när reglering behövs [%]
PRIVATE
tmp;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM AnalogInput4 NAMED "Läs reg.140-159" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(140); % Start address register
DATA[4] := RWORD(20); % Number of registers
ANSWER SIZE 45
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(40); % Byte count
DATA[3] -> RWORD(IF DATA>32767 THEN %R140
R140:= (DATA-65536)/100;
ELSE
R140:= DATA/100;
ENDIF;
);
DATA[5] -> RWORD(IF DATA>32767 THEN %R141
R141:= (DATA-65536)/100;
ELSE
R141:= DATA/100;
ENDIF;
);
DATA[7] -> RWORD(IF DATA>32767 THEN %R142
R142:= (DATA-65536)/100;
ELSE
R142:= DATA/100;
ENDIF;
);
DATA[9] -> RWORD(IF DATA>32767 THEN %R143
R143:= (DATA-65536)/100;
ELSE
R143:= DATA/100;
ENDIF;
);
DATA[11] -> RWORD(IF DATA>32767 THEN %R144
R144:= (DATA-65536)/100;
ELSE
R144:= DATA/100;
ENDIF;
);
DATA[13] -> RWORD(IF DATA>32767 THEN %R145
R145:= (DATA-65536)/100;
ELSE
R145:= DATA/100;
ENDIF;
);
DATA[15] -> RWORD(IF DATA>32767 THEN %R146
R146:= (DATA-65536)/100;
ELSE
R146:= DATA/100;
ENDIF;
);
DATA[17] -> RWORD(IF DATA>32767 THEN %R147
R147:= (DATA-65536)/100;
ELSE
R147:= DATA/100;
ENDIF;
);
DATA[19] -> RWORD(IF DATA>32767 THEN %R148
R148:= (DATA-65536)/100;
ELSE
R148:= DATA/100;
ENDIF;
);
DATA[21] -> RWORD(IF DATA>32767 THEN %R149
R149:= (DATA-65536)/100;
ELSE
R149:= DATA/100;
ENDIF;
);
DATA[23] -> RWORD(IF DATA>32767 THEN %R150
R150:= (DATA-65536)/100;
ELSE
R150:= DATA/100;
ENDIF;
);
DATA[25] -> RWORD(IF DATA>32767 THEN %R151
R151:= (DATA-65536)/100;
ELSE
R151:= DATA/100;
ENDIF;
);
DATA[27] -> RWORD(IF DATA>32767 THEN %R152
R152:= (DATA-65536)/100;
ELSE
R152:= DATA/100;
ENDIF;
);
DATA[29] -> RWORD(R153:= DATA;); %R153
DATA[31] -> RWORD(IF DATA>32767 THEN %R154
R154:= (DATA-65536)/100;
ELSE
R154:= DATA/100;
ENDIF;
);
DATA[33] -> RWORD(IF DATA>32767 THEN %R155
R155:= (DATA-65536)/100;
ELSE
R155:= DATA/100;
ENDIF;
);
DATA[35] -> RWORD(R156:= DATA;); %R156
DATA[37] -> RWORD(R157:= DATA;); %R157
DATA[39] -> RWORD(R158:= DATA;); %R158
DATA[41] -> RWORD(R159:= DATA;); %R159
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read input status 160-167
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanAnalog5 NAMED "OumanReg160-167" TYPEID 21355 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
R160 : "Inverkan Rum/FL" ["°C"]; % Rums-/Frånluftskompensations inverkan [°C]
R161 : "I-verkan Rum/FL" ["°C"]; % I-verkan rums/frånluftsreglering [°C]
R162 : "Min °C inverkan" ["°C"]; % Min.begr. inverkan [°C]
R163 : "BV Kylvatten" ["°C"]; % Börvärdesinställn. returvatten kyla [°C]
R164 : "Kylvattentemp" ["°C"]; % Returvattentemp. Kyla [°C]
R165 : "BV Rum natt" ["°C"]; % Nattbörvärdesinst. Rumstemp. [°C]
R166 : "Rumstemp" ["°C"]; % Rumstemp. [°C]
R167 : "Reg-BV Tilluft" ["°C"]; % Tilluftstemp. Bestämd av regulator [°C]
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM AnalogInput5 NAMED "Läs reg.160-167" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(160); % Start address register
DATA[4] := RWORD(8); % Number of registers
ANSWER SIZE 21
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(16); % Byte count
DATA[3] -> RWORD(IF DATA>32767 THEN %R160
R160:= (DATA-65536)/100;
ELSE
R160:= DATA/100;
ENDIF;
);
DATA[5] -> RWORD(IF DATA>32767 THEN %R161
R161:= (DATA-65536)/100;
ELSE
R161:= DATA/100;
ENDIF;
);
DATA[7] -> RWORD(IF DATA>32767 THEN %R162
R162:= (DATA-65536)/100;
ELSE
R162:= DATA/100;
ENDIF;
);
DATA[9] -> RWORD(IF DATA>32767 THEN %R163
R163:= (DATA-65536)/100;
ELSE
R163:= DATA/100;
ENDIF;
);
DATA[11] -> RWORD(IF DATA>32767 THEN %R164
R164:= (DATA-65536)/100;
ELSE
R164:= DATA/100;
ENDIF;
);
DATA[13] -> RWORD(IF DATA>32767 THEN %R165
R165:= (DATA-65536)/100;
ELSE
R165:= DATA/100;
ENDIF;
);
DATA[15] -> RWORD(IF DATA>32767 THEN %R166
R166:= (DATA-65536)/100;
ELSE
R166:= DATA/100;
ENDIF;
);
DATA[17] -> RWORD(IF DATA>32767 THEN %R167
R167:= (DATA-65536)/100;
ELSE
R167:= DATA/100;
ENDIF;
);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read alarm status index 101-116
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanLarm1 NAMED "Ouman Larm 1" TYPEID 21356 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
% R91 Larmstatus LarmIndex 101-116 0…FFh N2 03(r)
LI101 : "Fel Utetemp" ; % B0 101 = Givarefel, Utetemperatur
LI102 : "Fel TLtemp" ; % B1 102 = Givarefel, Tilluftstemperatur
LI103 : "Fel FLtemp" ; % B2 103 = Givarefel, Frånluftstemperatur
LI104 : "Fel Rumstemp" ; % B3 104 = Givarefel, Rumstemperatur
LI105 : "Fel TLtemp B" ; % B4 105 = Givarefel, Tilluftstemperatur B
LI106 : "Fel Rumstemp B" ; % B5 106 = Givarefel, Rumstemperatur B
LI107 : "Fel Returv.temp"; % B6 107 = Givarefel, Returvatten temperatur
LI108 : "Fel FLtemp VÅV" ; % B7 108 = Givarefel, Frånluftstemperatur efter VÅV
LI109 : "Fel TLtemp VÅV" ; % B8 109 = Givarefel, Tilluftstemperatur efter VÅV
LI110 : "Fel Inst.pot" ; % B9 110 = Givarefel, Fjärrinställningspotentiometer
LI111 : "Fel Fri mätning"; % B10 111 = Givarefel, Fri mätning (kan adresseras)
LI112 : "Larm Frysfara" ; % B11 112 = Frysfaralarm, Batteriets returvattentemperatur
LI113 : "Larm Avv.TLtemp"; % B12 113 = Avvikelselarm, Tilluftstemperatur
LI114 : "Larm Avv.FLtemp"; % B13 114 = Avvikelselarm, Frånluftstemperatur
LI115 : "Larm Avv.Rumst."; % B14 115 = Avvikelselarm, Rumstemperatur
LI116 : "Larm AvvTLtryck"; % B15 116 = Avvikelselarm, Tilluftens tryck
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Larm1 NAMED "Läs larm101-116" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(91); % Start address register
DATA[4] := RWORD(1); % Number of registers
ANSWER SIZE 7
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(2); % Byte count
DATA[3] -> BYTE(IF (DATA & 1) THEN LI101:= 1; ELSE LI101:= 0; ENDIF;
IF (DATA & 2) THEN LI102:= 1; ELSE LI102:= 0; ENDIF;
IF (DATA & 4) THEN LI103:= 1; ELSE LI103:= 0; ENDIF;
IF (DATA & 8) THEN LI104:= 1; ELSE LI104:= 0; ENDIF;
IF (DATA & 16) THEN LI105:= 1; ELSE LI105:= 0; ENDIF;
IF (DATA & 32) THEN LI106:= 1; ELSE LI106:= 0; ENDIF;
IF (DATA & 64) THEN LI107:= 1; ELSE LI107:= 0; ENDIF;
IF (DATA & 128) THEN LI108:= 1; ELSE LI108:= 0; ENDIF;
);
DATA[4] -> BYTE(IF (DATA & 1) THEN LI109:= 1; ELSE LI109:= 0; ENDIF;
IF (DATA & 2) THEN LI110:= 1; ELSE LI110:= 0; ENDIF;
IF (DATA & 4) THEN LI111:= 1; ELSE LI111:= 0; ENDIF;
IF (DATA & 8) THEN LI112:= 1; ELSE LI112:= 0; ENDIF;
IF (DATA & 16) THEN LI113:= 1; ELSE LI113:= 0; ENDIF;
IF (DATA & 32) THEN LI114:= 1; ELSE LI114:= 0; ENDIF;
IF (DATA & 64) THEN LI115:= 1; ELSE LI115:= 0; ENDIF;
IF (DATA & 128) THEN LI116:= 1; ELSE LI116:= 0; ENDIF;
);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read alarm status index 117-132
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanLarm2 NAMED "Ouman Larm 2" TYPEID 21357 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
%90 Larmstatus larmindex 117-132 0…FFh N2 03 (r)
LI117 : "Larm AvvFLtryck"; % B0 117 = Avvikelselarm, Frånluftens tryck
LI118 : "Larm Brand TL" ; % B1 118 = Brandfaralarm, Tilluftstemperatur
LI119 : "Larm VÅV v.grad"; % B2 119 = Återvinningslarm, VÅV:s verkningsgrad
LI120 : "Larm Elbatt.öhs"; % B3 120 = Larm, slutande 1 (B) Elbatteriets överhettningsskydd >= ver. 1.42
LI121 : "Larm slutande 2"; % B4 121 = Larm, slutande 2 (B) Ej i funktion version >= 1.42
LI122 : "Larm slutande 3"; % B5 122 = Larm, slutande 3 (B)
LI123 : "Larm slutande 4"; % B6 123 = Larm, slutande 4 (B)
LI124 : "Larm brytande 1"; % B7 124 = Larm, brytande 1 (B) Ej i funktion version >= 1.42
LI125 : "Larm brytande 2"; % B8 125 = Larm, brytande 2
LI126 : "Larm Filt.TLPDE"; % B9 126 = Filtervakts larm, Tilluftsfilterns PDE
LI127 : "Larm Filt.FLPDE"; % B10 127 = Filtervakts larm, Frånluftsfilterns PDE
LI128 : "Larm Filt.TLPDS"; % B11 128 = Filtervakts larm, Tilluftsfilterns PDS
LI129 : "Larm Filt.FLPDS"; % B12 129 = Filtervakts larm, Frånluftsfilterns PDS
LI130 : "Larm Flöde TL" ; % B13 130 = Flödeslarm, Tilluftens flödeshastighet
LI131 : "Larm Flöde FL" ; % B14 131 = Flödeslarm, Frånluftens flödeshastighet
LI132 : "Larm FlödeTLPDE"; % B15 132 = Flödeslarm, Tilluftsfilterns minimum PDE
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Larm2 NAMED "Läs larm117-132" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(90); % Start address register
DATA[4] := RWORD(1); % Number of registers
ANSWER SIZE 7
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(2); % Byte count
DATA[3] -> BYTE(IF (DATA & 1) THEN LI117:= 1; ELSE LI117:= 0; ENDIF;
IF (DATA & 2) THEN LI118:= 1; ELSE LI118:= 0; ENDIF;
IF (DATA & 4) THEN LI119:= 1; ELSE LI119:= 0; ENDIF;
IF (DATA & 8) THEN LI120:= 1; ELSE LI120:= 0; ENDIF;
IF (DATA & 16) THEN LI121:= 1; ELSE LI121:= 0; ENDIF;
IF (DATA & 32) THEN LI122:= 1; ELSE LI122:= 0; ENDIF;
IF (DATA & 64) THEN LI123:= 1; ELSE LI123:= 0; ENDIF;
IF (DATA & 128) THEN LI124:= 1; ELSE LI124:= 0; ENDIF;
);
DATA[4] -> BYTE(IF (DATA & 1) THEN LI125:= 1; ELSE LI125:= 0; ENDIF;
IF (DATA & 2) THEN LI126:= 1; ELSE LI126:= 0; ENDIF;
IF (DATA & 4) THEN LI127:= 1; ELSE LI127:= 0; ENDIF;
IF (DATA & 8) THEN LI128:= 1; ELSE LI128:= 0; ENDIF;
IF (DATA & 16) THEN LI129:= 1; ELSE LI129:= 0; ENDIF;
IF (DATA & 32) THEN LI130:= 1; ELSE LI130:= 0; ENDIF;
IF (DATA & 64) THEN LI131:= 1; ELSE LI131:= 0; ENDIF;
IF (DATA & 128) THEN LI132:= 1; ELSE LI132:= 0; ENDIF;
);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read alarm status index 133-148
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanLarm3 NAMED "Ouman Larm 3" TYPEID 21358 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
%93 Larmstatus larmindex 133-148 0…FFh N2 03(r)
LI133 : "Larm FlödeFLPDE"; % B0 133 = Flödeslarm, Frånluftsfilterns minimum PDE
LI134 : "Larm KonflTF1/1"; % B1 134 = Konfliktlarm, TF 1/1 driftinformation
LI135 : "Larm KonflTF1/2"; % B2 135 = Konfliktlarm, TF 1/2 driftinformation
LI136 : "Larm KonflFF1/1"; % B3 136 = Konfliktlarm, FF 1/1 driftinformation
LI137 : "Larm Avv FF 1/1"; % B4 137 = Avvikelselarm, FF 1/1 driftinformation
LI138 : "Larm KonflFF1/2"; % B5 138 = Konfliktlarm, FF 1/2 driftinformation
LI139 : "Larm Avv FF 1/2"; % B6 139 = Avvikelselarm, FF 1/2 driftinformation
LI140 : "Larm KonflTFPDS"; % B7 140 = Konfliktlarm, TF fläkt PDS
LI141 : "Larm KonflFFPDS"; % B8 141 = Konfliktlarm, FF fläkt PDS
LI142 : "Larm Konfl.230V"; % B9 142 = Konfliktlarm, 230V driftinformation
LI143 : "Larm TF f.omf." ; % B10 143 = TF dörbikoppling, TF frekvensomformarens förbikoppling
LI144 : "Larm KonflTFomf"; % B11 144 = Konfliktlarm, TF frekvensomformarens förbikoppling
LI145 : "Larm FF f.omf." ; % B12 145 = FF dörbikoppling, FF frekvensomformarens förbikoppling
LI146 : "Larm KonflFFomf"; % B13 146 = Konfliktlarm, FF frekvensomformarens förbikoppling
LI147 : "Larm Avv FF omf"; % B14 147 = Avvikelselarm, FF frekvensomformarens förbikoppling
LI148 : "Larm Pump värme"; % B15 148 = Pumplarm, Värmepumpens driftinformation
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Larm3 NAMED "Läs larm133-148" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(93); % Start address register
DATA[4] := RWORD(1); % Number of registers
ANSWER SIZE 7
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(2); % Byte count
DATA[3] -> BYTE(IF (DATA & 1) THEN LI133:= 1; ELSE LI133:= 0; ENDIF;
IF (DATA & 2) THEN LI134:= 1; ELSE LI134:= 0; ENDIF;
IF (DATA & 4) THEN LI135:= 1; ELSE LI135:= 0; ENDIF;
IF (DATA & 8) THEN LI136:= 1; ELSE LI136:= 0; ENDIF;
IF (DATA & 16) THEN LI137:= 1; ELSE LI137:= 0; ENDIF;
IF (DATA & 32) THEN LI138:= 1; ELSE LI138:= 0; ENDIF;
IF (DATA & 64) THEN LI139:= 1; ELSE LI139:= 0; ENDIF;
IF (DATA & 128) THEN LI140:= 1; ELSE LI140:= 0; ENDIF;
);
DATA[4] -> BYTE(IF (DATA & 1) THEN LI141:= 1; ELSE LI141:= 0; ENDIF;
IF (DATA & 2) THEN LI142:= 1; ELSE LI142:= 0; ENDIF;
IF (DATA & 4) THEN LI143:= 1; ELSE LI143:= 0; ENDIF;
IF (DATA & 8) THEN LI144:= 1; ELSE LI144:= 0; ENDIF;
%IF (DATA & 16) THEN LI145:= 1; ELSE LI145:= 0; ENDIF;
%IF (DATA & 32) THEN LI146:= 1; ELSE LI146:= 0; ENDIF;
%IF (DATA & 64) THEN LI147:= 1; ELSE LI147:= 0; ENDIF;
%IF (DATA & 128) THEN LI148:= 1; ELSE LI148:= 0; ENDIF;
);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read alarm status index 149-164
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanLarm4 NAMED "Ouman Larm 4" TYPEID 21359 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
%92 Larmstatus larmindex 149-164 0…FFh N2 03(r)
LI149 : "Larm Huvudpump" ; %B0 149 = Pumplarm, Huvudpumpens driftinformation
LI150 : "Larm VÅV pump" ; %B1 150 = Pumplarm, VÅV pumpens driftinformation
LI151 : "Larm Kylpump" ; %B2 151 = Pumplarm, Kylpumpens driftinformation
LI152 : "Larm Elbatt övh"; %B3 152 = Överhettningslarm, Elbatteriets överhettning
LI153 : "Larm TF1/1 relä"; %B4 153 = Värmerelälarm, TF 1/1 värmerelä
LI154 : "Larm TF1/2 relä"; %B5 154 = Värmerelälarm, TF 1/2 värmerelä
LI155 : "Larm FF1/1 relä"; %B6 155 = Värmerelälarm, FF 1/1 värmerelä
LI156 : "Larm FF1/2 relä"; %B7 156 = Värmerelälarm, FF 1/2 värmerelä
LI157 : "Larm Värmeprelä"; %B8 157 = Värmerelälarm, Värmepumpens värmerelä
LI158 : "Larm VÅVp. relä"; %B9 158 = Värmerelälarm, VÅV pumpens värmerelä
LI159 : "Larm Kylp. relä"; %B10 159 = Värmerelälarm, Kylpumpens värmerelä
LI160 : "Larm Tryck v.kr"; %B11 160 = Trycklarm, värmekretsens tryckvakt
LI161 : "Larm Tryck VÅV" ; %B12 161 = Trycklarm, VÅV glykolkretsens tryckvakt
LI162 : "Larm Rök" ; %B13 162 = Larm, röklarm
LI163 : "Larm Nöd-stopp" ; %B14 163 = Larm, Nöd-stopp
LI164 : "Larm Service" ; %B15 164 = Larm, Serviceinterval-larm
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Larm4 NAMED "Läs larm149-164" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(92); % Start address register
DATA[4] := RWORD(1); % Number of registers
ANSWER SIZE 7
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(2); % Byte count
DATA[3] -> BYTE(IF (DATA & 1) THEN LI149:= 1; ELSE LI149:= 0; ENDIF;
IF (DATA & 2) THEN LI150:= 1; ELSE LI150:= 0; ENDIF;
IF (DATA & 4) THEN LI151:= 1; ELSE LI151:= 0; ENDIF;
IF (DATA & 8) THEN LI152:= 1; ELSE LI152:= 0; ENDIF;
IF (DATA & 16) THEN LI153:= 1; ELSE LI153:= 0; ENDIF;
IF (DATA & 32) THEN LI154:= 1; ELSE LI154:= 0; ENDIF;
IF (DATA & 64) THEN LI155:= 1; ELSE LI155:= 0; ENDIF;
IF (DATA & 128) THEN LI156:= 1; ELSE LI156:= 0; ENDIF;
);
DATA[4] -> BYTE(IF (DATA & 1) THEN LI157:= 1; ELSE LI157:= 0; ENDIF;
IF (DATA & 2) THEN LI158:= 1; ELSE LI158:= 0; ENDIF;
IF (DATA & 4) THEN LI159:= 1; ELSE LI159:= 0; ENDIF;
IF (DATA & 8) THEN LI160:= 1; ELSE LI160:= 0; ENDIF;
IF (DATA & 16) THEN LI161:= 1; ELSE LI161:= 0; ENDIF;
IF (DATA & 32) THEN LI162:= 1; ELSE LI162:= 0; ENDIF;
IF (DATA & 64) THEN LI163:= 1; ELSE LI163:= 0; ENDIF;
IF (DATA & 128) THEN LI164:= 1; ELSE LI164:= 0; ENDIF;
);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read alarm status index 165-171
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanLarm5 NAMED "Ouman Larm 5" TYPEID 21360 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
%95 Larmstatus larmindex 165-171 0…FFh N2 03(r)
LI165 : "Larm VÅV rotat."; % B0 165 = Larm, VÅV rotation
LI166 : "Larm kylmaskin"; % B1 166 = Larm, kylmaskinens fellarm
LI167 : "Larm Brand FL" ; % B2 167 = Brandfaralarm, Frånluftstemperatur (version 1.42 och vidare)
LI168 : "Larm TryckTFPDE"; % B3 168 = Trycklarm, TF fläkt PDE (version 1.42 och vidare)
LI169 : "Larm TryckFFPDE"; % B4 169 = Trycklarm, FF fläkt PDE (version 1.42 och vidare)
LI170 : "Larm Avv.TFPDE"; % B5 170 = Avvikelselarm, TF fläkt PDE (versio 1.42 och vidare)
LI171 : "Larm Avv.FFPDE"; % B6 171 = Avvikelselarm, FF fläkt PDE ( version 1.42 och vidare)
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Larm5 NAMED "Läs Larm161-171" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(95); % Start address register
DATA[4] := RWORD(1); % Number of registers
ANSWER SIZE 7
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(2); % Byte count
DATA[3] -> BYTE(IF (DATA & 1) THEN LI165:= 1; ELSE LI165:= 0; ENDIF;
IF (DATA & 2) THEN LI166:= 1; ELSE LI166:= 0; ENDIF;
IF (DATA & 4) THEN LI167:= 1; ELSE LI167:= 0; ENDIF;
IF (DATA & 8) THEN LI168:= 1; ELSE LI168:= 0; ENDIF;
IF (DATA & 16) THEN LI169:= 1; ELSE LI169:= 0; ENDIF;
IF (DATA & 32) THEN LI170:= 1; ELSE LI170:= 0; ENDIF;
IF (DATA & 64) THEN LI171:= 1; ELSE LI171:= 0; ENDIF;
%IF (DATA & 128) THEN LI156:= 1; ELSE LI156:= 0; ENDIF;
);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read alarm status Summa larm A + B
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanLarmSum NAMED "Ouman Summalarm" TYPEID 21361 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
%99 Summalarm 03 (r)
LA : "A summalarm"; % Bit 0=A summalarm
LB : "B summalarm"; % Bit 1=B summalarm
% Funktion: om något larm är aktivt har bit värde 1 annars 0.
% Om nytt larm inkommer och bitvärdet är 1, går det ca 20s
% till det blir 0 och därefter återskapas nytt aktuellt värde.
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Summalarm NAMED "Läs Summalarm" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(99); % Start address register
DATA[4] := RWORD(1); % Number of registers
ANSWER SIZE 7
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(2); % Byte count
DATA[3] -> BYTE(IF (DATA & 1) THEN LA:= 1; ELSE LA:= 0; ENDIF;
IF (DATA & 2) THEN LB:= 1; ELSE LB:= 0; ENDIF;
);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Device definition for OUMAN write register
%%
%% Settings module:
%% Parity: None
%% Baud: 9600
%% Mode: RTU
%%
%% Note! Telegram for reading Analog status
%%
%% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
%% History:
%%
%DEVICETYPE OumanSettings NAMED "Ouman ställ reg" TYPEID 21361 IS
%
% PARAMETER
%
% Id : "Adress";
%
% R184 : "BV kylvatten" ["°C"]; %Börvärdesinst returvatten kyla 10…40 [°C] N6 03 (r), 06(w), 16(w)
% R242 : "BV värmeretur"["°C"]; %Börvärdesinst returvatten värme 10.0…40.0 [°C] N6 03 (r), 06(w), 16(w)
% R300a : "Styrmode temp"["(0-3)"]; %Bit1…2 Temperaturstyrning:
% % 0=Tilluftsstyrning
% % 1=Rumsåterställning
% % 2=Frånluftsåterställning
% % 3=Tilluftsstyrd med utekomp
% R300b : "Styrmode TF/FF"["(0-1)"]; %Bit3…4 TF/FF värmebegränsningstyrning:
% % 0=Spjäll min->Värme
% % 1=Värme->Spjäll min
%
% PUBLIC
%
% PRIVATE
% Cnt;
%
% BAUDRATE 9600;
%
% CHECKSUM MODBUS SWAPPED;
%
% TELEGRAM Settings1 NAMED "Ställ register" IS
%
% QUESTION
% DATA[0] := BYTE(Id);
% DATA[1] := HEX(06); %Write singel register
% DATA[2] <- RWORD( %Start adress (regnr-1)
% IF Cnt>8 THEN Cnt:=0; ENDIF;
% % Adress=Register
% IF Cnt=0 THEN DATA := 184; %R184
% ELSIF Cnt=1 THEN DATA := 242; %R242
% ELSIF Cnt=2 THEN DATA := 300; %R300
% ELSIF Cnt=3 THEN DATA := 300; %R300
% ELSIF Cnt=4 THEN DATA := 300; %R300
% ELSIF Cnt=5 THEN DATA := 300; %R300
% ELSIF Cnt=6 THEN DATA := 300; %R300
% ELSIF Cnt=7 THEN DATA := 300; %R300
% ELSIF Cnt=8 THEN DATA := 300; %R300
% ENDIF;
% );
%
% DATA[4] <- RWORD(
% IF Cnt=0 THEN
% IF R184<10 THEN DATA := 10; % 10…40 [°C]
% ELSIF R184>40 THEN DATA := 40;
% ELSE DATA := R184;
% ENDIF;
% ELSIF Cnt=1 THEN
% IF R242<0 THEN DATA := 0; % 10.0…40.0 [°C]
% ELSIF R242>40 THEN DATA := 400;
% ELSE DATA := R242*10;
% ENDIF;
% ELSIF Cnt=2 THEN
% IF R300a<0 THEN tmp := 0; % 0-3
% ELSIF R300a>3 THEN tmp := 3;
% ELSE tmp := R300a;
% ENDIF;
% IF R300b>0 THEN tmp := tmp + 4; % 0-1
% ENDIF;
% DATA := tmp;
% ELSIF Cnt=3 THEN
% IF R300a<0 THEN tmp := 0; % 0-3
% ELSIF R300a>3 THEN tmp := 3;
% ELSE tmp := R300a;
% ENDIF;
% IF R300b>0 THEN tmp := tmp + 4; % 0-1
% ENDIF;
% DATA := tmp;
% ELSIF Cnt=4 THEN
% IF R300a<0 THEN tmp := 0; % 0-3
% ELSIF R300a>3 THEN tmp := 3;
% ELSE tmp := R300a;
% ENDIF;
% IF R300b>0 THEN tmp := tmp + 4; % 0-1
% ENDIF;
% DATA := tmp;
% ELSIF Cnt=5 THEN
% IF R300a<0 THEN tmp := 0; % 0-3
% ELSIF R300a>3 THEN tmp := 3;
% ELSE tmp := R300a;
% ENDIF;
% IF R300b>0 THEN tmp := tmp + 4; % 0-1
% ENDIF;
% DATA := tmp;
% ELSIF Cnt=6 THEN
% IF R300a<0 THEN tmp := 0; % 0-3
% ELSIF R300a>3 THEN tmp := 3;
% ELSE tmp := R300a;
% ENDIF;
% IF R300b>0 THEN tmp := tmp + 4; % 0-1
% ENDIF;
% DATA := tmp;
% ELSIF Cnt=7 THEN
% IF R300a<0 THEN tmp := 0; % 0-3
% ELSIF R300a>3 THEN tmp := 3;
% ELSE tmp := R300a;
% ENDIF;
% IF R300b>0 THEN tmp := tmp + 4; % 0-1
% ENDIF;
% DATA := tmp;
% ELSIF Cnt=8 THEN
% IF R300a<0 THEN tmp := 0; % 0-3
% ELSIF R300a>3 THEN tmp := 3;
% ELSE tmp := R300a;
% ENDIF;
% IF R300b>0 THEN tmp := tmp + 4; % 0-1
% ENDIF;
% DATA := tmp;
% ENDIF;
%
% Cnt := Cnt + 1;
% IF Cnt>8 THEN Cnt := 0;
% ENDIF;
% );
%
% ANSWER SIZE 8
% DATA[0] = BYTE(Id);
% DATA[1] = HEX(06);
%
% TIMEOUT 2000
%
% END;
%
%END;
% Device definition for OUMAN read input registers 51-70
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanAnalog1 NAMED "Ouman Reg.51-70" TYPEID 21351 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
R51 : "Rumsfuktighet" ["%"] ; % Rumsfuktighet 0…100 [%]
R52 : "Tilluftstemp" ["°C"] ; % Tilluftstemperatur -30.00…100.00 [°C]
R53 : "Frånluftstemp" ["°C"] ; % Frånluftstemperatur -30.00…100.00 [°C]
R54 : "Returvattentemp" ["°C"] ; % Returvattentemp värmeslinga -30.00…100.00 [°C]
R55 : "Rumstemp 2" ["°C"] ; % Rumstemperatur 2 -30.00…100.00 [°C]
R56 : "Utetemp" ["°C"] ; % Utetemperatur -50.00…100.00 [°C]
R57 : "Tilluftstemp 2" ["°C"] ; % Tilluftstemperatur 2 -30.00…100.00 [°C]
R58 : "Rumstemp" ["°C"] ; % Rumstemperatur -30.00…100.00 [°C]
R59 : "VVX temp Frysv." ["°C"] ; % VVX Frysvakt -30.00…100.00 [°C]
R60 : "VVX temp Tillu." ["°C"] ; % Tilluftstemperatur efter VVX -30.00…100.00 [°C]
R61 : "Yttre BV-förskj" ["°C"] ; % Yttre börvärdesomställare -5.00…4.00 [°C]
R62 : "Fri temp" ["°C"] ; % Fri temperaturmätning -30.00…100.00 [°C]
R63 : "Tilluftstryck" ["Pa"] ; % Tilluftstryck 0…999 [Pa]
R64 : "Frånluftstryck" ["Pa"] ; % Frånluftstryck 0…999 [Pa]
R65 : "CO2-halt" ["ppm"]; % CO2-halt 0…2000 [ppm]
R66 : "Tilluftsflöde" ["m/s"]; % Tilluftsflöde 0.0…10.0 [m/s]
R67 : "Frånluftsflöde" ["m/s"]; % Frånluftsflöde 0.0…10.0 [m/s]
R68 : "Diff.tryck TF" ["Pa"] ; % Diff.tryck filter tilluft 0…999 [Pa]
R69 : "Diff.tryck FF" ["Pa"] ; % Diff.tryck filter frånluft 0…999 [Pa]
R70 : "Diff.tryck VVX" ["Pa"] ; % Diff.tryck VVX 0…999 [Pa]
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM AnalogInput1 NAMED "Läs reg.51-70" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(51); % Start address register
DATA[4] := RWORD(20); % Number of registers
ANSWER SIZE 45
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
DATA[2] = BYTE(40); % Byte count
DATA[3] -> RWORD(R51 := DATA;); % 0…100
DATA[5] -> RWORD(IF DATA>32767 THEN %-30.00…100.00
R52 := (DATA-65536)/100;
ELSE
R52 := DATA/100;
ENDIF;
);
DATA[7] -> RWORD(IF DATA>32767 THEN %-30.00…100.00
R53 := (DATA-65536)/100;
ELSE
R53 := DATA/100;
ENDIF;
);
DATA[9] -> RWORD(IF DATA>32767 THEN %-30.00…100.00
R54 := (DATA-65536)/100;
ELSE
R54 := DATA/100;
ENDIF;
);
DATA[11] -> RWORD(IF DATA>32767 THEN %-30.00…100.00
R55 := (DATA-65536)/100;
ELSE
R55 := DATA/100;
ENDIF;
);
DATA[13] -> RWORD(IF DATA>32767 THEN %-50.00…100.00
R56 := (DATA-65536)/100;
ELSE
R56 := DATA/100;
ENDIF;
);
DATA[15] -> RWORD(IF DATA>32767 THEN %-30.00…100.00
R57 := (DATA-65536)/100;
ELSE
R57 := DATA/100;
ENDIF;
);
DATA[17] -> RWORD(IF DATA>32767 THEN %-30.00…100.00
R58 := (DATA-65536)/100;
ELSE
R58 := DATA/100;
ENDIF;
);
DATA[19] -> RWORD(IF DATA>32767 THEN %-30.00…100.00
R59 := (DATA-65536)/100;
ELSE
R59 := DATA/100;
ENDIF;
);
DATA[21] -> RWORD(IF DATA>32767 THEN %-30.00…100.00
R60 := (DATA-65536)/100;
ELSE
R60 := DATA/100;
ENDIF;
);
DATA[23] -> RWORD(IF DATA>32767 THEN %-5.00…4.00
R61 := (DATA-65536)/100;
ELSE
R61 := DATA/100;
ENDIF;
);
DATA[25] -> RWORD(IF DATA>32767 THEN %-30.00…100.00
R62 := (DATA-65536)/100;
ELSE
R62 := DATA/100;
ENDIF;
);
DATA[27] -> RWORD(R63 := DATA;); % 0…999
DATA[29] -> RWORD(R64 := DATA;); % 0…999
DATA[31] -> RWORD(R65 := DATA;); % 0…2000
DATA[33] -> RWORD(R66 := DATA/10;); % 0.0…10.0
DATA[35] -> RWORD(R67 := DATA/10;); % 0.0…10.0
DATA[37] -> RWORD(R68 := DATA;); % 0…999
DATA[39] -> RWORD(R69 := DATA;); % 0…999
DATA[41] -> RWORD(R70 := DATA;); % 0…999
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read input registers 71-79
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanAnalog2 NAMED "Ouman Reg.71-79" TYPEID 21352 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
R71 : "VVX Verkningsg."["%"]; % Verkningsgrad VVX 0…100 [%]
R72 : "Utsignal spjäll"["%"]; % Utsignal till spjäll 0…100 [%]
R73 : "Utsignal VVX" ["%"]; % Utsignal till VVX 0…100 [%]
R74 : "Utsignal värme" ["%"]; % Utsignal till värme 0…100 [%]
R75 : "Utsignal kyla" ["%"]; % Utsignal till kyla 0…100 [%]
R76 : "Fläktstyrning" ["%"]; % Fläktstyrning 0…100 [%]
R77 : "Hastighet TF" ["%"]; % Hastighet TF 0…100 [%]
R78 : "Hastighet FF" ["%"]; % Hastighet FF 0…100 [%]
R79 : "Drifttid TF/FF" ["h"]; % Drifttid TF/FF 0…999 [h]
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM AnalogInput2 NAMED "Läs reg.71-79" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(71); % Start address register
DATA[4] := RWORD(9); % Number of registers
ANSWER SIZE 23
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(18); % Byte count
DATA[3] -> RWORD(R71 := DATA;); %0…100
DATA[5] -> RWORD(R72 := DATA;); %0…100
DATA[7] -> RWORD(R73 := DATA;); %0…100
DATA[9] -> RWORD(R74 := DATA;); %0…100
DATA[11] -> RWORD(R75 := DATA;); %0…100
DATA[13] -> RWORD(R76 := DATA;); %0…100
DATA[15] -> RWORD(R77 := DATA;); %0…100
DATA[17] -> RWORD(R78 := DATA;); %0…100
DATA[19] -> RWORD(R79 := DATA;); %0…999
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read input status 80-87
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanAnalog3 NAMED "Ouman DI/DU" TYPEID 21353 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
%R80 % Bit 0…6: Digitala ingångar 0…FFh P1 03 (r)
% Bit 7…9: Digitala utgångar
% Bit 10…12: 24V utgångar
% Bit 13: Driftinfo TF/FF 230V
% Bit 14: Regulators styrn. TF/FF
DI01: "Digital IN1";
DI02: "Digital IN2";
DI03: "Digital IN3";
DI04: "Digital IN4";
DI05: "Digital IN5";
DI06: "Digital IN6";
DI07: "Digital UT1";
DI08: "Digital UT2";
DI09: "Digital UT3";
DI10: "Digital UT4 24V";
DI11: "Digital UT5 24V";
DI12: "Digital UT6 24V";
DI13: "Driftinfo TF/FF";
DI14: "Reg.styr TF/FF";
%R81 : % Kategori avsökning Bit 9…15 0…FFh P1 03 (r)
% 0000001=N1-förfrågan TILL
% 0000010=N2-förfrågan TILL
% …
% 1000000=N7-förfrågan TILL
R82 : "TF difftryck" ["Pa"]; % TF difftryck 0…5000 [Pa]
R83 : "FF difftryck" ["Pa"]; % FF difftryck 0…5000 [Pa]
R84 : "TF luftmängd" ["m3/s"]; % TF luftmängd R84-85 0.0… [m3/s]
R86 : "FF luftmängd" ["m3/s"]; % FF luftmängd R86-87 0.0… [m3/s]
PRIVATE
tmp;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM AnalogInput3 NAMED "Läs DI/DU" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(80); % Start address register
DATA[4] := RWORD(8); % Number of registers
ANSWER SIZE 21
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(16); % Byte count
DATA[3] -> BYTE(IF (DATA & 1) THEN DI01:= 1; ELSE DI01:= 0; ENDIF;
IF (DATA & 2) THEN DI02:= 1; ELSE DI02:= 0; ENDIF;
IF (DATA & 4) THEN DI03:= 1; ELSE DI03:= 0; ENDIF;
IF (DATA & 8) THEN DI04:= 1; ELSE DI04:= 0; ENDIF;
IF (DATA & 16) THEN DI05:= 1; ELSE DI05:= 0; ENDIF;
IF (DATA & 32) THEN DI06:= 1; ELSE DI06:= 0; ENDIF;
IF (DATA & 64) THEN DI07:= 1; ELSE DI07:= 0; ENDIF;
IF (DATA & 128) THEN DI08:= 1; ELSE DI08:= 0; ENDIF;
);
DATA[4] -> BYTE(IF (DATA & 1) THEN DI09:= 1; ELSE DI09:= 0; ENDIF;
IF (DATA & 2) THEN DI10:= 1; ELSE DI10:= 0; ENDIF;
IF (DATA & 4) THEN DI11:= 1; ELSE DI11:= 0; ENDIF;
IF (DATA & 8) THEN DI12:= 1; ELSE DI12:= 0; ENDIF;
IF (DATA & 16) THEN DI13:= 1; ELSE DI13:= 0; ENDIF;
IF (DATA & 32) THEN DI14:= 1; ELSE DI14:= 0; ENDIF;
%IF (DATA & 64) THEN DI15:= 1; ELSE DI15:= 0; ENDIF;
%IF (DATA & 128) THEN DI16:= 1; ELSE DI16:= 0; ENDIF;
);
%DATA[5] -> RWORD(R81 := DATA;);
DATA[7] -> RWORD(R82 := DATA;); % 0…5000
DATA[9] -> RWORD(R83 := DATA;); % 0…5000
DATA[11]-> RWORD(tmp := DATA;); %
DATA[13]-> RWORD(R84 := (tmp + (DATA*65536)) / 10;); % 0.0…
DATA[15]-> RWORD(tmp := DATA;); %
DATA[17]-> RWORD(R86 := (tmp + (DATA*65536)) / 10;); % 0.0…
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read input status 140-159
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanAnalog4 NAMED "OumanReg140-159" TYPEID 21354 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
R140 : "Rumstemp" ["°C"]; % Rumstemperatur [°C]
R141 : "Frånluftstemp" ["°C"]; % Frånluftstemperatur [°C]
R142 : "BV Rum/Frånluft" ["°C"]; % Rum/Frånluftstemperatur börvär. [°C]
R143 : "Tilluftstemp" ["°C"]; % Tilluftstemperatur [°C]
R144 : "BV Tilluft" ["°C"]; % Tilluftstemperatur börvärde [°C]
R145 : "Temperatur 2" ["°C"]; % Temperatur 2 [°C]
R146 : "Börvärde extern" ["°C"]; % Extern börvärdesinställning [°C]
R147 : "Inverkan Rum/FL" ["°C"]; % Rum/Frånlufts kompensation inv. [°C]
R148 : "Inverkan värme" ["°C"]; % Inverkan av max.temp.diff värme [°C]
R149 : "Inverkan kyla" ["°C"]; % Inverkan av max.temp.diff kyla [°C]
R150 : "Max °C inverkan" ["°C"]; % Max.begr. inverkan [°C]
R151 : "Min °C inverkan" ["°C"]; % Min.begr. inverkan [°C]
R152 : "Starthöjning" ["°C"]; % Starthöjning [°C]
R153 : "Inverkan frysv." ["%"]; % Frysvakt antagen inverkan% [%]
R154 : "Start av kyla" ["°C"]; % Start av kyla [°C]
R155 : "Kylbehov" ["°C"]; % Kylbehov [°C]
R156 : "P-verkan Rum/FL" ["%"]; % P-verkan Rums/frånluftsstyrn.% [%]
R157 : "I-verkan Rum/FL" ["%"]; % I-verkan Rums/frånluftsstyrn.% [%]
R158 : "Min % inverkan" ["%"]; % Min.begr. inverkan % [%]
R159 : "Kylnivå regl." ["%"]; % Kylnivå % när reglering behövs [%]
PRIVATE
tmp;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM AnalogInput4 NAMED "Läs reg.140-159" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(140); % Start address register
DATA[4] := RWORD(20); % Number of registers
ANSWER SIZE 45
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(40); % Byte count
DATA[3] -> RWORD(IF DATA>32767 THEN %R140
R140:= (DATA-65536)/100;
ELSE
R140:= DATA/100;
ENDIF;
);
DATA[5] -> RWORD(IF DATA>32767 THEN %R141
R141:= (DATA-65536)/100;
ELSE
R141:= DATA/100;
ENDIF;
);
DATA[7] -> RWORD(IF DATA>32767 THEN %R142
R142:= (DATA-65536)/100;
ELSE
R142:= DATA/100;
ENDIF;
);
DATA[9] -> RWORD(IF DATA>32767 THEN %R143
R143:= (DATA-65536)/100;
ELSE
R143:= DATA/100;
ENDIF;
);
DATA[11] -> RWORD(IF DATA>32767 THEN %R144
R144:= (DATA-65536)/100;
ELSE
R144:= DATA/100;
ENDIF;
);
DATA[13] -> RWORD(IF DATA>32767 THEN %R145
R145:= (DATA-65536)/100;
ELSE
R145:= DATA/100;
ENDIF;
);
DATA[15] -> RWORD(IF DATA>32767 THEN %R146
R146:= (DATA-65536)/100;
ELSE
R146:= DATA/100;
ENDIF;
);
DATA[17] -> RWORD(IF DATA>32767 THEN %R147
R147:= (DATA-65536)/100;
ELSE
R147:= DATA/100;
ENDIF;
);
DATA[19] -> RWORD(IF DATA>32767 THEN %R148
R148:= (DATA-65536)/100;
ELSE
R148:= DATA/100;
ENDIF;
);
DATA[21] -> RWORD(IF DATA>32767 THEN %R149
R149:= (DATA-65536)/100;
ELSE
R149:= DATA/100;
ENDIF;
);
DATA[23] -> RWORD(IF DATA>32767 THEN %R150
R150:= (DATA-65536)/100;
ELSE
R150:= DATA/100;
ENDIF;
);
DATA[25] -> RWORD(IF DATA>32767 THEN %R151
R151:= (DATA-65536)/100;
ELSE
R151:= DATA/100;
ENDIF;
);
DATA[27] -> RWORD(IF DATA>32767 THEN %R152
R152:= (DATA-65536)/100;
ELSE
R152:= DATA/100;
ENDIF;
);
DATA[29] -> RWORD(R153:= DATA;); %R153
DATA[31] -> RWORD(IF DATA>32767 THEN %R154
R154:= (DATA-65536)/100;
ELSE
R154:= DATA/100;
ENDIF;
);
DATA[33] -> RWORD(IF DATA>32767 THEN %R155
R155:= (DATA-65536)/100;
ELSE
R155:= DATA/100;
ENDIF;
);
DATA[35] -> RWORD(R156:= DATA;); %R156
DATA[37] -> RWORD(R157:= DATA;); %R157
DATA[39] -> RWORD(R158:= DATA;); %R158
DATA[41] -> RWORD(R159:= DATA;); %R159
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read input status 160-167
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanAnalog5 NAMED "OumanReg160-167" TYPEID 21355 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
R160 : "Inverkan Rum/FL" ["°C"]; % Rums-/Frånluftskompensations inverkan [°C]
R161 : "I-verkan Rum/FL" ["°C"]; % I-verkan rums/frånluftsreglering [°C]
R162 : "Min °C inverkan" ["°C"]; % Min.begr. inverkan [°C]
R163 : "BV Kylvatten" ["°C"]; % Börvärdesinställn. returvatten kyla [°C]
R164 : "Kylvattentemp" ["°C"]; % Returvattentemp. Kyla [°C]
R165 : "BV Rum natt" ["°C"]; % Nattbörvärdesinst. Rumstemp. [°C]
R166 : "Rumstemp" ["°C"]; % Rumstemp. [°C]
R167 : "Reg-BV Tilluft" ["°C"]; % Tilluftstemp. Bestämd av regulator [°C]
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM AnalogInput5 NAMED "Läs reg.160-167" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(160); % Start address register
DATA[4] := RWORD(8); % Number of registers
ANSWER SIZE 21
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(16); % Byte count
DATA[3] -> RWORD(IF DATA>32767 THEN %R160
R160:= (DATA-65536)/100;
ELSE
R160:= DATA/100;
ENDIF;
);
DATA[5] -> RWORD(IF DATA>32767 THEN %R161
R161:= (DATA-65536)/100;
ELSE
R161:= DATA/100;
ENDIF;
);
DATA[7] -> RWORD(IF DATA>32767 THEN %R162
R162:= (DATA-65536)/100;
ELSE
R162:= DATA/100;
ENDIF;
);
DATA[9] -> RWORD(IF DATA>32767 THEN %R163
R163:= (DATA-65536)/100;
ELSE
R163:= DATA/100;
ENDIF;
);
DATA[11] -> RWORD(IF DATA>32767 THEN %R164
R164:= (DATA-65536)/100;
ELSE
R164:= DATA/100;
ENDIF;
);
DATA[13] -> RWORD(IF DATA>32767 THEN %R165
R165:= (DATA-65536)/100;
ELSE
R165:= DATA/100;
ENDIF;
);
DATA[15] -> RWORD(IF DATA>32767 THEN %R166
R166:= (DATA-65536)/100;
ELSE
R166:= DATA/100;
ENDIF;
);
DATA[17] -> RWORD(IF DATA>32767 THEN %R167
R167:= (DATA-65536)/100;
ELSE
R167:= DATA/100;
ENDIF;
);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read alarm status index 101-116
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanLarm1 NAMED "Ouman Larm 1" TYPEID 21356 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
% R91 Larmstatus LarmIndex 101-116 0…FFh N2 03(r)
LI101 : "Fel Utetemp" ; % B0 101 = Givarefel, Utetemperatur
LI102 : "Fel TLtemp" ; % B1 102 = Givarefel, Tilluftstemperatur
LI103 : "Fel FLtemp" ; % B2 103 = Givarefel, Frånluftstemperatur
LI104 : "Fel Rumstemp" ; % B3 104 = Givarefel, Rumstemperatur
LI105 : "Fel TLtemp B" ; % B4 105 = Givarefel, Tilluftstemperatur B
LI106 : "Fel Rumstemp B" ; % B5 106 = Givarefel, Rumstemperatur B
LI107 : "Fel Returv.temp"; % B6 107 = Givarefel, Returvatten temperatur
LI108 : "Fel FLtemp VÅV" ; % B7 108 = Givarefel, Frånluftstemperatur efter VÅV
LI109 : "Fel TLtemp VÅV" ; % B8 109 = Givarefel, Tilluftstemperatur efter VÅV
LI110 : "Fel Inst.pot" ; % B9 110 = Givarefel, Fjärrinställningspotentiometer
LI111 : "Fel Fri mätning"; % B10 111 = Givarefel, Fri mätning (kan adresseras)
LI112 : "Larm Frysfara" ; % B11 112 = Frysfaralarm, Batteriets returvattentemperatur
LI113 : "Larm Avv.TLtemp"; % B12 113 = Avvikelselarm, Tilluftstemperatur
LI114 : "Larm Avv.FLtemp"; % B13 114 = Avvikelselarm, Frånluftstemperatur
LI115 : "Larm Avv.Rumst."; % B14 115 = Avvikelselarm, Rumstemperatur
LI116 : "Larm AvvTLtryck"; % B15 116 = Avvikelselarm, Tilluftens tryck
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Larm1 NAMED "Läs larm101-116" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(91); % Start address register
DATA[4] := RWORD(1); % Number of registers
ANSWER SIZE 7
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(2); % Byte count
DATA[3] -> BYTE(IF (DATA & 1) THEN LI101:= 1; ELSE LI101:= 0; ENDIF;
IF (DATA & 2) THEN LI102:= 1; ELSE LI102:= 0; ENDIF;
IF (DATA & 4) THEN LI103:= 1; ELSE LI103:= 0; ENDIF;
IF (DATA & 8) THEN LI104:= 1; ELSE LI104:= 0; ENDIF;
IF (DATA & 16) THEN LI105:= 1; ELSE LI105:= 0; ENDIF;
IF (DATA & 32) THEN LI106:= 1; ELSE LI106:= 0; ENDIF;
IF (DATA & 64) THEN LI107:= 1; ELSE LI107:= 0; ENDIF;
IF (DATA & 128) THEN LI108:= 1; ELSE LI108:= 0; ENDIF;
);
DATA[4] -> BYTE(IF (DATA & 1) THEN LI109:= 1; ELSE LI109:= 0; ENDIF;
IF (DATA & 2) THEN LI110:= 1; ELSE LI110:= 0; ENDIF;
IF (DATA & 4) THEN LI111:= 1; ELSE LI111:= 0; ENDIF;
IF (DATA & 8) THEN LI112:= 1; ELSE LI112:= 0; ENDIF;
IF (DATA & 16) THEN LI113:= 1; ELSE LI113:= 0; ENDIF;
IF (DATA & 32) THEN LI114:= 1; ELSE LI114:= 0; ENDIF;
IF (DATA & 64) THEN LI115:= 1; ELSE LI115:= 0; ENDIF;
IF (DATA & 128) THEN LI116:= 1; ELSE LI116:= 0; ENDIF;
);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read alarm status index 117-132
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanLarm2 NAMED "Ouman Larm 2" TYPEID 21357 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
%90 Larmstatus larmindex 117-132 0…FFh N2 03 (r)
LI117 : "Larm AvvFLtryck"; % B0 117 = Avvikelselarm, Frånluftens tryck
LI118 : "Larm Brand TL" ; % B1 118 = Brandfaralarm, Tilluftstemperatur
LI119 : "Larm VÅV v.grad"; % B2 119 = Återvinningslarm, VÅV:s verkningsgrad
LI120 : "Larm Elbatt.öhs"; % B3 120 = Larm, slutande 1 (B) Elbatteriets överhettningsskydd >= ver. 1.42
LI121 : "Larm slutande 2"; % B4 121 = Larm, slutande 2 (B) Ej i funktion version >= 1.42
LI122 : "Larm slutande 3"; % B5 122 = Larm, slutande 3 (B)
LI123 : "Larm slutande 4"; % B6 123 = Larm, slutande 4 (B)
LI124 : "Larm brytande 1"; % B7 124 = Larm, brytande 1 (B) Ej i funktion version >= 1.42
LI125 : "Larm brytande 2"; % B8 125 = Larm, brytande 2
LI126 : "Larm Filt.TLPDE"; % B9 126 = Filtervakts larm, Tilluftsfilterns PDE
LI127 : "Larm Filt.FLPDE"; % B10 127 = Filtervakts larm, Frånluftsfilterns PDE
LI128 : "Larm Filt.TLPDS"; % B11 128 = Filtervakts larm, Tilluftsfilterns PDS
LI129 : "Larm Filt.FLPDS"; % B12 129 = Filtervakts larm, Frånluftsfilterns PDS
LI130 : "Larm Flöde TL" ; % B13 130 = Flödeslarm, Tilluftens flödeshastighet
LI131 : "Larm Flöde FL" ; % B14 131 = Flödeslarm, Frånluftens flödeshastighet
LI132 : "Larm FlödeTLPDE"; % B15 132 = Flödeslarm, Tilluftsfilterns minimum PDE
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Larm2 NAMED "Läs larm117-132" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(90); % Start address register
DATA[4] := RWORD(1); % Number of registers
ANSWER SIZE 7
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(2); % Byte count
DATA[3] -> BYTE(IF (DATA & 1) THEN LI117:= 1; ELSE LI117:= 0; ENDIF;
IF (DATA & 2) THEN LI118:= 1; ELSE LI118:= 0; ENDIF;
IF (DATA & 4) THEN LI119:= 1; ELSE LI119:= 0; ENDIF;
IF (DATA & 8) THEN LI120:= 1; ELSE LI120:= 0; ENDIF;
IF (DATA & 16) THEN LI121:= 1; ELSE LI121:= 0; ENDIF;
IF (DATA & 32) THEN LI122:= 1; ELSE LI122:= 0; ENDIF;
IF (DATA & 64) THEN LI123:= 1; ELSE LI123:= 0; ENDIF;
IF (DATA & 128) THEN LI124:= 1; ELSE LI124:= 0; ENDIF;
);
DATA[4] -> BYTE(IF (DATA & 1) THEN LI125:= 1; ELSE LI125:= 0; ENDIF;
IF (DATA & 2) THEN LI126:= 1; ELSE LI126:= 0; ENDIF;
IF (DATA & 4) THEN LI127:= 1; ELSE LI127:= 0; ENDIF;
IF (DATA & 8) THEN LI128:= 1; ELSE LI128:= 0; ENDIF;
IF (DATA & 16) THEN LI129:= 1; ELSE LI129:= 0; ENDIF;
IF (DATA & 32) THEN LI130:= 1; ELSE LI130:= 0; ENDIF;
IF (DATA & 64) THEN LI131:= 1; ELSE LI131:= 0; ENDIF;
IF (DATA & 128) THEN LI132:= 1; ELSE LI132:= 0; ENDIF;
);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read alarm status index 133-148
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanLarm3 NAMED "Ouman Larm 3" TYPEID 21358 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
%93 Larmstatus larmindex 133-148 0…FFh N2 03(r)
LI133 : "Larm FlödeFLPDE"; % B0 133 = Flödeslarm, Frånluftsfilterns minimum PDE
LI134 : "Larm KonflTF1/1"; % B1 134 = Konfliktlarm, TF 1/1 driftinformation
LI135 : "Larm KonflTF1/2"; % B2 135 = Konfliktlarm, TF 1/2 driftinformation
LI136 : "Larm KonflFF1/1"; % B3 136 = Konfliktlarm, FF 1/1 driftinformation
LI137 : "Larm Avv FF 1/1"; % B4 137 = Avvikelselarm, FF 1/1 driftinformation
LI138 : "Larm KonflFF1/2"; % B5 138 = Konfliktlarm, FF 1/2 driftinformation
LI139 : "Larm Avv FF 1/2"; % B6 139 = Avvikelselarm, FF 1/2 driftinformation
LI140 : "Larm KonflTFPDS"; % B7 140 = Konfliktlarm, TF fläkt PDS
LI141 : "Larm KonflFFPDS"; % B8 141 = Konfliktlarm, FF fläkt PDS
LI142 : "Larm Konfl.230V"; % B9 142 = Konfliktlarm, 230V driftinformation
LI143 : "Larm TF f.omf." ; % B10 143 = TF dörbikoppling, TF frekvensomformarens förbikoppling
LI144 : "Larm KonflTFomf"; % B11 144 = Konfliktlarm, TF frekvensomformarens förbikoppling
LI145 : "Larm FF f.omf." ; % B12 145 = FF dörbikoppling, FF frekvensomformarens förbikoppling
LI146 : "Larm KonflFFomf"; % B13 146 = Konfliktlarm, FF frekvensomformarens förbikoppling
LI147 : "Larm Avv FF omf"; % B14 147 = Avvikelselarm, FF frekvensomformarens förbikoppling
LI148 : "Larm Pump värme"; % B15 148 = Pumplarm, Värmepumpens driftinformation
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Larm3 NAMED "Läs larm133-148" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(93); % Start address register
DATA[4] := RWORD(1); % Number of registers
ANSWER SIZE 7
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(2); % Byte count
DATA[3] -> BYTE(IF (DATA & 1) THEN LI133:= 1; ELSE LI133:= 0; ENDIF;
IF (DATA & 2) THEN LI134:= 1; ELSE LI134:= 0; ENDIF;
IF (DATA & 4) THEN LI135:= 1; ELSE LI135:= 0; ENDIF;
IF (DATA & 8) THEN LI136:= 1; ELSE LI136:= 0; ENDIF;
IF (DATA & 16) THEN LI137:= 1; ELSE LI137:= 0; ENDIF;
IF (DATA & 32) THEN LI138:= 1; ELSE LI138:= 0; ENDIF;
IF (DATA & 64) THEN LI139:= 1; ELSE LI139:= 0; ENDIF;
IF (DATA & 128) THEN LI140:= 1; ELSE LI140:= 0; ENDIF;
);
DATA[4] -> BYTE(IF (DATA & 1) THEN LI141:= 1; ELSE LI141:= 0; ENDIF;
IF (DATA & 2) THEN LI142:= 1; ELSE LI142:= 0; ENDIF;
IF (DATA & 4) THEN LI143:= 1; ELSE LI143:= 0; ENDIF;
IF (DATA & 8) THEN LI144:= 1; ELSE LI144:= 0; ENDIF;
%IF (DATA & 16) THEN LI145:= 1; ELSE LI145:= 0; ENDIF;
%IF (DATA & 32) THEN LI146:= 1; ELSE LI146:= 0; ENDIF;
%IF (DATA & 64) THEN LI147:= 1; ELSE LI147:= 0; ENDIF;
%IF (DATA & 128) THEN LI148:= 1; ELSE LI148:= 0; ENDIF;
);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read alarm status index 149-164
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanLarm4 NAMED "Ouman Larm 4" TYPEID 21359 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
%92 Larmstatus larmindex 149-164 0…FFh N2 03(r)
LI149 : "Larm Huvudpump" ; %B0 149 = Pumplarm, Huvudpumpens driftinformation
LI150 : "Larm VÅV pump" ; %B1 150 = Pumplarm, VÅV pumpens driftinformation
LI151 : "Larm Kylpump" ; %B2 151 = Pumplarm, Kylpumpens driftinformation
LI152 : "Larm Elbatt övh"; %B3 152 = Överhettningslarm, Elbatteriets överhettning
LI153 : "Larm TF1/1 relä"; %B4 153 = Värmerelälarm, TF 1/1 värmerelä
LI154 : "Larm TF1/2 relä"; %B5 154 = Värmerelälarm, TF 1/2 värmerelä
LI155 : "Larm FF1/1 relä"; %B6 155 = Värmerelälarm, FF 1/1 värmerelä
LI156 : "Larm FF1/2 relä"; %B7 156 = Värmerelälarm, FF 1/2 värmerelä
LI157 : "Larm Värmeprelä"; %B8 157 = Värmerelälarm, Värmepumpens värmerelä
LI158 : "Larm VÅVp. relä"; %B9 158 = Värmerelälarm, VÅV pumpens värmerelä
LI159 : "Larm Kylp. relä"; %B10 159 = Värmerelälarm, Kylpumpens värmerelä
LI160 : "Larm Tryck v.kr"; %B11 160 = Trycklarm, värmekretsens tryckvakt
LI161 : "Larm Tryck VÅV" ; %B12 161 = Trycklarm, VÅV glykolkretsens tryckvakt
LI162 : "Larm Rök" ; %B13 162 = Larm, röklarm
LI163 : "Larm Nöd-stopp" ; %B14 163 = Larm, Nöd-stopp
LI164 : "Larm Service" ; %B15 164 = Larm, Serviceinterval-larm
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Larm4 NAMED "Läs larm149-164" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(92); % Start address register
DATA[4] := RWORD(1); % Number of registers
ANSWER SIZE 7
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(2); % Byte count
DATA[3] -> BYTE(IF (DATA & 1) THEN LI149:= 1; ELSE LI149:= 0; ENDIF;
IF (DATA & 2) THEN LI150:= 1; ELSE LI150:= 0; ENDIF;
IF (DATA & 4) THEN LI151:= 1; ELSE LI151:= 0; ENDIF;
IF (DATA & 8) THEN LI152:= 1; ELSE LI152:= 0; ENDIF;
IF (DATA & 16) THEN LI153:= 1; ELSE LI153:= 0; ENDIF;
IF (DATA & 32) THEN LI154:= 1; ELSE LI154:= 0; ENDIF;
IF (DATA & 64) THEN LI155:= 1; ELSE LI155:= 0; ENDIF;
IF (DATA & 128) THEN LI156:= 1; ELSE LI156:= 0; ENDIF;
);
DATA[4] -> BYTE(IF (DATA & 1) THEN LI157:= 1; ELSE LI157:= 0; ENDIF;
IF (DATA & 2) THEN LI158:= 1; ELSE LI158:= 0; ENDIF;
IF (DATA & 4) THEN LI159:= 1; ELSE LI159:= 0; ENDIF;
IF (DATA & 8) THEN LI160:= 1; ELSE LI160:= 0; ENDIF;
IF (DATA & 16) THEN LI161:= 1; ELSE LI161:= 0; ENDIF;
IF (DATA & 32) THEN LI162:= 1; ELSE LI162:= 0; ENDIF;
IF (DATA & 64) THEN LI163:= 1; ELSE LI163:= 0; ENDIF;
IF (DATA & 128) THEN LI164:= 1; ELSE LI164:= 0; ENDIF;
);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read alarm status index 165-171
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanLarm5 NAMED "Ouman Larm 5" TYPEID 21360 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
%95 Larmstatus larmindex 165-171 0…FFh N2 03(r)
LI165 : "Larm VÅV rotat."; % B0 165 = Larm, VÅV rotation
LI166 : "Larm kylmaskin"; % B1 166 = Larm, kylmaskinens fellarm
LI167 : "Larm Brand FL" ; % B2 167 = Brandfaralarm, Frånluftstemperatur (version 1.42 och vidare)
LI168 : "Larm TryckTFPDE"; % B3 168 = Trycklarm, TF fläkt PDE (version 1.42 och vidare)
LI169 : "Larm TryckFFPDE"; % B4 169 = Trycklarm, FF fläkt PDE (version 1.42 och vidare)
LI170 : "Larm Avv.TFPDE"; % B5 170 = Avvikelselarm, TF fläkt PDE (versio 1.42 och vidare)
LI171 : "Larm Avv.FFPDE"; % B6 171 = Avvikelselarm, FF fläkt PDE ( version 1.42 och vidare)
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Larm5 NAMED "Läs Larm161-171" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(95); % Start address register
DATA[4] := RWORD(1); % Number of registers
ANSWER SIZE 7
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(2); % Byte count
DATA[3] -> BYTE(IF (DATA & 1) THEN LI165:= 1; ELSE LI165:= 0; ENDIF;
IF (DATA & 2) THEN LI166:= 1; ELSE LI166:= 0; ENDIF;
IF (DATA & 4) THEN LI167:= 1; ELSE LI167:= 0; ENDIF;
IF (DATA & 8) THEN LI168:= 1; ELSE LI168:= 0; ENDIF;
IF (DATA & 16) THEN LI169:= 1; ELSE LI169:= 0; ENDIF;
IF (DATA & 32) THEN LI170:= 1; ELSE LI170:= 0; ENDIF;
IF (DATA & 64) THEN LI171:= 1; ELSE LI171:= 0; ENDIF;
%IF (DATA & 128) THEN LI156:= 1; ELSE LI156:= 0; ENDIF;
);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for OUMAN read alarm status Summa larm A + B
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
% History:
%
DEVICETYPE OumanLarmSum NAMED "Ouman Summalarm" TYPEID 21361 IS
PARAMETER
Id : "Adress";
PUBLIC
% OBS Modbus register number is the protocol number (no decrement in telegram)
%99 Summalarm 03 (r)
LA : "A summalarm"; % Bit 0=A summalarm
LB : "B summalarm"; % Bit 1=B summalarm
% Funktion: om något larm är aktivt har bit värde 1 annars 0.
% Om nytt larm inkommer och bitvärdet är 1, går det ca 20s
% till det blir 0 och därefter återskapas nytt aktuellt värde.
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Summalarm NAMED "Läs Summalarm" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(03); % Modbus command "03h" Read holding registers
DATA[2] := RWORD(99); % Start address register
DATA[4] := RWORD(1); % Number of registers
ANSWER SIZE 7
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(03); % Modbus command "03h" Read holding registers
%DATA[2] = BYTE(2); % Byte count
DATA[3] -> BYTE(IF (DATA & 1) THEN LA:= 1; ELSE LA:= 0; ENDIF;
IF (DATA & 2) THEN LB:= 1; ELSE LB:= 0; ENDIF;
);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Device definition for OUMAN write register
%%
%% Settings module:
%% Parity: None
%% Baud: 9600
%% Mode: RTU
%%
%% Note! Telegram for reading Analog status
%%
%% Author: 2010-05-04 Peter Widetun, ABELKO AB Luleå
%% History:
%%
%DEVICETYPE OumanSettings NAMED "Ouman ställ reg" TYPEID 21361 IS
%
% PARAMETER
%
% Id : "Adress";
%
% R184 : "BV kylvatten" ["°C"]; %Börvärdesinst returvatten kyla 10…40 [°C] N6 03 (r), 06(w), 16(w)
% R242 : "BV värmeretur"["°C"]; %Börvärdesinst returvatten värme 10.0…40.0 [°C] N6 03 (r), 06(w), 16(w)
% R300a : "Styrmode temp"["(0-3)"]; %Bit1…2 Temperaturstyrning:
% % 0=Tilluftsstyrning
% % 1=Rumsåterställning
% % 2=Frånluftsåterställning
% % 3=Tilluftsstyrd med utekomp
% R300b : "Styrmode TF/FF"["(0-1)"]; %Bit3…4 TF/FF värmebegränsningstyrning:
% % 0=Spjäll min->Värme
% % 1=Värme->Spjäll min
%
% PUBLIC
%
% PRIVATE
% Cnt;
%
% BAUDRATE 9600;
%
% CHECKSUM MODBUS SWAPPED;
%
% TELEGRAM Settings1 NAMED "Ställ register" IS
%
% QUESTION
% DATA[0] := BYTE(Id);
% DATA[1] := HEX(06); %Write singel register
% DATA[2] <- RWORD( %Start adress (regnr-1)
% IF Cnt>8 THEN Cnt:=0; ENDIF;
% % Adress=Register
% IF Cnt=0 THEN DATA := 184; %R184
% ELSIF Cnt=1 THEN DATA := 242; %R242
% ELSIF Cnt=2 THEN DATA := 300; %R300
% ELSIF Cnt=3 THEN DATA := 300; %R300
% ELSIF Cnt=4 THEN DATA := 300; %R300
% ELSIF Cnt=5 THEN DATA := 300; %R300
% ELSIF Cnt=6 THEN DATA := 300; %R300
% ELSIF Cnt=7 THEN DATA := 300; %R300
% ELSIF Cnt=8 THEN DATA := 300; %R300
% ENDIF;
% );
%
% DATA[4] <- RWORD(
% IF Cnt=0 THEN
% IF R184<10 THEN DATA := 10; % 10…40 [°C]
% ELSIF R184>40 THEN DATA := 40;
% ELSE DATA := R184;
% ENDIF;
% ELSIF Cnt=1 THEN
% IF R242<0 THEN DATA := 0; % 10.0…40.0 [°C]
% ELSIF R242>40 THEN DATA := 400;
% ELSE DATA := R242*10;
% ENDIF;
% ELSIF Cnt=2 THEN
% IF R300a<0 THEN tmp := 0; % 0-3
% ELSIF R300a>3 THEN tmp := 3;
% ELSE tmp := R300a;
% ENDIF;
% IF R300b>0 THEN tmp := tmp + 4; % 0-1
% ENDIF;
% DATA := tmp;
% ELSIF Cnt=3 THEN
% IF R300a<0 THEN tmp := 0; % 0-3
% ELSIF R300a>3 THEN tmp := 3;
% ELSE tmp := R300a;
% ENDIF;
% IF R300b>0 THEN tmp := tmp + 4; % 0-1
% ENDIF;
% DATA := tmp;
% ELSIF Cnt=4 THEN
% IF R300a<0 THEN tmp := 0; % 0-3
% ELSIF R300a>3 THEN tmp := 3;
% ELSE tmp := R300a;
% ENDIF;
% IF R300b>0 THEN tmp := tmp + 4; % 0-1
% ENDIF;
% DATA := tmp;
% ELSIF Cnt=5 THEN
% IF R300a<0 THEN tmp := 0; % 0-3
% ELSIF R300a>3 THEN tmp := 3;
% ELSE tmp := R300a;
% ENDIF;
% IF R300b>0 THEN tmp := tmp + 4; % 0-1
% ENDIF;
% DATA := tmp;
% ELSIF Cnt=6 THEN
% IF R300a<0 THEN tmp := 0; % 0-3
% ELSIF R300a>3 THEN tmp := 3;
% ELSE tmp := R300a;
% ENDIF;
% IF R300b>0 THEN tmp := tmp + 4; % 0-1
% ENDIF;
% DATA := tmp;
% ELSIF Cnt=7 THEN
% IF R300a<0 THEN tmp := 0; % 0-3
% ELSIF R300a>3 THEN tmp := 3;
% ELSE tmp := R300a;
% ENDIF;
% IF R300b>0 THEN tmp := tmp + 4; % 0-1
% ENDIF;
% DATA := tmp;
% ELSIF Cnt=8 THEN
% IF R300a<0 THEN tmp := 0; % 0-3
% ELSIF R300a>3 THEN tmp := 3;
% ELSE tmp := R300a;
% ENDIF;
% IF R300b>0 THEN tmp := tmp + 4; % 0-1
% ENDIF;
% DATA := tmp;
% ENDIF;
%
% Cnt := Cnt + 1;
% IF Cnt>8 THEN Cnt := 0;
% ENDIF;
% );
%
% ANSWER SIZE 8
% DATA[0] = BYTE(Id);
% DATA[1] = HEX(06);
%
% 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.