170
5 MODULE DEDICATED INSTRUCTION
5.4 Network Dedicated Instruction
Program example
• In this program example, when M112 turns ON, data in D750 to D753 of station No.2 (host station) are written to D300 to
D303 of station No.3 (target station).
[Structured ladder/FBD]
[ST]
IF(M111=TRUE)THEN (* Instruction flag ON *)
MOV( TRUE, 10, D750);
MOV( TRUE, 20, D751);
MOV( TRUE, 30, D752 );
MOV( TRUE, 40, D753 ); (* Stores data to be written to D750 to D753 *)
END_IF;
IF((M112=TRUE) &(SB47=FALSE) & (SW0A0.2=FALSE)) THEN
JP_ZNWR(TRUE,1,3,D300,4, D750, Var_Result); (* Performs writing *)
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Completion of writing *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
ELSE (* Error completion *)
END_IF;
END_IF;
IF(SM400=TRUE)THEN
MOV(TRUE,SW31,Var_ErrorCode); (* Stores error code *)
END_IF;
Performs writing
Stores data to be
written to D750
to D753
Stores error code
Process on completion of writing
Process on normal completion
Process on error completion
(* Process on completion of writing *)
(* Process on normal completion *)
(* Process on error completion *)
Summary of Contents for MELSEC System Q
Page 1: ...MELSEC Q L Structured Programming Manual Special Instructions ...
Page 2: ......
Page 307: ...10 SFC CONTROL INSTRUCTION 10 2 SFC Transition Condition Comment Read 305 10 MEMO ...
Page 309: ...I 307 MEMO ...
Page 315: ......