Regin Corrigo E Set time schedule
Detaljer
- Typ
- Drivrutin
- Upplaggd av
- Ove Jansson, Abelko Innovation
- Version
- 2
- Uppdaterad
- 2013-08-31
- Skapad
- 2013-08-28
- Kategori
- Kyla, Modbus, Övrig utrustning, Tidsstyrning, Värme, Ventilation
- Visningar
- 3517
Beskrivning
Drivrutin för att sätta tids styrning
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: 2010-02-19 Timeout ändrad till 2 sekunder NÖDVÄNDIGT !!!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CORRIGO E time settings 1
%
% 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
%
DEVICETYPE CorrigoTime1 NAMED "CorrigoE Time1" TYPEID 21274 IS
PARAMETER
Id : "Adress";
S40 : "Måndag Start 1" ["HH.MM"]; %40 7 Start time period 1 Monday normal speed (HH.MM)Scale factor = 100
S41 : "Måndag Stopp 1" ["HH.MM"]; %41 16 Stop time period 1 Monday normal speed
S42 : "Måndag Start 2" ["HH.MM"]; %42 0 Start time period 2 Monday normal speed
S43 : "Måndag Stopp 2" ["HH.MM"]; %43 0 Stop time period 2 Monday normal speed
S44 : "Tisdag Start 1" ["HH.MM"]; %44 7 Start time period 1 Tuesday normal speed
S45 : "Tisdag Stopp 1" ["HH.MM"]; %45 16 Stop time period 1 Tuesday normal speed
S46 : "Tisdag Start 2" ["HH.MM"]; %46 0 Start time period 2 Tuesday normal speed
S47 : "Tisdag Stopp 2" ["HH.MM"]; %47 0 Stop time period 2 Tuesday normal speed
PUBLIC
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM WriteTime1 NAMED "Kalender Må-Ti" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(10); % Modbus command "0x10" write multiple registers
DATA[2] := RWORD(39); % start register (40-1)
DATA[4] := RWORD(8); % number of registers to write
DATA[6] := BYTE(16); % number of bytes
DATA[7] <- RWORD(DATA := S40*100;);
DATA[9] <- RWORD(DATA := S41*100;);
DATA[11]<- RWORD(DATA := S42*100;);
DATA[13]<- RWORD(DATA := S43*100;);
DATA[15]<- RWORD(DATA := S44*100;);
DATA[17]<- RWORD(DATA := S45*100;);
DATA[19]<- RWORD(DATA := S46*100;);
DATA[21]<- RWORD(DATA := S47*100;);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(10);
%DATA[2] = RWORD(39); % start register
%DATA[4] = RWORD(10); % number of registers to write
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CORRIGO E time settings 2
%
% 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
%
DEVICETYPE CorrigoTime2 NAMED "CorrigoE Time2" TYPEID 21275 IS
PARAMETER
Id : "Adress";
S48 : "Onsdag Start 1" ["HH.MM"]; %48 7 Start time period 1 Wedn. normal speed
S49 : "Onsdag Stopp 1" ["HH.MM"]; %49 16 Stop time period 1 Wedn. normal speed
S50 : "Onsdag Start 2" ["HH.MM"]; %50 0 Start time period 2 Wedn. normal speed
S51 : "Onsdag Stopp 2" ["HH.MM"]; %51 0 Stop time period 2 Wedn. normal speed
S52 : "Torsd. Start 1" ["HH.MM"]; %52 7 Start time period 1 Thursday normal speed
S53 : "Torsd. Stopp 1" ["HH.MM"]; %53 16 Stop time period 1 Thursday normal speed
S54 : "Torsd. Start 2" ["HH.MM"]; %54 0 Start time period 2 Thursday normal speed
S55 : "Torsd. Stopp 2" ["HH.MM"]; %55 0 Stop time period 2 Thursday normal speed
PUBLIC
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM WriteTime2 NAMED "Kalender On-To" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(10); % Modbus command "0x10" write multiple registers
DATA[2] := RWORD(47); % start register (48-1)
DATA[4] := RWORD(8); % number of registers to write
DATA[6] := BYTE(16); % number of bytes
DATA[7] <- RWORD(DATA := S48*100;);
DATA[9] <- RWORD(DATA := S49*100;);
DATA[11]<- RWORD(DATA := S50*100;);
DATA[13]<- RWORD(DATA := S51*100;);
DATA[15]<- RWORD(DATA := S52*100;);
DATA[17]<- RWORD(DATA := S53*100;);
DATA[19]<- RWORD(DATA := S54*100;);
DATA[21]<- RWORD(DATA := S55*100;);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(10);
%DATA[2] = RWORD(47); % start register
%DATA[4] = RWORD(8); % number of registers to write
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CORRIGO E Analog time settings 3
%
% 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
%
DEVICETYPE CorrigoTime3 NAMED "CorrigoE Time3" TYPEID 21276 IS
PARAMETER
Id : "Adress";
S56 : "Fredag Start 1" ["HH.MM"]; %56 7 Start time period 1 Friday normal speed
S57 : "Fredag Stopp 1" ["HH.MM"]; %57 16 Stop time period 1 Friday normal speed
S58 : "Fredag Start 2" ["HH.MM"]; %58 0 Start time period 2 Friday normal speed
S59 : "Fredag Stopp 2" ["HH.MM"]; %59 0 Stop time period 2 Friday normal speed
S60 : "Lördag Start 1" ["HH.MM"]; %60 0 Start time period 1 Saturday normal speed
S61 : "Lördag Stopp 1" ["HH.MM"]; %61 0 Stop time period 1 Saturday normal speed
S62 : "Lördag Start 2" ["HH.MM"]; %62 0 Start time period 2 Saturday normal speed
S63 : "Lördag Stopp 2" ["HH.MM"]; %63 0 Stop time period 2 Saturday normal speed
PUBLIC
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM WriteTime3 NAMED "Kalender Fr-Lö" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(10); % Modbus command "0x10" write multiple registers
DATA[2] := RWORD(55); % start register
DATA[4] := RWORD(8); % number of registers to write
DATA[6] := BYTE(16); % number of bytes
DATA[7] <- RWORD(DATA := S56*100;);
DATA[9] <- RWORD(DATA := S57*100;);
DATA[11]<- RWORD(DATA := S58*100;);
DATA[13]<- RWORD(DATA := S59*100;);
DATA[15]<- RWORD(DATA := S60*100;);
DATA[17]<- RWORD(DATA := S61*100;);
DATA[19]<- RWORD(DATA := S62*100;);
DATA[21]<- RWORD(DATA := S63*100;);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(10);
%DATA[2] = RWORD(55); % start register
%DATA[4] = RWORD(8); % number of registers to write
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CORRIGO E Analog time settings 4
%
% 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
%
DEVICETYPE CorrigoTime4 NAMED "CorrigoE Time4" TYPEID 21277 IS
PARAMETER
Id : "Adress";
S64 : "Söndag Start 1" ["HH.MM"]; %64 0 Start time period 1 Sunday normal speed
S65 : "Söndag Stopp 1" ["HH.MM"]; %65 0 Stop time period 1 Sunday normal speed
S66 : "Söndag Start 2" ["HH.MM"]; %66 0 Start time period 2 Sunday normal speed
S67 : "Söndag Stopp 2" ["HH.MM"]; %67 0 Stop time period 2 Sunday normal speed
PUBLIC
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM WriteTime4 NAMED "Kalender Sö" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(10); % Modbus command "0x10" write multiple registers
DATA[2] := RWORD(63); % start register
DATA[4] := RWORD(4); % number of registers to write
DATA[6] := BYTE(8); % number of bytes
DATA[7] <- RWORD(DATA := S64*100;);
DATA[9] <- RWORD(DATA := S65*100;);
DATA[11]<- RWORD(DATA := S66*100;);
DATA[13]<- RWORD(DATA := S67*100;);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(10);
%DATA[2] = RWORD(63); % start register
%DATA[4] = RWORD(4); % number of registers to write
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CORRIGO E time settings 1
%
% 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
%
DEVICETYPE CorrigoTime1 NAMED "CorrigoE Time1" TYPEID 21274 IS
PARAMETER
Id : "Adress";
S40 : "Måndag Start 1" ["HH.MM"]; %40 7 Start time period 1 Monday normal speed (HH.MM)Scale factor = 100
S41 : "Måndag Stopp 1" ["HH.MM"]; %41 16 Stop time period 1 Monday normal speed
S42 : "Måndag Start 2" ["HH.MM"]; %42 0 Start time period 2 Monday normal speed
S43 : "Måndag Stopp 2" ["HH.MM"]; %43 0 Stop time period 2 Monday normal speed
S44 : "Tisdag Start 1" ["HH.MM"]; %44 7 Start time period 1 Tuesday normal speed
S45 : "Tisdag Stopp 1" ["HH.MM"]; %45 16 Stop time period 1 Tuesday normal speed
S46 : "Tisdag Start 2" ["HH.MM"]; %46 0 Start time period 2 Tuesday normal speed
S47 : "Tisdag Stopp 2" ["HH.MM"]; %47 0 Stop time period 2 Tuesday normal speed
PUBLIC
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM WriteTime1 NAMED "Kalender Må-Ti" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(10); % Modbus command "0x10" write multiple registers
DATA[2] := RWORD(39); % start register (40-1)
DATA[4] := RWORD(8); % number of registers to write
DATA[6] := BYTE(16); % number of bytes
DATA[7] <- RWORD(DATA := S40*100;);
DATA[9] <- RWORD(DATA := S41*100;);
DATA[11]<- RWORD(DATA := S42*100;);
DATA[13]<- RWORD(DATA := S43*100;);
DATA[15]<- RWORD(DATA := S44*100;);
DATA[17]<- RWORD(DATA := S45*100;);
DATA[19]<- RWORD(DATA := S46*100;);
DATA[21]<- RWORD(DATA := S47*100;);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(10);
%DATA[2] = RWORD(39); % start register
%DATA[4] = RWORD(10); % number of registers to write
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CORRIGO E time settings 2
%
% 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
%
DEVICETYPE CorrigoTime2 NAMED "CorrigoE Time2" TYPEID 21275 IS
PARAMETER
Id : "Adress";
S48 : "Onsdag Start 1" ["HH.MM"]; %48 7 Start time period 1 Wedn. normal speed
S49 : "Onsdag Stopp 1" ["HH.MM"]; %49 16 Stop time period 1 Wedn. normal speed
S50 : "Onsdag Start 2" ["HH.MM"]; %50 0 Start time period 2 Wedn. normal speed
S51 : "Onsdag Stopp 2" ["HH.MM"]; %51 0 Stop time period 2 Wedn. normal speed
S52 : "Torsd. Start 1" ["HH.MM"]; %52 7 Start time period 1 Thursday normal speed
S53 : "Torsd. Stopp 1" ["HH.MM"]; %53 16 Stop time period 1 Thursday normal speed
S54 : "Torsd. Start 2" ["HH.MM"]; %54 0 Start time period 2 Thursday normal speed
S55 : "Torsd. Stopp 2" ["HH.MM"]; %55 0 Stop time period 2 Thursday normal speed
PUBLIC
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM WriteTime2 NAMED "Kalender On-To" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(10); % Modbus command "0x10" write multiple registers
DATA[2] := RWORD(47); % start register (48-1)
DATA[4] := RWORD(8); % number of registers to write
DATA[6] := BYTE(16); % number of bytes
DATA[7] <- RWORD(DATA := S48*100;);
DATA[9] <- RWORD(DATA := S49*100;);
DATA[11]<- RWORD(DATA := S50*100;);
DATA[13]<- RWORD(DATA := S51*100;);
DATA[15]<- RWORD(DATA := S52*100;);
DATA[17]<- RWORD(DATA := S53*100;);
DATA[19]<- RWORD(DATA := S54*100;);
DATA[21]<- RWORD(DATA := S55*100;);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(10);
%DATA[2] = RWORD(47); % start register
%DATA[4] = RWORD(8); % number of registers to write
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CORRIGO E Analog time settings 3
%
% 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
%
DEVICETYPE CorrigoTime3 NAMED "CorrigoE Time3" TYPEID 21276 IS
PARAMETER
Id : "Adress";
S56 : "Fredag Start 1" ["HH.MM"]; %56 7 Start time period 1 Friday normal speed
S57 : "Fredag Stopp 1" ["HH.MM"]; %57 16 Stop time period 1 Friday normal speed
S58 : "Fredag Start 2" ["HH.MM"]; %58 0 Start time period 2 Friday normal speed
S59 : "Fredag Stopp 2" ["HH.MM"]; %59 0 Stop time period 2 Friday normal speed
S60 : "Lördag Start 1" ["HH.MM"]; %60 0 Start time period 1 Saturday normal speed
S61 : "Lördag Stopp 1" ["HH.MM"]; %61 0 Stop time period 1 Saturday normal speed
S62 : "Lördag Start 2" ["HH.MM"]; %62 0 Start time period 2 Saturday normal speed
S63 : "Lördag Stopp 2" ["HH.MM"]; %63 0 Stop time period 2 Saturday normal speed
PUBLIC
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM WriteTime3 NAMED "Kalender Fr-Lö" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(10); % Modbus command "0x10" write multiple registers
DATA[2] := RWORD(55); % start register
DATA[4] := RWORD(8); % number of registers to write
DATA[6] := BYTE(16); % number of bytes
DATA[7] <- RWORD(DATA := S56*100;);
DATA[9] <- RWORD(DATA := S57*100;);
DATA[11]<- RWORD(DATA := S58*100;);
DATA[13]<- RWORD(DATA := S59*100;);
DATA[15]<- RWORD(DATA := S60*100;);
DATA[17]<- RWORD(DATA := S61*100;);
DATA[19]<- RWORD(DATA := S62*100;);
DATA[21]<- RWORD(DATA := S63*100;);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(10);
%DATA[2] = RWORD(55); % start register
%DATA[4] = RWORD(8); % number of registers to write
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CORRIGO E Analog time settings 4
%
% 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
%
DEVICETYPE CorrigoTime4 NAMED "CorrigoE Time4" TYPEID 21277 IS
PARAMETER
Id : "Adress";
S64 : "Söndag Start 1" ["HH.MM"]; %64 0 Start time period 1 Sunday normal speed
S65 : "Söndag Stopp 1" ["HH.MM"]; %65 0 Stop time period 1 Sunday normal speed
S66 : "Söndag Start 2" ["HH.MM"]; %66 0 Start time period 2 Sunday normal speed
S67 : "Söndag Stopp 2" ["HH.MM"]; %67 0 Stop time period 2 Sunday normal speed
PUBLIC
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM WriteTime4 NAMED "Kalender Sö" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(10); % Modbus command "0x10" write multiple registers
DATA[2] := RWORD(63); % start register
DATA[4] := RWORD(4); % number of registers to write
DATA[6] := BYTE(8); % number of bytes
DATA[7] <- RWORD(DATA := S64*100;);
DATA[9] <- RWORD(DATA := S65*100;);
DATA[11]<- RWORD(DATA := S66*100;);
DATA[13]<- RWORD(DATA := S67*100;);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(10);
%DATA[2] = RWORD(63); % start register
%DATA[4] = RWORD(4); % number of registers to write
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.