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


 
5.3 Serial Communication
5.3.14 UINI instruction
5-113
ZP_UINI
5
MODULE DEDICATED
INSTRUCTION
ZP_UINI
[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 *)
*1
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
ELSE (* Error completion *)
END_IF;
RST(TRUE, Var_Flag); (* Turns interlock signal for communication stop OFF *)
*1
END_IF;
(* Do not perform the data communication process during interlock signal for communication
stop ON *)
IF(Var_Flag=FALSE)
*1
THEN
END_IF;
*1 : Create a program so that the data communication process does not run while the interlock signal for
communication stop is ON.
(* Process on normal completion *)
(* Process on error completion *)
(* Data communication process *)