![Mitsubishi Electric MELSEC System Q Скачать руководство пользователя страница 256](http://html.mh-extra.com/html/mitsubishi-electric/melsec-system-q/melsec-system-q_special-instructions-manual_239154256.webp)
254
7 SOCKET COMMUNICATION FUNCTION INSTRUCTION
7.1 Opening/Closing Connection
Program example
• The following program opens the connection 1.
[Structured ladder/FBD]
[ST]
IF((LDP( TRUE, Var_Flag_Inst ))
&(SD1282.0=FALSE) &(SD1284.0=FALSE) &(SD1288.A=TRUE))THEN
MOVP(TRUE, H0, Var_ControlData[0]); (* Sets execution type/completion type to 0H *)
SP_SOCOPEN( TRUE, "00", 1, Var_ControlData, Var_Result ); (* Establishes the connection number 1 *)
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
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;
END_IF;
Sets execution
type/completion
type to 0
H
Establishes
the connection
number 1
Turns normal
completion flag ON
Turns error
completion flag ON
Содержание 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: ......