![Mitsubishi Electric MELSEC System Q Скачать руководство пользователя страница 258](http://html.mh-extra.com/html/mitsubishi-electric/melsec-system-q/melsec-system-q_special-instructions-manual_239154258.webp)
256
7 SOCKET COMMUNICATION FUNCTION INSTRUCTION
7.1 Opening/Closing Connection
Setting data
Precautions
• Use the Built-in Ethernet port QCPU of which the function version is B or later and the first five digits of the serial number
are '11012' or higher.
• Use the LCPU other than L02SCPU and L02SCPU-P.
Program example
• The following program shuts off the connection 1 when the disconnect request flag turns ON or the external device closes
the connection 1.
Device
Item
Setting data
Setting range
Setting side
(s2)[0]
System area
(s2)[1]
Completion status
The instruction completion status is stored.
0: Normal completion
Other than 0: Error completion (error code)
System
[Structured ladder/FBD]
[ST]
IF((LDF( TRUE, SD1282.0 ))
&(SD1284.0=TRUE))THEN (* When open completion signal turns OFF *)
PLS(TRUE, Var_Flag); (* Turns flag ON *)
END_IF;
IF(((LDP(TRUE, Var_Flag_Inst) & SD1282.0) OR Var_Flag) & (NOT Var_Flag_Exe)) THEN
SP_SOCCLOSE(TRUE, "00", 1, Var_ControlData, Var_Result); (* Shuts off the connection number 1 *)
SET(TRUE, Var_Flag_Exe); (* Turns execution flag ON *)
ELSE
SP_SOCCLOSE(FALSE, "00", 1, Var_ControlData, Var_Result);
SET(FALSE, Var_Flag_Exe);
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
IF(Var_Result[1]=FALSE)THEN
SET(FALSE, Var_Flag_Normal); (* Turns normal completion flag ON *)
ELSE (* Error completion *)
SET(TRUE, Var_Flag_Error); (* Turns error completion flag ON *)
END_IF;
RST(TRUE, Var_Flag_Exe); (* Turns execution flag OFF *)
END_IF;
Turns flag ON when
open completion
signal turns OFF
Shuts off the
connection number 1
Turns execution
flag ON
Turns normal
completion flag ON
Turns error
completion flag ON
Turns execution
flag OFF
Содержание MELSEC System Q
Страница 1: ...MELSEC Q L Structured Programming Manual Special Instructions ...
Страница 2: ......
Страница 307: ...10 SFC CONTROL INSTRUCTION 10 2 SFC Transition Condition Comment Read 305 10 MEMO ...
Страница 309: ...I 307 MEMO ...
Страница 315: ......