Novenco Luftbehandlingsaggregat
Detaljer
- Typ
- Drivrutin
- Upplaggd av
- Ove Jansson, Abelko Innovation
- Version
- 3
- Uppdaterad
- 2013-08-28
- Skapad
- 2013-08-27
- Kategori
- Kyla, Modbus, Värme, Ventilation
- Visningar
- 2941
Beskrivning
Drivrutin baserad på ZCF_gen2_mu14159
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 NOVENCO read input registers 1-56
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2008-01-03 inital version
%
DEVICETYPE NovencoRead1 NAMED "Novenco ReadAI1" TYPEID 21320 IS
PARAMETER
Id : "Address";
PUBLIC
%Address Min Max Factor Desription
R1 : "DriftMode" [""] ; %3x0001 0 500 Current DriftMode 000-099:Agg Stop
% 100-199:Agg Lo Speed
% 200-299:Agg Hi Speed
% 300-399:Spec RegMode
R3 : "SupDuctPa" ["Pa"] ; %3x0003 0 2000 Supply DuctPressure (Calc from PressSignal)
%R4 : "SupDuctPaRgSet" ["Pa"] ; %3x0004 0 2000 Regulator SetPoint for DuctPressReg
R5 : "ExtDuctPa" ["Pa"] ; %3x0005 0 2000 Extract DuctPressure (Calc from PressSignal)
%R6 : "ExtDuctPaRgSet" ["Pa"] ; %3x0006 0 2000 Regulator SetPoint for DuctPressReg
R7 : "SupFlow" ["l/s"]; %3x0007 0 30000 Current SupplyFlow
%R8 : "SupFlowRegSet" ["l/s"]; %3x0008 250 30000 Regulator SupplyFlow-Set
R9 : "ExtFlow" ["l/s"]; %3x0009 0 30000 Current ExtractFlow
%R10 : "ExtFlowRegSet" ["l/s"]; %3x0010 0 30000 Regulator ExtractFlow-Set
R11 : "CO2_ppmMeasure" ["ppm"]; %3x0011 0 10000 CO2 Sensor ppm Measure
R20 : "SupTemp" ["°C"] ; %3x0020 0 4000 1/100 Current SupplyTemp
%R21 : "SupTempRegSet" ["°C"] ; %3x0021 0 4000 1/100 Regulator SupplyTemp-Set
R22 : "ExtTemp" ["°C"] ; %3x0022 0 4000 1/100 Current ExtractTemp
%R23 : "ExtTempRegSet" ["°C"] ; %3x0023 10 4000 1/100 Regulator ExtractTemp-Set
R24 : "OutDoorTemp" ["°C"] ; %3x0024 0 4000 1/100 Current OutDoorTemp
R25 : "RoomTemp" ["°C"] ; %3x0025 0 4000 1/100 Current RoomTemp (External Sens)
R26 : "ExhaustTemp" ["°C"] ; %3x0026 0 4000 1/100 Current ExhaustTemp
R29 : "BattEXC_Temp" ["°C"] ; %3x0029 0 6000 1/100 WaterBatt Temp after EXC
R30 : "HW_BattTemp " ["°C"] ; %3x0030 0 4000 1/100 Current HeatWaterBattTemp
R31 : "SupFiltPaAvr" ["Pa"] ; %3x0031 0 2000 Supply FilterPressure (Avr-Meas)
R32 : "ExtFiltPaAvr" ["Pa"] ; %3x0032 0 2000 Extract FilterPressure (Avr-Meas)
R34 : "SupMotorSet" ["%"] ; %3x0034 0 10000 Supply MotorSignal
R36 : "ExtMotorSet" ["%"] ; %3x0036 0 10000 Extract MotorSignal
R53 : "HeatEXCPower" ["%"] ; %3x0053 0 10000 1/100 EXC-Regulator HeatPower
R54 : "HeatPower" ["%"] ; %3x0054 0 10000 1/100 AfterHeat-Regulator Power
R55 : "CoolPower" ["%"] ; %3x0055 0 10000 1/100 Cool Regulator Power
%R56 : "CoolActPower" ["%"] ; %3x0056 0 10000 1/100 Actual Cool-Power
% By ON/OFF (DX) Cool Reg are actual power depending on
% RE ON (Step)
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM AnalogInput1 NAMED "Read reg. 1-56" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(04); % Modbus command "04h" Read registers
DATA[2] := RWORD(0); % Start address register
DATA[4] := RWORD(56); % Number of registers
ANSWER SIZE 117
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
%DATA[2] = BYTE(112); % Byte count
DATA[3] -> RWORD(R1 := DATA;); %DriftMode
DATA[7] -> RWORD(R3 := DATA;); %SupDuctPa
%DATA[9] -> RWORD(R4 := DATA;); %SupDuctPaRgSet
DATA[11] -> RWORD(R5 := DATA;); %ExtDuctPa
%DATA[13] -> RWORD(R6 := DATA;); %ExtDuctPaRgSet
DATA[15] -> RWORD(R7 := DATA;); %SupFlow
%DATA[17] -> RWORD(R8 := DATA;); %SupFlowRegSet
DATA[19] -> RWORD(R9 := DATA;); %ExtFlow
%DATA[21] -> RWORD(R10 := DATA;); %ExtFlowRegSet
DATA[23] -> RWORD(R11 := DATA;); %CO2_ppmMeas
DATA[41] -> RWORD(R20 := DATA /100;); %SupTemp 1/100
%DATA[43] -> RWORD(R21 := DATA /100;); %SupTempRegSet 1/100
DATA[45] -> RWORD(R22 := DATA /100;); %ExtTemp 1/100
%DATA[47] -> RWORD(R23 := DATA /100;); %ExtTempRegSet 1/100
DATA[49] -> RWORD(R24 := DATA /100;); %OutDoorTemp 1/100
DATA[51] -> RWORD(R25 := DATA /100;); %RoomTemp 1/100
DATA[53] -> RWORD(R26 := DATA /100;); %ExhaustTemp 1/100
DATA[59] -> RWORD(R29 := DATA /100;); %BattEXC_Temp 1/100
DATA[61] -> RWORD(R30 := DATA /100;); %HW_BattTemp 1/100
DATA[63] -> RWORD(R31 := DATA;); %SupFiltPaAvr
DATA[65] -> RWORD(R32 := DATA;); %ExtFiltPaAvr
DATA[69] -> RWORD(R34 := DATA;); %SupMotorSet
DATA[73] -> RWORD(R36 := DATA;); %ExtMotorSet
DATA[107]-> RWORD(R53 := DATA /100;); %HeatEXCPower 1/100
DATA[109]-> RWORD(R54 := DATA /100;); %HeatPower 1/100
DATA[111]-> RWORD(R55 := DATA /100;); %CoolPower 1/100
%DATA[113]-> RWORD(R56 := DATA /100;); %CoolActPower 1/100
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for NOVENCO read input registers 73-97
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2008-01-03 inital version
%
DEVICETYPE NovencoRead2 NAMED "Novenco ReadAI2" TYPEID 21321 IS
PARAMETER
Id : "Address";
PUBLIC
%Address Min Max Factor Desription
R73 : "FCsupMtrPrcOut" ["%"] ; %3x0073 0 10000 1/100 SupplyMotor Percent Output
R74 : "FCsupMtrHzOut" ["Hz"] ; %3x0074 0 10000 1/100 SupplyMotor Frequency Output
R75 : "FCsupMtrIout" ["mA"] ; %3x0075 0 30000 SupplyMotor Output Current
R76 : "FCsupMtrPowOut" ["W"] ; %3x0076 0 6000 SupplyMotor Output Power
R77 : "FCsupMtrPrcSet" ["%"] ; %3x0077 0 10000 SupplyMotor Output Set
R78 : "SupSFP" ["J/m3"]; %3x0078 0 10000 Supply SFP
R83 : "FCextMtrPrcOut" ["%"] ; %3x0083 0 10000 1/100 ExtractMotor Percent Output
R84 : "FCextMtrHzOut" ["Hz"] ; %3x0084 0 10000 1/100 ExtractMotor Frequency Output
R85 : "FCextMtrIout" ["mA"] ; %3x0085 0 30000 ExtractMotor Output Current
R86 : "FCextMtrPowOut" ["W"] ; %3x0086 0 6000 ExtractMotor Output Power
R87 : "FCextMtrPrcSet" ["%"] ; %3x0087 0 10000 ExtractMotor Output Set
R88 : "ExtSFP" ["J/m3"]; %3x0088 0 10000 Extract SFP
R92 : "EXC_PrcOut" ["%"] ; %3x0092 0 10000 1/100 EXC-Percent Out
R93 : "EXC_RpmOut" ["RPM"] ; %3x0093 0 20000 1/100 EXC-RpmOutput
R97 : "EXC_PrcSet" ["%"] ; %3x0097 0 10000 1/100 EXC-PercentSet
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM AnalogInput2 NAMED "Read reg. 73-97" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(04); % Modbus command "04h" Read registers
DATA[2] := RWORD(72); % Start address register 73
DATA[4] := RWORD(25); % Number of registers 73-97
ANSWER SIZE 55
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
%DATA[2] = BYTE(50); % Byte count
DATA[3] -> RWORD(R73 := DATA / 100;); %FCsupMtrPrcOut 1/100
DATA[5] -> RWORD(R74 := DATA / 100;); %FCsupMtrHzOut 1/100
DATA[7] -> RWORD(R75 := DATA;); %FCsupMtrIout
DATA[9] -> RWORD(R76 := DATA;); %FCsupMtrPowOut
DATA[11] -> RWORD(R77 := DATA;); %FCsupMtrPrcSet
DATA[13] -> RWORD(R78 := DATA;); %SupSFP
DATA[23] -> RWORD(R83 := DATA / 100;); %FCextMtrPrcOut 1/100
DATA[25] -> RWORD(R84 := DATA / 100;); %FCextMtrHzOut 1/100
DATA[27] -> RWORD(R85 := DATA;); %FCextMtrIout
DATA[29] -> RWORD(R86 := DATA;); %FCextMtrPowOut
DATA[31] -> RWORD(R87 := DATA;); %FCextMtrPrcSet
DATA[33] -> RWORD(R88 := DATA;); %ExtSFP
DATA[41] -> RWORD(R92 := DATA / 100;); %EXC_PrcOut 1/100
DATA[43] -> RWORD(R93 := DATA / 100;); %EXC_RpmOut 1/100
DATA[51] -> RWORD(R97 := DATA / 100;); %EXC_PrcSet 1/100
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for NOVENCO set register 1-55
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for setting register values
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2009-09-03 inital version
%
DEVICETYPE NovencoSetReg1 NAMED "Novenco SetPRES" TYPEID 21322 IS
PARAMETER
Id : "Address";
%%%%%%%%%%%%%%%%
%Address Min Max Factor Desription
SR1 : "ManDriftMode" ; %4x0001 0 3 0-Auto, 1-ManStop, 2-ManLo, 3-ManHi
SR2 : "MtrRegMode" ; %4x0002 0 6 0-Press, 1-Flow, 2-ExtSlave, 3-SupSlave,
% 4-External VDC Set, 5 FAN-Opt Sup/Ext,
% 6 FAN-Opt whit Ext Slave
SR3 : "SupDuctPaLoSet" ["Pa"] ; %4x0003 0 2000 LoSpeed DuctPressure Set
SR4 : "SupDuctPaHiSet" ["Pa"] ; %4x0004 0 2000 HiSpeed DuctPressure Set
SR7 : "ExtDuctPaLoSet" ["Pa"] ; %4x0007 0 2000 LoSpeed DuctPressure Set
SR8 : "ExtDuctPaHiSet" ["Pa"] ; %4x0008 0 2000 HiSpeed DuctPressure Set
SR35 : "SupFlowFireSet" ["%"] ; %4x0035 0 10000 1/100 User Supply Motor Percent Set at Fire
SR36 : "ExtFlowFireSet" ["%"] ; %4x0036 0 10000 1/100 User Extract Motor Percent Set at Fire
%SR50 : "TimeSw-Year" ["y"] ; %4x0050 2000 2099 Current Year
%SR51 : "TimeSw-Month" ["m"] ; %4x0051 1 12 Current Month
%SR52 : "TimeSw-Date" ["d"] ; %4x0052 1 31 Current Date
%SR53 : "TimeSw-Hour" ["h"] ; %4x0053 0 23 Current Hour
%SR54 : "TimeSw-Minute" ["Min"]; %4x0054 0 59 Current Minute
%SR55 : "TimeSw-Second" ["Sec"]; %4x0055 0 59 Current Second
PUBLIC
PRIVATE
Cnt;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Settings1 NAMED "Setvalue Pres." IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(06); %Write singel register
DATA[2] <- RWORD( %Start adress (regnr-1)
IF Cnt>7 THEN Cnt:=0;
ENDIF;
IF Cnt=0 THEN DATA := 0; %SR1 ManDriftMode
ELSIF Cnt=1 THEN DATA := 1; %SR2 MtrRegMode
ELSIF Cnt=2 THEN DATA := 2; %SR3 SupDuctPaLoSet
ELSIF Cnt=3 THEN DATA := 3; %SR4 SupDuctPaHiSet
ELSIF Cnt=4 THEN DATA := 6; %SR7 ExtDuctPaLoSet
ELSIF Cnt=5 THEN DATA := 7; %SR8 ExtDuctPaHiSet
ELSIF Cnt=6 THEN DATA := 34; %SR35 SupFlowFireSet
ELSIF Cnt=7 THEN DATA := 35; %SR36 ExtFlowFireSet
ENDIF;
);
DATA[4] <- RWORD(
IF Cnt=0 THEN
IF SR1<0 OR SR1>3 THEN DATA := 1; %ManDriftMode 0-3
ELSE DATA := SR1;
ENDIF;
ELSIF Cnt=1 THEN
IF SR2<0 OR SR2>6 THEN DATA := 0; %MtrRegMode 0-6
ELSE DATA := SR2;
ENDIF;
ELSIF Cnt=2 THEN
IF SR3<0 OR SR3>2000 THEN DATA := 1000; %SupDuctPaLoSet 0-2000 Pa
ELSE DATA := SR3;
ENDIF;
ELSIF Cnt=3 THEN
IF SR4<0 OR SR4>2000 THEN DATA := 1000; %SupDuctPaHiSet 0-2000 Pa
ELSE DATA := SR4;
ENDIF;
ELSIF Cnt=4 THEN
IF SR7<0 OR SR7>2000 THEN DATA := 1000; %ExtDuctPaLoSet 0-2000 Pa
ELSE DATA := SR7;
ENDIF;
ELSIF Cnt=5 THEN
IF SR8<0 OR SR8>2000 THEN DATA := 1000; %ExtDuctPaHiSet 0-2000 Pa
ELSE DATA := SR8;
ENDIF;
ELSIF Cnt=6 THEN
IF SR35<0 THEN DATA := 0; %SupFlowFireSet 0-100.00%
ELSIF SR35>100.00 THEN DATA := 10000;
ELSE DATA := SR35*100;
ENDIF;
ELSIF Cnt=7 THEN
IF SR36<0 THEN DATA := 0; %ExtFlowFireSet 0-100.00%
ELSIF SR36>100.00 THEN DATA := 10000;
ELSE DATA := SR36*100;
ENDIF;
ENDIF;
Cnt := Cnt + 1;
IF Cnt>7 THEN Cnt := 0;
ENDIF;
);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(06);
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for NOVENCO set register 148-248
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for setting register values
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2009-09-03 inital version
%
DEVICETYPE NovencoSetReg1 NAMED "Novenco SetTEMP" TYPEID 21323 IS
PARAMETER
Id : "Address";
%%%%%%%%%%%%%%%%
%Address Min Max Factor Desription
SR148: "TempRegMode" ; %4x0148 0 3 0-Sup, 1-Ext, 2-Room, 3-Sup/Ext -Diff
SR149: "TempRegSet" ["°C"]; %4x0149 0 4000 1/100 TempSet for actual RegMode
SR150: "SupTempMinSet" ["°C"]; %4x0150 0 1800 1/100 Min Allowed SupplyTemp
SR151: "SupTempMaxSet" ["°C"]; %4x0151 2000 5000 1/100 Max Allowed SupplyTemp
SR152: "SupTempDiffSet" ["°C"]; %4x0152 100 1500 1/100 TempDiff Set between Extract/Supply
% Used for TempRegMide = 3 (Const Sup/Ext -TempReg)
SR233: "HW_FrzStopSet" ["°C"]; %4x0233 500 4000 1/100 SetVal for AntiFrost Reg when Agg. = Stop
SR234: "HW_FrzDriftSet" ["°C"]; %4x0234 200 2000 1/100 SetVal for AntiFrost Reg when Agg. = Drift
SR235: "HW_FreezePB" ["°C"]; %4x0235 200 2000 1/100 P-Band for AntiFrost Reg
SR236: "HW_FrzAlrTpSet" ["°C"]; %4x0236 200 2000 1/100 SetVal for AntiFrost TempAlarm
%SR245: "FiltSupStatAlr" ["Pa"]; %4x0245 10 500 Filter Pressure Alr Limit for SupFilter (static mode)
%SR246: "FiltExtStatAlr" ["Pa"]; %4x0246 10 500 Filter Pressure Alr Limit for ExtFilter (static mode)
%SR247: "FiltSupDynAlr" ["%"] ; %4x0247 1000 10000 1/100 Filter Pressure Alr Limit for SupFilter (dynamic mode)
%SR248: "FiltExtDynAlr" ["%"] ; %4x0248 1000 10000 1/100 Filter Pressure Alr Limit for ExtFilter (dynamic mode)
PUBLIC
PRIVATE
Cnt;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Settings1 NAMED "Setvalue Temp" 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;
IF Cnt=0 THEN DATA := 147; %SR148
ELSIF Cnt=1 THEN DATA := 148; %SR149
ELSIF Cnt=2 THEN DATA := 149; %SR150
ELSIF Cnt=3 THEN DATA := 150; %SR151
ELSIF Cnt=4 THEN DATA := 151; %SR152
ELSIF Cnt=5 THEN DATA := 232; %SR233
ELSIF Cnt=6 THEN DATA := 233; %SR234
ELSIF Cnt=7 THEN DATA := 234; %SR235
ELSIF Cnt=8 THEN DATA := 235; %SR236
%ELSIF Cnt=x THEN DATA := 244; %SR245
%ELSIF Cnt=x THEN DATA := 245; %SR246
%ELSIF Cnt=x THEN DATA := 246; %SR247
%ELSIF Cnt=x THEN DATA := 247; %SR248
ENDIF;
);
DATA[4] <- RWORD(
IF Cnt=0 THEN
IF SR148<0 OR SR148>3 THEN DATA := 0; %SR148 TempRegMode 0-3
ELSE DATA := SR148;
ENDIF;
ELSIF Cnt=1 THEN
IF SR149<0 THEN DATA := 0; %SR149 TempRegSet 0-40.00 °C
ELSIF SR149>40.00 THEN DATA := 4000;
ELSE DATA := SR149*100;
ENDIF;
ELSIF Cnt=2 THEN
IF SR150<0 THEN DATA := 0; %SR150 SupTempMinSet 0-18.00 °C
ELSIF SR150>18.00 THEN DATA := 1800;
ELSE DATA := SR150*100;
ENDIF;
ELSIF Cnt=3 THEN
IF SR151<20.00 THEN DATA := 2000; %SR151 SupTempMaxSet 20.00-50.00 °C
ELSIF SR151>50.00 THEN DATA := 5000;
ELSE DATA := SR151*100;
ENDIF;
ELSIF Cnt=4 THEN
IF SR152< 1.00 THEN DATA := 100; %SR152 SupTempDiffSet 1.00-15.00 °C
ELSIF SR152>15.00 THEN DATA := 1500;
ELSE DATA := SR152*100;
ENDIF;
ELSIF Cnt=5 THEN
IF SR233< 5.00 THEN DATA := 500; %SR233 HW_FrzStopSet 5.00-40.00 °C
ELSIF SR233>40.00 THEN DATA := 4000;
ELSE DATA := SR233*100;
ENDIF;
ELSIF Cnt=6 THEN
IF SR234< 2.00 THEN DATA := 200; %SR234 HW_FrzDriftSet 2.00-20.00 °C
ELSIF SR234>20.00 THEN DATA := 2000;
ELSE DATA := SR234*100;
ENDIF;
ELSIF Cnt=7 THEN
IF SR235< 2.00 THEN DATA := 200; %SR235 HW_FreezePB 2.00-20.00 °C
ELSIF SR235>20.00 THEN DATA := 2000;
ELSE DATA := SR235*100;
ENDIF;
ELSIF Cnt=8 THEN
IF SR236< 2.00 THEN DATA := 200; %SR236 HW_FrzAlrTpSet 2.00-20.00 °C
ELSIF SR236>20.00 THEN DATA := 2000;
ELSE DATA := SR236*100;
ENDIF;
%ELSIF Cnt=x THEN
% IF SR245<10 THEN DATA := 10; %SR245 FiltSupStatAlr 10-500 Pa
% ELSIF SR245>500 THEN DATA := 500;
% ELSE DATA := SR245;
% ENDIF;
%ELSIF Cnt=x THEN
% IF SR246<10 THEN DATA := 10; %SR246 FiltExtStatAlr 10-500 Pa
% ELSIF SR246>500 THEN DATA := 500;
% ELSE DATA := SR246;
% ENDIF;
%ELSIF Cnt=x THEN
% IF SR247<10.00 THEN DATA := 1000; %SR247 FiltSupDynAlr 1000-10000 %
% ELSIF SR247>100.00 THEN DATA := 10000;
% ELSE DATA := SR247*100;
% ENDIF;
%ELSIF Cnt=x THEN
% IF SR248<10.00 THEN DATA := 1000; %SR248 FiltExtDynAlr 1000-10000 %
% ELSIF SR248>100.00 THEN DATA := 10000;
% ELSE ATA := SR248*100;
% ENDIF;
ENDIF;
Cnt := Cnt + 1;
IF Cnt>8 THEN Cnt := 0;
ENDIF;
);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(06);
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for NOVENCO read input digital input 1-93
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading digital inputs
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2009-09-03 inital version
%
DEVICETYPE NovencoDIN NAMED "Novenco Read DI" TYPEID 21324 IS
PARAMETER
Id : "Address";
PUBLIC
%Address Description
DI1 : "Operation" ; %1x0001 Operation ON/OFF
%DI2 : "ExtStop" ; %1x0002 External Stop
%DI3 : "ExtHiSpeed" ; %1x0003 External HiSpeed
DI31 : "Heat_RE1" ; %1x0031 Heat Relay 1
DI32 : "Cool_RE1" ; %1x0032 Cool Relay 1
DI33 : "BattEXC_PumpRE" ; %1x0033 WaterBatt EXC PumpRelay
DI34 : "AlrActive" ; %1x0034 Least one Active Alarm
DI35 : "Alr_RE1" ; %1x0035 AlarmRelay-1 (A-Alarm)
DI36 : "Alr_RE2" ; %1x0036 AlarmRelay-2 (B-Alarm)
DI37 : "Alr_FireSignal" ; %1x0037 FireAlarm-Signal (sensor in room)
DI38 : "Alr_SmokeSignal" ; %1x0038 SmokeAlarm-Signal (sensor in duct)
DI40 : "ElBattOverHeat" ; %1x0040 EL-Batt OverHeat Signal
DI41 : "FiltSupAlarm" ; %1x0041 Filter Alarm for Sup-Filter (pressure above Limit)
DI42 : "FiltExtAlarm" ; %1x0042 Filter Alarm for Ext-Filter (pressure above Limit)
DI57 : "HW_FrostAlarm" ; %1x0057 HeatWaterTemp -FrostReg Alarm
DI61 : "Cool_DI1_Alarm" ; %1x0061 Cool Digital Alarm-1 Input
DI62 : "Cool_DI2_Alarm" ; %1x0062 Cool Digital Alarm-2 Input
%DI70 : "SupMotorON" ; %1x0070 SupplyMotor ON/OFF
DI71 : "SupMotorAlarm" ; %1x0071 SupplyMotor ON/OFF
DI74 : "FCsupMtrAlrIhi" ; %1x0074 SupplyMotor Ihi Alarm
%DI80 : "ExtMotorON" ; %1x0080 ExtractMotor ON/OFF
DI81 : "ExtMotorAlarm" ; %1x0081 ExtractMotor ON/OFF
DI84 : "FCextMtrAlrIhi" ; %1x0084 ExtractMotor Ihi Alarm
%DI90 : "EXC_ON" ; %1x0090 EXC-MotorCtrl ON/OFF
DI93 : "EXC_RotAlarm" ; %1x0093 EXC-Rotation Alarm
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM DigitalInput1 NAMED "Read DI 1-20" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(02); % Modbus command "02h" read discrete input (bit)
DATA[2] := RWORD(0); % Start adress
DATA[4] := RWORD(93); % Number of inputs
ANSWER SIZE 17
DATA[0] = BYTE(Id);
DATA[1] = HEX(02);
%DATA[2] = BYTE(12);
%1-8
DATA[3] -> BYTE(IF (DATA & 1) THEN DI1 := 1; ELSE DI1 := 0; ENDIF; %1 Operation
% IF (DATA & 2) THEN DI2 := 1; ELSE DI2 := 0; ENDIF; %2 ExtStop
% IF (DATA & 4) THEN DI3 := 1; ELSE DI3 := 0; ENDIF; %3 ExtHiSpeed
); %4-8 Not used
%DATA[4] -> BYTE(IF (DATA & 1) THEN DIx := 1; ELSE DIx := 0; ENDIF; %9-16 Not used
%DATA[5] -> BYTE(IF (DATA & 1) THEN DIx := 1; ELSE DIx := 0; ENDIF; %17-24 Not used
%25-32
DATA[6] -> BYTE(IF (DATA & 64) THEN DI31:= 1; ELSE DI31:= 0; ENDIF; %31 : "Heat_RE1"
IF (DATA & 128) THEN DI32:= 1; ELSE DI32:= 0; ENDIF; %32 : "Cool_RE1"
);
%33-40
DATA[7] -> BYTE(IF (DATA & 1) THEN DI33:= 1; ELSE DI33:= 0; ENDIF; %33 : "BattEXC_PumpRE"
IF (DATA & 2) THEN DI34:= 1; ELSE DI34:= 0; ENDIF; %34 : "AlrActive"
IF (DATA & 4) THEN DI35:= 1; ELSE DI35:= 0; ENDIF; %35 : "Alr_RE1"
IF (DATA & 8) THEN DI36:= 1; ELSE DI36:= 0; ENDIF; %36 : "Alr_RE2"
IF (DATA & 16) THEN DI37:= 1; ELSE DI37:= 0; ENDIF; %37 : "Alr_FireSignal"
IF (DATA & 32) THEN DI38:= 1; ELSE DI38:= 0; ENDIF; %38 : "Alr_SmokeSig"
IF (DATA & 128) THEN DI40:= 1; ELSE DI40:= 0; ENDIF; %40 : "ElBattOverHeat"
);
%41-48
DATA[8] -> BYTE(IF (DATA & 1) THEN DI41:= 1; ELSE DI41:= 0; ENDIF; %41 : "FiltSupAlarm"
IF (DATA & 2) THEN DI42:= 1; ELSE DI42:= 0; ENDIF; %42 : "FiltExtAlarm"
);
%DATA[9] -> BYTE(IF (DATA & 1) THEN DIx := 1; ELSE DIx := 0; ENDIF; %49-56 Not used
%57-64
DATA[10] -> BYTE(IF (DATA & 1) THEN DI57:= 1; ELSE DI57:= 0; ENDIF; %57 : "HW_FrostAlr"
IF (DATA & 16) THEN DI61:= 1; ELSE DI61:= 0; ENDIF; %61 : "Cool_DI1_Alarm"
IF (DATA & 32) THEN DI62:= 1; ELSE DI62:= 0; ENDIF; %62 : "Cool_DI2_Alarm"
);
%65-72
%DATA[11] -> BYTE(IF (DATA & 32) THEN DI70:= 1; ELSE DI70:= 0; ENDIF; %70 : "SupMotorON"
DATA[11] -> BYTE(IF (DATA & 64) THEN DI71:= 1; ELSE DI71:= 0; ENDIF; %71 : "SupMotorAlarm"
);
%73-80
DATA[12] -> BYTE(IF (DATA & 2) THEN DI74:= 1; ELSE DI74:= 0; ENDIF; %74 : "FCsupMtrAlrIhi"
% IF (DATA & 128) THEN DI80:= 1; ELSE DI80:= 0; ENDIF; %80 : "ExtMotorON"
);
%81-88
DATA[13] -> BYTE(IF (DATA & 1) THEN DI81:= 1; ELSE DI81:= 0; ENDIF; %81 : "ExtMotorAlarm"
IF (DATA & 8) THEN DI84:= 1; ELSE DI84:= 0; ENDIF; %84 : "FCextMtrAlrIhi"
);
%89-96
%DATA[14] -> BYTE(IF (DATA & 2) THEN DI90:= 1; ELSE DI90:= 0; ENDIF; %90 : "EXC_ON"
DATA[14] -> BYTE(IF (DATA & 16) THEN DI93:= 1; ELSE DI93:= 0; ENDIF; %93 : "EXC_RotAlarm"
);
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for NOVENCO digital output 1
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading digital inputs
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2009-09-03 inital version
%
DEVICETYPE NovencoDOUT NAMED "Novenco Set DO" TYPEID 21325 IS
PARAMETER
Id : "Adress";
DU6 : "RecircFunction"; %0x0006 0/1 Recirc Function ON/OFF
PUBLIC
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM DigitalOutput NAMED "Recirc ON/OFF" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(05); % Modbus command "0x05" force singel coil
DATA[2] := RWORD(5); % start coil (adress-1)
DATA[4] <- RWORD(IF DU6=0 THEN DATA:=0; % 0x0000 OFF
ELSE DATA:=65280; % 0xFF00 ON
ENDIF;
);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(05);
%DATA[2] = RWORD(0); % start coil
%DATA[4] = RWORD(1); % value
TIMEOUT 1000
END;
END;
% Device definition for NOVENCO read input registers 1-56
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2008-01-03 inital version
%
DEVICETYPE NovencoRead1 NAMED "Novenco ReadAI1" TYPEID 21320 IS
PARAMETER
Id : "Address";
PUBLIC
%Address Min Max Factor Desription
R1 : "DriftMode" [""] ; %3x0001 0 500 Current DriftMode 000-099:Agg Stop
% 100-199:Agg Lo Speed
% 200-299:Agg Hi Speed
% 300-399:Spec RegMode
R3 : "SupDuctPa" ["Pa"] ; %3x0003 0 2000 Supply DuctPressure (Calc from PressSignal)
%R4 : "SupDuctPaRgSet" ["Pa"] ; %3x0004 0 2000 Regulator SetPoint for DuctPressReg
R5 : "ExtDuctPa" ["Pa"] ; %3x0005 0 2000 Extract DuctPressure (Calc from PressSignal)
%R6 : "ExtDuctPaRgSet" ["Pa"] ; %3x0006 0 2000 Regulator SetPoint for DuctPressReg
R7 : "SupFlow" ["l/s"]; %3x0007 0 30000 Current SupplyFlow
%R8 : "SupFlowRegSet" ["l/s"]; %3x0008 250 30000 Regulator SupplyFlow-Set
R9 : "ExtFlow" ["l/s"]; %3x0009 0 30000 Current ExtractFlow
%R10 : "ExtFlowRegSet" ["l/s"]; %3x0010 0 30000 Regulator ExtractFlow-Set
R11 : "CO2_ppmMeasure" ["ppm"]; %3x0011 0 10000 CO2 Sensor ppm Measure
R20 : "SupTemp" ["°C"] ; %3x0020 0 4000 1/100 Current SupplyTemp
%R21 : "SupTempRegSet" ["°C"] ; %3x0021 0 4000 1/100 Regulator SupplyTemp-Set
R22 : "ExtTemp" ["°C"] ; %3x0022 0 4000 1/100 Current ExtractTemp
%R23 : "ExtTempRegSet" ["°C"] ; %3x0023 10 4000 1/100 Regulator ExtractTemp-Set
R24 : "OutDoorTemp" ["°C"] ; %3x0024 0 4000 1/100 Current OutDoorTemp
R25 : "RoomTemp" ["°C"] ; %3x0025 0 4000 1/100 Current RoomTemp (External Sens)
R26 : "ExhaustTemp" ["°C"] ; %3x0026 0 4000 1/100 Current ExhaustTemp
R29 : "BattEXC_Temp" ["°C"] ; %3x0029 0 6000 1/100 WaterBatt Temp after EXC
R30 : "HW_BattTemp " ["°C"] ; %3x0030 0 4000 1/100 Current HeatWaterBattTemp
R31 : "SupFiltPaAvr" ["Pa"] ; %3x0031 0 2000 Supply FilterPressure (Avr-Meas)
R32 : "ExtFiltPaAvr" ["Pa"] ; %3x0032 0 2000 Extract FilterPressure (Avr-Meas)
R34 : "SupMotorSet" ["%"] ; %3x0034 0 10000 Supply MotorSignal
R36 : "ExtMotorSet" ["%"] ; %3x0036 0 10000 Extract MotorSignal
R53 : "HeatEXCPower" ["%"] ; %3x0053 0 10000 1/100 EXC-Regulator HeatPower
R54 : "HeatPower" ["%"] ; %3x0054 0 10000 1/100 AfterHeat-Regulator Power
R55 : "CoolPower" ["%"] ; %3x0055 0 10000 1/100 Cool Regulator Power
%R56 : "CoolActPower" ["%"] ; %3x0056 0 10000 1/100 Actual Cool-Power
% By ON/OFF (DX) Cool Reg are actual power depending on
% RE ON (Step)
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM AnalogInput1 NAMED "Read reg. 1-56" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(04); % Modbus command "04h" Read registers
DATA[2] := RWORD(0); % Start address register
DATA[4] := RWORD(56); % Number of registers
ANSWER SIZE 117
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
%DATA[2] = BYTE(112); % Byte count
DATA[3] -> RWORD(R1 := DATA;); %DriftMode
DATA[7] -> RWORD(R3 := DATA;); %SupDuctPa
%DATA[9] -> RWORD(R4 := DATA;); %SupDuctPaRgSet
DATA[11] -> RWORD(R5 := DATA;); %ExtDuctPa
%DATA[13] -> RWORD(R6 := DATA;); %ExtDuctPaRgSet
DATA[15] -> RWORD(R7 := DATA;); %SupFlow
%DATA[17] -> RWORD(R8 := DATA;); %SupFlowRegSet
DATA[19] -> RWORD(R9 := DATA;); %ExtFlow
%DATA[21] -> RWORD(R10 := DATA;); %ExtFlowRegSet
DATA[23] -> RWORD(R11 := DATA;); %CO2_ppmMeas
DATA[41] -> RWORD(R20 := DATA /100;); %SupTemp 1/100
%DATA[43] -> RWORD(R21 := DATA /100;); %SupTempRegSet 1/100
DATA[45] -> RWORD(R22 := DATA /100;); %ExtTemp 1/100
%DATA[47] -> RWORD(R23 := DATA /100;); %ExtTempRegSet 1/100
DATA[49] -> RWORD(R24 := DATA /100;); %OutDoorTemp 1/100
DATA[51] -> RWORD(R25 := DATA /100;); %RoomTemp 1/100
DATA[53] -> RWORD(R26 := DATA /100;); %ExhaustTemp 1/100
DATA[59] -> RWORD(R29 := DATA /100;); %BattEXC_Temp 1/100
DATA[61] -> RWORD(R30 := DATA /100;); %HW_BattTemp 1/100
DATA[63] -> RWORD(R31 := DATA;); %SupFiltPaAvr
DATA[65] -> RWORD(R32 := DATA;); %ExtFiltPaAvr
DATA[69] -> RWORD(R34 := DATA;); %SupMotorSet
DATA[73] -> RWORD(R36 := DATA;); %ExtMotorSet
DATA[107]-> RWORD(R53 := DATA /100;); %HeatEXCPower 1/100
DATA[109]-> RWORD(R54 := DATA /100;); %HeatPower 1/100
DATA[111]-> RWORD(R55 := DATA /100;); %CoolPower 1/100
%DATA[113]-> RWORD(R56 := DATA /100;); %CoolActPower 1/100
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for NOVENCO read input registers 73-97
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2008-01-03 inital version
%
DEVICETYPE NovencoRead2 NAMED "Novenco ReadAI2" TYPEID 21321 IS
PARAMETER
Id : "Address";
PUBLIC
%Address Min Max Factor Desription
R73 : "FCsupMtrPrcOut" ["%"] ; %3x0073 0 10000 1/100 SupplyMotor Percent Output
R74 : "FCsupMtrHzOut" ["Hz"] ; %3x0074 0 10000 1/100 SupplyMotor Frequency Output
R75 : "FCsupMtrIout" ["mA"] ; %3x0075 0 30000 SupplyMotor Output Current
R76 : "FCsupMtrPowOut" ["W"] ; %3x0076 0 6000 SupplyMotor Output Power
R77 : "FCsupMtrPrcSet" ["%"] ; %3x0077 0 10000 SupplyMotor Output Set
R78 : "SupSFP" ["J/m3"]; %3x0078 0 10000 Supply SFP
R83 : "FCextMtrPrcOut" ["%"] ; %3x0083 0 10000 1/100 ExtractMotor Percent Output
R84 : "FCextMtrHzOut" ["Hz"] ; %3x0084 0 10000 1/100 ExtractMotor Frequency Output
R85 : "FCextMtrIout" ["mA"] ; %3x0085 0 30000 ExtractMotor Output Current
R86 : "FCextMtrPowOut" ["W"] ; %3x0086 0 6000 ExtractMotor Output Power
R87 : "FCextMtrPrcSet" ["%"] ; %3x0087 0 10000 ExtractMotor Output Set
R88 : "ExtSFP" ["J/m3"]; %3x0088 0 10000 Extract SFP
R92 : "EXC_PrcOut" ["%"] ; %3x0092 0 10000 1/100 EXC-Percent Out
R93 : "EXC_RpmOut" ["RPM"] ; %3x0093 0 20000 1/100 EXC-RpmOutput
R97 : "EXC_PrcSet" ["%"] ; %3x0097 0 10000 1/100 EXC-PercentSet
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM AnalogInput2 NAMED "Read reg. 73-97" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(04); % Modbus command "04h" Read registers
DATA[2] := RWORD(72); % Start address register 73
DATA[4] := RWORD(25); % Number of registers 73-97
ANSWER SIZE 55
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
%DATA[2] = BYTE(50); % Byte count
DATA[3] -> RWORD(R73 := DATA / 100;); %FCsupMtrPrcOut 1/100
DATA[5] -> RWORD(R74 := DATA / 100;); %FCsupMtrHzOut 1/100
DATA[7] -> RWORD(R75 := DATA;); %FCsupMtrIout
DATA[9] -> RWORD(R76 := DATA;); %FCsupMtrPowOut
DATA[11] -> RWORD(R77 := DATA;); %FCsupMtrPrcSet
DATA[13] -> RWORD(R78 := DATA;); %SupSFP
DATA[23] -> RWORD(R83 := DATA / 100;); %FCextMtrPrcOut 1/100
DATA[25] -> RWORD(R84 := DATA / 100;); %FCextMtrHzOut 1/100
DATA[27] -> RWORD(R85 := DATA;); %FCextMtrIout
DATA[29] -> RWORD(R86 := DATA;); %FCextMtrPowOut
DATA[31] -> RWORD(R87 := DATA;); %FCextMtrPrcSet
DATA[33] -> RWORD(R88 := DATA;); %ExtSFP
DATA[41] -> RWORD(R92 := DATA / 100;); %EXC_PrcOut 1/100
DATA[43] -> RWORD(R93 := DATA / 100;); %EXC_RpmOut 1/100
DATA[51] -> RWORD(R97 := DATA / 100;); %EXC_PrcSet 1/100
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for NOVENCO set register 1-55
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for setting register values
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2009-09-03 inital version
%
DEVICETYPE NovencoSetReg1 NAMED "Novenco SetPRES" TYPEID 21322 IS
PARAMETER
Id : "Address";
%%%%%%%%%%%%%%%%
%Address Min Max Factor Desription
SR1 : "ManDriftMode" ; %4x0001 0 3 0-Auto, 1-ManStop, 2-ManLo, 3-ManHi
SR2 : "MtrRegMode" ; %4x0002 0 6 0-Press, 1-Flow, 2-ExtSlave, 3-SupSlave,
% 4-External VDC Set, 5 FAN-Opt Sup/Ext,
% 6 FAN-Opt whit Ext Slave
SR3 : "SupDuctPaLoSet" ["Pa"] ; %4x0003 0 2000 LoSpeed DuctPressure Set
SR4 : "SupDuctPaHiSet" ["Pa"] ; %4x0004 0 2000 HiSpeed DuctPressure Set
SR7 : "ExtDuctPaLoSet" ["Pa"] ; %4x0007 0 2000 LoSpeed DuctPressure Set
SR8 : "ExtDuctPaHiSet" ["Pa"] ; %4x0008 0 2000 HiSpeed DuctPressure Set
SR35 : "SupFlowFireSet" ["%"] ; %4x0035 0 10000 1/100 User Supply Motor Percent Set at Fire
SR36 : "ExtFlowFireSet" ["%"] ; %4x0036 0 10000 1/100 User Extract Motor Percent Set at Fire
%SR50 : "TimeSw-Year" ["y"] ; %4x0050 2000 2099 Current Year
%SR51 : "TimeSw-Month" ["m"] ; %4x0051 1 12 Current Month
%SR52 : "TimeSw-Date" ["d"] ; %4x0052 1 31 Current Date
%SR53 : "TimeSw-Hour" ["h"] ; %4x0053 0 23 Current Hour
%SR54 : "TimeSw-Minute" ["Min"]; %4x0054 0 59 Current Minute
%SR55 : "TimeSw-Second" ["Sec"]; %4x0055 0 59 Current Second
PUBLIC
PRIVATE
Cnt;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Settings1 NAMED "Setvalue Pres." IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(06); %Write singel register
DATA[2] <- RWORD( %Start adress (regnr-1)
IF Cnt>7 THEN Cnt:=0;
ENDIF;
IF Cnt=0 THEN DATA := 0; %SR1 ManDriftMode
ELSIF Cnt=1 THEN DATA := 1; %SR2 MtrRegMode
ELSIF Cnt=2 THEN DATA := 2; %SR3 SupDuctPaLoSet
ELSIF Cnt=3 THEN DATA := 3; %SR4 SupDuctPaHiSet
ELSIF Cnt=4 THEN DATA := 6; %SR7 ExtDuctPaLoSet
ELSIF Cnt=5 THEN DATA := 7; %SR8 ExtDuctPaHiSet
ELSIF Cnt=6 THEN DATA := 34; %SR35 SupFlowFireSet
ELSIF Cnt=7 THEN DATA := 35; %SR36 ExtFlowFireSet
ENDIF;
);
DATA[4] <- RWORD(
IF Cnt=0 THEN
IF SR1<0 OR SR1>3 THEN DATA := 1; %ManDriftMode 0-3
ELSE DATA := SR1;
ENDIF;
ELSIF Cnt=1 THEN
IF SR2<0 OR SR2>6 THEN DATA := 0; %MtrRegMode 0-6
ELSE DATA := SR2;
ENDIF;
ELSIF Cnt=2 THEN
IF SR3<0 OR SR3>2000 THEN DATA := 1000; %SupDuctPaLoSet 0-2000 Pa
ELSE DATA := SR3;
ENDIF;
ELSIF Cnt=3 THEN
IF SR4<0 OR SR4>2000 THEN DATA := 1000; %SupDuctPaHiSet 0-2000 Pa
ELSE DATA := SR4;
ENDIF;
ELSIF Cnt=4 THEN
IF SR7<0 OR SR7>2000 THEN DATA := 1000; %ExtDuctPaLoSet 0-2000 Pa
ELSE DATA := SR7;
ENDIF;
ELSIF Cnt=5 THEN
IF SR8<0 OR SR8>2000 THEN DATA := 1000; %ExtDuctPaHiSet 0-2000 Pa
ELSE DATA := SR8;
ENDIF;
ELSIF Cnt=6 THEN
IF SR35<0 THEN DATA := 0; %SupFlowFireSet 0-100.00%
ELSIF SR35>100.00 THEN DATA := 10000;
ELSE DATA := SR35*100;
ENDIF;
ELSIF Cnt=7 THEN
IF SR36<0 THEN DATA := 0; %ExtFlowFireSet 0-100.00%
ELSIF SR36>100.00 THEN DATA := 10000;
ELSE DATA := SR36*100;
ENDIF;
ENDIF;
Cnt := Cnt + 1;
IF Cnt>7 THEN Cnt := 0;
ENDIF;
);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(06);
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for NOVENCO set register 148-248
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for setting register values
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2009-09-03 inital version
%
DEVICETYPE NovencoSetReg1 NAMED "Novenco SetTEMP" TYPEID 21323 IS
PARAMETER
Id : "Address";
%%%%%%%%%%%%%%%%
%Address Min Max Factor Desription
SR148: "TempRegMode" ; %4x0148 0 3 0-Sup, 1-Ext, 2-Room, 3-Sup/Ext -Diff
SR149: "TempRegSet" ["°C"]; %4x0149 0 4000 1/100 TempSet for actual RegMode
SR150: "SupTempMinSet" ["°C"]; %4x0150 0 1800 1/100 Min Allowed SupplyTemp
SR151: "SupTempMaxSet" ["°C"]; %4x0151 2000 5000 1/100 Max Allowed SupplyTemp
SR152: "SupTempDiffSet" ["°C"]; %4x0152 100 1500 1/100 TempDiff Set between Extract/Supply
% Used for TempRegMide = 3 (Const Sup/Ext -TempReg)
SR233: "HW_FrzStopSet" ["°C"]; %4x0233 500 4000 1/100 SetVal for AntiFrost Reg when Agg. = Stop
SR234: "HW_FrzDriftSet" ["°C"]; %4x0234 200 2000 1/100 SetVal for AntiFrost Reg when Agg. = Drift
SR235: "HW_FreezePB" ["°C"]; %4x0235 200 2000 1/100 P-Band for AntiFrost Reg
SR236: "HW_FrzAlrTpSet" ["°C"]; %4x0236 200 2000 1/100 SetVal for AntiFrost TempAlarm
%SR245: "FiltSupStatAlr" ["Pa"]; %4x0245 10 500 Filter Pressure Alr Limit for SupFilter (static mode)
%SR246: "FiltExtStatAlr" ["Pa"]; %4x0246 10 500 Filter Pressure Alr Limit for ExtFilter (static mode)
%SR247: "FiltSupDynAlr" ["%"] ; %4x0247 1000 10000 1/100 Filter Pressure Alr Limit for SupFilter (dynamic mode)
%SR248: "FiltExtDynAlr" ["%"] ; %4x0248 1000 10000 1/100 Filter Pressure Alr Limit for ExtFilter (dynamic mode)
PUBLIC
PRIVATE
Cnt;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Settings1 NAMED "Setvalue Temp" 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;
IF Cnt=0 THEN DATA := 147; %SR148
ELSIF Cnt=1 THEN DATA := 148; %SR149
ELSIF Cnt=2 THEN DATA := 149; %SR150
ELSIF Cnt=3 THEN DATA := 150; %SR151
ELSIF Cnt=4 THEN DATA := 151; %SR152
ELSIF Cnt=5 THEN DATA := 232; %SR233
ELSIF Cnt=6 THEN DATA := 233; %SR234
ELSIF Cnt=7 THEN DATA := 234; %SR235
ELSIF Cnt=8 THEN DATA := 235; %SR236
%ELSIF Cnt=x THEN DATA := 244; %SR245
%ELSIF Cnt=x THEN DATA := 245; %SR246
%ELSIF Cnt=x THEN DATA := 246; %SR247
%ELSIF Cnt=x THEN DATA := 247; %SR248
ENDIF;
);
DATA[4] <- RWORD(
IF Cnt=0 THEN
IF SR148<0 OR SR148>3 THEN DATA := 0; %SR148 TempRegMode 0-3
ELSE DATA := SR148;
ENDIF;
ELSIF Cnt=1 THEN
IF SR149<0 THEN DATA := 0; %SR149 TempRegSet 0-40.00 °C
ELSIF SR149>40.00 THEN DATA := 4000;
ELSE DATA := SR149*100;
ENDIF;
ELSIF Cnt=2 THEN
IF SR150<0 THEN DATA := 0; %SR150 SupTempMinSet 0-18.00 °C
ELSIF SR150>18.00 THEN DATA := 1800;
ELSE DATA := SR150*100;
ENDIF;
ELSIF Cnt=3 THEN
IF SR151<20.00 THEN DATA := 2000; %SR151 SupTempMaxSet 20.00-50.00 °C
ELSIF SR151>50.00 THEN DATA := 5000;
ELSE DATA := SR151*100;
ENDIF;
ELSIF Cnt=4 THEN
IF SR152< 1.00 THEN DATA := 100; %SR152 SupTempDiffSet 1.00-15.00 °C
ELSIF SR152>15.00 THEN DATA := 1500;
ELSE DATA := SR152*100;
ENDIF;
ELSIF Cnt=5 THEN
IF SR233< 5.00 THEN DATA := 500; %SR233 HW_FrzStopSet 5.00-40.00 °C
ELSIF SR233>40.00 THEN DATA := 4000;
ELSE DATA := SR233*100;
ENDIF;
ELSIF Cnt=6 THEN
IF SR234< 2.00 THEN DATA := 200; %SR234 HW_FrzDriftSet 2.00-20.00 °C
ELSIF SR234>20.00 THEN DATA := 2000;
ELSE DATA := SR234*100;
ENDIF;
ELSIF Cnt=7 THEN
IF SR235< 2.00 THEN DATA := 200; %SR235 HW_FreezePB 2.00-20.00 °C
ELSIF SR235>20.00 THEN DATA := 2000;
ELSE DATA := SR235*100;
ENDIF;
ELSIF Cnt=8 THEN
IF SR236< 2.00 THEN DATA := 200; %SR236 HW_FrzAlrTpSet 2.00-20.00 °C
ELSIF SR236>20.00 THEN DATA := 2000;
ELSE DATA := SR236*100;
ENDIF;
%ELSIF Cnt=x THEN
% IF SR245<10 THEN DATA := 10; %SR245 FiltSupStatAlr 10-500 Pa
% ELSIF SR245>500 THEN DATA := 500;
% ELSE DATA := SR245;
% ENDIF;
%ELSIF Cnt=x THEN
% IF SR246<10 THEN DATA := 10; %SR246 FiltExtStatAlr 10-500 Pa
% ELSIF SR246>500 THEN DATA := 500;
% ELSE DATA := SR246;
% ENDIF;
%ELSIF Cnt=x THEN
% IF SR247<10.00 THEN DATA := 1000; %SR247 FiltSupDynAlr 1000-10000 %
% ELSIF SR247>100.00 THEN DATA := 10000;
% ELSE DATA := SR247*100;
% ENDIF;
%ELSIF Cnt=x THEN
% IF SR248<10.00 THEN DATA := 1000; %SR248 FiltExtDynAlr 1000-10000 %
% ELSIF SR248>100.00 THEN DATA := 10000;
% ELSE ATA := SR248*100;
% ENDIF;
ENDIF;
Cnt := Cnt + 1;
IF Cnt>8 THEN Cnt := 0;
ENDIF;
);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(06);
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for NOVENCO read input digital input 1-93
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading digital inputs
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2009-09-03 inital version
%
DEVICETYPE NovencoDIN NAMED "Novenco Read DI" TYPEID 21324 IS
PARAMETER
Id : "Address";
PUBLIC
%Address Description
DI1 : "Operation" ; %1x0001 Operation ON/OFF
%DI2 : "ExtStop" ; %1x0002 External Stop
%DI3 : "ExtHiSpeed" ; %1x0003 External HiSpeed
DI31 : "Heat_RE1" ; %1x0031 Heat Relay 1
DI32 : "Cool_RE1" ; %1x0032 Cool Relay 1
DI33 : "BattEXC_PumpRE" ; %1x0033 WaterBatt EXC PumpRelay
DI34 : "AlrActive" ; %1x0034 Least one Active Alarm
DI35 : "Alr_RE1" ; %1x0035 AlarmRelay-1 (A-Alarm)
DI36 : "Alr_RE2" ; %1x0036 AlarmRelay-2 (B-Alarm)
DI37 : "Alr_FireSignal" ; %1x0037 FireAlarm-Signal (sensor in room)
DI38 : "Alr_SmokeSignal" ; %1x0038 SmokeAlarm-Signal (sensor in duct)
DI40 : "ElBattOverHeat" ; %1x0040 EL-Batt OverHeat Signal
DI41 : "FiltSupAlarm" ; %1x0041 Filter Alarm for Sup-Filter (pressure above Limit)
DI42 : "FiltExtAlarm" ; %1x0042 Filter Alarm for Ext-Filter (pressure above Limit)
DI57 : "HW_FrostAlarm" ; %1x0057 HeatWaterTemp -FrostReg Alarm
DI61 : "Cool_DI1_Alarm" ; %1x0061 Cool Digital Alarm-1 Input
DI62 : "Cool_DI2_Alarm" ; %1x0062 Cool Digital Alarm-2 Input
%DI70 : "SupMotorON" ; %1x0070 SupplyMotor ON/OFF
DI71 : "SupMotorAlarm" ; %1x0071 SupplyMotor ON/OFF
DI74 : "FCsupMtrAlrIhi" ; %1x0074 SupplyMotor Ihi Alarm
%DI80 : "ExtMotorON" ; %1x0080 ExtractMotor ON/OFF
DI81 : "ExtMotorAlarm" ; %1x0081 ExtractMotor ON/OFF
DI84 : "FCextMtrAlrIhi" ; %1x0084 ExtractMotor Ihi Alarm
%DI90 : "EXC_ON" ; %1x0090 EXC-MotorCtrl ON/OFF
DI93 : "EXC_RotAlarm" ; %1x0093 EXC-Rotation Alarm
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM DigitalInput1 NAMED "Read DI 1-20" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(02); % Modbus command "02h" read discrete input (bit)
DATA[2] := RWORD(0); % Start adress
DATA[4] := RWORD(93); % Number of inputs
ANSWER SIZE 17
DATA[0] = BYTE(Id);
DATA[1] = HEX(02);
%DATA[2] = BYTE(12);
%1-8
DATA[3] -> BYTE(IF (DATA & 1) THEN DI1 := 1; ELSE DI1 := 0; ENDIF; %1 Operation
% IF (DATA & 2) THEN DI2 := 1; ELSE DI2 := 0; ENDIF; %2 ExtStop
% IF (DATA & 4) THEN DI3 := 1; ELSE DI3 := 0; ENDIF; %3 ExtHiSpeed
); %4-8 Not used
%DATA[4] -> BYTE(IF (DATA & 1) THEN DIx := 1; ELSE DIx := 0; ENDIF; %9-16 Not used
%DATA[5] -> BYTE(IF (DATA & 1) THEN DIx := 1; ELSE DIx := 0; ENDIF; %17-24 Not used
%25-32
DATA[6] -> BYTE(IF (DATA & 64) THEN DI31:= 1; ELSE DI31:= 0; ENDIF; %31 : "Heat_RE1"
IF (DATA & 128) THEN DI32:= 1; ELSE DI32:= 0; ENDIF; %32 : "Cool_RE1"
);
%33-40
DATA[7] -> BYTE(IF (DATA & 1) THEN DI33:= 1; ELSE DI33:= 0; ENDIF; %33 : "BattEXC_PumpRE"
IF (DATA & 2) THEN DI34:= 1; ELSE DI34:= 0; ENDIF; %34 : "AlrActive"
IF (DATA & 4) THEN DI35:= 1; ELSE DI35:= 0; ENDIF; %35 : "Alr_RE1"
IF (DATA & 8) THEN DI36:= 1; ELSE DI36:= 0; ENDIF; %36 : "Alr_RE2"
IF (DATA & 16) THEN DI37:= 1; ELSE DI37:= 0; ENDIF; %37 : "Alr_FireSignal"
IF (DATA & 32) THEN DI38:= 1; ELSE DI38:= 0; ENDIF; %38 : "Alr_SmokeSig"
IF (DATA & 128) THEN DI40:= 1; ELSE DI40:= 0; ENDIF; %40 : "ElBattOverHeat"
);
%41-48
DATA[8] -> BYTE(IF (DATA & 1) THEN DI41:= 1; ELSE DI41:= 0; ENDIF; %41 : "FiltSupAlarm"
IF (DATA & 2) THEN DI42:= 1; ELSE DI42:= 0; ENDIF; %42 : "FiltExtAlarm"
);
%DATA[9] -> BYTE(IF (DATA & 1) THEN DIx := 1; ELSE DIx := 0; ENDIF; %49-56 Not used
%57-64
DATA[10] -> BYTE(IF (DATA & 1) THEN DI57:= 1; ELSE DI57:= 0; ENDIF; %57 : "HW_FrostAlr"
IF (DATA & 16) THEN DI61:= 1; ELSE DI61:= 0; ENDIF; %61 : "Cool_DI1_Alarm"
IF (DATA & 32) THEN DI62:= 1; ELSE DI62:= 0; ENDIF; %62 : "Cool_DI2_Alarm"
);
%65-72
%DATA[11] -> BYTE(IF (DATA & 32) THEN DI70:= 1; ELSE DI70:= 0; ENDIF; %70 : "SupMotorON"
DATA[11] -> BYTE(IF (DATA & 64) THEN DI71:= 1; ELSE DI71:= 0; ENDIF; %71 : "SupMotorAlarm"
);
%73-80
DATA[12] -> BYTE(IF (DATA & 2) THEN DI74:= 1; ELSE DI74:= 0; ENDIF; %74 : "FCsupMtrAlrIhi"
% IF (DATA & 128) THEN DI80:= 1; ELSE DI80:= 0; ENDIF; %80 : "ExtMotorON"
);
%81-88
DATA[13] -> BYTE(IF (DATA & 1) THEN DI81:= 1; ELSE DI81:= 0; ENDIF; %81 : "ExtMotorAlarm"
IF (DATA & 8) THEN DI84:= 1; ELSE DI84:= 0; ENDIF; %84 : "FCextMtrAlrIhi"
);
%89-96
%DATA[14] -> BYTE(IF (DATA & 2) THEN DI90:= 1; ELSE DI90:= 0; ENDIF; %90 : "EXC_ON"
DATA[14] -> BYTE(IF (DATA & 16) THEN DI93:= 1; ELSE DI93:= 0; ENDIF; %93 : "EXC_RotAlarm"
);
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for NOVENCO digital output 1
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading digital inputs
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2009-09-03 inital version
%
DEVICETYPE NovencoDOUT NAMED "Novenco Set DO" TYPEID 21325 IS
PARAMETER
Id : "Adress";
DU6 : "RecircFunction"; %0x0006 0/1 Recirc Function ON/OFF
PUBLIC
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM DigitalOutput NAMED "Recirc ON/OFF" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(05); % Modbus command "0x05" force singel coil
DATA[2] := RWORD(5); % start coil (adress-1)
DATA[4] <- RWORD(IF DU6=0 THEN DATA:=0; % 0x0000 OFF
ELSE DATA:=65280; % 0xFF00 ON
ENDIF;
);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(05);
%DATA[2] = RWORD(0); % start coil
%DATA[4] = RWORD(1); % value
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.