IVT REGO 5002, 5003, 5004, 5005 AI del 2
Detaljer
Beskrivning
drivrutin för IVT REGO 5002, 5003, 5004, 5005
Bruksanvisning
.
Juridisk information
Alla skript tillhandahålls i befintligt skick och all användning sker på eget ansvar. Felaktig använding kan leda till skadad eller förstörd utrustning.
Skript kod
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for IVT REGO 5002, 5003, 5004, 5005
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% READ Analog input 81-100
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2010-02-12 inital version
%
DEVICETYPE IvtRego5005AI5 NAMED "IVTREGO AI-100" TYPEID 21346 IS
PARAMETER
Id :"Adress";
PUBLIC
R81 : "Starter G2 VBp"; %30081 Starter, G2 låg hastighet (värmebärarpump) 10* 5002, 5004
%R82 : ""; %30082
%R83 : ""; %30083
%R84 : ""; %30084
%R85 : ""; %30085
%R86 : ""; %30086
%R87 : ""; %30087
%R88 : ""; %30088
%R89 : ""; %30089
%R90 : ""; %30090
R91 : "Larm KPR strömb"; %30091 Larmstatus no.46, Kompressor strömbrytare 5004
%R92 : ""; %30092
%R93 : ""; %30093
%R94 : ""; %30094
%R95 : ""; %30095
%R96 : ""; %30096
%R97 : ""; %30097
%R98 : ""; %30098
%R99 : ""; %30099
R100: "Rego Version" ; %30100 Rego500X Versionsnummer (X = Värmepumpstyp)
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM ReadAI4 NAMED "Läs AI61-80" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(04); % Modbus command "04h" Read registers
DATA[2] := RWORD(80); % 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(R81 := DATA/10;); %10* 5004
%DATA[5] -> RWORD(R82 := DATA;);
%DATA[7] -> RWORD(R83 := DATA;);
%DATA[9] -> RWORD(R84 := DATA;);
%DATA[11] -> RWORD(R85 := DATA;);
%DATA[13] -> RWORD(R86 := DATA;);
%DATA[15] -> RWORD(R87 := DATA;);
%DATA[17] -> RWORD(R88 := DATA;);
%DATA[19] -> RWORD(R89 := DATA;);
%DATA[21] -> RWORD(R90 := DATA;);
DATA[23] -> RWORD(R91 := DATA;); %KPR strömbrytare 5004
%DATA[25] -> RWORD(R92 := DATA;);
%DATA[27] -> RWORD(R93 := DATA;);
%DATA[29] -> RWORD(R94 := DATA;);
%DATA[31] -> RWORD(R95 := DATA;);
%DATA[33] -> RWORD(R96 := DATA;);
%DATA[35] -> RWORD(R97 := DATA;);
%DATA[37] -> RWORD(R98 := DATA;);
%DATA[39] -> RWORD(R99 := DATA;);
DATA[41] -> RWORD(R100:= DATA;); %Rego500X Versionsnummer
TIMEOUT 1000
END;
END;
% Device definition for IVT REGO 5002, 5003, 5004, 5005
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% READ Analog input 81-100
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2010-02-12 inital version
%
DEVICETYPE IvtRego5005AI5 NAMED "IVTREGO AI-100" TYPEID 21346 IS
PARAMETER
Id :"Adress";
PUBLIC
R81 : "Starter G2 VBp"; %30081 Starter, G2 låg hastighet (värmebärarpump) 10* 5002, 5004
%R82 : ""; %30082
%R83 : ""; %30083
%R84 : ""; %30084
%R85 : ""; %30085
%R86 : ""; %30086
%R87 : ""; %30087
%R88 : ""; %30088
%R89 : ""; %30089
%R90 : ""; %30090
R91 : "Larm KPR strömb"; %30091 Larmstatus no.46, Kompressor strömbrytare 5004
%R92 : ""; %30092
%R93 : ""; %30093
%R94 : ""; %30094
%R95 : ""; %30095
%R96 : ""; %30096
%R97 : ""; %30097
%R98 : ""; %30098
%R99 : ""; %30099
R100: "Rego Version" ; %30100 Rego500X Versionsnummer (X = Värmepumpstyp)
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM ReadAI4 NAMED "Läs AI61-80" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(04); % Modbus command "04h" Read registers
DATA[2] := RWORD(80); % 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(R81 := DATA/10;); %10* 5004
%DATA[5] -> RWORD(R82 := DATA;);
%DATA[7] -> RWORD(R83 := DATA;);
%DATA[9] -> RWORD(R84 := DATA;);
%DATA[11] -> RWORD(R85 := DATA;);
%DATA[13] -> RWORD(R86 := DATA;);
%DATA[15] -> RWORD(R87 := DATA;);
%DATA[17] -> RWORD(R88 := DATA;);
%DATA[19] -> RWORD(R89 := DATA;);
%DATA[21] -> RWORD(R90 := DATA;);
DATA[23] -> RWORD(R91 := DATA;); %KPR strömbrytare 5004
%DATA[25] -> RWORD(R92 := DATA;);
%DATA[27] -> RWORD(R93 := DATA;);
%DATA[29] -> RWORD(R94 := DATA;);
%DATA[31] -> RWORD(R95 := DATA;);
%DATA[33] -> RWORD(R96 := DATA;);
%DATA[35] -> RWORD(R97 := DATA;);
%DATA[37] -> RWORD(R98 := DATA;);
%DATA[39] -> RWORD(R99 := DATA;);
DATA[41] -> RWORD(R100:= DATA;); %Rego500X Versionsnummer
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.