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


 
5-174
5.4 Network Dedicated Instruction
5.4.12 SEND instruction
J_SEND, G_SEND
[ST]
IF (Var_Flag_Inst=TRUE) THEN
MOV(TRUE,H81,Var_ControlData[0]); (* Sets execution/error completion type *)
MOV(TRUE,3,Var_ControlData[2]); (* Sets channel used by host station *)
MOV(TRUE,H5,Var_ControlData[3]); (* Sets target station channel *)
MOV(TRUE,1,Var_ControlData[4]); (* Sets target station network number *)
MOV(TRUE,2,Var_ControlData[5]); (* Sets target station number *)
MOV(TRUE,0,Var_ControlData[6]);
MOV(TRUE,0,Var_ControlData[8]); (* Sets monitoring time *)
MOV(TRUE,4,Var_ControlData[9]); (* Sets data length by the word *)
MOV(TRUE,0,Var_ControlData[10]);
END_IF;
IF (Var_Flag_Inst2=TRUE) THEN
MOV(TRUE,10,D750); (*Sets send data to D750 to D753 *)
MOV(TRUE,20,D751);
MOV(TRUE,30,D752);
MOV(TRUE,40,D753);
END_IF;
IF((Var_Flag_Exe=TRUE) AND (SB47=FALSE) AND (SW0A0.1=FALSE)) THEN
MOV(TRUE, 5, Var_ControlData[7]); (* Sets number of resends *)
JP_SEND(TRUE,1,Var_ControlData,D750,Var_Result);(* Sends data *)
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;
(* Process on completion of sending *)
(* Process on normal completion *)
(* Process on error completion *)