94
5 MODULE DEDICATED INSTRUCTION
5.3 Serial Communication Instruction
*1 Create a program so that the data communication process does not run while the interlock signal for communication stop is ON.
[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 *)
ELSE (* 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
END_IF;
(* Process on normal completion *)
(* Process on error completion *)
(* Data communication process *)
Содержание MELSEC System Q
Страница 1: ...MELSEC Q L Structured Programming Manual Special Instructions ...
Страница 2: ......
Страница 307: ...10 SFC CONTROL INSTRUCTION 10 2 SFC Transition Condition Comment Read 305 10 MEMO ...
Страница 309: ...I 307 MEMO ...
Страница 315: ......