![Mitsubishi MELFA 4D-2CG5100-PKG-E Скачать руководство пользователя страница 115](http://html1.mh-extra.com/html/mitsubishi/melfa-4d-2cg5100-pkg-e/melfa-4d-2cg5100-pkg-e_instruction-manual_1808016115.webp)
9
Detailed Explanation of Functions
Vision Sensor Dedicated Commands and Status Variables
9-104
9.1.3.
Robot status variables
Here are the status variables for vision sensors.
Be careful. The data for these status variables is not backed up by the RT ToolBox backup function.
Table 9-3 Vision Sensor Status Variable List
Variable name
Array elements
Contents
Attribute
(*)
Data type
M_NVOPEN
8
Line connection status
R
Integer type
M_NVNUM
8
Vision sensor work detection count
R
Integer type
P_NVS*(*=1 – 8)
30
R
Position type
M_NVS*(*=1 - 8)
30, 10
R
Single-precision
real number type
C_NVS*(*=1 - 8)
30, 10
Vision sensor detection data
R Text
type
(*1) R indicates that a status variable is read-only.
The details of the status variables are as follows.
(1) M_NVOPEN
[Function]
Indicates the vision sensor line connection status.
[Array meaning]
Array elements (1 - 8)
:
Vision sensor numbers
[Explanation of values returned]
0: Line connecting (logon not complete) 1: Logon complete -1: Not connected
[Usage]
After an NVOPEN command is executed, checks whether or not the line with the vision sensor is connected
and the vision sensor logged onto.
[Sample sentence]
100 IF M_NVOPEN(1)<>1 THEN ' If vision sensor number 1 is not connected
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
' Connects with vision sensor number 1 and waits for the logon state.
140
・・・・・
300 NVCLOSE #1
'Cuts the line with the vision sensor connected to COM2.
[Explanation]
1) Indicates the status of a line connected with a network vision sensor with an NVOPEN command when
the line is opened.
2) The initial value is "-1". At the point in time that the NVOPEN command is executed and the line is
connected, the value becomes "0" (line connecting). At the point in time that the network vision sensor
logon is completed, the value becomes "1" (logon complete).
3) This variable strongly resembles the status of status variable M_OPEN, but whereas M_OPEN
becomes "1" when the connection is verified, M_NVOPEN becomes "1" when the vision sensor logon is
complete.
[Errors]
(1) If the type of data specified as an array element is incorrect, a
"syntax error in input command
statement"
error occurs.
(2) If there is an abnormal number of array elements (too many or too few), an
"incorrect argument type"
error occurs.
(3) If an array element other than "1" through "8" is specified, an
"array element mistake"
error occurs.