Mitsubishi MELSEC-L series Programming Manual page 141

Hide thumbs Also See for MELSEC-L series:
Table of Contents

Advertisement

[ST]
PLS(X24, Var_Flag_Inst);
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]);
MOV(TRUE, 0, Var_ControlData[6]);
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);
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]);
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 the 2nd block of the CPU monitoring to M0 to M15 *)
MOV(TRUE, H90, Var_ControlData[22]);
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);
RST(TRUE, Var_Flag_Set);
END_IF;
IF(Var_Flag_Exe=TRUE)THEN
ZP_CSET(TRUE, "00", 1, Var_ControlData, Var_Dummy, Var_Result);
END_IF;
IF(Var_Result[0]=TRUE)THEN
IF(Var_Result[1]=FALSE)THEN
SET(TRUE, Var_Flag_Normal);
ELSE
SET(TRUE, Var_Flag_Error);
END_IF;
RST(TRUE, Var_Flag_Exe);
END_IF;
5.2 Serial Communication and Modem Interface Instruction
5.2.11 CSET instruction (programmable controller CPU monitor)
(* Instruction pulse *)
(* Sets programmable controller CPU monitoring function
to constant cycle transmission. *)
(* Sets transmission method to data transmission *)
(* Turns data set flag ON *)
(* Sets device code *)
(* Sets number of registered points *)
(* Sets device code *)
(* Turns execution flag ON *)
(* Turns data set flag OFF *)
(* Registers the programmable controller CPU monitoring *)
(* Execution finished *)
(* Normal completion *)
(* Turns normal completion flag ON *)
(* Error completion *)
(* Turns error completion flag ON *)
(* Turns execution flag OFF *)
ZP_CSET
5
5-95

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-q series

Table of Contents