Regin Corrigo E 2010
Detaljer
- Typ
- Drivrutin
- Upplaggd av
- Ove Jansson, Abelko Innovation
- Version
- 3
- Uppdaterad
- 2013-08-28
- Skapad
- 2013-08-27
- Kategori
- Modbus, Övrig utrustning
- Visningar
- 3285
Beskrivning
Drivrutin Corrigo E
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
% History: 2009-02-01 Ändrat utetemp för negativa tal
% History: 2008-12-10 Fel answer size Digital Input, Ändrat 7 till 9
% AO1-5 visning i procent (ingen division med 10)
% History: 2010-02-19 Timeout ändrad till 2 sekunder NÖDVÄNDIGT !!!
% History: 2010-06-18 Anpassning för Svensk Styrteknik
% History: 2010-06-20 En del rättade fel i koden.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CORRIGO E Analog inputs/outputs
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status AI and AO
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2008-10-14 inital version
% History: 2010-06-18 Anpassning för Svensk Styrteknik
%
DEVICETYPE CorrigoEAnalog NAMED "CorrigoE AI/AU" TYPEID 21270 IS
PARAMETER
Id : "Adress";
PUBLIC
V1 : "Utetemperatur" ["°C"]; %1 Outdoor temperature
%V2 : "VVX effekt" ["%"]; %2 Exch. Efficiency (%)
%V3 : "Driftläge" [""]; %3 (I) Run mode, 0=Stopped,
% % 1=Starting up,
% % 2=Starting reduced speed,
% % 3=Starting full speed,
% % 4=Starting normal run,
% % 5=Normal run,
% % 6=Support control heating,
% % 7=Support control cooling,
% % 8=CO2 run,
% % 9=Night cooling,
% % 10=Full speed stop,
% % 11=Stopping fan
%V4 : "Drifttid TF" ["h"]; %4 Running time (h) supply air fan
%V5 : "Drifttid FF" ["h"]; %5 Running time (h) exhaust air fan
%V6 : "Förlängd drift" ["min"]; %6 (I) Number of minutes extended operation
V7 : "Temp tilluft" ["°C"]; %7 Supply air temperature
%V8 : "BV tilluft" ["°C"]; %8 Calculated setpoint supply air
V9 : "Temp frånluft" ["°C"]; %9 Exhaust air temp
%V10 : "Temp 1 rum" ["°C"]; %10 Room temperature 1
%V11 : "Temp 2 rum" ["°C"]; %11 Room temperature 2
%V12 : "Drifttid Vä/Ky" ["min"]; %12 (I) Number of minutes in ongoing support heating/cooling
V13 : "Tryck tilluft" ["Pa"]; %13 Supply air fan pressure (Pa)
V14 : "Tryck frånluft" ["Pa"]; %14 Exhaust air fan pressure (Pa)
%V15 : "Flöde tilluft" ["m3/h"]; %15 Supply air fan flow (m3/h) Scale factor = 1
%V16 : "Flöde frånluft" ["m3/h"]; %16 Exhaust air fan flow (m3/h) Scale factor = 1
%V17 : "CO2-halt" ["ppm"]; %17 CO2 (ppm)
%V18 : "Drifttid CO2" ["min"]; %18 (I) Number of minutes support run time CO2
V19 : "Temp frysvakt" ["°C"]; %19 Frost protection temp
%V20 : "Temp frånluft" ["°C"]; %20 Extract air temp
%V21 : "Temp avfrost." ["°C"]; %21 De-icing temp exchanger
%V22 : "Drifttid Avis." ["min"]; %22 (I) Number of minutes for ongoing de-icing
%V23 : "Fuktighet rum" ["%RH"]; %23 Humidity room
%V24 : "Fuktighet TF" ["%RH"]; %24 Humidity duct
%V25 : "Temp extra" ["°C"]; %25 Additional sensor / External setpoint
% AI functions %%%%%%%%%%%%%%%
% 0=Not used 5=Roomtemp2 10=Deicingtemp 15=Extra unit temp
% 1=Outdoortemp 6=Extracttemp 11=Frost prot.temp 16=External SAF control
% 2=Supplytemp 7=Extrasensor 12=CO2 17=External EAF control
% 3=Exhausttemp 8=SAF pressure 13=Humidity room 18=SAF pressure 2
% 4=Roomtemp1 9=EAF pressure 14=Humidity duct
V26 : "AI1" [""]; %26 The scaled and filtered value of AI1 R,4
V27 : "AI2" [""]; %27 The scaled and filtered value of AI2 R,4
V28 : "AI3" [""]; %28 The scaled and filtered value of AI3 R,4
V29 : "AI4" [""]; %29 The scaled and filtered value of AI4 R,4
V30 : "AI5" [""]; %30 The scaled and filtered value of UAI1 R,4
V31 : "AI6" [""]; %31 The scaled and filtered value of UAI2 R,4
V32 : "AI7" [""]; %32 The scaled and filtered value of UAI3 R,4
V33 : "AI8" [""]; %33 The scaled and filtered value of UAI4 R,4
% AO function %%%%%%%%%%%%%%%%%
% 0=Not used 5=EAF
% 1=Y1-Heating 6=Y6-Humidity
% 2=Y2-Exchanger 7=Sequence
% 3=Y3-Cooling 8=Extra unit
% 4=SAF 9=Heat/Cool (change over)
V54 : "AO1" ["%"]; %54 Value of AO1
V55 : "AO2" ["%"]; %55 Value of AO2
V56 : "AO3" ["%"]; %56 Value of AO3
V57 : "AO4" ["%"]; %57 Value of AO4
V58 : "AO5" ["%"]; %58 Value of AO5
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM AnalogInput NAMED "Läs Analog IN" 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(33); % Number of registers
ANSWER SIZE 71
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
%DATA[2] = BYTE(66); % Byte count
DATA[3] -> RWORD(IF (DATA>=32768) THEN V1 :=(DATA-65536)/10; ELSE V1 :=DATA/10; ENDIF;);
%DATA[5] -> RWORD(V2 := DATA / 10;);
%DATA[7] -> RWORD(V3 := DATA;);
%DATA[9] -> RWORD(V4 := DATA / 10;);
%DATA[11] -> RWORD(V5 := DATA / 10;);
%DATA[13] -> RWORD(V6 := DATA;);
DATA[15] -> RWORD(IF (DATA>=32768) THEN V7 :=(DATA-65536)/10; ELSE V7 :=DATA/10; ENDIF;);
%DATA[17] -> RWORD(IF (DATA>=32768) THEN V8 :=(DATA-65536)/10; ELSE V8 :=DATA/10; ENDIF;);
DATA[19] -> RWORD(IF (DATA>=32768) THEN V9 :=(DATA-65536)/10; ELSE V9 :=DATA/10; ENDIF;);
%DATA[21] -> RWORD(IF (DATA>=32768) THEN V10:=(DATA-65536)/10; ELSE V10:=DATA/10; ENDIF;);
%DATA[23] -> RWORD(IF (DATA>=32768) THEN V11:=(DATA-65536)/10; ELSE V11:=DATA/10; ENDIF;);
%DATA[25] -> RWORD(V12:= DATA;);
DATA[27] -> RWORD(V13:= DATA / 10;);
DATA[29] -> RWORD(V14:= DATA / 10;);
%DATA[31] -> RWORD(V15:= DATA;);
%DATA[33] -> RWORD(V16:= DATA;);
%DATA[35] -> RWORD(V17:= DATA / 10;);
%DATA[37] -> RWORD(V18:= DATA;);
DATA[39] -> RWORD(IF (DATA>=32768) THEN V19:=(DATA-65536)/10; ELSE V19:=DATA/10; ENDIF;);
%DATA[41] -> RWORD(IF (DATA>=32768) THEN V20:=(DATA-65536)/10; ELSE V20:=DATA/10; ENDIF;);
%DATA[43] -> RWORD(IF (DATA>=32768) THEN V21:=(DATA-65536)/10; ELSE V21:=DATA/10; ENDIF;);
%DATA[45] -> RWORD(V22:= DATA;);
%DATA[47] -> RWORD(V23:= DATA / 10;);
%DATA[49] -> RWORD(V24:= DATA / 10;);
%DATA[51] -> RWORD(IF (DATA>=32768) THEN V25:=(DATA-65536)/10; ELSE V25:=DATA/10; ENDIF;);
DATA[53] -> RWORD(V26:= DATA / 10;); %OBS! Ej skalat värde !!!!
DATA[55] -> RWORD(V27:= DATA / 10;); %OBS! Ej skalat värde !!!!
DATA[57] -> RWORD(V28:= DATA / 10;); %OBS! Ej skalat värde !!!!
DATA[59] -> RWORD(V29:= DATA / 10;); %OBS! Ej skalat värde !!!!
DATA[61] -> RWORD(V30:= DATA / 10;); %OBS! Ej skalat värde !!!!
DATA[63] -> RWORD(V31:= DATA / 10;); %OBS! Ej skalat värde !!!!
DATA[65] -> RWORD(V32:= DATA / 10;); %OBS! Ej skalat värde !!!!
DATA[67] -> RWORD(V33:= DATA / 10;); %OBS! Ej skalat värde !!!!
TIMEOUT 2000
END;
TELEGRAM AnalogOutput NAMED "Läs AU 1-5" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(04); % Modbus command "04h" Read registers
DATA[2] := RWORD(53); % Start address register (Reg.nr-1)
DATA[4] := RWORD(5); % Number of registers
ANSWER SIZE 15
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
DATA[2] = BYTE(10); % Byte count
DATA[3] -> RWORD(V54:= DATA;); % Ändrat Volt till %
DATA[5] -> RWORD(V55:= DATA;);
DATA[7] -> RWORD(V56:= DATA;);
DATA[9] -> RWORD(V57:= DATA;);
DATA[11] -> RWORD(V58:= DATA;);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CORRIGO E, Digtal inputs
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Digital status DI and DO
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2008-10-14 inital version
% History: 2010-06-18 Anpassning för Svensk Styrteknik
%
DEVICETYPE CorrigoEDigital NAMED "CorrigoE DI/DU" TYPEID 21271 IS
PARAMETER
Id : "Adress";
PUBLIC
%D1 : "Helfart aktiv"; %1 Is set if timechannel full speed is active
%D2 : "Halvfart aktiv"; %2 Is set if timechannel reduced speed is active
%D3 : "Timer 1 aktiv"; %3 Is set if timer output 1 is active
%D4 : "Timer 2 aktiv"; %4 Is set if timer output 2 is active
%D5 : "Timer 3 aktiv"; %5 Is set if timer output 3 is active
%D6 : "Timer 4 aktiv"; %6 Is set if timer output 4 is active
%D7 : "Timer 5 aktiv"; %7 Is set if timer output 5 is active
%D8 : "Helfart extra"; %8 Is set if extended operation full speed
%D9 : "Halvfart extra"; %9 Is set if extended operation half speed
%D10 : "VärmeReglering"; %10 Is set if ongoing support heating
%D11 : "KylaReglering"; %11 Is set if ongoing support cooling
%D12 : "CO2-reglering"; %12 Is set if ongoing support CO2
%D13 : "Avisning aktiv"; %13 DeIcingActive
% DI / UDI Function %%%%%%%%%%%%%%%%
% 0=Not used 5=P1-Cooling 10=Ext run ½ 15=De-icing
% 1=SAF-Ind 6=Filter alarm 11=External alarm 16=Frostprotection
% 2=EAF-Ind 7=Fire alarm 12=External switch 17=Overheatprotection
% 3=P1-Heating 8=Fire damper-ind 13=Flow guard 18=Recirculation run
% 4=P1-Exchanger 9=Ext run 1/1 14=Rot.sent.exch 19=Change over
%
D14 : "DI1 status"; %14 Value of DI1
D15 : "DI2 status"; %15 Value of DI2
D16 : "DI3 status"; %16 Value of DI3
D17 : "DI4 status"; %17 Value of DI4
D18 : "DI5 status"; %18 Value of DI5
D19 : "DI6 status"; %19 Value of DI6
D20 : "DI7 status"; %20 Value of DI7
D21 : "DI8 status"; %21 Value of DI8
D22 : "DI9 status"; %22 Value of DI9, Value of UDI1
D23 : "DI10 status"; %23 Value of DI10, Value of UDI2
D24 : "DI11 status"; %24 Value of DI11, Value of UDI3
D25 : "DI12 status"; %25 Value of DI12, Value of UDI4
% DO function %%%%%%%%%%%%%%%%%%%
% 0 = Not Used 11 = SumAlarmB 22 = ExchangerIncrease 33 = TimeChannel1
% 1 = SAFStart1 12 = SAFFrequencyStart 23 = ExchangerDecrease 34 = TimeChannel2
% 2 = EAFStart1 13 = EAFFrequencyStart 24 = CoolingIncrease 35 = TimeChannel3
% 3 = SAFStart2 14 = HeatingActivate 25 = CoolingDecrease 36 = TimeChannel4
% 4 = EAFStart2 15 = ExchangerActivate 26 = HeatStep1 37 = TimeChannel5
% 5 = HeatingPumpStart 16 = CoolingActivate 27 = HeatStep2 38 = Humidity start
% 6 = ExchangerStart 17 = RecycleAirDamper 28 = HeatStep3 39 = Extra unit start
% 7 = CoolingPumpStart 18 = FreshAirDamper 29 = HeatStep4 40 = Heat/Cool step 1
% 8 = FireDamper 19 = ExtractAirDamper 30 = CoolStep1 41 = Heat/Cool step 2
% 9 = SumAlarm 20 = HeatingIncrease 31 = CoolStep2 42 = Heat/Cool step 3
% 10 = SumAlarmA 21 = HeatingDecrease 32 = CoolStep3
D26 : "DU1"; %26 Value of DO1
D27 : "DU2"; %27 Value of DO2
D28 : "DU3"; %28 Value of DO3
D29 : "DU4"; %29 Value of DO4
D30 : "DU5"; %30 Value of DO5
D31 : "DU6"; %31 Value of DO6
D32 : "DU7"; %32 Value of DO7
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM DigitalInput NAMED "Digital status" 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(32); % Number of inputs
ANSWER SIZE 9
DATA[0] = BYTE(Id);
DATA[1] = HEX(02);
%DATA[2] = BYTE(4);
%DATA[3] -> BYTE(
% IF (DATA & 1) THEN D1 := 1; ELSE D1 := 0; ENDIF;
% IF (DATA & 2) THEN D2 := 1; ELSE D2 := 0; ENDIF;
% IF (DATA & 4) THEN D3 := 1; ELSE D3 := 0; ENDIF;
% IF (DATA & 8) THEN D4 := 1; ELSE D4 := 0; ENDIF;
% IF (DATA & 16) THEN D5 := 1; ELSE D5 := 0; ENDIF;
% IF (DATA & 32) THEN D6 := 1; ELSE D6 := 0; ENDIF;
% IF (DATA & 64) THEN D7 := 1; ELSE D7 := 0; ENDIF;
% IF (DATA & 128) THEN D8 := 1; ELSE D8 := 0; ENDIF;
% );
DATA[4] -> BYTE(
% IF (DATA & 1) THEN D9 := 1; ELSE D9 := 0; ENDIF;
% IF (DATA & 2) THEN D10:= 1; ELSE D10:= 0; ENDIF;
% IF (DATA & 4) THEN D11:= 1; ELSE D11:= 0; ENDIF;
% IF (DATA & 8) THEN D12:= 1; ELSE D12:= 0; ENDIF;
% IF (DATA & 16) THEN D13:= 1; ELSE D13:= 0; ENDIF;
IF (DATA & 32) THEN D14:= 1; ELSE D14:= 0; ENDIF;
IF (DATA & 64) THEN D15:= 1; ELSE D15:= 0; ENDIF;
IF (DATA & 128) THEN D16:= 1; ELSE D16:= 0; ENDIF;
);
DATA[5] -> BYTE(
IF (DATA & 1) THEN D17:= 1; ELSE D17:= 0; ENDIF;
IF (DATA & 2) THEN D18:= 1; ELSE D18:= 0; ENDIF;
IF (DATA & 4) THEN D19:= 1; ELSE D19:= 0; ENDIF;
IF (DATA & 8) THEN D20:= 1; ELSE D20:= 0; ENDIF;
IF (DATA & 16) THEN D21:= 1; ELSE D21:= 0; ENDIF;
IF (DATA & 32) THEN D22:= 1; ELSE D22:= 0; ENDIF;
IF (DATA & 64) THEN D23:= 1; ELSE D23:= 0; ENDIF;
IF (DATA & 128) THEN D24:= 1; ELSE D24:= 0; ENDIF;
);
DATA[6] -> BYTE(
IF (DATA & 1) THEN D25:= 1; ELSE D25:= 0; ENDIF;
IF (DATA & 2) THEN D26:= 1; ELSE D26:= 0; ENDIF;
IF (DATA & 4) THEN D27:= 1; ELSE D27:= 0; ENDIF;
IF (DATA & 8) THEN D28:= 1; ELSE D28:= 0; ENDIF;
IF (DATA & 16) THEN D29:= 1; ELSE D29:= 0; ENDIF;
IF (DATA & 32) THEN D30:= 1; ELSE D30:= 0; ENDIF;
IF (DATA & 64) THEN D31:= 1; ELSE D31:= 0; ENDIF;
IF (DATA & 128) THEN D32:= 1; ELSE D32:= 0; ENDIF;
);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CORRIGO E, Alarm inputs
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Notera!
% Kvittera genom att öka kanalvärdet kopplat till "Kvittering".
% Om man har en checkbox (kryssruta) för att utföra kvittering går det kanske
% att koppla en logisk funktion som efter viss timeout ställer tillbaka
% kvitteringskanalen (och checkboxen). Den timeouten måste anpassas efter
% skriptets ställda uppdateringstid.
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2008-10-14 inital version
% History: 2010-06-18 Anpassning för Svensk Styrteknik
%
DEVICETYPE CorrigoEAlarm NAMED "CorrigoE Larm1" TYPEID 21272 IS
PARAMETER
Id : "Adress";
Ack : "Kvittering"; %3 Command to acknowledge all alarms L,1
PUBLIC
AL1 : "Fel TF Fläkt"; %33* Run Error Supply Air Fan
AL2 : "Fel FL Fläkt"; %34* Run Error Exhaust Air Fan
AL3 : "Fel P1 Värme"; %35 Run Error P1-Heater
AL4 : "Fel P1 Kyla"; %36 Run Error P1-Cooler
AL5 : "Fel P1 VVX"; %37 Run Error P1-Exchanger
AL6 : "Larm Filtervakt"; %38 Filter guard
AL7 : "Larm Flödesvakt"; %39 Flow guard
AL8 : "Larm ExFrysvakt"; %40 External frost guard
AL9 : "Larm Avfrost."; %41 Deicing pressure guard
AL10 : "Larm BRAND"; %42 Fire alarm
%AL11 : "Larm Ext. relä"; %43 External switch
%AL12 : "Larm Externt"; %44 External alarm
AL13 : "Larm TF regler"; %45 Supply Air control error
%AL14 : "Larm Avv. fukt"; %46 Deviation Humidity control
AL15 : "Larm TF HögTem"; %47* High supply air temp
AL16 : "Larm TF LågTem"; %48* Low supply air temp
%AL17 : "Larm TF Max"; %49 Supply Air Fan max limit
%AL18 : "Larm TF Min"; %50 Supply Air Fan min limit
%AL19 : "Larm Rum HögT."; %51 High room temp
%AL20 : "Larm Rum LågT."; %52 Low room temp
AL53 : "Larm FF HögTem"; %53 High exhaust air temp
AL54 : "Larm FF LågTem"; %54 Low exhaust air temp
%AL55 : "Larm ElvärmeHög"; %55 Electric heating is overheated
AL56 : "Larm Frysrisk"; %56 Frost risk
AL57 : "Larm Frysva.Låg"; %57 Low frost guard temp
%AL58 : "Larm Effekt Låg" %58 Low efficiency
AL59 : "Givarfel Utetemp"; %59 Sensor error outdoor temp
%AL60 : "Analogue deicing"; %60 Analogue deicing
AL61 : "Larm VVX r.vakt"; %61 Rotation guard exchanger
%AL62 : "Fel Brandspjäll"; %62 Fire damper is out of operation
AL63 : "Fel Reg TFfläkt"; %63 Supply Air Fan control error
AL64 : "Fel Reg FFfläkt"; %64 Exhaust Air Fan control error
%AL65 : "Supply Air Fan extern"; %65 Supply Air Fan external operation
%AL66 : "Exhaust Air Fan exter"; %66 Exhaust Air Fan external operation
%AL67 : "Ventilation Manual mo"; %67 Ventilation Manual mode
PRIVATE
Started;
AckMemory;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM DigitalAlarm NAMED "Larm status" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(02); % Modbus command "02h" read discrete input (bit)
DATA[2] := RWORD(32); % Start adress (33-1)
DATA[4] := RWORD(35); % Number of inputs
ANSWER SIZE 10
DATA[0] = BYTE(Id);
DATA[1] = HEX(02);
%DATA[2] = BYTE(5);
DATA[3] -> BYTE(
IF (DATA & 1) THEN AL1 := 1; ELSE AL1 := 0; ENDIF;
IF (DATA & 2) THEN AL2 := 1; ELSE AL2 := 0; ENDIF;
IF (DATA & 4) THEN AL3 := 1; ELSE AL3 := 0; ENDIF;
IF (DATA & 8) THEN AL4 := 1; ELSE AL4 := 0; ENDIF;
IF (DATA & 16) THEN AL5 := 1; ELSE AL5 := 0; ENDIF;
IF (DATA & 32) THEN AL6 := 1; ELSE AL6 := 0; ENDIF;
IF (DATA & 64) THEN AL7 := 1; ELSE AL7 := 0; ENDIF;
IF (DATA & 128) THEN AL8 := 1; ELSE AL8 := 0; ENDIF;
);
DATA[4] -> BYTE(
IF (DATA & 1) THEN AL9 := 1; ELSE AL9 := 0; ENDIF;
IF (DATA & 2) THEN AL10:= 1; ELSE AL10:= 0; ENDIF;
% IF (DATA & 4) THEN AL11:= 1; ELSE AL11:= 0; ENDIF;
% IF (DATA & 8) THEN AL12:= 1; ELSE AL12:= 0; ENDIF;
IF (DATA & 16) THEN AL13:= 1; ELSE AL13:= 0; ENDIF;
% IF (DATA & 32) THEN AL14:= 1; ELSE AL14:= 0; ENDIF;
IF (DATA & 64) THEN AL15:= 1; ELSE AL15:= 0; ENDIF;
IF (DATA & 128) THEN AL16:= 1; ELSE AL16:= 0; ENDIF;
);
DATA[5] -> BYTE(
% IF (DATA & 1) THEN AL17:= 1; ELSE AL17:= 0; ENDIF;
% IF (DATA & 2) THEN AL18:= 1; ELSE AL18:= 0; ENDIF;
% IF (DATA & 4) THEN AL19:= 1; ELSE AL19:= 0; ENDIF;
% IF (DATA & 8) THEN AL20:= 1; ELSE AL20:= 0; ENDIF;
IF (DATA & 16) THEN AL53:= 1; ELSE AL53:= 0; ENDIF;
IF (DATA & 32) THEN AL54:= 1; ELSE AL54:= 0; ENDIF;
% IF (DATA & 64) THEN AL55:= 1; ELSE AL55:= 0; ENDIF;
IF (DATA & 128) THEN AL56:= 1; ELSE AL56:= 0; ENDIF;
);
DATA[6] -> BYTE(
IF (DATA & 1) THEN AL57:= 1; ELSE AL57:= 0; ENDIF;
% IF (DATA & 2) THEN AL58:= 1; ELSE AL58:= 0; ENDIF;
IF (DATA & 4) THEN AL59:= 1; ELSE AL59:= 0; ENDIF;
% IF (DATA & 8) THEN AL60:= 1; ELSE AL60:= 0; ENDIF;
IF (DATA & 16) THEN AL61:= 1; ELSE AL61:= 0; ENDIF;
% IF (DATA & 32) THEN AL62:= 1; ELSE AL62:= 0; ENDIF;
IF (DATA & 64) THEN AL63:= 1; ELSE AL63:= 0; ENDIF;
IF (DATA & 128) THEN AL64:= 1; ELSE AL64:= 0; ENDIF;
);
% DATA[7] -> BYTE(
% IF (DATA & 1) THEN AL65:= 1; ELSE AL65:= 0; ENDIF;
% IF (DATA & 2) THEN AL66:= 1; ELSE AL66:= 0; ENDIF;
% IF (DATA & 4) THEN AL67:= 1; ELSE AL67:= 0; ENDIF;
% );
TIMEOUT 2000
END;
TELEGRAM Acknowledge NAMED "Larmkvittering" IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(05); %Write singel coil
DATA[2] <- RWORD(DATA := 2;); %Start adress (regnr-1)
DATA[4] <- RWORD(IF (Started = 0) THEN
AckMemory := Ack;
Started := 1;
ENDIF;
IF (Ack > AckMemory) THEN
DATA := 65280; % FF00h
ELSE
DATA := 0;
ENDIF;
AckMemory := Ack;
);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(05);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CORRIGO E, Alarm inputs
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Alarm inputs
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2010-06-18 Nytt, Anpassning för Svensk Styrteknik
%
DEVICETYPE CorrigoEAlarm2 NAMED "CorrigoE Larm2" TYPEID 21275 IS
PARAMETER
Id : "Adress";
PUBLIC
%AL68 : "Manual supply a"; %68 Manual supply air control
%AL69 : "Manual Supply A"; %69 Manual Supply Air Fan mode
%AL70 : "Manual Supply A"; %70 Manual Supply Air Fan freq control
%AL71 : "Manual Exhaust "; %71 Manual Exhaust Air Fan mode
%AL72 : "Manual Exhaust "; %72 Manual Exhaust Air Fan freq control
%AL73 : "Manual heater c"; %73 Manual heater control
%AL74 : "Manual cooler c"; %74 Manual cooler control
%AL75 : "Manual exchange"; %75 Manual exchanger control
%AL76 : "Manual P1-Heate"; %76 Manual P1-Heater
%AL77 : "Manual P1-Coole"; %77 Manual P1-Cooler
%AL78 : "Manual P1-Excha"; %78 Manual P1-Exchanger
%AL79 : "Manual fire dam"; %79 Manual fire damper
%AL80 : "Internal batter"; %80 Internal battery error
%AL81 : "Start signal fu"; %81 Start signal full speed supply air fan
%AL82 : "Start signal fu"; %82 Start signal full speed exhaust air fan
%AL83 : "Start signal ha"; %83 Start signal half speed supply air fan
%AL84 : "Start signal ha"; %84 Start signal half speed exhaust air fan
%AL85 : "Start signal He"; %85 Start signal Heat Pump
%AL86 : "Start signal Ex"; %86 Start signal Exchanger
%AL87 : "Start signal Co"; %87 Start signal Cool Pump
%AL88 : "Start signal fr"; %88 Start signal frequencer supply air fan
%AL89 : "Start signal fr"; %89 Start signal frequencer exhaust air fan
AL90 : "Givarfel TLtemp"; %90 Sensor error Supply Air temp
AL91 : "Givarfel FLtemp"; %91 Sensor error Exhaust Air temp
AL92 : "Givarfel R1temp"; %92 Sensor error Room temp 1
AL93 : "Givarfel R2temp"; %93 Sensor error Room temp 2
AL94 : "Givarfel ALtemp"; %94 Sensor error Extract Air temp
AL95 : "Givarfel EXtemp"; %95 Sensor error Extra sensor
AL96 : "Givarfel SAFtry"; %96 Sensor error SAF pressure
AL97 : "Givarfel EAFtry"; %97 Sensor error EAF pressure
AL98 : "Givarfel AFtemp"; %98 Sensor error Deicing temp
AL99 : "Givarfel FPtemp"; %99 Sensor error Frost Protection temp
AL100 : "Givarfel CO2"; %100 Sensor error CO2
AL101 : "Givarfel Rfukt"; %101 Sensor error Humidity room
AL102 : "Givarfel Dfukt"; %102 Sensor error Humidity duct
%AL103 : "ReservedActive1" %103 Not used L,2
%AL104 : "ReservedActive2" %104 Not used L,2
%AL105 : "ReservedActive3" %105 Not used L,2
%AL106 : "ReservedActive4" %106 Not used L,2
%AL107 : "ReservedActive5" %107 Not used L,2
%AL108 : "ReservedActive6" %108 Not used L,2
%AL109 : "ReservedActive7" %109 Not used L,2
%AL110 : "ReservedActive8" %110 Not used L,2
%AL111 : "ReservedActive9" %111 Not used L,2
%AL112 : "ReservedActive10" %112 Not used L,2
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM DigitalAlarm2 NAMED "Givarfel" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(02); % Modbus command "02h" read discrete input (bit)
DATA[2] := RWORD(67); % Start adress (68-1)
DATA[4] := RWORD(45); % Number of inputs
ANSWER SIZE 11
DATA[0] = BYTE(Id);
DATA[1] = HEX(02);
%DATA[2] = BYTE(6);
%DATA[3] -> BYTE(
% IF (DATA & 1) THEN AL68 := 1; ELSE AL68 := 0; ENDIF;
% IF (DATA & 2) THEN AL69 := 1; ELSE AL69 := 0; ENDIF;
% IF (DATA & 4) THEN AL70 := 1; ELSE AL70 := 0; ENDIF;
% IF (DATA & 8) THEN AL71 := 1; ELSE AL71 := 0; ENDIF;
% IF (DATA & 16) THEN AL72 := 1; ELSE AL72 := 0; ENDIF;
% IF (DATA & 32) THEN AL73 := 1; ELSE AL73 := 0; ENDIF;
% IF (DATA & 64) THEN AL74 := 1; ELSE AL74 := 0; ENDIF;
% IF (DATA & 128) THEN AL75 := 1; ELSE AL75 := 0; ENDIF;
% );
%DATA[4] -> BYTE(
% IF (DATA & 1) THEN AL76 := 1; ELSE AL76 := 0; ENDIF;
% IF (DATA & 2) THEN AL77 := 1; ELSE AL77 := 0; ENDIF;
% IF (DATA & 4) THEN AL78 := 1; ELSE AL78 := 0; ENDIF;
% IF (DATA & 8) THEN AL79 := 1; ELSE AL79 := 0; ENDIF;
% IF (DATA & 16) THEN AL80 := 1; ELSE AL80 := 0; ENDIF;
% IF (DATA & 32) THEN AL81 := 1; ELSE AL81 := 0; ENDIF;
% IF (DATA & 64) THEN AL82 := 1; ELSE AL82 := 0; ENDIF;
% IF (DATA & 128) THEN AL83 := 1; ELSE AL83 := 0; ENDIF;
% );
DATA[5] -> BYTE(
% IF (DATA & 1) THEN AL84 := 1; ELSE AL84 := 0; ENDIF;
% IF (DATA & 2) THEN AL85 := 1; ELSE AL85 := 0; ENDIF;
% IF (DATA & 4) THEN AL86 := 1; ELSE AL86 := 0; ENDIF;
% IF (DATA & 8) THEN AL87 := 1; ELSE AL87 := 0; ENDIF;
% IF (DATA & 16) THEN AL88 := 1; ELSE AL88 := 0; ENDIF;
% IF (DATA & 32) THEN AL89 := 1; ELSE AL89 := 0; ENDIF;
IF (DATA & 64) THEN AL90 := 1; ELSE AL90 := 0; ENDIF;
IF (DATA & 128) THEN AL91 := 1; ELSE AL91 := 0; ENDIF;
);
DATA[6] -> BYTE(
IF (DATA & 1) THEN AL92 := 1; ELSE AL92 := 0; ENDIF;
IF (DATA & 2) THEN AL93 := 1; ELSE AL93 := 0; ENDIF;
IF (DATA & 4) THEN AL94 := 1; ELSE AL94 := 0; ENDIF;
IF (DATA & 8) THEN AL95 := 1; ELSE AL95 := 0; ENDIF;
IF (DATA & 16) THEN AL96 := 1; ELSE AL96 := 0; ENDIF;
IF (DATA & 32) THEN AL97 := 1; ELSE AL97 := 0; ENDIF;
IF (DATA & 64) THEN AL98 := 1; ELSE AL98 := 0; ENDIF;
IF (DATA & 128) THEN AL99 := 1; ELSE AL99 := 0; ENDIF;
);
DATA[7] -> BYTE(
IF (DATA & 1) THEN AL100:= 1; ELSE AL100:= 0; ENDIF;
IF (DATA & 2) THEN AL101:= 1; ELSE AL101:= 0; ENDIF;
IF (DATA & 4) THEN AL102:= 1; ELSE AL102:= 0; ENDIF;
% IF (DATA & 8) THEN AL103:= 1; ELSE AL103:= 0; ENDIF;
% IF (DATA & 16) THEN AL104:= 1; ELSE AL104:= 0; ENDIF;
% IF (DATA & 32) THEN AL105:= 1; ELSE AL105:= 0; ENDIF;
% IF (DATA & 64) THEN AL106:= 1; ELSE AL106:= 0; ENDIF;
% IF (DATA & 128) THEN AL107:= 1; ELSE AL107:= 0; ENDIF;
);
% DATA[8] -> BYTE(
% IF (DATA & 1) THEN AL108:= 1; ELSE AL108:= 0; ENDIF;
% IF (DATA & 2) THEN AL109:= 1; ELSE AL109:= 0; ENDIF;
% IF (DATA & 4) THEN AL110:= 1; ELSE AL110:= 0; ENDIF;
% IF (DATA & 8) THEN AL111:= 1; ELSE AL111:= 0; ENDIF;
% IF (DATA & 16) THEN AL112:= 1; ELSE AL112:= 0; ENDIF;
% );
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CORRIGO E Analog settings
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for setting Analog status
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2008-10-14 inital version
% History: 2010-06-18 Anpassning för Svensk Styrteknik
%
DEVICETYPE CorrigoESet1 NAMED "CorrigoE Börv." TYPEID 21273 IS
PARAMETER
Id : "Adress";
S1 : "Börvärde TL" ["°C"]; %1 Setpoint constant supply air temperature
%S2 : "Kurva1 X1" ["°C"]; %2 Outdoor temp, First curvepoint for outdoor compensated setpoint
%S3 : "Kurva1 X2" ["°C"]; %3 Second
%S4 : "Kurva1 X3" ["°C"]; %4 Third
%S5 : "Kurva1 X4" ["°C"]; %5 Fourth
%S6 : "Kurva1 X5" ["°C"]; %6 Fifth
%S7 : "Kurva1 X6" ["°C"]; %7 Sixth
%S8 : "Kurva1 X7" ["°C"]; %8 Seventh
%S9 : "Kurva1 X8" ["°C"]; %9 Eighth
%S10 : "Kurva1 Y1" ["°C"]; %10 Setpoint, First curvepoint for outdoor compensated setpoint
%S11 : "Kurva1 Y2" ["°C"]; %11 Second
%S12 : "Kurva1 Y3" ["°C"]; %12 Third
%S13 : "Kurva1 Y4" ["°C"]; %13 Fourth
%S14 : "Kurva1 Y5" ["°C"]; %14 Fifth
%S15 : "Kurva1 Y6" ["°C"]; %15 Sixth
%S16 : "Kurva1 Y7" ["°C"]; %16 Seventh
%S17 : "Kurva1 Y8" ["°C"]; %17 Eight
%S18 : "Börvärde FL" ["°C"]; %18 Setpoint exhaust air temp
%S19 : "Börvärde Rum" ["°C"]; %19 Setpoint room temp
%S20 : "Värme start" ["°C"]; %20 Room temp for start heating
%S21 : "Värme stopp" ["°C"]; %21 Room temp for stop heating
%S22 : "Kyla start" ["°C"]; %22 Room temp for start cooling
%S23 : "Kyla stopp" ["°C"]; %23 Room temp for stop cooling
S24 : "BVTryck TF 1/1" ["Pa"]; %24 Setpoint full speed supply air fan pressure
S25 : "BVTryck TF 1/2" ["Pa"]; %25 Setpoint reduced speed supply air fan pressure
S26 : "BVTryck FF 1/1" ["Pa"]; %26 Setpoint full speed exhaust air fan pressure
S27 : "BVTryck FF 1/2" ["Pa"]; %27 Setpoint reduced speed exhaust air fan pressure
%S28 : "BVFlöde TF 1/1" ["m3/h"]; %28 Setpoint full speed supply air fan flow. Scale factor = 1
%S29 : "BVFlöde TF 1/2" ["m3/h"]; %29 Setpoint reduced speed supply air fan flow. Scale factor = 1
%S30 : "BVFlöde FF 1/1" ["m3/h"]; %30 Setpoint full speed exhaust air fan flow. Scale factor = 1
%S31 : "BVFlöde FF 1/2" ["m3/h"]; %31 Setpoint reduced speed exhaust air fan flow. Scale factor = 1
%S32 : "Börvärde CO2" ["ppm"]; %32 Setpoint CO2
S33 : "BVVarmhållning" ["°C"]; %33 25°C Setpoint frost protection if the ventilation unit is stoped
S34 : "Larmgr.Frysvakt"["°C"]; %34 5° P-Gain frost protection when running (alarm limit+PGain)
%S35 : "Avfrosttemp" ["°C"]; %35 Setpoint de-icing temp
%S36 : "Avfrosthyst." ["°C"]; %36 Hysteresis for stop of de-icing
%S37 : "BVFukt Rum" ["%RH"]; %37 Setpoint humidity room
%S38 : "BVFukt TL ["%RH"]; %38 Max limit humidity duct
%S39 : "BVFukthyst." ["%RH"]; %39 Hysteresis to start humidity control after stop max limitation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
S439 : "BV Pumpstopp" ["°C"]; %439 18 °C Recirculation setpoint R,3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% S393 : "Fläktstyr 1/1"; %393 TimeGroupStatusFanFullSpeed X,3 Manual/Auto Full Speed time channel
% % 0=Manual-Off
% % 1=Manual-On
% % 2=Forced Off
% % 3=Forced On
% % 4=Auto
% S394 : "Fläktstyr 1/2"; %394 TimeGroupStatusFanHalfSpeed X,3 Manual/Auto Half Speed time channel
% % 0=Manual-Off
% % 1=Manual-On
% % 2=Forced Off
% % 3=Forced On
% % 4=Auto
%
% Set bit value
% Ventilation1.Cor_AlaAcknowAll L,1 3 0 Command to acknowledge all alarms
PUBLIC
PRIVATE
Cnt;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Settings1 NAMED "Ställ Börvärden" 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-1
IF Cnt=0 THEN DATA := 0; %S1
ELSIF Cnt=1 THEN DATA := 23; %S24
ELSIF Cnt=2 THEN DATA := 24; %S25
ELSIF Cnt=3 THEN DATA := 25; %S26
ELSIF Cnt=4 THEN DATA := 26; %S27
ELSIF Cnt=5 THEN DATA := 0; %S1
ELSIF Cnt=6 THEN DATA := 32; %S33
ELSIF Cnt=7 THEN DATA := 33; %S34
ELSE DATA := 438; %S439
ENDIF;
);
DATA[4] <- RWORD(
IF Cnt=0 THEN
IF S1<10 THEN DATA := 100; % S1 : "Börvärde TL"
ELSIF S1>40 THEN DATA := 400;
ELSE DATA := S1*10;
ENDIF;
ELSIF Cnt=1 THEN
IF S24<20 THEN DATA := 200; % S24: "BVTryck TF 1/1"
ELSIF S24>750 THEN DATA := 7500;
ELSE DATA := S24*10;
ENDIF;
ELSIF Cnt=2 THEN
IF S25<20 THEN DATA := 200; % S25: "BVTryck TF 1/2"
ELSIF S25>750 THEN DATA := 7500;
ELSE DATA := 25*10;
ENDIF;
ELSIF Cnt=3 THEN
IF S26<20 THEN DATA := 200; % S26: "BVTryck FF 1/1"
ELSIF S26>750 THEN DATA := 7500;
ELSE DATA := S26*10;
ENDIF;
ELSIF Cnt=4 THEN
IF S27<20 THEN DATA := 200; % S27: "BVTryck FF 1/2"
ELSIF S27>750 THEN DATA := 7500;
ELSE DATA := S27*10;
ENDIF;
ELSIF Cnt=5 THEN
IF S1<10 THEN DATA := 100; % S1 : "Börvärde TL"
ELSIF S1>40 THEN DATA := 400;
ELSE DATA := S1*10;
ENDIF;
ELSIF Cnt=6 THEN
IF S33<10 THEN DATA := 100; % S33: "BVVarmhållning"
ELSIF S33>40 THEN DATA := 400;
ELSE DATA := S33*10;
ENDIF;
ELSIF Cnt=7 THEN
IF S34<4 THEN DATA := 40; % S34: "Larmgr.Frysvakt"
ELSIF S34>40 THEN DATA := 400;
ELSE DATA := S34*10;
ENDIF;
ELSE
IF S439<10 THEN DATA := 100; % S439: "BV Pumpstopp"
ELSIF S439>40 THEN DATA := 400;
ELSE DATA := S439*10;
ENDIF;
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 CORRIGO E Analog settings 2
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for setting Analog status
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2010-06-18 Nytt, Anpassning för Svensk Styrteknik
%
DEVICETYPE CorrigoESet2 NAMED "CorrigoE Fläkt" TYPEID 21274 IS
PARAMETER
Id : "Adress";
S340 : "Max avv.tryckTF"; %340 SAFMaxDiffPressure 50 Pa Max control deviation pressure SAF
S341 : "Max avv.tryckFF"; %341 EAFMaxDiffPressure 50 Pa Max control deviation pressure EAF
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
S393 : "Fläktstyr 1/1"; %393 TimeGroupStatusFanFullSpeed X,3 Manual/Auto Full Speed time channel
% 0=Manual-Off
% 1=Manual-On
% 2=Forced Off
% 3=Forced On
% 4=Auto
S394 : "Fläktstyr 1/2"; %394 TimeGroupStatusFanHalfSpeed X,3 Manual/Auto Half Speed time channel
% 0=Manual-Off
% 1=Manual-On
% 2=Forced Off
% 3=Forced On
% 4=Auto
PUBLIC
PRIVATE
Cnt;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Settings2 NAMED "Ställ Fläktpar." IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(06); %Write singel register
DATA[2] <- RWORD( %Start adress (regnr-1)
IF Cnt>3 THEN Cnt:=0; ENDIF;
%% Adress=Register-1
IF Cnt=0 THEN DATA := 392; %S393
ELSIF Cnt=1 THEN DATA := 339; %S340
ELSIF Cnt=2 THEN DATA := 340; %S341
%ELSIF Cnt=3 THEN DATA := 25; %
%ELSIF Cnt=4 THEN DATA := 26; %
%ELSIF Cnt=5 THEN DATA := 0; %
%ELSIF Cnt=6 THEN DATA := 32; %
%ELSIF Cnt=7 THEN DATA := 33; %
ELSE DATA := 393; %S394
ENDIF;
);
DATA[4] <- RWORD(
IF Cnt=0 THEN
IF S393<0 THEN DATA := 0; % S393: "Fläktstyr 1/1";
ELSIF S393>4 THEN DATA := 4;
ELSE DATA := S393;
ENDIF;
ELSIF Cnt=1 THEN
IF S340<10 THEN DATA := 100; % S340: "Max avv.tryckTF"
ELSIF S340>200 THEN DATA := 2000;
ELSE DATA := S340*10;
ENDIF;
ELSIF Cnt=2 THEN
IF S341<10 THEN DATA := 100; % S341: "Max avv.tryckFF"
ELSIF S341>200 THEN DATA := 2000;
ELSE DATA := S341*10;
ENDIF;
%ELSIF Cnt=3 THEN
% IF S26<20 THEN DATA := 200; %
% ELSIF S26>750 THEN DATA := 7500;
% ELSE DATA := S26*10;
% ENDIF;
%ELSIF Cnt=4 THEN
% IF S27<20 THEN DATA := 200; %
% ELSIF S27>750 THEN DATA := 7500;
% ELSE DATA := S27*10;
% ENDIF;
%ELSIF Cnt=5 THEN
% IF S1<10 THEN DATA := 100; %
% ELSIF S1>40 THEN DATA := 400;
% ELSE DATA := S1*10;
% ENDIF;
%ELSIF Cnt=6 THEN
% IF S33<10 THEN DATA := 100; %
% ELSIF S33>40 THEN DATA := 400;
% ELSE DATA := S33*10;
% ENDIF;
%ELSIF Cnt=7 THEN
% IF S34<4 THEN DATA := 40; %
% ELSIF S34>40 THEN DATA := 400;
% ELSE DATA := S34*10;
% ENDIF;
ELSE
IF S394<0 THEN DATA := 0; % S394: "Fläktstyr 1/2";
ELSIF S394>4 THEN DATA := 4;
ELSE DATA := S394;
ENDIF;
ENDIF;
Cnt := Cnt + 1;
IF Cnt>3 THEN Cnt := 0;
ENDIF;
);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(06);
TIMEOUT 2000
END;
END;
% History: 2008-12-10 Fel answer size Digital Input, Ändrat 7 till 9
% AO1-5 visning i procent (ingen division med 10)
% History: 2010-02-19 Timeout ändrad till 2 sekunder NÖDVÄNDIGT !!!
% History: 2010-06-18 Anpassning för Svensk Styrteknik
% History: 2010-06-20 En del rättade fel i koden.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CORRIGO E Analog inputs/outputs
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status AI and AO
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2008-10-14 inital version
% History: 2010-06-18 Anpassning för Svensk Styrteknik
%
DEVICETYPE CorrigoEAnalog NAMED "CorrigoE AI/AU" TYPEID 21270 IS
PARAMETER
Id : "Adress";
PUBLIC
V1 : "Utetemperatur" ["°C"]; %1 Outdoor temperature
%V2 : "VVX effekt" ["%"]; %2 Exch. Efficiency (%)
%V3 : "Driftläge" [""]; %3 (I) Run mode, 0=Stopped,
% % 1=Starting up,
% % 2=Starting reduced speed,
% % 3=Starting full speed,
% % 4=Starting normal run,
% % 5=Normal run,
% % 6=Support control heating,
% % 7=Support control cooling,
% % 8=CO2 run,
% % 9=Night cooling,
% % 10=Full speed stop,
% % 11=Stopping fan
%V4 : "Drifttid TF" ["h"]; %4 Running time (h) supply air fan
%V5 : "Drifttid FF" ["h"]; %5 Running time (h) exhaust air fan
%V6 : "Förlängd drift" ["min"]; %6 (I) Number of minutes extended operation
V7 : "Temp tilluft" ["°C"]; %7 Supply air temperature
%V8 : "BV tilluft" ["°C"]; %8 Calculated setpoint supply air
V9 : "Temp frånluft" ["°C"]; %9 Exhaust air temp
%V10 : "Temp 1 rum" ["°C"]; %10 Room temperature 1
%V11 : "Temp 2 rum" ["°C"]; %11 Room temperature 2
%V12 : "Drifttid Vä/Ky" ["min"]; %12 (I) Number of minutes in ongoing support heating/cooling
V13 : "Tryck tilluft" ["Pa"]; %13 Supply air fan pressure (Pa)
V14 : "Tryck frånluft" ["Pa"]; %14 Exhaust air fan pressure (Pa)
%V15 : "Flöde tilluft" ["m3/h"]; %15 Supply air fan flow (m3/h) Scale factor = 1
%V16 : "Flöde frånluft" ["m3/h"]; %16 Exhaust air fan flow (m3/h) Scale factor = 1
%V17 : "CO2-halt" ["ppm"]; %17 CO2 (ppm)
%V18 : "Drifttid CO2" ["min"]; %18 (I) Number of minutes support run time CO2
V19 : "Temp frysvakt" ["°C"]; %19 Frost protection temp
%V20 : "Temp frånluft" ["°C"]; %20 Extract air temp
%V21 : "Temp avfrost." ["°C"]; %21 De-icing temp exchanger
%V22 : "Drifttid Avis." ["min"]; %22 (I) Number of minutes for ongoing de-icing
%V23 : "Fuktighet rum" ["%RH"]; %23 Humidity room
%V24 : "Fuktighet TF" ["%RH"]; %24 Humidity duct
%V25 : "Temp extra" ["°C"]; %25 Additional sensor / External setpoint
% AI functions %%%%%%%%%%%%%%%
% 0=Not used 5=Roomtemp2 10=Deicingtemp 15=Extra unit temp
% 1=Outdoortemp 6=Extracttemp 11=Frost prot.temp 16=External SAF control
% 2=Supplytemp 7=Extrasensor 12=CO2 17=External EAF control
% 3=Exhausttemp 8=SAF pressure 13=Humidity room 18=SAF pressure 2
% 4=Roomtemp1 9=EAF pressure 14=Humidity duct
V26 : "AI1" [""]; %26 The scaled and filtered value of AI1 R,4
V27 : "AI2" [""]; %27 The scaled and filtered value of AI2 R,4
V28 : "AI3" [""]; %28 The scaled and filtered value of AI3 R,4
V29 : "AI4" [""]; %29 The scaled and filtered value of AI4 R,4
V30 : "AI5" [""]; %30 The scaled and filtered value of UAI1 R,4
V31 : "AI6" [""]; %31 The scaled and filtered value of UAI2 R,4
V32 : "AI7" [""]; %32 The scaled and filtered value of UAI3 R,4
V33 : "AI8" [""]; %33 The scaled and filtered value of UAI4 R,4
% AO function %%%%%%%%%%%%%%%%%
% 0=Not used 5=EAF
% 1=Y1-Heating 6=Y6-Humidity
% 2=Y2-Exchanger 7=Sequence
% 3=Y3-Cooling 8=Extra unit
% 4=SAF 9=Heat/Cool (change over)
V54 : "AO1" ["%"]; %54 Value of AO1
V55 : "AO2" ["%"]; %55 Value of AO2
V56 : "AO3" ["%"]; %56 Value of AO3
V57 : "AO4" ["%"]; %57 Value of AO4
V58 : "AO5" ["%"]; %58 Value of AO5
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM AnalogInput NAMED "Läs Analog IN" 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(33); % Number of registers
ANSWER SIZE 71
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
%DATA[2] = BYTE(66); % Byte count
DATA[3] -> RWORD(IF (DATA>=32768) THEN V1 :=(DATA-65536)/10; ELSE V1 :=DATA/10; ENDIF;);
%DATA[5] -> RWORD(V2 := DATA / 10;);
%DATA[7] -> RWORD(V3 := DATA;);
%DATA[9] -> RWORD(V4 := DATA / 10;);
%DATA[11] -> RWORD(V5 := DATA / 10;);
%DATA[13] -> RWORD(V6 := DATA;);
DATA[15] -> RWORD(IF (DATA>=32768) THEN V7 :=(DATA-65536)/10; ELSE V7 :=DATA/10; ENDIF;);
%DATA[17] -> RWORD(IF (DATA>=32768) THEN V8 :=(DATA-65536)/10; ELSE V8 :=DATA/10; ENDIF;);
DATA[19] -> RWORD(IF (DATA>=32768) THEN V9 :=(DATA-65536)/10; ELSE V9 :=DATA/10; ENDIF;);
%DATA[21] -> RWORD(IF (DATA>=32768) THEN V10:=(DATA-65536)/10; ELSE V10:=DATA/10; ENDIF;);
%DATA[23] -> RWORD(IF (DATA>=32768) THEN V11:=(DATA-65536)/10; ELSE V11:=DATA/10; ENDIF;);
%DATA[25] -> RWORD(V12:= DATA;);
DATA[27] -> RWORD(V13:= DATA / 10;);
DATA[29] -> RWORD(V14:= DATA / 10;);
%DATA[31] -> RWORD(V15:= DATA;);
%DATA[33] -> RWORD(V16:= DATA;);
%DATA[35] -> RWORD(V17:= DATA / 10;);
%DATA[37] -> RWORD(V18:= DATA;);
DATA[39] -> RWORD(IF (DATA>=32768) THEN V19:=(DATA-65536)/10; ELSE V19:=DATA/10; ENDIF;);
%DATA[41] -> RWORD(IF (DATA>=32768) THEN V20:=(DATA-65536)/10; ELSE V20:=DATA/10; ENDIF;);
%DATA[43] -> RWORD(IF (DATA>=32768) THEN V21:=(DATA-65536)/10; ELSE V21:=DATA/10; ENDIF;);
%DATA[45] -> RWORD(V22:= DATA;);
%DATA[47] -> RWORD(V23:= DATA / 10;);
%DATA[49] -> RWORD(V24:= DATA / 10;);
%DATA[51] -> RWORD(IF (DATA>=32768) THEN V25:=(DATA-65536)/10; ELSE V25:=DATA/10; ENDIF;);
DATA[53] -> RWORD(V26:= DATA / 10;); %OBS! Ej skalat värde !!!!
DATA[55] -> RWORD(V27:= DATA / 10;); %OBS! Ej skalat värde !!!!
DATA[57] -> RWORD(V28:= DATA / 10;); %OBS! Ej skalat värde !!!!
DATA[59] -> RWORD(V29:= DATA / 10;); %OBS! Ej skalat värde !!!!
DATA[61] -> RWORD(V30:= DATA / 10;); %OBS! Ej skalat värde !!!!
DATA[63] -> RWORD(V31:= DATA / 10;); %OBS! Ej skalat värde !!!!
DATA[65] -> RWORD(V32:= DATA / 10;); %OBS! Ej skalat värde !!!!
DATA[67] -> RWORD(V33:= DATA / 10;); %OBS! Ej skalat värde !!!!
TIMEOUT 2000
END;
TELEGRAM AnalogOutput NAMED "Läs AU 1-5" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(04); % Modbus command "04h" Read registers
DATA[2] := RWORD(53); % Start address register (Reg.nr-1)
DATA[4] := RWORD(5); % Number of registers
ANSWER SIZE 15
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
DATA[2] = BYTE(10); % Byte count
DATA[3] -> RWORD(V54:= DATA;); % Ändrat Volt till %
DATA[5] -> RWORD(V55:= DATA;);
DATA[7] -> RWORD(V56:= DATA;);
DATA[9] -> RWORD(V57:= DATA;);
DATA[11] -> RWORD(V58:= DATA;);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CORRIGO E, Digtal inputs
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Digital status DI and DO
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2008-10-14 inital version
% History: 2010-06-18 Anpassning för Svensk Styrteknik
%
DEVICETYPE CorrigoEDigital NAMED "CorrigoE DI/DU" TYPEID 21271 IS
PARAMETER
Id : "Adress";
PUBLIC
%D1 : "Helfart aktiv"; %1 Is set if timechannel full speed is active
%D2 : "Halvfart aktiv"; %2 Is set if timechannel reduced speed is active
%D3 : "Timer 1 aktiv"; %3 Is set if timer output 1 is active
%D4 : "Timer 2 aktiv"; %4 Is set if timer output 2 is active
%D5 : "Timer 3 aktiv"; %5 Is set if timer output 3 is active
%D6 : "Timer 4 aktiv"; %6 Is set if timer output 4 is active
%D7 : "Timer 5 aktiv"; %7 Is set if timer output 5 is active
%D8 : "Helfart extra"; %8 Is set if extended operation full speed
%D9 : "Halvfart extra"; %9 Is set if extended operation half speed
%D10 : "VärmeReglering"; %10 Is set if ongoing support heating
%D11 : "KylaReglering"; %11 Is set if ongoing support cooling
%D12 : "CO2-reglering"; %12 Is set if ongoing support CO2
%D13 : "Avisning aktiv"; %13 DeIcingActive
% DI / UDI Function %%%%%%%%%%%%%%%%
% 0=Not used 5=P1-Cooling 10=Ext run ½ 15=De-icing
% 1=SAF-Ind 6=Filter alarm 11=External alarm 16=Frostprotection
% 2=EAF-Ind 7=Fire alarm 12=External switch 17=Overheatprotection
% 3=P1-Heating 8=Fire damper-ind 13=Flow guard 18=Recirculation run
% 4=P1-Exchanger 9=Ext run 1/1 14=Rot.sent.exch 19=Change over
%
D14 : "DI1 status"; %14 Value of DI1
D15 : "DI2 status"; %15 Value of DI2
D16 : "DI3 status"; %16 Value of DI3
D17 : "DI4 status"; %17 Value of DI4
D18 : "DI5 status"; %18 Value of DI5
D19 : "DI6 status"; %19 Value of DI6
D20 : "DI7 status"; %20 Value of DI7
D21 : "DI8 status"; %21 Value of DI8
D22 : "DI9 status"; %22 Value of DI9, Value of UDI1
D23 : "DI10 status"; %23 Value of DI10, Value of UDI2
D24 : "DI11 status"; %24 Value of DI11, Value of UDI3
D25 : "DI12 status"; %25 Value of DI12, Value of UDI4
% DO function %%%%%%%%%%%%%%%%%%%
% 0 = Not Used 11 = SumAlarmB 22 = ExchangerIncrease 33 = TimeChannel1
% 1 = SAFStart1 12 = SAFFrequencyStart 23 = ExchangerDecrease 34 = TimeChannel2
% 2 = EAFStart1 13 = EAFFrequencyStart 24 = CoolingIncrease 35 = TimeChannel3
% 3 = SAFStart2 14 = HeatingActivate 25 = CoolingDecrease 36 = TimeChannel4
% 4 = EAFStart2 15 = ExchangerActivate 26 = HeatStep1 37 = TimeChannel5
% 5 = HeatingPumpStart 16 = CoolingActivate 27 = HeatStep2 38 = Humidity start
% 6 = ExchangerStart 17 = RecycleAirDamper 28 = HeatStep3 39 = Extra unit start
% 7 = CoolingPumpStart 18 = FreshAirDamper 29 = HeatStep4 40 = Heat/Cool step 1
% 8 = FireDamper 19 = ExtractAirDamper 30 = CoolStep1 41 = Heat/Cool step 2
% 9 = SumAlarm 20 = HeatingIncrease 31 = CoolStep2 42 = Heat/Cool step 3
% 10 = SumAlarmA 21 = HeatingDecrease 32 = CoolStep3
D26 : "DU1"; %26 Value of DO1
D27 : "DU2"; %27 Value of DO2
D28 : "DU3"; %28 Value of DO3
D29 : "DU4"; %29 Value of DO4
D30 : "DU5"; %30 Value of DO5
D31 : "DU6"; %31 Value of DO6
D32 : "DU7"; %32 Value of DO7
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM DigitalInput NAMED "Digital status" 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(32); % Number of inputs
ANSWER SIZE 9
DATA[0] = BYTE(Id);
DATA[1] = HEX(02);
%DATA[2] = BYTE(4);
%DATA[3] -> BYTE(
% IF (DATA & 1) THEN D1 := 1; ELSE D1 := 0; ENDIF;
% IF (DATA & 2) THEN D2 := 1; ELSE D2 := 0; ENDIF;
% IF (DATA & 4) THEN D3 := 1; ELSE D3 := 0; ENDIF;
% IF (DATA & 8) THEN D4 := 1; ELSE D4 := 0; ENDIF;
% IF (DATA & 16) THEN D5 := 1; ELSE D5 := 0; ENDIF;
% IF (DATA & 32) THEN D6 := 1; ELSE D6 := 0; ENDIF;
% IF (DATA & 64) THEN D7 := 1; ELSE D7 := 0; ENDIF;
% IF (DATA & 128) THEN D8 := 1; ELSE D8 := 0; ENDIF;
% );
DATA[4] -> BYTE(
% IF (DATA & 1) THEN D9 := 1; ELSE D9 := 0; ENDIF;
% IF (DATA & 2) THEN D10:= 1; ELSE D10:= 0; ENDIF;
% IF (DATA & 4) THEN D11:= 1; ELSE D11:= 0; ENDIF;
% IF (DATA & 8) THEN D12:= 1; ELSE D12:= 0; ENDIF;
% IF (DATA & 16) THEN D13:= 1; ELSE D13:= 0; ENDIF;
IF (DATA & 32) THEN D14:= 1; ELSE D14:= 0; ENDIF;
IF (DATA & 64) THEN D15:= 1; ELSE D15:= 0; ENDIF;
IF (DATA & 128) THEN D16:= 1; ELSE D16:= 0; ENDIF;
);
DATA[5] -> BYTE(
IF (DATA & 1) THEN D17:= 1; ELSE D17:= 0; ENDIF;
IF (DATA & 2) THEN D18:= 1; ELSE D18:= 0; ENDIF;
IF (DATA & 4) THEN D19:= 1; ELSE D19:= 0; ENDIF;
IF (DATA & 8) THEN D20:= 1; ELSE D20:= 0; ENDIF;
IF (DATA & 16) THEN D21:= 1; ELSE D21:= 0; ENDIF;
IF (DATA & 32) THEN D22:= 1; ELSE D22:= 0; ENDIF;
IF (DATA & 64) THEN D23:= 1; ELSE D23:= 0; ENDIF;
IF (DATA & 128) THEN D24:= 1; ELSE D24:= 0; ENDIF;
);
DATA[6] -> BYTE(
IF (DATA & 1) THEN D25:= 1; ELSE D25:= 0; ENDIF;
IF (DATA & 2) THEN D26:= 1; ELSE D26:= 0; ENDIF;
IF (DATA & 4) THEN D27:= 1; ELSE D27:= 0; ENDIF;
IF (DATA & 8) THEN D28:= 1; ELSE D28:= 0; ENDIF;
IF (DATA & 16) THEN D29:= 1; ELSE D29:= 0; ENDIF;
IF (DATA & 32) THEN D30:= 1; ELSE D30:= 0; ENDIF;
IF (DATA & 64) THEN D31:= 1; ELSE D31:= 0; ENDIF;
IF (DATA & 128) THEN D32:= 1; ELSE D32:= 0; ENDIF;
);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CORRIGO E, Alarm inputs
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Notera!
% Kvittera genom att öka kanalvärdet kopplat till "Kvittering".
% Om man har en checkbox (kryssruta) för att utföra kvittering går det kanske
% att koppla en logisk funktion som efter viss timeout ställer tillbaka
% kvitteringskanalen (och checkboxen). Den timeouten måste anpassas efter
% skriptets ställda uppdateringstid.
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2008-10-14 inital version
% History: 2010-06-18 Anpassning för Svensk Styrteknik
%
DEVICETYPE CorrigoEAlarm NAMED "CorrigoE Larm1" TYPEID 21272 IS
PARAMETER
Id : "Adress";
Ack : "Kvittering"; %3 Command to acknowledge all alarms L,1
PUBLIC
AL1 : "Fel TF Fläkt"; %33* Run Error Supply Air Fan
AL2 : "Fel FL Fläkt"; %34* Run Error Exhaust Air Fan
AL3 : "Fel P1 Värme"; %35 Run Error P1-Heater
AL4 : "Fel P1 Kyla"; %36 Run Error P1-Cooler
AL5 : "Fel P1 VVX"; %37 Run Error P1-Exchanger
AL6 : "Larm Filtervakt"; %38 Filter guard
AL7 : "Larm Flödesvakt"; %39 Flow guard
AL8 : "Larm ExFrysvakt"; %40 External frost guard
AL9 : "Larm Avfrost."; %41 Deicing pressure guard
AL10 : "Larm BRAND"; %42 Fire alarm
%AL11 : "Larm Ext. relä"; %43 External switch
%AL12 : "Larm Externt"; %44 External alarm
AL13 : "Larm TF regler"; %45 Supply Air control error
%AL14 : "Larm Avv. fukt"; %46 Deviation Humidity control
AL15 : "Larm TF HögTem"; %47* High supply air temp
AL16 : "Larm TF LågTem"; %48* Low supply air temp
%AL17 : "Larm TF Max"; %49 Supply Air Fan max limit
%AL18 : "Larm TF Min"; %50 Supply Air Fan min limit
%AL19 : "Larm Rum HögT."; %51 High room temp
%AL20 : "Larm Rum LågT."; %52 Low room temp
AL53 : "Larm FF HögTem"; %53 High exhaust air temp
AL54 : "Larm FF LågTem"; %54 Low exhaust air temp
%AL55 : "Larm ElvärmeHög"; %55 Electric heating is overheated
AL56 : "Larm Frysrisk"; %56 Frost risk
AL57 : "Larm Frysva.Låg"; %57 Low frost guard temp
%AL58 : "Larm Effekt Låg" %58 Low efficiency
AL59 : "Givarfel Utetemp"; %59 Sensor error outdoor temp
%AL60 : "Analogue deicing"; %60 Analogue deicing
AL61 : "Larm VVX r.vakt"; %61 Rotation guard exchanger
%AL62 : "Fel Brandspjäll"; %62 Fire damper is out of operation
AL63 : "Fel Reg TFfläkt"; %63 Supply Air Fan control error
AL64 : "Fel Reg FFfläkt"; %64 Exhaust Air Fan control error
%AL65 : "Supply Air Fan extern"; %65 Supply Air Fan external operation
%AL66 : "Exhaust Air Fan exter"; %66 Exhaust Air Fan external operation
%AL67 : "Ventilation Manual mo"; %67 Ventilation Manual mode
PRIVATE
Started;
AckMemory;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM DigitalAlarm NAMED "Larm status" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(02); % Modbus command "02h" read discrete input (bit)
DATA[2] := RWORD(32); % Start adress (33-1)
DATA[4] := RWORD(35); % Number of inputs
ANSWER SIZE 10
DATA[0] = BYTE(Id);
DATA[1] = HEX(02);
%DATA[2] = BYTE(5);
DATA[3] -> BYTE(
IF (DATA & 1) THEN AL1 := 1; ELSE AL1 := 0; ENDIF;
IF (DATA & 2) THEN AL2 := 1; ELSE AL2 := 0; ENDIF;
IF (DATA & 4) THEN AL3 := 1; ELSE AL3 := 0; ENDIF;
IF (DATA & 8) THEN AL4 := 1; ELSE AL4 := 0; ENDIF;
IF (DATA & 16) THEN AL5 := 1; ELSE AL5 := 0; ENDIF;
IF (DATA & 32) THEN AL6 := 1; ELSE AL6 := 0; ENDIF;
IF (DATA & 64) THEN AL7 := 1; ELSE AL7 := 0; ENDIF;
IF (DATA & 128) THEN AL8 := 1; ELSE AL8 := 0; ENDIF;
);
DATA[4] -> BYTE(
IF (DATA & 1) THEN AL9 := 1; ELSE AL9 := 0; ENDIF;
IF (DATA & 2) THEN AL10:= 1; ELSE AL10:= 0; ENDIF;
% IF (DATA & 4) THEN AL11:= 1; ELSE AL11:= 0; ENDIF;
% IF (DATA & 8) THEN AL12:= 1; ELSE AL12:= 0; ENDIF;
IF (DATA & 16) THEN AL13:= 1; ELSE AL13:= 0; ENDIF;
% IF (DATA & 32) THEN AL14:= 1; ELSE AL14:= 0; ENDIF;
IF (DATA & 64) THEN AL15:= 1; ELSE AL15:= 0; ENDIF;
IF (DATA & 128) THEN AL16:= 1; ELSE AL16:= 0; ENDIF;
);
DATA[5] -> BYTE(
% IF (DATA & 1) THEN AL17:= 1; ELSE AL17:= 0; ENDIF;
% IF (DATA & 2) THEN AL18:= 1; ELSE AL18:= 0; ENDIF;
% IF (DATA & 4) THEN AL19:= 1; ELSE AL19:= 0; ENDIF;
% IF (DATA & 8) THEN AL20:= 1; ELSE AL20:= 0; ENDIF;
IF (DATA & 16) THEN AL53:= 1; ELSE AL53:= 0; ENDIF;
IF (DATA & 32) THEN AL54:= 1; ELSE AL54:= 0; ENDIF;
% IF (DATA & 64) THEN AL55:= 1; ELSE AL55:= 0; ENDIF;
IF (DATA & 128) THEN AL56:= 1; ELSE AL56:= 0; ENDIF;
);
DATA[6] -> BYTE(
IF (DATA & 1) THEN AL57:= 1; ELSE AL57:= 0; ENDIF;
% IF (DATA & 2) THEN AL58:= 1; ELSE AL58:= 0; ENDIF;
IF (DATA & 4) THEN AL59:= 1; ELSE AL59:= 0; ENDIF;
% IF (DATA & 8) THEN AL60:= 1; ELSE AL60:= 0; ENDIF;
IF (DATA & 16) THEN AL61:= 1; ELSE AL61:= 0; ENDIF;
% IF (DATA & 32) THEN AL62:= 1; ELSE AL62:= 0; ENDIF;
IF (DATA & 64) THEN AL63:= 1; ELSE AL63:= 0; ENDIF;
IF (DATA & 128) THEN AL64:= 1; ELSE AL64:= 0; ENDIF;
);
% DATA[7] -> BYTE(
% IF (DATA & 1) THEN AL65:= 1; ELSE AL65:= 0; ENDIF;
% IF (DATA & 2) THEN AL66:= 1; ELSE AL66:= 0; ENDIF;
% IF (DATA & 4) THEN AL67:= 1; ELSE AL67:= 0; ENDIF;
% );
TIMEOUT 2000
END;
TELEGRAM Acknowledge NAMED "Larmkvittering" IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(05); %Write singel coil
DATA[2] <- RWORD(DATA := 2;); %Start adress (regnr-1)
DATA[4] <- RWORD(IF (Started = 0) THEN
AckMemory := Ack;
Started := 1;
ENDIF;
IF (Ack > AckMemory) THEN
DATA := 65280; % FF00h
ELSE
DATA := 0;
ENDIF;
AckMemory := Ack;
);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(05);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CORRIGO E, Alarm inputs
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Alarm inputs
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2010-06-18 Nytt, Anpassning för Svensk Styrteknik
%
DEVICETYPE CorrigoEAlarm2 NAMED "CorrigoE Larm2" TYPEID 21275 IS
PARAMETER
Id : "Adress";
PUBLIC
%AL68 : "Manual supply a"; %68 Manual supply air control
%AL69 : "Manual Supply A"; %69 Manual Supply Air Fan mode
%AL70 : "Manual Supply A"; %70 Manual Supply Air Fan freq control
%AL71 : "Manual Exhaust "; %71 Manual Exhaust Air Fan mode
%AL72 : "Manual Exhaust "; %72 Manual Exhaust Air Fan freq control
%AL73 : "Manual heater c"; %73 Manual heater control
%AL74 : "Manual cooler c"; %74 Manual cooler control
%AL75 : "Manual exchange"; %75 Manual exchanger control
%AL76 : "Manual P1-Heate"; %76 Manual P1-Heater
%AL77 : "Manual P1-Coole"; %77 Manual P1-Cooler
%AL78 : "Manual P1-Excha"; %78 Manual P1-Exchanger
%AL79 : "Manual fire dam"; %79 Manual fire damper
%AL80 : "Internal batter"; %80 Internal battery error
%AL81 : "Start signal fu"; %81 Start signal full speed supply air fan
%AL82 : "Start signal fu"; %82 Start signal full speed exhaust air fan
%AL83 : "Start signal ha"; %83 Start signal half speed supply air fan
%AL84 : "Start signal ha"; %84 Start signal half speed exhaust air fan
%AL85 : "Start signal He"; %85 Start signal Heat Pump
%AL86 : "Start signal Ex"; %86 Start signal Exchanger
%AL87 : "Start signal Co"; %87 Start signal Cool Pump
%AL88 : "Start signal fr"; %88 Start signal frequencer supply air fan
%AL89 : "Start signal fr"; %89 Start signal frequencer exhaust air fan
AL90 : "Givarfel TLtemp"; %90 Sensor error Supply Air temp
AL91 : "Givarfel FLtemp"; %91 Sensor error Exhaust Air temp
AL92 : "Givarfel R1temp"; %92 Sensor error Room temp 1
AL93 : "Givarfel R2temp"; %93 Sensor error Room temp 2
AL94 : "Givarfel ALtemp"; %94 Sensor error Extract Air temp
AL95 : "Givarfel EXtemp"; %95 Sensor error Extra sensor
AL96 : "Givarfel SAFtry"; %96 Sensor error SAF pressure
AL97 : "Givarfel EAFtry"; %97 Sensor error EAF pressure
AL98 : "Givarfel AFtemp"; %98 Sensor error Deicing temp
AL99 : "Givarfel FPtemp"; %99 Sensor error Frost Protection temp
AL100 : "Givarfel CO2"; %100 Sensor error CO2
AL101 : "Givarfel Rfukt"; %101 Sensor error Humidity room
AL102 : "Givarfel Dfukt"; %102 Sensor error Humidity duct
%AL103 : "ReservedActive1" %103 Not used L,2
%AL104 : "ReservedActive2" %104 Not used L,2
%AL105 : "ReservedActive3" %105 Not used L,2
%AL106 : "ReservedActive4" %106 Not used L,2
%AL107 : "ReservedActive5" %107 Not used L,2
%AL108 : "ReservedActive6" %108 Not used L,2
%AL109 : "ReservedActive7" %109 Not used L,2
%AL110 : "ReservedActive8" %110 Not used L,2
%AL111 : "ReservedActive9" %111 Not used L,2
%AL112 : "ReservedActive10" %112 Not used L,2
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM DigitalAlarm2 NAMED "Givarfel" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(02); % Modbus command "02h" read discrete input (bit)
DATA[2] := RWORD(67); % Start adress (68-1)
DATA[4] := RWORD(45); % Number of inputs
ANSWER SIZE 11
DATA[0] = BYTE(Id);
DATA[1] = HEX(02);
%DATA[2] = BYTE(6);
%DATA[3] -> BYTE(
% IF (DATA & 1) THEN AL68 := 1; ELSE AL68 := 0; ENDIF;
% IF (DATA & 2) THEN AL69 := 1; ELSE AL69 := 0; ENDIF;
% IF (DATA & 4) THEN AL70 := 1; ELSE AL70 := 0; ENDIF;
% IF (DATA & 8) THEN AL71 := 1; ELSE AL71 := 0; ENDIF;
% IF (DATA & 16) THEN AL72 := 1; ELSE AL72 := 0; ENDIF;
% IF (DATA & 32) THEN AL73 := 1; ELSE AL73 := 0; ENDIF;
% IF (DATA & 64) THEN AL74 := 1; ELSE AL74 := 0; ENDIF;
% IF (DATA & 128) THEN AL75 := 1; ELSE AL75 := 0; ENDIF;
% );
%DATA[4] -> BYTE(
% IF (DATA & 1) THEN AL76 := 1; ELSE AL76 := 0; ENDIF;
% IF (DATA & 2) THEN AL77 := 1; ELSE AL77 := 0; ENDIF;
% IF (DATA & 4) THEN AL78 := 1; ELSE AL78 := 0; ENDIF;
% IF (DATA & 8) THEN AL79 := 1; ELSE AL79 := 0; ENDIF;
% IF (DATA & 16) THEN AL80 := 1; ELSE AL80 := 0; ENDIF;
% IF (DATA & 32) THEN AL81 := 1; ELSE AL81 := 0; ENDIF;
% IF (DATA & 64) THEN AL82 := 1; ELSE AL82 := 0; ENDIF;
% IF (DATA & 128) THEN AL83 := 1; ELSE AL83 := 0; ENDIF;
% );
DATA[5] -> BYTE(
% IF (DATA & 1) THEN AL84 := 1; ELSE AL84 := 0; ENDIF;
% IF (DATA & 2) THEN AL85 := 1; ELSE AL85 := 0; ENDIF;
% IF (DATA & 4) THEN AL86 := 1; ELSE AL86 := 0; ENDIF;
% IF (DATA & 8) THEN AL87 := 1; ELSE AL87 := 0; ENDIF;
% IF (DATA & 16) THEN AL88 := 1; ELSE AL88 := 0; ENDIF;
% IF (DATA & 32) THEN AL89 := 1; ELSE AL89 := 0; ENDIF;
IF (DATA & 64) THEN AL90 := 1; ELSE AL90 := 0; ENDIF;
IF (DATA & 128) THEN AL91 := 1; ELSE AL91 := 0; ENDIF;
);
DATA[6] -> BYTE(
IF (DATA & 1) THEN AL92 := 1; ELSE AL92 := 0; ENDIF;
IF (DATA & 2) THEN AL93 := 1; ELSE AL93 := 0; ENDIF;
IF (DATA & 4) THEN AL94 := 1; ELSE AL94 := 0; ENDIF;
IF (DATA & 8) THEN AL95 := 1; ELSE AL95 := 0; ENDIF;
IF (DATA & 16) THEN AL96 := 1; ELSE AL96 := 0; ENDIF;
IF (DATA & 32) THEN AL97 := 1; ELSE AL97 := 0; ENDIF;
IF (DATA & 64) THEN AL98 := 1; ELSE AL98 := 0; ENDIF;
IF (DATA & 128) THEN AL99 := 1; ELSE AL99 := 0; ENDIF;
);
DATA[7] -> BYTE(
IF (DATA & 1) THEN AL100:= 1; ELSE AL100:= 0; ENDIF;
IF (DATA & 2) THEN AL101:= 1; ELSE AL101:= 0; ENDIF;
IF (DATA & 4) THEN AL102:= 1; ELSE AL102:= 0; ENDIF;
% IF (DATA & 8) THEN AL103:= 1; ELSE AL103:= 0; ENDIF;
% IF (DATA & 16) THEN AL104:= 1; ELSE AL104:= 0; ENDIF;
% IF (DATA & 32) THEN AL105:= 1; ELSE AL105:= 0; ENDIF;
% IF (DATA & 64) THEN AL106:= 1; ELSE AL106:= 0; ENDIF;
% IF (DATA & 128) THEN AL107:= 1; ELSE AL107:= 0; ENDIF;
);
% DATA[8] -> BYTE(
% IF (DATA & 1) THEN AL108:= 1; ELSE AL108:= 0; ENDIF;
% IF (DATA & 2) THEN AL109:= 1; ELSE AL109:= 0; ENDIF;
% IF (DATA & 4) THEN AL110:= 1; ELSE AL110:= 0; ENDIF;
% IF (DATA & 8) THEN AL111:= 1; ELSE AL111:= 0; ENDIF;
% IF (DATA & 16) THEN AL112:= 1; ELSE AL112:= 0; ENDIF;
% );
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CORRIGO E Analog settings
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for setting Analog status
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2008-10-14 inital version
% History: 2010-06-18 Anpassning för Svensk Styrteknik
%
DEVICETYPE CorrigoESet1 NAMED "CorrigoE Börv." TYPEID 21273 IS
PARAMETER
Id : "Adress";
S1 : "Börvärde TL" ["°C"]; %1 Setpoint constant supply air temperature
%S2 : "Kurva1 X1" ["°C"]; %2 Outdoor temp, First curvepoint for outdoor compensated setpoint
%S3 : "Kurva1 X2" ["°C"]; %3 Second
%S4 : "Kurva1 X3" ["°C"]; %4 Third
%S5 : "Kurva1 X4" ["°C"]; %5 Fourth
%S6 : "Kurva1 X5" ["°C"]; %6 Fifth
%S7 : "Kurva1 X6" ["°C"]; %7 Sixth
%S8 : "Kurva1 X7" ["°C"]; %8 Seventh
%S9 : "Kurva1 X8" ["°C"]; %9 Eighth
%S10 : "Kurva1 Y1" ["°C"]; %10 Setpoint, First curvepoint for outdoor compensated setpoint
%S11 : "Kurva1 Y2" ["°C"]; %11 Second
%S12 : "Kurva1 Y3" ["°C"]; %12 Third
%S13 : "Kurva1 Y4" ["°C"]; %13 Fourth
%S14 : "Kurva1 Y5" ["°C"]; %14 Fifth
%S15 : "Kurva1 Y6" ["°C"]; %15 Sixth
%S16 : "Kurva1 Y7" ["°C"]; %16 Seventh
%S17 : "Kurva1 Y8" ["°C"]; %17 Eight
%S18 : "Börvärde FL" ["°C"]; %18 Setpoint exhaust air temp
%S19 : "Börvärde Rum" ["°C"]; %19 Setpoint room temp
%S20 : "Värme start" ["°C"]; %20 Room temp for start heating
%S21 : "Värme stopp" ["°C"]; %21 Room temp for stop heating
%S22 : "Kyla start" ["°C"]; %22 Room temp for start cooling
%S23 : "Kyla stopp" ["°C"]; %23 Room temp for stop cooling
S24 : "BVTryck TF 1/1" ["Pa"]; %24 Setpoint full speed supply air fan pressure
S25 : "BVTryck TF 1/2" ["Pa"]; %25 Setpoint reduced speed supply air fan pressure
S26 : "BVTryck FF 1/1" ["Pa"]; %26 Setpoint full speed exhaust air fan pressure
S27 : "BVTryck FF 1/2" ["Pa"]; %27 Setpoint reduced speed exhaust air fan pressure
%S28 : "BVFlöde TF 1/1" ["m3/h"]; %28 Setpoint full speed supply air fan flow. Scale factor = 1
%S29 : "BVFlöde TF 1/2" ["m3/h"]; %29 Setpoint reduced speed supply air fan flow. Scale factor = 1
%S30 : "BVFlöde FF 1/1" ["m3/h"]; %30 Setpoint full speed exhaust air fan flow. Scale factor = 1
%S31 : "BVFlöde FF 1/2" ["m3/h"]; %31 Setpoint reduced speed exhaust air fan flow. Scale factor = 1
%S32 : "Börvärde CO2" ["ppm"]; %32 Setpoint CO2
S33 : "BVVarmhållning" ["°C"]; %33 25°C Setpoint frost protection if the ventilation unit is stoped
S34 : "Larmgr.Frysvakt"["°C"]; %34 5° P-Gain frost protection when running (alarm limit+PGain)
%S35 : "Avfrosttemp" ["°C"]; %35 Setpoint de-icing temp
%S36 : "Avfrosthyst." ["°C"]; %36 Hysteresis for stop of de-icing
%S37 : "BVFukt Rum" ["%RH"]; %37 Setpoint humidity room
%S38 : "BVFukt TL ["%RH"]; %38 Max limit humidity duct
%S39 : "BVFukthyst." ["%RH"]; %39 Hysteresis to start humidity control after stop max limitation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
S439 : "BV Pumpstopp" ["°C"]; %439 18 °C Recirculation setpoint R,3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% S393 : "Fläktstyr 1/1"; %393 TimeGroupStatusFanFullSpeed X,3 Manual/Auto Full Speed time channel
% % 0=Manual-Off
% % 1=Manual-On
% % 2=Forced Off
% % 3=Forced On
% % 4=Auto
% S394 : "Fläktstyr 1/2"; %394 TimeGroupStatusFanHalfSpeed X,3 Manual/Auto Half Speed time channel
% % 0=Manual-Off
% % 1=Manual-On
% % 2=Forced Off
% % 3=Forced On
% % 4=Auto
%
% Set bit value
% Ventilation1.Cor_AlaAcknowAll L,1 3 0 Command to acknowledge all alarms
PUBLIC
PRIVATE
Cnt;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Settings1 NAMED "Ställ Börvärden" 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-1
IF Cnt=0 THEN DATA := 0; %S1
ELSIF Cnt=1 THEN DATA := 23; %S24
ELSIF Cnt=2 THEN DATA := 24; %S25
ELSIF Cnt=3 THEN DATA := 25; %S26
ELSIF Cnt=4 THEN DATA := 26; %S27
ELSIF Cnt=5 THEN DATA := 0; %S1
ELSIF Cnt=6 THEN DATA := 32; %S33
ELSIF Cnt=7 THEN DATA := 33; %S34
ELSE DATA := 438; %S439
ENDIF;
);
DATA[4] <- RWORD(
IF Cnt=0 THEN
IF S1<10 THEN DATA := 100; % S1 : "Börvärde TL"
ELSIF S1>40 THEN DATA := 400;
ELSE DATA := S1*10;
ENDIF;
ELSIF Cnt=1 THEN
IF S24<20 THEN DATA := 200; % S24: "BVTryck TF 1/1"
ELSIF S24>750 THEN DATA := 7500;
ELSE DATA := S24*10;
ENDIF;
ELSIF Cnt=2 THEN
IF S25<20 THEN DATA := 200; % S25: "BVTryck TF 1/2"
ELSIF S25>750 THEN DATA := 7500;
ELSE DATA := 25*10;
ENDIF;
ELSIF Cnt=3 THEN
IF S26<20 THEN DATA := 200; % S26: "BVTryck FF 1/1"
ELSIF S26>750 THEN DATA := 7500;
ELSE DATA := S26*10;
ENDIF;
ELSIF Cnt=4 THEN
IF S27<20 THEN DATA := 200; % S27: "BVTryck FF 1/2"
ELSIF S27>750 THEN DATA := 7500;
ELSE DATA := S27*10;
ENDIF;
ELSIF Cnt=5 THEN
IF S1<10 THEN DATA := 100; % S1 : "Börvärde TL"
ELSIF S1>40 THEN DATA := 400;
ELSE DATA := S1*10;
ENDIF;
ELSIF Cnt=6 THEN
IF S33<10 THEN DATA := 100; % S33: "BVVarmhållning"
ELSIF S33>40 THEN DATA := 400;
ELSE DATA := S33*10;
ENDIF;
ELSIF Cnt=7 THEN
IF S34<4 THEN DATA := 40; % S34: "Larmgr.Frysvakt"
ELSIF S34>40 THEN DATA := 400;
ELSE DATA := S34*10;
ENDIF;
ELSE
IF S439<10 THEN DATA := 100; % S439: "BV Pumpstopp"
ELSIF S439>40 THEN DATA := 400;
ELSE DATA := S439*10;
ENDIF;
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 CORRIGO E Analog settings 2
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for setting Analog status
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2010-06-18 Nytt, Anpassning för Svensk Styrteknik
%
DEVICETYPE CorrigoESet2 NAMED "CorrigoE Fläkt" TYPEID 21274 IS
PARAMETER
Id : "Adress";
S340 : "Max avv.tryckTF"; %340 SAFMaxDiffPressure 50 Pa Max control deviation pressure SAF
S341 : "Max avv.tryckFF"; %341 EAFMaxDiffPressure 50 Pa Max control deviation pressure EAF
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
S393 : "Fläktstyr 1/1"; %393 TimeGroupStatusFanFullSpeed X,3 Manual/Auto Full Speed time channel
% 0=Manual-Off
% 1=Manual-On
% 2=Forced Off
% 3=Forced On
% 4=Auto
S394 : "Fläktstyr 1/2"; %394 TimeGroupStatusFanHalfSpeed X,3 Manual/Auto Half Speed time channel
% 0=Manual-Off
% 1=Manual-On
% 2=Forced Off
% 3=Forced On
% 4=Auto
PUBLIC
PRIVATE
Cnt;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Settings2 NAMED "Ställ Fläktpar." IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(06); %Write singel register
DATA[2] <- RWORD( %Start adress (regnr-1)
IF Cnt>3 THEN Cnt:=0; ENDIF;
%% Adress=Register-1
IF Cnt=0 THEN DATA := 392; %S393
ELSIF Cnt=1 THEN DATA := 339; %S340
ELSIF Cnt=2 THEN DATA := 340; %S341
%ELSIF Cnt=3 THEN DATA := 25; %
%ELSIF Cnt=4 THEN DATA := 26; %
%ELSIF Cnt=5 THEN DATA := 0; %
%ELSIF Cnt=6 THEN DATA := 32; %
%ELSIF Cnt=7 THEN DATA := 33; %
ELSE DATA := 393; %S394
ENDIF;
);
DATA[4] <- RWORD(
IF Cnt=0 THEN
IF S393<0 THEN DATA := 0; % S393: "Fläktstyr 1/1";
ELSIF S393>4 THEN DATA := 4;
ELSE DATA := S393;
ENDIF;
ELSIF Cnt=1 THEN
IF S340<10 THEN DATA := 100; % S340: "Max avv.tryckTF"
ELSIF S340>200 THEN DATA := 2000;
ELSE DATA := S340*10;
ENDIF;
ELSIF Cnt=2 THEN
IF S341<10 THEN DATA := 100; % S341: "Max avv.tryckFF"
ELSIF S341>200 THEN DATA := 2000;
ELSE DATA := S341*10;
ENDIF;
%ELSIF Cnt=3 THEN
% IF S26<20 THEN DATA := 200; %
% ELSIF S26>750 THEN DATA := 7500;
% ELSE DATA := S26*10;
% ENDIF;
%ELSIF Cnt=4 THEN
% IF S27<20 THEN DATA := 200; %
% ELSIF S27>750 THEN DATA := 7500;
% ELSE DATA := S27*10;
% ENDIF;
%ELSIF Cnt=5 THEN
% IF S1<10 THEN DATA := 100; %
% ELSIF S1>40 THEN DATA := 400;
% ELSE DATA := S1*10;
% ENDIF;
%ELSIF Cnt=6 THEN
% IF S33<10 THEN DATA := 100; %
% ELSIF S33>40 THEN DATA := 400;
% ELSE DATA := S33*10;
% ENDIF;
%ELSIF Cnt=7 THEN
% IF S34<4 THEN DATA := 40; %
% ELSIF S34>40 THEN DATA := 400;
% ELSE DATA := S34*10;
% ENDIF;
ELSE
IF S394<0 THEN DATA := 0; % S394: "Fläktstyr 1/2";
ELSIF S394>4 THEN DATA := 4;
ELSE DATA := S394;
ENDIF;
ENDIF;
Cnt := Cnt + 1;
IF Cnt>3 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.