5 MODULE DEDICATED INSTRUCTION
5.3 Serial Communication Instruction
81
5
[ST]
PLS(X24, Var_Flag_Inst); (* Instruction pulse *)
IF((Var_Flag_Inst=TRUE) & (Var_Flag_Normal=FALSE))THEN
MOV(TRUE, 0, Var_ControlData[0]); (* Sets execution type *)
MOV(TRUE, 2, Var_ControlData[2]); (* Sets request type *)
MOV(TRUE, 2, Var_ControlData[3]); (* Sets cycle time unit to minute *)
MOV(TRUE, 3, Var_ControlData[4]); (* Sets cycle time to 3 minutes *)
MOV(TRUE, 1, Var_ControlData[5]); (* Sets programmable controller CPU monitoring function to constant cycle transmission. *)
MOV(TRUE, 0, Var_ControlData[6]); (* Sets transmission method to data transmission *)
MOV(TRUE, 1, Var_ControlData[7]); (* Sets output start pointer *)
MOV(TRUE, 2, Var_ControlData[8]); (* Sets number of user frame transmissions *)
SET(TRUE, Var_Flag_Set); (* Turns data set flag ON *)
END_IF;
IF(Var_Flag_Set=TRUE)THEN
MOV(TRUE, 1, Var_ControlData[10]); (* Sets number of registered word blocks *)
MOV(TRUE, 1, Var_ControlData[11]); (* Sets number of registered bit blocks *)
(* Sets the 1st block of the CPU monitoring to D100 to D109 *)
MOV(TRUE, H0A8, Var_ControlData[13]); (* Sets device code *)
MOV(TRUE, 100, Var_ControlData[14]);(* Sets start number of monitoring device *)
MOV(TRUE, 0, Var_ControlData[15]);
MOV(TRUE, 10, Var_ControlData[16]); (* Sets number of registered points *)
(* Sets the 2nd block of the CPU monitoring to M0 to M15 *)
MOV(TRUE, H90, Var_ControlData[22]); (* Sets device code *)
MOV(TRUE, 0, Var_ControlData[23]);(* Sets start number of monitoring device *)
MOV(TRUE, 0, Var_ControlData[24]);
MOV(TRUE, 1, Var_ControlData[25]); (* Sets number of registered points. (For bit device, specify it in units of words.) *)
SET(TRUE, Var_Flag_Exe); (* Turns execution flag ON *)
RST(TRUE, Var_Flag_Set); (* Turns data set flag OFF *)
END_IF;
IF(Var_Flag_Exe=TRUE)THEN
ZP_CSET(TRUE, "U0", 1, Var_ControlData, Var_Dummy, Var_Result); (* Registers the programmable controller CPU monitoring *)
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
SET(TRUE, Var_Flag_Normal); (* Turns normal completion flag ON *)
ELSE (* Error completion *)
SET(TRUE, Var_Flag_Error); (* Turns error completion flag ON *)
END_IF;
RST(TRUE, Var_Flag_Exe); (* Turns execution flag OFF *)
END_IF;
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: ......