Mitsubishi MELSEC-L series Programming Manual page 244

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

Advertisement

ZP_OPEN
[ST]
IF(SM400=TRUE)THEN
END_IF;
IF(Var_Flag_Inst=TRUE)THEN
END_IF;
IF((Var_Flag_Exe=TRUE) AND (X19=TRUE)
END_IF;
IF(Var_Result[0]=TRUE)THEN
END_IF;
*1 :
5.4 CC-Link IE Controller Network, MELSECNET/H, and Ethernet Instruction
5-198
5.4.15 OPEN instruction
(* Always ON *)
MOV(TRUE,U0\G20480,K4M0);
(* Open completed signal/connection 1 open completion signal *)
MOV(TRUE,U0\G20482,K4M20);
(* Open request signal/connection 1 open request signal *)
PLS(TRUE,Var_Flag_Exe);
AND (M0=FALSE) AND (M20=FALSE))THEN
(* Connection 1 open completion signal/connection 1 open request signal *)
*1
(*Use GX Works2-[Open settings]*)
MOVP(TRUE,H0,D100);
(*Execution type*)
*1
(*Use D100-[control data]*)
MOVP(TRUE,H8000,D100);
(*Execution type*)
MOVP(TRUE,H0,D102);
(*Application setting*)
MOVP(TRUE,H1000,D103);
(*Host station port number*)
DMOVP(TRUE,H0A6155DF,D104);
(*Destination IP address*)
MOVP(TRUE,H2000,D106);
(*Destination port number*)
ZP_OPEN(TRUE,"U0",K1,D100,Var_Result);
IF(Var_Result[1]=FALSE)THEN
SET(TRUE, Var_Flag_Normal);
END_IF;
IF(Var_Result[1]=TRUE)THEN
SET(TRUE, Var_Flag_Error);
END_IF;
For devisions of
and
in the program,
used and
is necessary when it is not used.
(* When instruction flag is ON*)
(* Turns execution flag ON *)
(* Execution flag/initialization normal completion signal *)
(* Opens connection *)
(* Execution finished *)
(* Normal completion *)
(* Turns normal completion flag ON *)
(* Error completion *)
(* Turns error completion flag ON *)
is necessary when the [Open settings] of GX Works2 is

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-q series

Table of Contents