Seneca Z-10-D-OUT
Detaljer
- Typ
- Drivrutin
- Upplaggd av
- Ove Jansson, Abelko Innovation
- Version
- 5
- Uppdaterad
- 2016-04-13
- Skapad
- 2013-08-27
- Kategori
- IO enheter, Modbus
- Visningar
- 2712
Beskrivning
Device definition for Seneca Z-10-D-OUT
10 digital outputs
Bruksanvisning
Hur man installerar typdefinitionerna och driftsätter modulerna finns beskrivet i användarmanualen, kapitel 18.7. För inkopplingsanvisningar och liknande, se modulens manual. Den kan hämtas från Senecas hemsida: http://www.seneca.it/
Det finns ett skript för att konfigurera Seneca enheter
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 SenecaZ10DOUT NAMED "Seneca Z-10-D-OUT" TYPEID 21017
IS
% Device definition for Z-10-D-OUT 10 digital outputs
%
% History:
% 2007-02-28 fixed "blinking" problem
PARAMETER
Id :"Address";
DO_1 :"DO1";
DO_2 :"DO2";
DO_3 :"DO3";
DO_4 :"DO4";
DO_5 :"DO5";
DO_6 :"DO6";
DO_7 :"DO7";
DO_8 :"DO8";
DO_9 :"DO9";
DO_10 :"DO10";
TimeOut:"TimeOut" ["s"];
Safety:"FailSafe";
PUBLIC
pDO_1 :"DO1";
pDO_2 :"DO2";
pDO_3 :"DO3";
pDO_4 :"DO4";
pDO_5 :"DO5";
pDO_6 :"DO6";
pDO_7 :"DO7";
pDO_8 :"DO8";
pDO_9 :"DO9";
pDO_10 :"DO10";
PRIVATE
Tmp;
BAUDRATE 38400;
CHECKSUM MODBUS SWAPPED;
TELEGRAM WriteDOut NAMED "Write Output" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(10); % Modbus command "$10" write multiple registers
DATA[2] := RWORD(02); % start register
DATA[4] := RWORD(03); % number of registers to write
DATA[6] := HEX(06); % number of bytes to send
DATA[7] <- RWORD( % "Outputs" 40003
IF DO_1 THEN Tmp := 1; ELSE Tmp := 0; ENDIF;
IF DO_2 THEN Tmp := Tmp + 2; ENDIF;
IF DO_3 THEN Tmp := Tmp + 4; ENDIF;
IF DO_4 THEN Tmp := Tmp + 8; ENDIF;
IF DO_5 THEN Tmp := Tmp + 16; ENDIF;
IF DO_6 THEN Tmp := Tmp + 32; ENDIF;
IF DO_7 THEN Tmp := Tmp + 64; ENDIF;
IF DO_8 THEN Tmp := Tmp + 128; ENDIF;
IF DO_9 THEN Tmp := Tmp + 256; ENDIF;
IF DO_10 THEN Tmp := Tmp + 512; ENDIF;
DATA := Tmp;
pDO_1 := DO_1;
pDO_2 := DO_2;
pDO_3 := DO_3;
pDO_4 := DO_4;
pDO_5 := DO_5;
pDO_6 := DO_6;
pDO_7 := DO_7;
pDO_8 := DO_8;
pDO_9 := DO_9;
pDO_10 := DO_10;
);
DATA[9] := RWORD(0000); % "Diagostics" 40004
DATA[11] := RWORD(0000); % "Default outputs" 40005
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(10);
TIMEOUT 300
END;
TELEGRAM WriteSettings NAMED "Write Settings" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(10); % Modbus command "$10" write multiple registers
DATA[2] := RWORD(12); % start register
DATA[4] := RWORD(03); % number of registers to write
DATA[6] := HEX(06); % number of bytes to send
DATA[7] := RWORD(0000); % "Safety timeout" 40013 disabling automatic reset
DATA[9] := RWORD(0000); % "Reserved" 40014
DATA[11] := RWORD(0000); % "Opened Mask" 40015 activates all outputs
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(10);
TIMEOUT 300
END;
END;
IS
% Device definition for Z-10-D-OUT 10 digital outputs
%
% History:
% 2007-02-28 fixed "blinking" problem
PARAMETER
Id :"Address";
DO_1 :"DO1";
DO_2 :"DO2";
DO_3 :"DO3";
DO_4 :"DO4";
DO_5 :"DO5";
DO_6 :"DO6";
DO_7 :"DO7";
DO_8 :"DO8";
DO_9 :"DO9";
DO_10 :"DO10";
TimeOut:"TimeOut" ["s"];
Safety:"FailSafe";
PUBLIC
pDO_1 :"DO1";
pDO_2 :"DO2";
pDO_3 :"DO3";
pDO_4 :"DO4";
pDO_5 :"DO5";
pDO_6 :"DO6";
pDO_7 :"DO7";
pDO_8 :"DO8";
pDO_9 :"DO9";
pDO_10 :"DO10";
PRIVATE
Tmp;
BAUDRATE 38400;
CHECKSUM MODBUS SWAPPED;
TELEGRAM WriteDOut NAMED "Write Output" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(10); % Modbus command "$10" write multiple registers
DATA[2] := RWORD(02); % start register
DATA[4] := RWORD(03); % number of registers to write
DATA[6] := HEX(06); % number of bytes to send
DATA[7] <- RWORD( % "Outputs" 40003
IF DO_1 THEN Tmp := 1; ELSE Tmp := 0; ENDIF;
IF DO_2 THEN Tmp := Tmp + 2; ENDIF;
IF DO_3 THEN Tmp := Tmp + 4; ENDIF;
IF DO_4 THEN Tmp := Tmp + 8; ENDIF;
IF DO_5 THEN Tmp := Tmp + 16; ENDIF;
IF DO_6 THEN Tmp := Tmp + 32; ENDIF;
IF DO_7 THEN Tmp := Tmp + 64; ENDIF;
IF DO_8 THEN Tmp := Tmp + 128; ENDIF;
IF DO_9 THEN Tmp := Tmp + 256; ENDIF;
IF DO_10 THEN Tmp := Tmp + 512; ENDIF;
DATA := Tmp;
pDO_1 := DO_1;
pDO_2 := DO_2;
pDO_3 := DO_3;
pDO_4 := DO_4;
pDO_5 := DO_5;
pDO_6 := DO_6;
pDO_7 := DO_7;
pDO_8 := DO_8;
pDO_9 := DO_9;
pDO_10 := DO_10;
);
DATA[9] := RWORD(0000); % "Diagostics" 40004
DATA[11] := RWORD(0000); % "Default outputs" 40005
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(10);
TIMEOUT 300
END;
TELEGRAM WriteSettings NAMED "Write Settings" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(10); % Modbus command "$10" write multiple registers
DATA[2] := RWORD(12); % start register
DATA[4] := RWORD(03); % number of registers to write
DATA[6] := HEX(06); % number of bytes to send
DATA[7] := RWORD(0000); % "Safety timeout" 40013 disabling automatic reset
DATA[9] := RWORD(0000); % "Reserved" 40014
DATA[11] := RWORD(0000); % "Opened Mask" 40015 activates all outputs
ANSWER SIZE 8
DATA[0] = BYTE(Id);
DATA[1] = HEX(10);
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.