Siemens Saphir
Detaljer
- Typ
- Drivrutin
- Upplaggd av
- Ove Jansson, Abelko Innovation
- Version
- 1
- Uppdaterad
- 2013-08-27
- Skapad
- 2013-08-27
- Kategori
- Modbus, Övrig utrustning
- Visningar
- 4541
Beskrivning
Drivrutin till Siemens Saphir
Bruksanvisning
Siemens SAPHIR Modbus for ACX32 slave mode GEA COM4 Application v1.9-v2.x (pdf)
Siemens SAPHIR Modbus for ACX36 slave IV Produkt LB10 Application v1.2.x (pdf)
Siemens SAPHIR Modbus for ACX32 slave mode IV Produkt LB20 Application v3.x (pdf)
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 2010-02-02 Klara negativa värden på temperaturer
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for SIEMENS SAPHIR Select device
%
% Skriptet gäller för:
% - SAPHIR S34 LB20 v3x (ACX32)
% - SAPHIR SS22 LB10 v12x (ACX36)
% - SAPHIR GEA COM4 (ACX32) 091117
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading selected values
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2008-01-07 initial version
% History: 2009-10-23 Added registers for ACX36
% History: 2009-11-17 Added registers for ACX32 GEA COM4 med inställningsmöjlighet
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for SIEMENS SAPHIR Setpoint values
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Setpoint values
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2007-12-17 inital version
%
DEVICETYPE SaphirSetpoints NAMED "Saphir R1-18" TYPEID 21191 IS
PARAMETER
Id : "Address";
PUBLIC
% Feedback for Holding reg
R1 : "SetP Temp comf." ["°C"]; % Basic setpoint temp, Comfort xx.y °C
R2 : "SetP Temp econ." ["°C"]; % Basic setpoint temp, Economy xx.y °C (ACX32)
R3 : "DeadZ Cool comf" ["°C"]; % Dead zone cooling, Comfort xx.y °C
R4 : "DeadZ Cool econ" ["°C"]; % Dead zone cooling, Economy xx.y °C (ACX32)
R5 : "SetP Post-cond." ["°C"]; % Setpoint post-conditioning xx.y °C (ACX32)
%R6
R7 : "SetP Temp SMin" ["°C"]; % Min setpoint SA temp, cascade xx.y °C
R8 : "SetP Temp SMax" ["°C"]; % Max setpoint SA temp, cascade xx.y °C
%R9
%R10 : "SetP Press SLow" ["Pa"]; % Setpoint pressure SA lowspeed xxx Pa (ACX32)
%R11 : "SetP Press SHig" ["Pa"]; % Setpoint pressure SA highspeed xxx Pa (ACX32)
%R12 : "SetP Press ELow" ["Pa"]; % Setpoint pressure EA lowspeed xxx Pa (ACX32)
%R13 : "SetP Press EHig" ["Pa"]; % Setpoint pressure EA highspeed xxx Pa (ACX32)
R10 : "SetP Flow SLow" ["l/s"]; % Setpoint flow SA lowspeed xxx l/s (ACX32)
R11 : "SetP Flow SHigh" ["l/s"]; % Setpoint flow SA highspeed xxx l/s (ACX32)
R12 : "SetP Flow ELow" ["l/s"]; % Setpoint flow EA lowspeed xxx l/s (ACX32)
R13 : "SetP Flow EHigh" ["l/s"]; % Setpoint flow EA highspeed xxx l/s (ACX32)
R14 : "SetP Flow" ["l/s"]; % Setpoint flow xxx l/s (GEA COM4)
%R15 : "SetP Speed SLow" ["%"]; % Setpoint fixed SA lowspeed xxx 0-100%
%R16 : "SetP Speed SHig" ["%"]; % Setpoint fixed SA highspeed xxx 0-100%
%R17 : "SetP Speed ELow" ["%"]; % Setpoint fixed EA lowspeed xxx 0-100%
%R18 : "SetP Speed EHig" ["%"]; % Setpoint fixed EA highspeed xxx 0-100%
R15 : "SetP Press SLow" ["Pa"]; % Setpoint pressure SA lowspeed xxx Pa (ACX32)
R16 : "SetP Press SHig" ["Pa"]; % Setpoint pressure SA highspeed xxx Pa (ACX32)
R17 : "SetP Press ELow" ["Pa"]; % Setpoint pressure EA lowspeed xxx Pa (ACX32)
R18 : "SetP Press EHig" ["Pa"]; % Setpoint pressure EA highspeed xxx Pa (ACX32)
R19 : "SetP Pressure" ["Pa"]; % Setpoint pressure xxx Pa (GEA COM4)
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Setpoints NAMED "Register 1-19" 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(19); % Number of registers
ANSWER SIZE 43
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
DATA[2] = BYTE(38); % Byte count
DATA[3] -> RWORD(R1 := DATA / 10;); % xx.y °C
DATA[5] -> RWORD(R2 := DATA / 10;); % xx.y °C
DATA[7] -> RWORD(R3 := DATA / 10;); % xx.y °C
DATA[9] -> RWORD(R4 := DATA / 10;); % xx.y °C
DATA[11] -> RWORD(R5 := DATA / 10;); % xx.y °C
% R6 % No data
DATA[15] -> RWORD(R7 := DATA / 10;); % xx.y °C
DATA[17] -> RWORD(R8 := DATA / 10;); % xx.y °C
% R9 % No data
DATA[21] -> RWORD(R10 := DATA;); % xxx Pa / l/s
DATA[23] -> RWORD(R11 := DATA;); % xxx Pa / l/s
DATA[25] -> RWORD(R12 := DATA;); % xxx Pa / l/s
DATA[27] -> RWORD(R13 := DATA;); % xxx Pa / l/s
DATA[29] -> RWORD(R14 := DATA;); % xxx l/s (GEA COM4)
DATA[31] -> RWORD(R15 := DATA;); % xxx Pa / 0-100%
DATA[33] -> RWORD(R16 := DATA;); % xxx Pa / 0-100%
DATA[35] -> RWORD(R17 := DATA;); % xxx Pa / 0-100%
DATA[37] -> RWORD(R18 := DATA;); % xxx Pa / 0-100%
DATA[39] -> RWORD(R19 := DATA;); % xxx Pa
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for SIEMENS SAPHIR Analog values 1
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2007-12-17 inital version
%
DEVICETYPE SaphirAnalog1 NAMED "Saphir R20-33" TYPEID 21192 IS
PARAMETER
Id : "Address";
PUBLIC
R20 : "SetP Temp heat" ["°C"]; % Actual heat setpoint temp control xx.y °C
R21 : "SetP Temp cool" ["°C"]; % Actual cool setpoint temp control xx.y °C
R22 : "SetP Temp SHeat" ["°C"]; % Actual heat setpoint SA temp control xx.y °C
R23 : "SetP Temp SCool" ["°C"]; % Actual cool setpoint SA temp control xx.y °C
R24 : "SetP TempRemote" ["°C"]; % Presentation remote setpoint xx.y °C
R25 : "Temp Outdoor" ["°C"]; % Outdoor temperature xx.y °C
R26 : "Temp Supply air" ["°C"]; % SA temperature xx.y °C
R27 : "Temp Frost" ["°C"]; % Frost temperature xx.y °C
R28 : "Temp Room" ["°C"]; % Room/EA temperature xx.y °C
R29 : "Temp Multi 2" ["°C"]; % Multifunction temperature 2 xx.y °C
R30 : "Temp Multi 1" ["°C"]; % Multifunction temperature 1 xx.y °C
R31 : "Flow SupplyAir" ["l/s"]; % SA flow/pressure xxx l/s (ACX32)
R32 : "Flow ExhaustAir" ["l/s"]; % EA flow/pressure xxx l/s (ACX32)
R33 : "PressSupplyAir" ["Pa"] ; % SA pressure xxx Pa (ACX32)
R34 : "PressExhausAir" ["Pa"] ; % EA pressure xxx Pa (GEA COM4)
R39 : "Temp Room unit" ["°C"]; % Room unit temperature xx.y °C (ACX36)
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Analog1 NAMED "Register 20-39" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(04); % Modbus command "04h" Read registers
DATA[2] := RWORD(19); % Start address register
DATA[4] := RWORD(20); % Number of registers
ANSWER SIZE 45
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
DATA[2] = BYTE(40); % Byte count
DATA[3] -> RWORD(R20 := DATA / 10;); % xx.y °C
DATA[5] -> RWORD(R21 := DATA / 10;); % xx.y °C
DATA[7] -> RWORD(R22 := DATA / 10;); % xx.y °C
DATA[9] -> RWORD(R23 := DATA / 10;); % xx.y °C
DATA[11] -> RWORD(R24 := DATA / 10;); % xx.y °C
DATA[13] -> RWORD(IF (DATA>=32768) THEN R25:=(DATA-65536)/10; ELSE R25:=DATA/10; ENDIF;); % xx.y °C
DATA[15] -> RWORD(IF (DATA>=32768) THEN R26:=(DATA-65536)/10; ELSE R26:=DATA/10; ENDIF;); % xx.y °C
DATA[17] -> RWORD(IF (DATA>=32768) THEN R27:=(DATA-65536)/10; ELSE R27:=DATA/10; ENDIF;); % xx.y °C
DATA[19] -> RWORD(IF (DATA>=32768) THEN R28:=(DATA-65536)/10; ELSE R28:=DATA/10; ENDIF;); % xx.y °C
DATA[21] -> RWORD(IF (DATA>=32768) THEN R29:=(DATA-65536)/10; ELSE R29:=DATA/10; ENDIF;); % xx.y °C
DATA[23] -> RWORD(IF (DATA>=32768) THEN R30:=(DATA-65536)/10; ELSE R30:=DATA/10; ENDIF;); % xx.y °C
DATA[25] -> RWORD(R31 := DATA;); % xxx l/s
DATA[27] -> RWORD(R32 := DATA;); % xxx l/s
DATA[29] -> RWORD(R33 := DATA;); % xxx Pa
DATA[31] -> RWORD(R34 := DATA;); % xxx Pa (GEA COM4)
DATA[41] -> RWORD(R39 := DATA / 10;); % xx.y °C (ACX36)
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for SIEMENS SAPHIR Analog values 2, Outputs, values and modes
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2007-12-17 inital version
%
DEVICETYPE SaphirAnalog2 NAMED "Saphir R40-51" TYPEID 21193 IS
PARAMETER
Id : "Address";
PUBLIC
R40 : "AO Heat" ["%"]; % Analog out Heating 0-100%
R41 : "AO Cool" ["%"]; % Analog out Cooling 0-100%
R42 : "AO HeatRecovery" ["%"]; % Analog out Heat recovery 0-100%
R43 : "Efficiency HRC" ["%"]; % Actual HRC efficiency 0-100%
R44 : "Fan speed Sup." ["%"]; % Frequency converter Supply fan 0-100%
R45 : "Fan speed Exh." ["%"]; % Frequency converter Exhaust fan 0-100%
R46 : "Air Quality" ["ppm"]; % Air quality 0-2000 ppm (ACX32)
R47 : "AO Extra" ["%"]; % Analog out Extra ctrl/sequence 0-100% (ACX32)
%R48 : "Not used" [" "]; % Not used
%R49 : "Not used" [" "]; % Not used
R50 : "Mode operation" ; % Actual operation mode ACX32 0-8
% 0 = Damperkick 1 = Testtemp (ACX32)
% 2 = Off 3 = Economy (ACX32)
% 4 = Comfort 5 = Startup (ACX32)
% 6 = Nightpurge 7 = Unoccupied (ACX32)
% 8 = Overrun (ACX32)
% Actual operation mode ACX32 GEA COM4 0-10
% 0 = Off 1 = Timeschedule (ACX32 GEA COM4)
% 2 = LON Op 3 = Night Op (ACX32 GEA COM4)
% 4 = Remote Op 5 = Timer Op (ACX32 GEA COM4)
% 6 = Overrun 7 = Stopr (ACX32 GEA COM4)
% 8 = Remote stop 9 = Test (ACX32 GEA COM4)
% 10= Startup (ACX32 GEA COM4)
% Actual operation mode ACX36 0-8
% 0 = Off 1 = Step 1 (ACX36)
% 2 = Step 2 3 = Undefined (ACX36)
% 4 = Testtemp 5 = Nightpurge (ACX36)
% 6 = Unoccupied 7 = Startup (ACX36)
% 8 = Overrun 9 = Damper kick (ACX36)
R51 : "Mode fan"; % Actual fan mode ACX32 0-2
% 0 = Off 1 = Lowspeed (ACX32)
% 2 = Highspeed (ACX32)
% Actual fan mode ACX32 GEA COM4 0-5
% 0 = Internal TSP 1 = Off (ACX32 GEA COM4)
% 2 = Eco Step 1 3 = Eco Step 2 (ACX32 GEA COM4
% 4 = Comf Step 1 5 = Comf step 2 (ACX32 GEA COM4
% Actual fan mode ACX36 0-2
% 0 = Off 1 = Step 1 (ACX36)
% 2 = Step 2 (ACX36)
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Analog2 NAMED "Register 40-51" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(04); % Modbus command "04h" Read registers
DATA[2] := RWORD(39); % Start address register
DATA[4] := RWORD(12); % Number of registers
ANSWER SIZE 29
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
DATA[2] = BYTE(24); % Byte count
DATA[3] -> RWORD(R40 := DATA;); % 0-100%
DATA[5] -> RWORD(R41 := DATA;); % 0-100%
DATA[7] -> RWORD(R42 := DATA;); % 0-100%
DATA[9] -> RWORD(R43 := DATA;); % 0-100%
DATA[11] -> RWORD(R44 := DATA;); % 0-100%
DATA[13] -> RWORD(R45 := DATA;); % 0-100%
DATA[15] -> RWORD(R46 := DATA;); % 0-2000 ppm
DATA[17] -> RWORD(R47 := DATA;); % 0-100%
% R48 % No data
% R49 % No data
DATA[23] -> RWORD(R50 := DATA;); % 0-8
DATA[25] -> RWORD(R51 := DATA;); % 0-2
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for SIEMENS SAPHIR Digital alarms 1
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Digital alarms
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2007-12-17 inital version
%
DEVICETYPE SaphirAlarms1 NAMED "Saphir DI1-14" TYPEID 21194 IS
PARAMETER
Id : "Address";
PUBLIC
%DI1 : "Not used" ; % Not used
DI2 : "Alarm A" ; % Alarm class A active
DI3 : "Alarm B" ; % Alarm class B active
DI4 : "Alarm C" ; % Alarm class C active
DI5 : "Alarm TempDev" ; % Temperature deviation alarm
DI6 : "Alarm Fire" ; % Fire alarm
DI7 : "Alarm HRC" ; % HRC alarm
DI8 : "Alarm PumpHeat" ; % Heating pump alarm
DI9 : "Alarm PumpCool" ; % Cooling pump alarm
DI10 : "Alarm AUX" ; % AUX alarm
DI11 : "Alarm FanSupply"; % Supply fan alarm
DI12 : "Alarm FanExhaus"; % Exhaust fan alarm
%DI13 : "Not used" ; % Not used
DI14 : "Alarm FrostProt"; % Frost protection alarm
%DI6b : "Alarm Smoke" ; % Smoke alarm
%DI8b : "Alarm Heating" ; % Heating alarm
%DI9b : "Alarm Cooling" ; % Cooling alarm
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Alarms1 NAMED "Digital 1-14" 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(14); % Number of inputs
ANSWER SIZE 7
DATA[0] = BYTE(Id);
DATA[1] = HEX(02);
DATA[2] = BYTE(2);
DATA[3] -> BYTE(%IF (DATA & 1) THEN DI1 := 1; ELSE DI1 := 0; ENDIF;
IF (DATA & 2) THEN DI2 := 1; ELSE DI2 := 0; ENDIF;
IF (DATA & 4) THEN DI3 := 1; ELSE DI3 := 0; ENDIF;
IF (DATA & 8) THEN DI4 := 1; ELSE DI4 := 0; ENDIF;
IF (DATA & 16) THEN DI5 := 1; ELSE DI5 := 0; ENDIF;
IF (DATA & 32) THEN DI6 := 1; ELSE DI6 := 0; ENDIF;
IF (DATA & 64) THEN DI7 := 1; ELSE DI7 := 0; ENDIF;
IF (DATA & 128) THEN DI8 := 1; ELSE DI8 := 0; ENDIF;
%IF (DATA & 32) THEN DI6b := 1; ELSE DI6b := 0; ENDIF;
%IF (DATA & 128) THEN DI8b := 1; ELSE DI8b := 0; ENDIF;
);
DATA[4] -> BYTE( IF (DATA & 1) THEN DI9 := 1; ELSE DI9 := 0; ENDIF;
IF (DATA & 2) THEN DI10 := 1; ELSE DI10 := 0; ENDIF;
IF (DATA & 4) THEN DI11 := 1; ELSE DI11 := 0; ENDIF;
IF (DATA & 8) THEN DI12 := 1; ELSE DI12 := 0; ENDIF;
%IF (DATA & 16) THEN DI13 := 1; ELSE DI13 := 0; ENDIF;
IF (DATA & 32) THEN DI14 := 1; ELSE DI14 := 0; ENDIF;
%IF (DATA & 1) THEN DI9b := 1; ELSE DI9b := 0; ENDIF;
);
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for SIEMENS SAPHIR Digital alarms 2
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Digital alarms
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2007-12-17 inital version
%
DEVICETYPE SaphirAlarms2 NAMED "Saphir DI15-28" TYPEID 21195 IS
PARAMETER
Id : "Address";
PUBLIC
DI15 : "Alarm HRC Frost"; % HRC frost alarm
DI16 : "Alarm HRC Press"; % HRC pressure guard alarm (ACX36)
DI17 : "Alarm HRC Effic"; % HRC efficiency alarm
DI18 : "Alarm UnitOverr"; % Unit override alarm
DI19 : "Alarm Filter" ; % Filter alarm
DI20 : "Alarm Room unit"; % Room unit alarm (ACX36)
DI21 : "Alarm SensRoom" ; % Room sensor alarm
DI22 : "Alarm SensOutd" ; % Out door sensor alarm
DI23 : "Alarm SensSup." ; % SA sensor alarm 1x0023
DI24 : "Alarm SensFrost"; % Frost sensor alarm
DI25 : "Alarm SensorM1" ; % Multifunction sensor 1 alarm
DI26 : "Alarm SensorM2" ; % Multifunction sensor 2 alarm
DI27 : "Alarm Runtime" ; % Runtime alarm
DI28 : "Alarm DampSmoke"; % Smoke damper alarm
%DI28 : "Alarm El.Heater"; % Electrical heater alarm (GEA COM4)
%DI29 : "Alarm Chiller" ; % Chiller alarm (GEA COM4)
%DI21b : "Alarm SensExh."; % Exhaust sensor alarm
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Alarms2 NAMED "Digital 15-28" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(02); % Modbus command "02h" read discrete input (bit)
DATA[2] := RWORD(14); % Start adress
DATA[4] := RWORD(16); % Number of inputs
ANSWER SIZE 7
DATA[0] = BYTE(Id);
DATA[1] = HEX(02);
DATA[2] = BYTE(2);
DATA[3] -> BYTE( IF (DATA & 1) THEN DI15 := 1; ELSE DI15 := 0; ENDIF;
IF (DATA & 2) THEN DI16 := 1; ELSE DI16 := 0; ENDIF; %(ACX36)
IF (DATA & 4) THEN DI17 := 1; ELSE DI17 := 0; ENDIF;
IF (DATA & 8) THEN DI18 := 1; ELSE DI18 := 0; ENDIF;
IF (DATA & 16) THEN DI19 := 1; ELSE DI19 := 0; ENDIF;
IF (DATA & 32) THEN DI20 := 1; ELSE DI20 := 0; ENDIF; %(ACX36)
IF (DATA & 64) THEN DI21 := 1; ELSE DI21 := 0; ENDIF;
IF (DATA & 128) THEN DI22 := 1; ELSE DI22 := 0; ENDIF;
%DI21b := DI21;
);
DATA[4] -> BYTE( IF (DATA & 1) THEN DI23 := 1; ELSE DI23 := 0; ENDIF;
IF (DATA & 2) THEN DI24 := 1; ELSE DI24 := 0; ENDIF;
IF (DATA & 4) THEN DI25 := 1; ELSE DI25 := 0; ENDIF;
IF (DATA & 8) THEN DI26 := 1; ELSE DI26 := 0; ENDIF;
IF (DATA & 16) THEN DI27 := 1; ELSE DI27 := 0; ENDIF;
IF (DATA & 32) THEN DI28 := 1; ELSE DI28 := 0; ENDIF;
IF (DATA & 32) THEN DI28 := 1; ELSE DI28 := 0; ENDIF;
%IF (DATA & 64) THEN DI29 := 1; ELSE DI29 := 0; ENDIF; %(GEA COM4)
);
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for SIEMENS SAPHIR Digital inputs 1
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Digital status
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2007-12-17 inital version
%
DEVICETYPE SaphirDigital1 NAMED "Saphir DI33-45" TYPEID 21196 IS
PARAMETER
Id : "Address";
PUBLIC
DI33 : "DI Pump heat" ; % Heating pump
DI34 : "DI Pump cool" ; % Cooling pump
DI35 : "DI Damper Outd." ; % Out door damper
DI36 : "DI alarm A" ; % Alarm class A output
DI37 : "DI alarm B" ; % Alarm class B output
DI38 : "DI Damper smoke" ; % Smoke damper
DI39 : "DI CoolDX Step2" ; % Cooling DX Step 2
DI40 : "DI FanSupp off" ; % Supply fan Off
DI41 : "DI FanSupp st1" ; % Supply fan Step 1
DI42 : "DI FanSupp st2" ; % Supply fan Step 2
DI43 : "DI FanExhaustOff" ; % Exhaust fan Off
DI44 : "DI FanExhaustStep1"; % Exhaust fan Step 1
DI45 : "DI FanExhaustStep2"; % Exhaust fan Step 2
%DI33b : "DI El. heat" ; % Electrical heater
%DI34b : "DI DX step 1" ; % DX Step 1
%DI39 : "DI Chiller ON" ; % Chiller in operation (GEA COM4)
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Digital1 NAMED "Digital 33-45" 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 address
DATA[4] := RWORD(13); % Number of inputs
ANSWER SIZE 7
DATA[0] = BYTE(Id);
DATA[1] = HEX(02);
DATA[2] = BYTE(2);
DATA[3] -> BYTE(IF (DATA & 1) THEN DI33 := 1; ELSE DI33 := 0; ENDIF;
IF (DATA & 2) THEN DI34 := 1; ELSE DI34 := 0; ENDIF;
IF (DATA & 4) THEN DI35 := 1; ELSE DI35 := 0; ENDIF;
IF (DATA & 8) THEN DI36 := 1; ELSE DI36 := 0; ENDIF;
IF (DATA & 16) THEN DI37 := 1; ELSE DI37 := 0; ENDIF;
IF (DATA & 32) THEN DI38 := 1; ELSE DI38 := 0; ENDIF;
IF (DATA & 64) THEN DI39 := 1; ELSE DI39 := 0; ENDIF;
IF (DATA & 128) THEN DI40 := 1; ELSE DI40 := 0; ENDIF;
);
DATA[4] -> BYTE(IF (DATA & 1) THEN DI41 := 1; ELSE DI41 := 0; ENDIF;
IF (DATA & 2) THEN DI42 := 1; ELSE DI42 := 0; ENDIF;
IF (DATA & 4) THEN DI43 := 1; ELSE DI43 := 0; ENDIF;
IF (DATA & 8) THEN DI44 := 1; ELSE DI44 := 0; ENDIF;
IF (DATA & 16) THEN DI45 := 1; ELSE DI45 := 0; ENDIF;
);
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for SIEMENS SAPHIR Digital inputs 2
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Digital status
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2007-12-17 inital version
%
DEVICETYPE SaphirDigital2 NAMED "Saphir DI52-61" TYPEID 21197 IS
PARAMETER
Id : "Address";
PUBLIC
DI52 : "Service Stop"; % Service switch Stop
DI53 : "Service Step1"; % Service switch Step 1 (ACX32)
DI54 : "Service Step2"; % Service switch Step 2 (ACX32)
DI55 : "External Stop"; % External Stop (ACX32)
DI56 : "Control Stop"; % Control input Stop
DI57 : "Control Step1"; % Control input Step 1
DI58 : "Control Step2"; % Control input Step 2
DI59 : "Control Room"; % Room control active
DI60 : "Control Supply"; % Supply control active
DI61 : "Control Exhaust"; % EA control active
DI64 : "Emergency Stop"; % EA control active (ACX36)
%DI56b: "Timer in Stop"; % Timer input Stop
%DI57b: "Timer in Step1" ; % Timer input Step 1
%DI58b: "Timer in Step2" ; % Timer input Step 2
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Digital2 NAMED "Digital 52-61" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(02); % Modbus command "02h" read discrete input (bit)
DATA[2] := RWORD(51); % Start address
DATA[4] := RWORD(16); % Number of inputs
ANSWER SIZE 7
DATA[0] = BYTE(Id);
DATA[1] = HEX(02);
DATA[2] = BYTE(2);
DATA[3] -> BYTE(IF (DATA & 1) THEN DI52 := 1; ELSE DI52 := 0; ENDIF;
IF (DATA & 2) THEN DI53 := 1; ELSE DI53 := 0; ENDIF;
IF (DATA & 4) THEN DI54 := 1; ELSE DI54 := 0; ENDIF;
IF (DATA & 8) THEN DI55 := 1; ELSE DI55 := 0; ENDIF;
IF (DATA & 16) THEN DI56 := 1; ELSE DI56 := 0; ENDIF;
IF (DATA & 32) THEN DI57 := 1; ELSE DI57 := 0; ENDIF;
IF (DATA & 64) THEN DI58 := 1; ELSE DI58 := 0; ENDIF;
IF (DATA & 128) THEN DI59 := 1; ELSE DI59 := 0; ENDIF;
);
DATA[4] -> BYTE(IF (DATA & 1) THEN DI60 := 1; ELSE DI60 := 0; ENDIF;
IF (DATA & 2) THEN DI61 := 1; ELSE DI61 := 0; ENDIF;
%IF (DATA & 4) THEN DI62 := 1; ELSE DI62 := 0; ENDIF;
%IF (DATA & 8) THEN DI63 := 1; ELSE DI63 := 0; ENDIF;
IF (DATA & 16) THEN DI64 := 1; ELSE DI64 := 0; ENDIF; %(ACX36)
%IF (DATA & 32) THEN DI65 := 1; ELSE DI65 := 0; ENDIF;
%IF (DATA & 64) THEN DI66 := 1; ELSE DI66 := 0; ENDIF;
%IF (DATA & 128) THEN DI67 := 1; ELSE DI67 := 0; ENDIF;
);
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for SIEMENS SAPHIR Analog settings
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2009-11-17 inital version
%
DEVICETYPE SaphirSettings NAMED "Saphir settings" TYPEID 21198 IS
PARAMETER
Id : "Address";
R1 : "SetP Temp comf." ["°C"]; % Basic setpoint temp, Comfort xx.y °C
%R2 : "SetP Temp econ." ["°C"]; % Basic setpoint temp, Economy xx.y °C (ACX32)
%R3 : "DeadZ Cool comf" ["°C"]; % Dead zone cooling, Comfort xx.y °C
%R4 : "DeadZ Cool econ" ["°C"]; % Dead zone cooling, Economy xx.y °C (ACX32)
%R5 : "SetP Post-cond." ["°C"]; % Setpoint post-conditioning xx.y °C (ACX32)
%R6
%R7 : "SetP Temp SMin" ["°C"]; % Min setpoint SA temp, cascade xx.y °C
%R8 : "SetP Temp SMax" ["°C"]; % Max setpoint SA temp, cascade xx.y °C
%R9
%R10 : "SetP Press SLow" ["Pa"]; % Setpoint pressure SA lowspeed xxx Pa (ACX32)
%R11 : "SetP Press SHig" ["Pa"]; % Setpoint pressure SA highspeed xxx Pa (ACX32)
%R12 : "SetP Press ELow" ["Pa"]; % Setpoint pressure EA lowspeed xxx Pa (ACX32)
%R13 : "SetP Press EHig" ["Pa"]; % Setpoint pressure EA highspeed xxx Pa (ACX32)
%R10 : "SetP Flow SLow" ["l/s"]; % Setpoint flow SA lowspeed xxx l/s (ACX32)
%R11 : "SetP Flow SHigh" ["l/s"]; % Setpoint flow SA highspeed xxx l/s (ACX32)
%R12 : "SetP Flow ELow" ["l/s"]; % Setpoint flow EA lowspeed xxx l/s (ACX32)
%R13 : "SetP Flow EHigh" ["l/s"]; % Setpoint flow EA highspeed xxx l/s (ACX32)
%R14 : "SetP Flow" ["l/s"]; % Setpoint flow xxx l/s (GEA COM4)
%R15 : "SetP Speed SLow" ["%"]; % Setpoint fixed SA lowspeed xxx 0-100%
%R16 : "SetP Speed SHig" ["%"]; % Setpoint fixed SA highspeed xxx 0-100%
%R17 : "SetP Speed ELow" ["%"]; % Setpoint fixed EA lowspeed xxx 0-100%
%R18 : "SetP Speed EHig" ["%"]; % Setpoint fixed EA highspeed xxx 0-100%
%R15 : "SetP Press SLow" ["Pa"]; % Setpoint pressure SA lowspeed xxx Pa (ACX32)
%R16 : "SetP Press SHig" ["Pa"]; % Setpoint pressure SA highspeed xxx Pa (ACX32)
%R17 : "SetP Press ELow" ["Pa"]; % Setpoint pressure EA lowspeed xxx Pa (ACX32)
%R18 : "SetP Press EHig" ["Pa"]; % Setpoint pressure EA highspeed xxx Pa (ACX32)
%R19 : "SetP Pressure" ["Pa"]; % Setpoint pressure xxx Pa (GEA COM4)
R50 : "BMS set mode"; % BMS override timeprogram mode 0-5 (LBA10/20)
% 0 = Internal TSP 1 = Off
% 2 = Eco Step 1 3 = Eco Step 2
% 4 = Comf Step 1 5 = Comf step 2
%R51 : "BMS set mode"; % BMS override timeprogram mode 0-5 (GEA)
% 0 = Internal TSP 1 = Off
% 2 = Eco Step 1 3 = Eco Step 2
% 4 = Comf Step 1 5 = Comf step 2
PUBLIC
PRIVATE
Cnt;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Settings1 NAMED "Setvalues" IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(06); %Write singel register
DATA[2] <- RWORD( %Start adress (regnr-1)
Cnt := Cnt + 1;
IF Cnt>1 THEN Cnt:=0;
ENDIF;
IF Cnt=0 THEN DATA := 0; %R1
ELSIF Cnt=1 THEN DATA := 49; %R50
%ELSIF Cnt=2 THEN DATA := 2; %R3
%ELSIF Cnt=3 THEN DATA := 3 %R4
%ELSIF Cnt=4 THEN DATA := 4; %R5
ENDIF;
);
DATA[4] <- RWORD(
IF Cnt=0 THEN
IF R1<0 THEN DATA := 0; %Basic setpoint temp, Comfort
ELSIF R1>30 THEN DATA := 300;
ELSE DATA := R1*10;
ENDIF;
ELSIF Cnt=1 THEN
IF R50<0 THEN DATA := 0; %BMS override timeprogram 0-5
ELSIF R50>5 THEN DATA := 0;
ELSE DATA := R50;
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;
ENDIF;
);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(06);
TIMEOUT 1000
END;
END;
% 2010-02-02 Klara negativa värden på temperaturer
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for SIEMENS SAPHIR Select device
%
% Skriptet gäller för:
% - SAPHIR S34 LB20 v3x (ACX32)
% - SAPHIR SS22 LB10 v12x (ACX36)
% - SAPHIR GEA COM4 (ACX32) 091117
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading selected values
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2008-01-07 initial version
% History: 2009-10-23 Added registers for ACX36
% History: 2009-11-17 Added registers for ACX32 GEA COM4 med inställningsmöjlighet
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for SIEMENS SAPHIR Setpoint values
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Setpoint values
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2007-12-17 inital version
%
DEVICETYPE SaphirSetpoints NAMED "Saphir R1-18" TYPEID 21191 IS
PARAMETER
Id : "Address";
PUBLIC
% Feedback for Holding reg
R1 : "SetP Temp comf." ["°C"]; % Basic setpoint temp, Comfort xx.y °C
R2 : "SetP Temp econ." ["°C"]; % Basic setpoint temp, Economy xx.y °C (ACX32)
R3 : "DeadZ Cool comf" ["°C"]; % Dead zone cooling, Comfort xx.y °C
R4 : "DeadZ Cool econ" ["°C"]; % Dead zone cooling, Economy xx.y °C (ACX32)
R5 : "SetP Post-cond." ["°C"]; % Setpoint post-conditioning xx.y °C (ACX32)
%R6
R7 : "SetP Temp SMin" ["°C"]; % Min setpoint SA temp, cascade xx.y °C
R8 : "SetP Temp SMax" ["°C"]; % Max setpoint SA temp, cascade xx.y °C
%R9
%R10 : "SetP Press SLow" ["Pa"]; % Setpoint pressure SA lowspeed xxx Pa (ACX32)
%R11 : "SetP Press SHig" ["Pa"]; % Setpoint pressure SA highspeed xxx Pa (ACX32)
%R12 : "SetP Press ELow" ["Pa"]; % Setpoint pressure EA lowspeed xxx Pa (ACX32)
%R13 : "SetP Press EHig" ["Pa"]; % Setpoint pressure EA highspeed xxx Pa (ACX32)
R10 : "SetP Flow SLow" ["l/s"]; % Setpoint flow SA lowspeed xxx l/s (ACX32)
R11 : "SetP Flow SHigh" ["l/s"]; % Setpoint flow SA highspeed xxx l/s (ACX32)
R12 : "SetP Flow ELow" ["l/s"]; % Setpoint flow EA lowspeed xxx l/s (ACX32)
R13 : "SetP Flow EHigh" ["l/s"]; % Setpoint flow EA highspeed xxx l/s (ACX32)
R14 : "SetP Flow" ["l/s"]; % Setpoint flow xxx l/s (GEA COM4)
%R15 : "SetP Speed SLow" ["%"]; % Setpoint fixed SA lowspeed xxx 0-100%
%R16 : "SetP Speed SHig" ["%"]; % Setpoint fixed SA highspeed xxx 0-100%
%R17 : "SetP Speed ELow" ["%"]; % Setpoint fixed EA lowspeed xxx 0-100%
%R18 : "SetP Speed EHig" ["%"]; % Setpoint fixed EA highspeed xxx 0-100%
R15 : "SetP Press SLow" ["Pa"]; % Setpoint pressure SA lowspeed xxx Pa (ACX32)
R16 : "SetP Press SHig" ["Pa"]; % Setpoint pressure SA highspeed xxx Pa (ACX32)
R17 : "SetP Press ELow" ["Pa"]; % Setpoint pressure EA lowspeed xxx Pa (ACX32)
R18 : "SetP Press EHig" ["Pa"]; % Setpoint pressure EA highspeed xxx Pa (ACX32)
R19 : "SetP Pressure" ["Pa"]; % Setpoint pressure xxx Pa (GEA COM4)
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Setpoints NAMED "Register 1-19" 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(19); % Number of registers
ANSWER SIZE 43
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
DATA[2] = BYTE(38); % Byte count
DATA[3] -> RWORD(R1 := DATA / 10;); % xx.y °C
DATA[5] -> RWORD(R2 := DATA / 10;); % xx.y °C
DATA[7] -> RWORD(R3 := DATA / 10;); % xx.y °C
DATA[9] -> RWORD(R4 := DATA / 10;); % xx.y °C
DATA[11] -> RWORD(R5 := DATA / 10;); % xx.y °C
% R6 % No data
DATA[15] -> RWORD(R7 := DATA / 10;); % xx.y °C
DATA[17] -> RWORD(R8 := DATA / 10;); % xx.y °C
% R9 % No data
DATA[21] -> RWORD(R10 := DATA;); % xxx Pa / l/s
DATA[23] -> RWORD(R11 := DATA;); % xxx Pa / l/s
DATA[25] -> RWORD(R12 := DATA;); % xxx Pa / l/s
DATA[27] -> RWORD(R13 := DATA;); % xxx Pa / l/s
DATA[29] -> RWORD(R14 := DATA;); % xxx l/s (GEA COM4)
DATA[31] -> RWORD(R15 := DATA;); % xxx Pa / 0-100%
DATA[33] -> RWORD(R16 := DATA;); % xxx Pa / 0-100%
DATA[35] -> RWORD(R17 := DATA;); % xxx Pa / 0-100%
DATA[37] -> RWORD(R18 := DATA;); % xxx Pa / 0-100%
DATA[39] -> RWORD(R19 := DATA;); % xxx Pa
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for SIEMENS SAPHIR Analog values 1
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2007-12-17 inital version
%
DEVICETYPE SaphirAnalog1 NAMED "Saphir R20-33" TYPEID 21192 IS
PARAMETER
Id : "Address";
PUBLIC
R20 : "SetP Temp heat" ["°C"]; % Actual heat setpoint temp control xx.y °C
R21 : "SetP Temp cool" ["°C"]; % Actual cool setpoint temp control xx.y °C
R22 : "SetP Temp SHeat" ["°C"]; % Actual heat setpoint SA temp control xx.y °C
R23 : "SetP Temp SCool" ["°C"]; % Actual cool setpoint SA temp control xx.y °C
R24 : "SetP TempRemote" ["°C"]; % Presentation remote setpoint xx.y °C
R25 : "Temp Outdoor" ["°C"]; % Outdoor temperature xx.y °C
R26 : "Temp Supply air" ["°C"]; % SA temperature xx.y °C
R27 : "Temp Frost" ["°C"]; % Frost temperature xx.y °C
R28 : "Temp Room" ["°C"]; % Room/EA temperature xx.y °C
R29 : "Temp Multi 2" ["°C"]; % Multifunction temperature 2 xx.y °C
R30 : "Temp Multi 1" ["°C"]; % Multifunction temperature 1 xx.y °C
R31 : "Flow SupplyAir" ["l/s"]; % SA flow/pressure xxx l/s (ACX32)
R32 : "Flow ExhaustAir" ["l/s"]; % EA flow/pressure xxx l/s (ACX32)
R33 : "PressSupplyAir" ["Pa"] ; % SA pressure xxx Pa (ACX32)
R34 : "PressExhausAir" ["Pa"] ; % EA pressure xxx Pa (GEA COM4)
R39 : "Temp Room unit" ["°C"]; % Room unit temperature xx.y °C (ACX36)
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Analog1 NAMED "Register 20-39" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(04); % Modbus command "04h" Read registers
DATA[2] := RWORD(19); % Start address register
DATA[4] := RWORD(20); % Number of registers
ANSWER SIZE 45
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
DATA[2] = BYTE(40); % Byte count
DATA[3] -> RWORD(R20 := DATA / 10;); % xx.y °C
DATA[5] -> RWORD(R21 := DATA / 10;); % xx.y °C
DATA[7] -> RWORD(R22 := DATA / 10;); % xx.y °C
DATA[9] -> RWORD(R23 := DATA / 10;); % xx.y °C
DATA[11] -> RWORD(R24 := DATA / 10;); % xx.y °C
DATA[13] -> RWORD(IF (DATA>=32768) THEN R25:=(DATA-65536)/10; ELSE R25:=DATA/10; ENDIF;); % xx.y °C
DATA[15] -> RWORD(IF (DATA>=32768) THEN R26:=(DATA-65536)/10; ELSE R26:=DATA/10; ENDIF;); % xx.y °C
DATA[17] -> RWORD(IF (DATA>=32768) THEN R27:=(DATA-65536)/10; ELSE R27:=DATA/10; ENDIF;); % xx.y °C
DATA[19] -> RWORD(IF (DATA>=32768) THEN R28:=(DATA-65536)/10; ELSE R28:=DATA/10; ENDIF;); % xx.y °C
DATA[21] -> RWORD(IF (DATA>=32768) THEN R29:=(DATA-65536)/10; ELSE R29:=DATA/10; ENDIF;); % xx.y °C
DATA[23] -> RWORD(IF (DATA>=32768) THEN R30:=(DATA-65536)/10; ELSE R30:=DATA/10; ENDIF;); % xx.y °C
DATA[25] -> RWORD(R31 := DATA;); % xxx l/s
DATA[27] -> RWORD(R32 := DATA;); % xxx l/s
DATA[29] -> RWORD(R33 := DATA;); % xxx Pa
DATA[31] -> RWORD(R34 := DATA;); % xxx Pa (GEA COM4)
DATA[41] -> RWORD(R39 := DATA / 10;); % xx.y °C (ACX36)
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for SIEMENS SAPHIR Analog values 2, Outputs, values and modes
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2007-12-17 inital version
%
DEVICETYPE SaphirAnalog2 NAMED "Saphir R40-51" TYPEID 21193 IS
PARAMETER
Id : "Address";
PUBLIC
R40 : "AO Heat" ["%"]; % Analog out Heating 0-100%
R41 : "AO Cool" ["%"]; % Analog out Cooling 0-100%
R42 : "AO HeatRecovery" ["%"]; % Analog out Heat recovery 0-100%
R43 : "Efficiency HRC" ["%"]; % Actual HRC efficiency 0-100%
R44 : "Fan speed Sup." ["%"]; % Frequency converter Supply fan 0-100%
R45 : "Fan speed Exh." ["%"]; % Frequency converter Exhaust fan 0-100%
R46 : "Air Quality" ["ppm"]; % Air quality 0-2000 ppm (ACX32)
R47 : "AO Extra" ["%"]; % Analog out Extra ctrl/sequence 0-100% (ACX32)
%R48 : "Not used" [" "]; % Not used
%R49 : "Not used" [" "]; % Not used
R50 : "Mode operation" ; % Actual operation mode ACX32 0-8
% 0 = Damperkick 1 = Testtemp (ACX32)
% 2 = Off 3 = Economy (ACX32)
% 4 = Comfort 5 = Startup (ACX32)
% 6 = Nightpurge 7 = Unoccupied (ACX32)
% 8 = Overrun (ACX32)
% Actual operation mode ACX32 GEA COM4 0-10
% 0 = Off 1 = Timeschedule (ACX32 GEA COM4)
% 2 = LON Op 3 = Night Op (ACX32 GEA COM4)
% 4 = Remote Op 5 = Timer Op (ACX32 GEA COM4)
% 6 = Overrun 7 = Stopr (ACX32 GEA COM4)
% 8 = Remote stop 9 = Test (ACX32 GEA COM4)
% 10= Startup (ACX32 GEA COM4)
% Actual operation mode ACX36 0-8
% 0 = Off 1 = Step 1 (ACX36)
% 2 = Step 2 3 = Undefined (ACX36)
% 4 = Testtemp 5 = Nightpurge (ACX36)
% 6 = Unoccupied 7 = Startup (ACX36)
% 8 = Overrun 9 = Damper kick (ACX36)
R51 : "Mode fan"; % Actual fan mode ACX32 0-2
% 0 = Off 1 = Lowspeed (ACX32)
% 2 = Highspeed (ACX32)
% Actual fan mode ACX32 GEA COM4 0-5
% 0 = Internal TSP 1 = Off (ACX32 GEA COM4)
% 2 = Eco Step 1 3 = Eco Step 2 (ACX32 GEA COM4
% 4 = Comf Step 1 5 = Comf step 2 (ACX32 GEA COM4
% Actual fan mode ACX36 0-2
% 0 = Off 1 = Step 1 (ACX36)
% 2 = Step 2 (ACX36)
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Analog2 NAMED "Register 40-51" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(04); % Modbus command "04h" Read registers
DATA[2] := RWORD(39); % Start address register
DATA[4] := RWORD(12); % Number of registers
ANSWER SIZE 29
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
DATA[2] = BYTE(24); % Byte count
DATA[3] -> RWORD(R40 := DATA;); % 0-100%
DATA[5] -> RWORD(R41 := DATA;); % 0-100%
DATA[7] -> RWORD(R42 := DATA;); % 0-100%
DATA[9] -> RWORD(R43 := DATA;); % 0-100%
DATA[11] -> RWORD(R44 := DATA;); % 0-100%
DATA[13] -> RWORD(R45 := DATA;); % 0-100%
DATA[15] -> RWORD(R46 := DATA;); % 0-2000 ppm
DATA[17] -> RWORD(R47 := DATA;); % 0-100%
% R48 % No data
% R49 % No data
DATA[23] -> RWORD(R50 := DATA;); % 0-8
DATA[25] -> RWORD(R51 := DATA;); % 0-2
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for SIEMENS SAPHIR Digital alarms 1
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Digital alarms
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2007-12-17 inital version
%
DEVICETYPE SaphirAlarms1 NAMED "Saphir DI1-14" TYPEID 21194 IS
PARAMETER
Id : "Address";
PUBLIC
%DI1 : "Not used" ; % Not used
DI2 : "Alarm A" ; % Alarm class A active
DI3 : "Alarm B" ; % Alarm class B active
DI4 : "Alarm C" ; % Alarm class C active
DI5 : "Alarm TempDev" ; % Temperature deviation alarm
DI6 : "Alarm Fire" ; % Fire alarm
DI7 : "Alarm HRC" ; % HRC alarm
DI8 : "Alarm PumpHeat" ; % Heating pump alarm
DI9 : "Alarm PumpCool" ; % Cooling pump alarm
DI10 : "Alarm AUX" ; % AUX alarm
DI11 : "Alarm FanSupply"; % Supply fan alarm
DI12 : "Alarm FanExhaus"; % Exhaust fan alarm
%DI13 : "Not used" ; % Not used
DI14 : "Alarm FrostProt"; % Frost protection alarm
%DI6b : "Alarm Smoke" ; % Smoke alarm
%DI8b : "Alarm Heating" ; % Heating alarm
%DI9b : "Alarm Cooling" ; % Cooling alarm
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Alarms1 NAMED "Digital 1-14" 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(14); % Number of inputs
ANSWER SIZE 7
DATA[0] = BYTE(Id);
DATA[1] = HEX(02);
DATA[2] = BYTE(2);
DATA[3] -> BYTE(%IF (DATA & 1) THEN DI1 := 1; ELSE DI1 := 0; ENDIF;
IF (DATA & 2) THEN DI2 := 1; ELSE DI2 := 0; ENDIF;
IF (DATA & 4) THEN DI3 := 1; ELSE DI3 := 0; ENDIF;
IF (DATA & 8) THEN DI4 := 1; ELSE DI4 := 0; ENDIF;
IF (DATA & 16) THEN DI5 := 1; ELSE DI5 := 0; ENDIF;
IF (DATA & 32) THEN DI6 := 1; ELSE DI6 := 0; ENDIF;
IF (DATA & 64) THEN DI7 := 1; ELSE DI7 := 0; ENDIF;
IF (DATA & 128) THEN DI8 := 1; ELSE DI8 := 0; ENDIF;
%IF (DATA & 32) THEN DI6b := 1; ELSE DI6b := 0; ENDIF;
%IF (DATA & 128) THEN DI8b := 1; ELSE DI8b := 0; ENDIF;
);
DATA[4] -> BYTE( IF (DATA & 1) THEN DI9 := 1; ELSE DI9 := 0; ENDIF;
IF (DATA & 2) THEN DI10 := 1; ELSE DI10 := 0; ENDIF;
IF (DATA & 4) THEN DI11 := 1; ELSE DI11 := 0; ENDIF;
IF (DATA & 8) THEN DI12 := 1; ELSE DI12 := 0; ENDIF;
%IF (DATA & 16) THEN DI13 := 1; ELSE DI13 := 0; ENDIF;
IF (DATA & 32) THEN DI14 := 1; ELSE DI14 := 0; ENDIF;
%IF (DATA & 1) THEN DI9b := 1; ELSE DI9b := 0; ENDIF;
);
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for SIEMENS SAPHIR Digital alarms 2
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Digital alarms
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2007-12-17 inital version
%
DEVICETYPE SaphirAlarms2 NAMED "Saphir DI15-28" TYPEID 21195 IS
PARAMETER
Id : "Address";
PUBLIC
DI15 : "Alarm HRC Frost"; % HRC frost alarm
DI16 : "Alarm HRC Press"; % HRC pressure guard alarm (ACX36)
DI17 : "Alarm HRC Effic"; % HRC efficiency alarm
DI18 : "Alarm UnitOverr"; % Unit override alarm
DI19 : "Alarm Filter" ; % Filter alarm
DI20 : "Alarm Room unit"; % Room unit alarm (ACX36)
DI21 : "Alarm SensRoom" ; % Room sensor alarm
DI22 : "Alarm SensOutd" ; % Out door sensor alarm
DI23 : "Alarm SensSup." ; % SA sensor alarm 1x0023
DI24 : "Alarm SensFrost"; % Frost sensor alarm
DI25 : "Alarm SensorM1" ; % Multifunction sensor 1 alarm
DI26 : "Alarm SensorM2" ; % Multifunction sensor 2 alarm
DI27 : "Alarm Runtime" ; % Runtime alarm
DI28 : "Alarm DampSmoke"; % Smoke damper alarm
%DI28 : "Alarm El.Heater"; % Electrical heater alarm (GEA COM4)
%DI29 : "Alarm Chiller" ; % Chiller alarm (GEA COM4)
%DI21b : "Alarm SensExh."; % Exhaust sensor alarm
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Alarms2 NAMED "Digital 15-28" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(02); % Modbus command "02h" read discrete input (bit)
DATA[2] := RWORD(14); % Start adress
DATA[4] := RWORD(16); % Number of inputs
ANSWER SIZE 7
DATA[0] = BYTE(Id);
DATA[1] = HEX(02);
DATA[2] = BYTE(2);
DATA[3] -> BYTE( IF (DATA & 1) THEN DI15 := 1; ELSE DI15 := 0; ENDIF;
IF (DATA & 2) THEN DI16 := 1; ELSE DI16 := 0; ENDIF; %(ACX36)
IF (DATA & 4) THEN DI17 := 1; ELSE DI17 := 0; ENDIF;
IF (DATA & 8) THEN DI18 := 1; ELSE DI18 := 0; ENDIF;
IF (DATA & 16) THEN DI19 := 1; ELSE DI19 := 0; ENDIF;
IF (DATA & 32) THEN DI20 := 1; ELSE DI20 := 0; ENDIF; %(ACX36)
IF (DATA & 64) THEN DI21 := 1; ELSE DI21 := 0; ENDIF;
IF (DATA & 128) THEN DI22 := 1; ELSE DI22 := 0; ENDIF;
%DI21b := DI21;
);
DATA[4] -> BYTE( IF (DATA & 1) THEN DI23 := 1; ELSE DI23 := 0; ENDIF;
IF (DATA & 2) THEN DI24 := 1; ELSE DI24 := 0; ENDIF;
IF (DATA & 4) THEN DI25 := 1; ELSE DI25 := 0; ENDIF;
IF (DATA & 8) THEN DI26 := 1; ELSE DI26 := 0; ENDIF;
IF (DATA & 16) THEN DI27 := 1; ELSE DI27 := 0; ENDIF;
IF (DATA & 32) THEN DI28 := 1; ELSE DI28 := 0; ENDIF;
IF (DATA & 32) THEN DI28 := 1; ELSE DI28 := 0; ENDIF;
%IF (DATA & 64) THEN DI29 := 1; ELSE DI29 := 0; ENDIF; %(GEA COM4)
);
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for SIEMENS SAPHIR Digital inputs 1
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Digital status
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2007-12-17 inital version
%
DEVICETYPE SaphirDigital1 NAMED "Saphir DI33-45" TYPEID 21196 IS
PARAMETER
Id : "Address";
PUBLIC
DI33 : "DI Pump heat" ; % Heating pump
DI34 : "DI Pump cool" ; % Cooling pump
DI35 : "DI Damper Outd." ; % Out door damper
DI36 : "DI alarm A" ; % Alarm class A output
DI37 : "DI alarm B" ; % Alarm class B output
DI38 : "DI Damper smoke" ; % Smoke damper
DI39 : "DI CoolDX Step2" ; % Cooling DX Step 2
DI40 : "DI FanSupp off" ; % Supply fan Off
DI41 : "DI FanSupp st1" ; % Supply fan Step 1
DI42 : "DI FanSupp st2" ; % Supply fan Step 2
DI43 : "DI FanExhaustOff" ; % Exhaust fan Off
DI44 : "DI FanExhaustStep1"; % Exhaust fan Step 1
DI45 : "DI FanExhaustStep2"; % Exhaust fan Step 2
%DI33b : "DI El. heat" ; % Electrical heater
%DI34b : "DI DX step 1" ; % DX Step 1
%DI39 : "DI Chiller ON" ; % Chiller in operation (GEA COM4)
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Digital1 NAMED "Digital 33-45" 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 address
DATA[4] := RWORD(13); % Number of inputs
ANSWER SIZE 7
DATA[0] = BYTE(Id);
DATA[1] = HEX(02);
DATA[2] = BYTE(2);
DATA[3] -> BYTE(IF (DATA & 1) THEN DI33 := 1; ELSE DI33 := 0; ENDIF;
IF (DATA & 2) THEN DI34 := 1; ELSE DI34 := 0; ENDIF;
IF (DATA & 4) THEN DI35 := 1; ELSE DI35 := 0; ENDIF;
IF (DATA & 8) THEN DI36 := 1; ELSE DI36 := 0; ENDIF;
IF (DATA & 16) THEN DI37 := 1; ELSE DI37 := 0; ENDIF;
IF (DATA & 32) THEN DI38 := 1; ELSE DI38 := 0; ENDIF;
IF (DATA & 64) THEN DI39 := 1; ELSE DI39 := 0; ENDIF;
IF (DATA & 128) THEN DI40 := 1; ELSE DI40 := 0; ENDIF;
);
DATA[4] -> BYTE(IF (DATA & 1) THEN DI41 := 1; ELSE DI41 := 0; ENDIF;
IF (DATA & 2) THEN DI42 := 1; ELSE DI42 := 0; ENDIF;
IF (DATA & 4) THEN DI43 := 1; ELSE DI43 := 0; ENDIF;
IF (DATA & 8) THEN DI44 := 1; ELSE DI44 := 0; ENDIF;
IF (DATA & 16) THEN DI45 := 1; ELSE DI45 := 0; ENDIF;
);
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for SIEMENS SAPHIR Digital inputs 2
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Digital status
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2007-12-17 inital version
%
DEVICETYPE SaphirDigital2 NAMED "Saphir DI52-61" TYPEID 21197 IS
PARAMETER
Id : "Address";
PUBLIC
DI52 : "Service Stop"; % Service switch Stop
DI53 : "Service Step1"; % Service switch Step 1 (ACX32)
DI54 : "Service Step2"; % Service switch Step 2 (ACX32)
DI55 : "External Stop"; % External Stop (ACX32)
DI56 : "Control Stop"; % Control input Stop
DI57 : "Control Step1"; % Control input Step 1
DI58 : "Control Step2"; % Control input Step 2
DI59 : "Control Room"; % Room control active
DI60 : "Control Supply"; % Supply control active
DI61 : "Control Exhaust"; % EA control active
DI64 : "Emergency Stop"; % EA control active (ACX36)
%DI56b: "Timer in Stop"; % Timer input Stop
%DI57b: "Timer in Step1" ; % Timer input Step 1
%DI58b: "Timer in Step2" ; % Timer input Step 2
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Digital2 NAMED "Digital 52-61" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(02); % Modbus command "02h" read discrete input (bit)
DATA[2] := RWORD(51); % Start address
DATA[4] := RWORD(16); % Number of inputs
ANSWER SIZE 7
DATA[0] = BYTE(Id);
DATA[1] = HEX(02);
DATA[2] = BYTE(2);
DATA[3] -> BYTE(IF (DATA & 1) THEN DI52 := 1; ELSE DI52 := 0; ENDIF;
IF (DATA & 2) THEN DI53 := 1; ELSE DI53 := 0; ENDIF;
IF (DATA & 4) THEN DI54 := 1; ELSE DI54 := 0; ENDIF;
IF (DATA & 8) THEN DI55 := 1; ELSE DI55 := 0; ENDIF;
IF (DATA & 16) THEN DI56 := 1; ELSE DI56 := 0; ENDIF;
IF (DATA & 32) THEN DI57 := 1; ELSE DI57 := 0; ENDIF;
IF (DATA & 64) THEN DI58 := 1; ELSE DI58 := 0; ENDIF;
IF (DATA & 128) THEN DI59 := 1; ELSE DI59 := 0; ENDIF;
);
DATA[4] -> BYTE(IF (DATA & 1) THEN DI60 := 1; ELSE DI60 := 0; ENDIF;
IF (DATA & 2) THEN DI61 := 1; ELSE DI61 := 0; ENDIF;
%IF (DATA & 4) THEN DI62 := 1; ELSE DI62 := 0; ENDIF;
%IF (DATA & 8) THEN DI63 := 1; ELSE DI63 := 0; ENDIF;
IF (DATA & 16) THEN DI64 := 1; ELSE DI64 := 0; ENDIF; %(ACX36)
%IF (DATA & 32) THEN DI65 := 1; ELSE DI65 := 0; ENDIF;
%IF (DATA & 64) THEN DI66 := 1; ELSE DI66 := 0; ENDIF;
%IF (DATA & 128) THEN DI67 := 1; ELSE DI67 := 0; ENDIF;
);
TIMEOUT 1000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for SIEMENS SAPHIR Analog settings
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2009-11-17 inital version
%
DEVICETYPE SaphirSettings NAMED "Saphir settings" TYPEID 21198 IS
PARAMETER
Id : "Address";
R1 : "SetP Temp comf." ["°C"]; % Basic setpoint temp, Comfort xx.y °C
%R2 : "SetP Temp econ." ["°C"]; % Basic setpoint temp, Economy xx.y °C (ACX32)
%R3 : "DeadZ Cool comf" ["°C"]; % Dead zone cooling, Comfort xx.y °C
%R4 : "DeadZ Cool econ" ["°C"]; % Dead zone cooling, Economy xx.y °C (ACX32)
%R5 : "SetP Post-cond." ["°C"]; % Setpoint post-conditioning xx.y °C (ACX32)
%R6
%R7 : "SetP Temp SMin" ["°C"]; % Min setpoint SA temp, cascade xx.y °C
%R8 : "SetP Temp SMax" ["°C"]; % Max setpoint SA temp, cascade xx.y °C
%R9
%R10 : "SetP Press SLow" ["Pa"]; % Setpoint pressure SA lowspeed xxx Pa (ACX32)
%R11 : "SetP Press SHig" ["Pa"]; % Setpoint pressure SA highspeed xxx Pa (ACX32)
%R12 : "SetP Press ELow" ["Pa"]; % Setpoint pressure EA lowspeed xxx Pa (ACX32)
%R13 : "SetP Press EHig" ["Pa"]; % Setpoint pressure EA highspeed xxx Pa (ACX32)
%R10 : "SetP Flow SLow" ["l/s"]; % Setpoint flow SA lowspeed xxx l/s (ACX32)
%R11 : "SetP Flow SHigh" ["l/s"]; % Setpoint flow SA highspeed xxx l/s (ACX32)
%R12 : "SetP Flow ELow" ["l/s"]; % Setpoint flow EA lowspeed xxx l/s (ACX32)
%R13 : "SetP Flow EHigh" ["l/s"]; % Setpoint flow EA highspeed xxx l/s (ACX32)
%R14 : "SetP Flow" ["l/s"]; % Setpoint flow xxx l/s (GEA COM4)
%R15 : "SetP Speed SLow" ["%"]; % Setpoint fixed SA lowspeed xxx 0-100%
%R16 : "SetP Speed SHig" ["%"]; % Setpoint fixed SA highspeed xxx 0-100%
%R17 : "SetP Speed ELow" ["%"]; % Setpoint fixed EA lowspeed xxx 0-100%
%R18 : "SetP Speed EHig" ["%"]; % Setpoint fixed EA highspeed xxx 0-100%
%R15 : "SetP Press SLow" ["Pa"]; % Setpoint pressure SA lowspeed xxx Pa (ACX32)
%R16 : "SetP Press SHig" ["Pa"]; % Setpoint pressure SA highspeed xxx Pa (ACX32)
%R17 : "SetP Press ELow" ["Pa"]; % Setpoint pressure EA lowspeed xxx Pa (ACX32)
%R18 : "SetP Press EHig" ["Pa"]; % Setpoint pressure EA highspeed xxx Pa (ACX32)
%R19 : "SetP Pressure" ["Pa"]; % Setpoint pressure xxx Pa (GEA COM4)
R50 : "BMS set mode"; % BMS override timeprogram mode 0-5 (LBA10/20)
% 0 = Internal TSP 1 = Off
% 2 = Eco Step 1 3 = Eco Step 2
% 4 = Comf Step 1 5 = Comf step 2
%R51 : "BMS set mode"; % BMS override timeprogram mode 0-5 (GEA)
% 0 = Internal TSP 1 = Off
% 2 = Eco Step 1 3 = Eco Step 2
% 4 = Comf Step 1 5 = Comf step 2
PUBLIC
PRIVATE
Cnt;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Settings1 NAMED "Setvalues" IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(06); %Write singel register
DATA[2] <- RWORD( %Start adress (regnr-1)
Cnt := Cnt + 1;
IF Cnt>1 THEN Cnt:=0;
ENDIF;
IF Cnt=0 THEN DATA := 0; %R1
ELSIF Cnt=1 THEN DATA := 49; %R50
%ELSIF Cnt=2 THEN DATA := 2; %R3
%ELSIF Cnt=3 THEN DATA := 3 %R4
%ELSIF Cnt=4 THEN DATA := 4; %R5
ENDIF;
);
DATA[4] <- RWORD(
IF Cnt=0 THEN
IF R1<0 THEN DATA := 0; %Basic setpoint temp, Comfort
ELSIF R1>30 THEN DATA := 300;
ELSE DATA := R1*10;
ENDIF;
ELSIF Cnt=1 THEN
IF R50<0 THEN DATA := 0; %BMS override timeprogram 0-5
ELSIF R50>5 THEN DATA := 0;
ELSE DATA := R50;
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;
ENDIF;
);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(06);
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.