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]
[ST]
IF((LDP(TRUE, Var_Flag_Inst)) &(SD1282.0=FALSE) THEN
MOVP(TRUE, H55DE, Var_ControlData[2]);
MOVP(TRUE, H0A61, Var_ControlData[3]);
MOVP(TRUE, H2001, Var_ControlData[4]); (* Sets destination port number to 8193 *)
SP_SOCCSET(TRUE, "U0", 1, Var_ControlData);
END_IF;
(* Sets destination IP address to 10.97.85.222 *)
(* Changes the setting of the connection number 1 *)
7.7 SOCCSET Instruction
SP_SOCCSET
Sets destination
IP address
to 10.97.85.222
Sets destination
port number to 8193
Changes the setting
of the connection
number 1
7-21
7