Mitsubishi Electric MELSEC-L Special Instructions Manual page 96

Melsec-q/l structured programming manual
Hide thumbs Also See for MELSEC-L:
Table of Contents

Advertisement

[ST]
IF(LDP(TRUE,X20) (* UINI instruction command *)
&(Y2=FALSE) (* CH1 mode switching request *)
&(Y9=FALSE) (* CH2 mode switching request *)
&(X6=FALSE) (* CH1 mode switching *)
&(X0D=FALSE))THEN (* CH2 mode switching *)
(* Runs if there is no mode switching *)
FMOV(TRUE, H0, 13, Var_ControlData[0]); (* Clears control data to 0 *)
MOV(TRUE, H0, Var_ControlData[0]); (* Always sets 0 *)
MOV(TRUE, H0, Var_ControlData[1]); (* Clears execution result to 0 *)
MOV(TRUE, H0, Var_ControlData[2]); (* Sets execution type *)
MOV(TRUE,H7E6,Var_ControlData[3]); (* Sets CH1 transmission specification *)
MOV(TRUE,H8,Var_ControlData[4]); (* Sets CH1 communication protocol *)
MOV(TRUE, H7E7, Var_ControlData[5]); (* Sets CH2 transmission specification *)
MOV(TRUE, H5, Var_ControlData[6]); (* Sets CH2 communication protocol *)
MOV(TRUE, H1, Var_ControlData[7]); (* Sets host station number *)
ZP_UINI(TRUE, "00", Var_ControlData, Var_Result); (* Switches mode *)
SET(TRUE, Var_Flag ); (* Turns interlock signal for communication stop ON *)
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
(* Process on normal completion *)
ELSE (* Error completion *)
(* Process on error completion *)
END_IF;
RST(TRUE, Var_Flag); (* Turns interlock signal for communication stop OFF *)
END_IF;
(* Do not perform the data communication process during interlock signal for communication stop ON *)
IF(Var_Flag=FALSE)*1 THEN
(* Data communication process *)
END_IF;
*1 Create a program so that the data communication process does not run while the interlock signal for communication stop is ON.
5 MODULE DEDICATED INSTRUCTION
94
5.3 Serial Communication Instruction
*1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-q

Table of Contents