Danfoss/Thermia Robust WM HPC Write value Y
Detaljer
Beskrivning
Drivrutin
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
% Skapad med Modbus Creator
% - OBS! Användaren ansvarar själv för att samma TYPID inte används flera gånger i samma apparat.
% TYPID 10000-19999 är för användardefinierade enheter
DEVICETYPE Danfoss_Robust NAMED "WM_HPC_Write_value_Y" TYPEID 10786 IS
PARAMETER
Id : "Adress";
V1 : "Value Y 01" [""];
V2 : "Value Y 02" [""];
V3 : "Value Y 03" [""];
V4 : "Value Y 04" [""];
V5 : "Value Y 05" [""];
V6 : "Value Y 06" [""];
V7 : "Value Y 07" [""];
V8 : "Value Y 08" [""];
V9 : "Value Y 09" [""];
V10 : "Value Y 10" [""];
PUBLIC
PRIVATE
count6;
BAUDRATE 19200;
CHECKSUM MODBUS SWAPPED;
TELEGRAM WriteRegister NAMED "Write Register" IS
QUESTION
DATA[0] := BYTE(Id); % Enhetens Modbus adress
DATA[1] := HEX(06); % Modbus kommando för att skriva ett register
DATA[2] <- RWORD(
IF(count6>9) THEN count6 := 0; ENDIF;
IF (count6=0) THEN DATA := 6500;
ELSIF (count6=1) THEN DATA := 6502;
ELSIF (count6=2) THEN DATA := 6504;
ELSIF (count6=3) THEN DATA := 6506;
ELSIF (count6=4) THEN DATA := 6508;
ELSIF (count6=5) THEN DATA := 6510;
ELSIF (count6=6) THEN DATA := 6512;
ELSIF (count6=7) THEN DATA := 6514;
ELSIF (count6=8) THEN DATA := 6516;
ELSIF (count6=9) THEN DATA := 6518;
ENDIF;
); % Register adress
DATA[4] <- RWORD(
IF (count6=0) THEN DATA := V1;
ELSIF (count6=1) THEN DATA := V2;
ELSIF (count6=2) THEN DATA := V3;
ELSIF (count6=3) THEN DATA := V4;
ELSIF (count6=4) THEN DATA := V5;
ELSIF (count6=5) THEN DATA := V6;
ELSIF (count6=6) THEN DATA := V7;
ELSIF (count6=7) THEN DATA := V8;
ELSIF (count6=8) THEN DATA := V9;
ELSIF (count6=9) THEN DATA := V10;
ENDIF;
);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = BYTE(06);
TIMEOUT 300
END;
END;
% - OBS! Användaren ansvarar själv för att samma TYPID inte används flera gånger i samma apparat.
% TYPID 10000-19999 är för användardefinierade enheter
DEVICETYPE Danfoss_Robust NAMED "WM_HPC_Write_value_Y" TYPEID 10786 IS
PARAMETER
Id : "Adress";
V1 : "Value Y 01" [""];
V2 : "Value Y 02" [""];
V3 : "Value Y 03" [""];
V4 : "Value Y 04" [""];
V5 : "Value Y 05" [""];
V6 : "Value Y 06" [""];
V7 : "Value Y 07" [""];
V8 : "Value Y 08" [""];
V9 : "Value Y 09" [""];
V10 : "Value Y 10" [""];
PUBLIC
PRIVATE
count6;
BAUDRATE 19200;
CHECKSUM MODBUS SWAPPED;
TELEGRAM WriteRegister NAMED "Write Register" IS
QUESTION
DATA[0] := BYTE(Id); % Enhetens Modbus adress
DATA[1] := HEX(06); % Modbus kommando för att skriva ett register
DATA[2] <- RWORD(
IF(count6>9) THEN count6 := 0; ENDIF;
IF (count6=0) THEN DATA := 6500;
ELSIF (count6=1) THEN DATA := 6502;
ELSIF (count6=2) THEN DATA := 6504;
ELSIF (count6=3) THEN DATA := 6506;
ELSIF (count6=4) THEN DATA := 6508;
ELSIF (count6=5) THEN DATA := 6510;
ELSIF (count6=6) THEN DATA := 6512;
ELSIF (count6=7) THEN DATA := 6514;
ELSIF (count6=8) THEN DATA := 6516;
ELSIF (count6=9) THEN DATA := 6518;
ENDIF;
); % Register adress
DATA[4] <- RWORD(
IF (count6=0) THEN DATA := V1;
ELSIF (count6=1) THEN DATA := V2;
ELSIF (count6=2) THEN DATA := V3;
ELSIF (count6=3) THEN DATA := V4;
ELSIF (count6=4) THEN DATA := V5;
ELSIF (count6=5) THEN DATA := V6;
ELSIF (count6=6) THEN DATA := V7;
ELSIF (count6=7) THEN DATA := V8;
ELSIF (count6=8) THEN DATA := V9;
ELSIF (count6=9) THEN DATA := V10;
ENDIF;
);
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = BYTE(06);
TIMEOUT 300
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.