Siemens Saphir ACX36
Detaljer
- Typ
- Drivrutin
- Upplaggd av
- Ove Jansson, Abelko Innovation
- Version
- 1
- Uppdaterad
- 2013-08-28
- Skapad
- 2013-08-28
- Kategori
- Kyla, Modbus, Övrig utrustning, Värme, Ventilation
- Visningar
- 3274
Beskrivning
Drivrutin
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
DEVICETYPE ACX36Input NAMED "ACX36 R25-28_40-42" TYPEID 21192 IS
PARAMETER
Id : "Address";
PUBLIC
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
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%
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Analog1 NAMED "Register 25-28" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(04); % Modbus command "04h" Read registers
DATA[2] := RWORD(24); % Start address register
DATA[4] := RWORD(4); % Number of registers
ANSWER SIZE 13
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
DATA[2] = BYTE(8); % Byte count
DATA[3] -> RWORD(IF (DATA>=32768) THEN R25:=(DATA-65536)/10; ELSE R25:=DATA/10; ENDIF;); % xx.y °C
DATA[5] -> RWORD(IF (DATA>=32768) THEN R26:=(DATA-65536)/10; ELSE R26:=DATA/10; ENDIF;); % xx.y °C
DATA[7] -> RWORD(IF (DATA>=32768) THEN R27:=(DATA-65536)/10; ELSE R27:=DATA/10; ENDIF;); % xx.y °C
DATA[9] -> RWORD(IF (DATA>=32768) THEN R28:=(DATA-65536)/10; ELSE R28:=DATA/10; ENDIF;); % xx.y °C
TIMEOUT 1000
END;
TELEGRAM Analog2 NAMED "Register 40-42" 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(3); % Number of registers
ANSWER SIZE 11
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
DATA[2] = BYTE(6); % Byte count
DATA[3] -> RWORD(R40 := DATA;); % 0-100%
DATA[5] -> RWORD(R41 := DATA;); % 0-100%
DATA[7] -> RWORD(R42 := DATA;); % 0-100%
TIMEOUT 1000
END;
END;
DEVICETYPE ACX36Alarms NAMED "ACX36 DI2-4" TYPEID 21194 IS
PARAMETER
Id : "Address";
PUBLIC
DI2 : "Alarm A" ; % Alarm class A active
DI3 : "Alarm B" ; % Alarm class B active
DI4 : "Alarm C" ; % Alarm class C active
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Alarms NAMED "Digital 2-4" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(02); % Modbus command "02h" read discrete input (bit)
DATA[2] := RWORD(1); % Start adress
DATA[4] := RWORD(3); % Number of inputs
ANSWER SIZE 6
DATA[0] = BYTE(Id);
DATA[1] = HEX(02);
DATA[2] = BYTE(1);
DATA[3] -> BYTE( 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;
);
TIMEOUT 1000
END;
END;
DEVICETYPE ACX36Settings NAMED "ACX36 settings" TYPEID 21198 IS
PARAMETER
Id : "Address";
R1 : "SetP Temp comf." ["°C"]; % Basic setpoint temp, Comfort xx.y °C (x10)
R50 : "BMS set mode"; % BMS override timeprogram mode 0-4
% 0 = Internal TSP 1 = Off
% 2 = Step 1 3 = Step 2
% 4 = Step 3
PUBLIC
PRIVATE
Cnt;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Settings 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
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;
ENDIF;
);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(06);
TIMEOUT 1000
END;
END;
DEVICETYPE ClimatixStartStop NAMED "Climatrix Start/Stop" TYPEID 21425 IS
PARAMETER
Id : "Address";
R6 : "StartStopAgg"; % Start/Stopp av aggregat
% 0 = Auto, styrs av inbyggd tidkanal
% 1 = Stopp
% 2 = Ekonomi börvärde + Lågfart
% 3 = Komfort börvärde + Lågfart
% 4 = Ekonomi börvärde + Högfart
% 5 = Komfort börvärde + Högfart
% 6 = Används ej i vår applikation
% 7 = Används ej i vår applikation
PUBLIC
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Settings NAMED "Setvalues" IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(06); %Write singel register
DATA[2] := RWORD(5); %Start adress (regnr-1)
DATA[4] <- RWORD(
IF R6<0 THEN DATA := 0; %BMS override timeprogram 0-5
ELSIF R6>7 THEN DATA := 0;
ELSE DATA := R6;
ENDIF;
);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(06);
TIMEOUT 1000
END;
END;
PARAMETER
Id : "Address";
PUBLIC
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
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%
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Analog1 NAMED "Register 25-28" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(04); % Modbus command "04h" Read registers
DATA[2] := RWORD(24); % Start address register
DATA[4] := RWORD(4); % Number of registers
ANSWER SIZE 13
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
DATA[2] = BYTE(8); % Byte count
DATA[3] -> RWORD(IF (DATA>=32768) THEN R25:=(DATA-65536)/10; ELSE R25:=DATA/10; ENDIF;); % xx.y °C
DATA[5] -> RWORD(IF (DATA>=32768) THEN R26:=(DATA-65536)/10; ELSE R26:=DATA/10; ENDIF;); % xx.y °C
DATA[7] -> RWORD(IF (DATA>=32768) THEN R27:=(DATA-65536)/10; ELSE R27:=DATA/10; ENDIF;); % xx.y °C
DATA[9] -> RWORD(IF (DATA>=32768) THEN R28:=(DATA-65536)/10; ELSE R28:=DATA/10; ENDIF;); % xx.y °C
TIMEOUT 1000
END;
TELEGRAM Analog2 NAMED "Register 40-42" 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(3); % Number of registers
ANSWER SIZE 11
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
DATA[2] = BYTE(6); % Byte count
DATA[3] -> RWORD(R40 := DATA;); % 0-100%
DATA[5] -> RWORD(R41 := DATA;); % 0-100%
DATA[7] -> RWORD(R42 := DATA;); % 0-100%
TIMEOUT 1000
END;
END;
DEVICETYPE ACX36Alarms NAMED "ACX36 DI2-4" TYPEID 21194 IS
PARAMETER
Id : "Address";
PUBLIC
DI2 : "Alarm A" ; % Alarm class A active
DI3 : "Alarm B" ; % Alarm class B active
DI4 : "Alarm C" ; % Alarm class C active
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Alarms NAMED "Digital 2-4" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(02); % Modbus command "02h" read discrete input (bit)
DATA[2] := RWORD(1); % Start adress
DATA[4] := RWORD(3); % Number of inputs
ANSWER SIZE 6
DATA[0] = BYTE(Id);
DATA[1] = HEX(02);
DATA[2] = BYTE(1);
DATA[3] -> BYTE( 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;
);
TIMEOUT 1000
END;
END;
DEVICETYPE ACX36Settings NAMED "ACX36 settings" TYPEID 21198 IS
PARAMETER
Id : "Address";
R1 : "SetP Temp comf." ["°C"]; % Basic setpoint temp, Comfort xx.y °C (x10)
R50 : "BMS set mode"; % BMS override timeprogram mode 0-4
% 0 = Internal TSP 1 = Off
% 2 = Step 1 3 = Step 2
% 4 = Step 3
PUBLIC
PRIVATE
Cnt;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Settings 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
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;
ENDIF;
);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(06);
TIMEOUT 1000
END;
END;
DEVICETYPE ClimatixStartStop NAMED "Climatrix Start/Stop" TYPEID 21425 IS
PARAMETER
Id : "Address";
R6 : "StartStopAgg"; % Start/Stopp av aggregat
% 0 = Auto, styrs av inbyggd tidkanal
% 1 = Stopp
% 2 = Ekonomi börvärde + Lågfart
% 3 = Komfort börvärde + Lågfart
% 4 = Ekonomi börvärde + Högfart
% 5 = Komfort börvärde + Högfart
% 6 = Används ej i vår applikation
% 7 = Används ej i vår applikation
PUBLIC
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Settings NAMED "Setvalues" IS
QUESTION
DATA[0] := BYTE(Id);
DATA[1] := HEX(06); %Write singel register
DATA[2] := RWORD(5); %Start adress (regnr-1)
DATA[4] <- RWORD(
IF R6<0 THEN DATA := 0; %BMS override timeprogram 0-5
ELSIF R6>7 THEN DATA := 0;
ELSE DATA := R6;
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.