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


 
5.4 Network Dedicated Instruction
5.4.1 RIRD instruction
5-121
J_RIRD, G_RIRD
5
MODULE DEDICATED
INSTRUCTION
J_RIRD, G_RIRD
[ST]
IF(X0=TRUE)
&(Var_Flag_Exe=FALSE) (* Execution flag *)
&(SW80.0=FALSE))THEN (* Data link status of station number 1 *)
MOV(TRUE,1, Var_ControlData[1]); (* Sets station number *)
MOV(TRUE,H0405, Var_ControlData[2]); (* Sets access code and attribute code *)
MOV(TRUE, 1000, Var_ControlData[3]); (* Sets device number *)
MOV(TRUE, 10, Var_ControlData[4]); (* Sets number of read points *)
G_RIRD(TRUE, H04, Var_ControlData, D0, Var_Result);(* Performs readout *)
SET(TRUE, Var_Flag_Exe); (* Turns execution flag 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_Exe); (* Turns execution flag OFF *)
END_IF;
(* Process on completion of readout *)
(* Process on normal completion *)
(* Process on error completion *)