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


 
5-194
5.4 Network Dedicated Instruction
5.4.16 ZNRD instruction
J_ZNRD
Program Example
In this program example, when M101 turns ON, data in D250 to D254 of station No.4 (target
station) are read out to D700 to D704 of station No.1 (host station).
[Structured ladder/FBD]
[ST]
IF((M101=TRUE) &(SB47=FALSE) & (SW0A0.3=FALSE)) THEN
JP_ZNRD(TRUE,1,4,D250,5,D700, Var_Result);(* Performs ZNRD instruction*)
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
ELSE (* Error completion *)
END_IF;
END_IF;
IF(SM400=TRUE)THEN
MOV(TRUE,SW30,Var_ErrorCode); (* Stores error code *)
END_IF;
Performs readout
Stores error code
Process on completion of readout
Process on normal completion
Process on error completion
(* Process on completion of readout *)
(* Process on normal completion *)
(* Process on error completion *)