5 MODULE DEDICATED INSTRUCTION
5.4 Network Dedicated Instruction
181
5
Program example
• The following program writes the clock data (8:30:00) to all stations on the network number 1.
[Structured ladder/FBD]
[ST]
IF(Var_Flag_Inst=TRUE)THEN
MOV(TRUE,H38,Var_ClockData[0]); (* Sets clock data *)
MOV(TRUE,H0,Var_ClockData[1]);
MOV(TRUE,H8,Var_ClockData[2]);
MOV(TRUE,H3000,Var_ClockData[3]);
MOV(TRUE,H0,Var_ClockData[4]);
END_IF;
IF((Var_Flag_Exe=TRUE) AND (SB47=FALSE) AND (SB0A0=FALSE)) THEN
ZP_RTMWR_J(TRUE,"J1",5,H0FF,H3FF,Var_ClockData,Var_Result); (* Writes clock data to other stations*)
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
ELSE (* Error completion *)
END_IF;
END_IF;
MOV(SM400, SW34, Var_ErrorCode); (* Stores error code *)
Sets clock data
Execution finished
Writes clock data
to other stations
Normal completion
Error completion
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 *)
Содержание MELSEC System Q
Страница 1: ...MELSEC Q L Structured Programming Manual Special Instructions ...
Страница 2: ......
Страница 307: ...10 SFC CONTROL INSTRUCTION 10 2 SFC Transition Condition Comment Read 305 10 MEMO ...
Страница 309: ...I 307 MEMO ...
Страница 315: ......