Mitsubishi MELFA 4D-2CG5100-PKG-E Instruction Manual page 114

Network vision sensor
Table of Contents

Advertisement

9 Detailed Explanation of Functions
(7) NVCLOSE (network vision sensor line close)
[Function]
Cuts the line with the specified vision sensor.
[Format]
NVCLOSE□[[#]<Vision sensor number>[,[[#]<Vision sensor number>・・・]
[Term]
<Vision sensor number> (Can be omitted)
Specifies a constant from 1 to 8 (the vision sensor number). Indicates the number for the vision
sensor connection to the COM specified with the <COM number>.
When this parameter is omitted, all the lines (vision sensor lines) opened with an NVOPEN command
are closed.
Also, up to 8 <vision sensor numbers> can be specified. They are delimited with commas.
Setting range: 1 - 8
[Sample sentence]
100 IF M_NVOPEN(1)<>1 THEN ' When logon has not been completed for vision sensor number 1
110
NVOPEN "COM2:" AS #1 ' Connects with the vision sensor connected to COM2 and sets its number
as number 1.
120 ENDIF
130 WAIT M_NVOPEN(1)=1
completed.
140 ・・・・・
300 NVCLOSE #1
[Explanation]
1) Cuts the line with the vision sensor connected with the NVOPEN command.
2) If the <vision sensor number> is omitted, cuts the line with all the vision sensors.
3) If a line is already cut, execution shifts to the next step.
4) Because up to seven vision sensors can be connected at the same time, <Vision sensor numbers> are
used in order to identify which vision sensor to close the line for.
5) If the program is cancelled while this command is being executed, execution continues until processing
of this command is complete.
6) When this command is used with multi-tasking, in the task using this command, it is necessary to close
only the lines opened by executing an NVOPEN command . At this time, use the <Vision sensor
number> specified with the NVOPEN command.
7) A program start condition of "Always" and the continue function are not supported.
8) If an END command is used, all the lines opened with an NVOPEN command or OPEN command are
closed. However, lines are not closed with an End command in a program called out with a CALLP
command.
Lines are also closed by a program reset, so when an END command or a program reset is executed, it
is not necessary to close lines with this command.
9) The continue function is not supported.
10) If an interrupt condition is established while this command is being executed, the interrupt processing is
executed after this command is completed.
[Errors]
1) If the value specified as the <vision sensor number> is anything other than "1" through "8", the
"argument out of range" error occurs.
2) If there are more than eight command arguments, an "incorrect argument count" error occurs.
9-103 Vision Sensor Dedicated Commands and Status Variables
' Connects with vision sensor number 1 and waits for logon to be
'Cuts the line with the vision sensor connected to COM2.

Advertisement

Table of Contents
loading

Table of Contents