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


 
5.4 Network Dedicated Instruction
5.4.7 RLPASET instruction
5-145
G_RLPASET
5
MODULE DEDICATED
INSTRUCTION
G_RLPASET
[ST]
FROM(TRUE, H0, H5E4, 28, K4SB40); (* Reads SB0040 to SB01FF *)
FROM(TRUE, H0, H640, 448, SW40); (* Reads SW0040 to SW01FF*)
IF((SM402=TRUE) & (SB6E=TRUE))THEN
SET(TRUE, Var_Flag_Inst); (* Parameter setting command *)
END_IF;
IF(Var_Flag_Inst=TRUE)THEN (* Parameter setting command ON *)
MOV(TRUE, 0, Var_ControlData[0]); (* Clear completion status *)
MOV(TRUE, 15, Var_ControlData[1]); (* Sets all of setting flags to Valid *)
MOV(TRUE, 3, Var_ControlData[2]); (* Sets number of connected modules *)
MOV(TRUE, 3, Var_ControlData[3]); (* Sets number of retries *)
MOV(TRUE, 1, Var_ControlData[4]); (* Sets number of automatic return modules *)
MOV(TRUE, 0, Var_ControlData[5]);
(* Sets operation specification when CPU is down to stop *)
MOV(TRUE, 0, Var_ControlData[6]);
(* Sets scan mode specification to asynchronous *)
MOV(TRUE, 0, Var_ControlData[7]); (* Set delay time specification *)
MOV(TRUE, H2101, Var_SlaveStation[0]);
(* First module: local station, 1-station occupy, station number 1 *)
MOV(TRUE, H0102, Var_SlaveStation[1]);
(* Second module: Remote I/O station, 1-station occupy, station number 2*)
MOV(TRUE, H0103, Var_SlaveStation[2]);
(* Third module: Remote I/O station, 1-station occupy, station number 3 *)
MOV(TRUE, H4, Var_ReservedStation[0]);
(* Reserved station specification: station number 3 *)
MOV(TRUE, H2, Var_ErrorInvalidStation[0]);
(* Error invalid station specification: station number 2 *)
MOV(TRUE, 100, Var_BufferSize[0]);
(* First module: local module, send buffer 100 words *)
MOV(TRUE, 100, Var_BufferSize[1]);
(* Second module: local station, receive buffer 100 words *)
MOV(TRUE, 0, Var_BufferSize[2]);
(* Third module: local station, auto-refresh buffer 0 words *)
GP_RLPASET(TRUE, H00, Var_ControlData, Var_SlaveStation,
Var_ReservedStation, Var_ErrorInvalidStation, Var_BufferSize,
Var_Result); (* Performs parameter setting *)
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
SET(TRUE, SB3); (* Refresh command *)
SET(TRUE, Var_Flag_Exe); (* Control program start command *)
ELSE (* Error completion *)
END_IF;
RST(TRUE, Var_Flag_Inst); (* Turns parameter setting command OFF *)
END_IF;
(* Process on error completion *)