Elvaco CMa20 trådlös rumsgivare
Detaljer
Beskrivning
Fungerar även på IMSE Ultra
Provat via Elvaco trådlös master
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
DEVICETYPE CMa20 NAMED "Elvaco CMa20" TYPEID 17978 IS
PARAMETER
Id :"Address"INT;
PUBLIC
IDNr : "ID number"INT;
Tcurrent : "Temp"["°C"]DEC2;
Tmin : "Temp min"["°C"]DEC2;
Tmax : "Temp max"["°C"]DEC2;
Hcurrent : "Humidity"["RH%"]DEC2;
Hmin : "Humidity min"["RH%"]DEC2;
Hmax : "Humidity max"["RH%"]DEC2;
PRIVATE
Exp;
tmp;
BAUDRATE 2400;
PARITY EVEN;
CHECKSUM SUM8 SKIP 4;
POSTBYTES 1;
TELEGRAM Init NAMED "Init" IS
QUESTION
DATA[0] := HEX(10);
DATA[1] := HEX(40);
DATA[2] := BYTE(Id);
DATA[3] <- BYTE(DATA :=Id+64;);
DATA[4] := HEX(16);
ANSWER SIZE 1
DATA[0] = HEX(E5);
TIMEOUT 5000
END;
TELEGRAM Read NAMED "Read" IS
QUESTION
DATA[0] := HEX(10);
DATA[1] := HEX(7B);
DATA[2] := BYTE(Id);
DATA[3] <- BYTE(DATA :=Id+123;);
DATA[4] := HEX(16);
ANSWER SIZE 89
DATA[0] = HEX(68);
DATA[1] = HEX(53);
DATA[2] = HEX(53);
DATA[3] = HEX(68);
DATA[4] = HEX(08);
DATA[5] = BYTE(Id);
DATA[6] = HEX(72);
DATA[7] -> BYTE(IDNr := (DATA & HEX(F)) + 10*(DATA & HEX(F0))/16;);
DATA[8] -> BYTE(IDNr := IDNr + 100*(DATA & HEX(F)) + 1000*(DATA & HEX(F0))/16;);
DATA[9] -> BYTE(IDNr := IDNr + 10000*(DATA & HEX(F)) + 100000*(DATA & HEX(F0))/16;);
DATA[10] -> BYTE(IDNr := IDNr + 1000000*(DATA & HEX(F)) + 10000000*(DATA & HEX(F0))/16;);
DATA[30] -> BYTE(tmp:=DATA;);
DATA[31] -> BYTE(
tmp:= (tmp + (DATA * 256))/100;
Hcurrent := tmp;
);
DATA[39] -> BYTE(tmp:=DATA;);
DATA[40] -> BYTE(
tmp:= (tmp + (DATA * 256))/100;
Hmin := tmp;
);
DATA[48] -> BYTE(tmp:=DATA;);
DATA[49] -> BYTE(
tmp:= (tmp + (DATA * 256))/100;
Hmax := tmp;
);
DATA[52] -> BYTE(tmp:=DATA;);
DATA[53] -> BYTE(
tmp:= (tmp + (DATA * 256));
IF(DATA & 128)THEN tmp := tmp - 65536;ENDIF;
Tcurrent := tmp/100;
);
DATA[56] -> BYTE(tmp:=DATA;);
DATA[57] -> BYTE(
IF(DATA & 128)THEN tmp := tmp - 65536;ENDIF;
tmp:= (tmp + (DATA * 256))/100;
Tmin := tmp;
);
DATA[60] -> BYTE(tmp:=DATA;);
DATA[61] -> BYTE(
IF(DATA & 128)THEN tmp := tmp -65536;ENDIF;
tmp:= (tmp + (DATA * 256))/100;
Tmax := tmp;
);
TIMEOUT 5000
END;
END;
PARAMETER
Id :"Address"INT;
PUBLIC
IDNr : "ID number"INT;
Tcurrent : "Temp"["°C"]DEC2;
Tmin : "Temp min"["°C"]DEC2;
Tmax : "Temp max"["°C"]DEC2;
Hcurrent : "Humidity"["RH%"]DEC2;
Hmin : "Humidity min"["RH%"]DEC2;
Hmax : "Humidity max"["RH%"]DEC2;
PRIVATE
Exp;
tmp;
BAUDRATE 2400;
PARITY EVEN;
CHECKSUM SUM8 SKIP 4;
POSTBYTES 1;
TELEGRAM Init NAMED "Init" IS
QUESTION
DATA[0] := HEX(10);
DATA[1] := HEX(40);
DATA[2] := BYTE(Id);
DATA[3] <- BYTE(DATA :=Id+64;);
DATA[4] := HEX(16);
ANSWER SIZE 1
DATA[0] = HEX(E5);
TIMEOUT 5000
END;
TELEGRAM Read NAMED "Read" IS
QUESTION
DATA[0] := HEX(10);
DATA[1] := HEX(7B);
DATA[2] := BYTE(Id);
DATA[3] <- BYTE(DATA :=Id+123;);
DATA[4] := HEX(16);
ANSWER SIZE 89
DATA[0] = HEX(68);
DATA[1] = HEX(53);
DATA[2] = HEX(53);
DATA[3] = HEX(68);
DATA[4] = HEX(08);
DATA[5] = BYTE(Id);
DATA[6] = HEX(72);
DATA[7] -> BYTE(IDNr := (DATA & HEX(F)) + 10*(DATA & HEX(F0))/16;);
DATA[8] -> BYTE(IDNr := IDNr + 100*(DATA & HEX(F)) + 1000*(DATA & HEX(F0))/16;);
DATA[9] -> BYTE(IDNr := IDNr + 10000*(DATA & HEX(F)) + 100000*(DATA & HEX(F0))/16;);
DATA[10] -> BYTE(IDNr := IDNr + 1000000*(DATA & HEX(F)) + 10000000*(DATA & HEX(F0))/16;);
DATA[30] -> BYTE(tmp:=DATA;);
DATA[31] -> BYTE(
tmp:= (tmp + (DATA * 256))/100;
Hcurrent := tmp;
);
DATA[39] -> BYTE(tmp:=DATA;);
DATA[40] -> BYTE(
tmp:= (tmp + (DATA * 256))/100;
Hmin := tmp;
);
DATA[48] -> BYTE(tmp:=DATA;);
DATA[49] -> BYTE(
tmp:= (tmp + (DATA * 256))/100;
Hmax := tmp;
);
DATA[52] -> BYTE(tmp:=DATA;);
DATA[53] -> BYTE(
tmp:= (tmp + (DATA * 256));
IF(DATA & 128)THEN tmp := tmp - 65536;ENDIF;
Tcurrent := tmp/100;
);
DATA[56] -> BYTE(tmp:=DATA;);
DATA[57] -> BYTE(
IF(DATA & 128)THEN tmp := tmp - 65536;ENDIF;
tmp:= (tmp + (DATA * 256))/100;
Tmin := tmp;
);
DATA[60] -> BYTE(tmp:=DATA;);
DATA[61] -> BYTE(
IF(DATA & 128)THEN tmp := tmp -65536;ENDIF;
tmp:= (tmp + (DATA * 256))/100;
Tmax := tmp;
);
TIMEOUT 5000
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.