Mitsubishi MELSEC-L series Programming Manual page 326

Hide thumbs Also See for MELSEC-L series:
Table of Contents

Advertisement

SP_SOCOPEN
Program Example
The following program opens the connection 1.
(When the refresh device of the link special register (SW) is set to SW0.)
[Structured ladder]
[ST]
IF((LDP(TRUE, Var_Flag_Inst))
&(SD1282.0=FALSE) &(SD1284.0=FALSE) &(SD1288.A=TRUE))THEN
END_IF;
IF(Var_Result[0]=TRUE)THEN
END_IF;
7.1 SOCOPEN Instruction
7-4
MOVP(TRUE, H0, Var_ControlData[0]);
SP_SOCOPEN(TRUE, "U0", 1, Var_ControlData, Var_Result);
IF(Var_Result[1]=FALSE)THEN
SET(TRUE, Var_Flag_Normal);
ELSE
SET(TRUE, Var_Flag_Error);
END_IF;
(* Sets execution type/completion type to 0
(* Establishes the connection number 1 *)
(* Execution finished *)
(* Normal completion *)
(* Turns normal completion flag ON *)
(* Error completion *)
(* Turns error completion flag ON *)
Sets execution
type/completion
type to 0
H
Establishes
the connection
number 1
Turns normal
completion flag ON
Turns error
completion flag ON
*)
H

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-q series

Table of Contents