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


 
5-246
5.4 Network Dedicated Instruction
5.4.32 UINI instruction
Z_UINI
Program Example
The following program sets the station number 2. The following is an example for Ethernet.
[Structured ladder/FBD]
[ST]
IF (Var_Flag_Inst=TRUE) THEN
MOV(TRUE,H1,Var_ControlData[2]); (* Sets change target *)
MOV(TRUE,ZR0,Var_ControlData[3]);(* Sets host station number *)
END_IF;
IF((Var_Flag_Exe=TRUE) AND (SB70=TRUE))THEN
ZP_UINI(TRUE,"00",Var_ControlData,Var_Result);
(* Performs reinitialization *)
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
ELSE (* Error completion *)
MOV(TRUE, Var_ControlData[1], Var_ErrorCode);(* Stores error code *)
END_IF;
END_IF;
Sets change
target
Performs
reinitialization
Sets host
station number
Stores error code
Error completion
Normal completion
Execution finished
Process on completion
Process on normal completion
Process on error completion
(* Process on completion *)
(* Process on normal completion *)
(* Process on error completion *)