Nibe 1234
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
DEVICETYPE NIbe_1345 NAMED "Master" TYPEID 10001 IS
PARAMETER
Id : "Adress";
PUBLIC
V1 : "M.EP14 BrineInTemp" ["°C"]DEC1;
V2 : "M.EP14 BrineUtTemp" ["°C"]DEC1;
V3 : "M.EP15 BrineUtTemp" ["°C"]DEC1;
V4 : "M.EP15 BrineInTemp" ["°C"]DEC1;
V5 : "M.EP15 DriftTid" ["H"];
V6 : "M.EP14 DriftTid" ["H"];
V7 : "M.EP15 Komp.Status" [""];
V8 : "M.EP14 Komp.Status" [""];
PRIVATE
count3;
tmp;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Read3 NAMED "Read 3" IS
QUESTION
DATA[0] := BYTE(Id); % Enhetens Modbus adress
DATA[1] := HEX(03); % Modbus kommando för att läsa register
DATA[2] <- BYTE(
count3 := count3+1;
IF(count3>7) THEN count3 := 0; ENDIF;
IF (count3=0) THEN tmp := 156; % DEC=40015, HEX=9C,4F, BYTE=156,79
ELSIF (count3=1) THEN tmp := 156; % DEC=40016, HEX=9C,50, BYTE=156,80
ELSIF (count3=2) THEN tmp := 156; % DEC=40085, HEX=9C,95, BYTE=156,149
ELSIF (count3=3) THEN tmp := 156; % DEC=40100, HEX=9C,A4, BYTE=156,164
ELSIF (count3=4) THEN tmp := 169; % DEC=43418, HEX=A9,9A, BYTE=169,154
ELSIF (count3=5) THEN tmp := 169; % DEC=43420, HEX=A9,9C, BYTE=169,156
ELSIF (count3=6) THEN tmp := 169; % DEC=43426, HEX=A9,A2, BYTE=169,162
ELSIF (count3=7) THEN tmp := 169; % DEC=43427, HEX=A9,A3, BYTE=169,163
ENDIF;
DATA:= tmp;
);
DATA[3] <- BYTE(
IF (count3=0) THEN tmp := 79; % DEC=40015, HEX=9C,4F, BYTE=156,79
ELSIF (count3=1) THEN tmp := 80; % DEC=40016, HEX=9C,50, BYTE=156,80
ELSIF (count3=2) THEN tmp := 149; % DEC=40085, HEX=9C,95, BYTE=156,149
ELSIF (count3=3) THEN tmp := 164; % DEC=40100, HEX=9C,A4, BYTE=156,164
ELSIF (count3=4) THEN tmp := 154; % DEC=43418, HEX=A9,9A, BYTE=169,154
ELSIF (count3=5) THEN tmp := 156; % DEC=43420, HEX=A9,9C, BYTE=169,156
ELSIF (count3=6) THEN tmp := 162; % DEC=43426, HEX=A9,A2, BYTE=169,162
ELSIF (count3=7) THEN tmp := 163; % DEC=43427, HEX=A9,A3, BYTE=169,163
ENDIF;
DATA:= tmp;
);
DATA[4] := RWORD(01);
ANSWER SIZE 7
DATA[0] = BYTE(Id);
DATA[1] = BYTE(03);
DATA[3] -> RWORD(
IF (count3=0) THEN V1 := DATA/10;
ELSIF (count3=1) THEN V2 := DATA/10;
ELSIF (count3=2) THEN V3 := DATA/10;
ELSIF (count3=3) THEN V4 := DATA/10;
ELSIF (count3=4) THEN V5 := DATA/10;
ELSIF (count3=5) THEN V6 := DATA/10;
ELSIF (count3=6) THEN V7 := DATA;
ELSIF (count3=7) THEN V8 := DATA;
ENDIF;
);
TIMEOUT 300
END;
END;
DEVICETYPE NIbe_1345 NAMED "Slav 1" TYPEID 10000 IS
PARAMETER
Id : "Adress";
PUBLIC
V1 : "S.EP15 BrineInTemp" ["°C"]DEC1;
V2 : "S.EP15 BrineUtTemp" ["°C"]DEC1;
V3 : "S.EP15 Komp Status" [""];
V4 : "S.EP15 DriftTid" ["h"];
V5 : "S.EP14 BrineInTemp" ["°C"]DEC1;
V6 : "S.EP14 BrineUtTemp" ["°C"]DEC1;
V7 : "S.EP14 Komp Status" [""];
V8 : "S.EP14 DtiftTid" ["h"];
PRIVATE
count3;
tmp;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Read3 NAMED "Read 3" IS
QUESTION
DATA[0] := BYTE(Id); % Enhetens Modbus adress
DATA[1] := HEX(03); % Modbus kommando för att läsa register
DATA[2] <- BYTE(
count3 := count3+1;
IF(count3>7) THEN count3 := 0; ENDIF;
IF (count3=0) THEN tmp := 156; % DEC=40035, HEX=9C,63, BYTE=156,99
ELSIF (count3=1) THEN tmp := 156; % DEC=40036, HEX=9C,64, BYTE=156,100
ELSIF (count3=2) THEN tmp := 156; % DEC=40043, HEX=9C,6B, BYTE=156,107
ELSIF (count3=3) THEN tmp := 156; % DEC=40050, HEX=9C,72, BYTE=156,114
ELSIF (count3=4) THEN tmp := 156; % DEC=40056, HEX=9C,78, BYTE=156,120
ELSIF (count3=5) THEN tmp := 156; % DEC=40057, HEX=9C,79, BYTE=156,121
ELSIF (count3=6) THEN tmp := 156; % DEC=40064, HEX=9C,80, BYTE=156,128
ELSIF (count3=7) THEN tmp := 156; % DEC=40071, HEX=9C,87, BYTE=156,135
ENDIF;
DATA:= tmp;
);
DATA[3] <- BYTE(
IF (count3=0) THEN tmp := 99; % DEC=40035, HEX=9C,63, BYTE=156,99
ELSIF (count3=1) THEN tmp := 100; % DEC=40036, HEX=9C,64, BYTE=156,100
ELSIF (count3=2) THEN tmp := 107; % DEC=40043, HEX=9C,6B, BYTE=156,107
ELSIF (count3=3) THEN tmp := 114; % DEC=40050, HEX=9C,72, BYTE=156,114
ELSIF (count3=4) THEN tmp := 120; % DEC=40056, HEX=9C,78, BYTE=156,120
ELSIF (count3=5) THEN tmp := 121; % DEC=40057, HEX=9C,79, BYTE=156,121
ELSIF (count3=6) THEN tmp := 128; % DEC=40064, HEX=9C,80, BYTE=156,128
ELSIF (count3=7) THEN tmp := 135; % DEC=40071, HEX=9C,87, BYTE=156,135
ENDIF;
DATA:= tmp;
);
DATA[4] := RWORD(01);
ANSWER SIZE 7
DATA[0] = BYTE(Id);
DATA[1] = BYTE(03);
DATA[3] -> RWORD(
IF (count3=0) THEN V1 := DATA/10;
ELSIF (count3=1) THEN V2 := DATA/10;
ELSIF (count3=2) THEN V3 := DATA;
ELSIF (count3=3) THEN V4 := DATA;
ELSIF (count3=4) THEN V5 := DATA/10;
ELSIF (count3=5) THEN V6 := DATA/10;
ELSIF (count3=6) THEN V7 := DATA;
ELSIF (count3=7) THEN V8 := DATA;
ENDIF;
);
TIMEOUT 300
END;
END;
PARAMETER
Id : "Adress";
PUBLIC
V1 : "M.EP14 BrineInTemp" ["°C"]DEC1;
V2 : "M.EP14 BrineUtTemp" ["°C"]DEC1;
V3 : "M.EP15 BrineUtTemp" ["°C"]DEC1;
V4 : "M.EP15 BrineInTemp" ["°C"]DEC1;
V5 : "M.EP15 DriftTid" ["H"];
V6 : "M.EP14 DriftTid" ["H"];
V7 : "M.EP15 Komp.Status" [""];
V8 : "M.EP14 Komp.Status" [""];
PRIVATE
count3;
tmp;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Read3 NAMED "Read 3" IS
QUESTION
DATA[0] := BYTE(Id); % Enhetens Modbus adress
DATA[1] := HEX(03); % Modbus kommando för att läsa register
DATA[2] <- BYTE(
count3 := count3+1;
IF(count3>7) THEN count3 := 0; ENDIF;
IF (count3=0) THEN tmp := 156; % DEC=40015, HEX=9C,4F, BYTE=156,79
ELSIF (count3=1) THEN tmp := 156; % DEC=40016, HEX=9C,50, BYTE=156,80
ELSIF (count3=2) THEN tmp := 156; % DEC=40085, HEX=9C,95, BYTE=156,149
ELSIF (count3=3) THEN tmp := 156; % DEC=40100, HEX=9C,A4, BYTE=156,164
ELSIF (count3=4) THEN tmp := 169; % DEC=43418, HEX=A9,9A, BYTE=169,154
ELSIF (count3=5) THEN tmp := 169; % DEC=43420, HEX=A9,9C, BYTE=169,156
ELSIF (count3=6) THEN tmp := 169; % DEC=43426, HEX=A9,A2, BYTE=169,162
ELSIF (count3=7) THEN tmp := 169; % DEC=43427, HEX=A9,A3, BYTE=169,163
ENDIF;
DATA:= tmp;
);
DATA[3] <- BYTE(
IF (count3=0) THEN tmp := 79; % DEC=40015, HEX=9C,4F, BYTE=156,79
ELSIF (count3=1) THEN tmp := 80; % DEC=40016, HEX=9C,50, BYTE=156,80
ELSIF (count3=2) THEN tmp := 149; % DEC=40085, HEX=9C,95, BYTE=156,149
ELSIF (count3=3) THEN tmp := 164; % DEC=40100, HEX=9C,A4, BYTE=156,164
ELSIF (count3=4) THEN tmp := 154; % DEC=43418, HEX=A9,9A, BYTE=169,154
ELSIF (count3=5) THEN tmp := 156; % DEC=43420, HEX=A9,9C, BYTE=169,156
ELSIF (count3=6) THEN tmp := 162; % DEC=43426, HEX=A9,A2, BYTE=169,162
ELSIF (count3=7) THEN tmp := 163; % DEC=43427, HEX=A9,A3, BYTE=169,163
ENDIF;
DATA:= tmp;
);
DATA[4] := RWORD(01);
ANSWER SIZE 7
DATA[0] = BYTE(Id);
DATA[1] = BYTE(03);
DATA[3] -> RWORD(
IF (count3=0) THEN V1 := DATA/10;
ELSIF (count3=1) THEN V2 := DATA/10;
ELSIF (count3=2) THEN V3 := DATA/10;
ELSIF (count3=3) THEN V4 := DATA/10;
ELSIF (count3=4) THEN V5 := DATA/10;
ELSIF (count3=5) THEN V6 := DATA/10;
ELSIF (count3=6) THEN V7 := DATA;
ELSIF (count3=7) THEN V8 := DATA;
ENDIF;
);
TIMEOUT 300
END;
END;
DEVICETYPE NIbe_1345 NAMED "Slav 1" TYPEID 10000 IS
PARAMETER
Id : "Adress";
PUBLIC
V1 : "S.EP15 BrineInTemp" ["°C"]DEC1;
V2 : "S.EP15 BrineUtTemp" ["°C"]DEC1;
V3 : "S.EP15 Komp Status" [""];
V4 : "S.EP15 DriftTid" ["h"];
V5 : "S.EP14 BrineInTemp" ["°C"]DEC1;
V6 : "S.EP14 BrineUtTemp" ["°C"]DEC1;
V7 : "S.EP14 Komp Status" [""];
V8 : "S.EP14 DtiftTid" ["h"];
PRIVATE
count3;
tmp;
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM Read3 NAMED "Read 3" IS
QUESTION
DATA[0] := BYTE(Id); % Enhetens Modbus adress
DATA[1] := HEX(03); % Modbus kommando för att läsa register
DATA[2] <- BYTE(
count3 := count3+1;
IF(count3>7) THEN count3 := 0; ENDIF;
IF (count3=0) THEN tmp := 156; % DEC=40035, HEX=9C,63, BYTE=156,99
ELSIF (count3=1) THEN tmp := 156; % DEC=40036, HEX=9C,64, BYTE=156,100
ELSIF (count3=2) THEN tmp := 156; % DEC=40043, HEX=9C,6B, BYTE=156,107
ELSIF (count3=3) THEN tmp := 156; % DEC=40050, HEX=9C,72, BYTE=156,114
ELSIF (count3=4) THEN tmp := 156; % DEC=40056, HEX=9C,78, BYTE=156,120
ELSIF (count3=5) THEN tmp := 156; % DEC=40057, HEX=9C,79, BYTE=156,121
ELSIF (count3=6) THEN tmp := 156; % DEC=40064, HEX=9C,80, BYTE=156,128
ELSIF (count3=7) THEN tmp := 156; % DEC=40071, HEX=9C,87, BYTE=156,135
ENDIF;
DATA:= tmp;
);
DATA[3] <- BYTE(
IF (count3=0) THEN tmp := 99; % DEC=40035, HEX=9C,63, BYTE=156,99
ELSIF (count3=1) THEN tmp := 100; % DEC=40036, HEX=9C,64, BYTE=156,100
ELSIF (count3=2) THEN tmp := 107; % DEC=40043, HEX=9C,6B, BYTE=156,107
ELSIF (count3=3) THEN tmp := 114; % DEC=40050, HEX=9C,72, BYTE=156,114
ELSIF (count3=4) THEN tmp := 120; % DEC=40056, HEX=9C,78, BYTE=156,120
ELSIF (count3=5) THEN tmp := 121; % DEC=40057, HEX=9C,79, BYTE=156,121
ELSIF (count3=6) THEN tmp := 128; % DEC=40064, HEX=9C,80, BYTE=156,128
ELSIF (count3=7) THEN tmp := 135; % DEC=40071, HEX=9C,87, BYTE=156,135
ENDIF;
DATA:= tmp;
);
DATA[4] := RWORD(01);
ANSWER SIZE 7
DATA[0] = BYTE(Id);
DATA[1] = BYTE(03);
DATA[3] -> RWORD(
IF (count3=0) THEN V1 := DATA/10;
ELSIF (count3=1) THEN V2 := DATA/10;
ELSIF (count3=2) THEN V3 := DATA;
ELSIF (count3=3) THEN V4 := DATA;
ELSIF (count3=4) THEN V5 := DATA/10;
ELSIF (count3=5) THEN V6 := DATA/10;
ELSIF (count3=6) THEN V7 := DATA;
ELSIF (count3=7) THEN V8 := DATA;
ENDIF;
);
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.