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


 
7.7 SOCCSET Instruction
7-21
7
SOCKET COMMUNICATION
FUNCTION INSTRUCTION
SP_SOCCSET
SP_SOCCSET
Program Example
The following program changes the destination (destination IP address and port number) of the
connection number 1 which is being open.
[Structured ladder/FBD]
[ST]
IF((LDP(TRUE, Var_Flag_Inst)) &(SD1282.0=TRUE) THEN
MOVP(TRUE, H55DE, Var_ControlData[2]);
MOVP(TRUE, H0A61, Var_ControlData[3]);
(* Sets destination IP address to 10.97.85.222 *)
MOVP(TRUE, H2001, Var_ControlData[4]); (* Sets destination port number to 8193 *)
SP_SOCCSET(TRUE, "U0", 1, Var_ControlData);
(* Changes the setting of the connection number 1 *)
END_IF;
Sets destination
IP address
to 10.97.85.222
Sets destination
port number to 8193
Changes the setting
of the connection
number 1