Mitsubishi Electronics MELSEC Q series MELSEC L series Home Theater Server User Manual


 
5-102
5.3 Serial Communication
5.3.11 CSET instruction (programmable controller CPU monitor)
ZP_CSET
(2) Program to cancel the programmable controller CPU monitoring
The following program cancels the programmable controller CPU monitoring of the CH1 side
interface.
(For the Q series C24 whose I/O signals are X/Y00 to X/Y1F)
[Structured ladder/FBD]
[ST]
PLS(X25, 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, 3, Var_ControlData[2]); (* Sets request type *)
ZP_CSET(TRUE, "U0", 1, Var_ControlData, Var_Dummy, Var_Result);
(* Cancels 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;
END_IF;
Instruction pulse
Sets execution type
Sets request type
Cancels programmable
controller CPU
monitoring
Turns normal completion
flag ON
Turns error completion
flag ON