![Mitsubishi MELFA 4D-2CG5100-PKG-E Скачать руководство пользователя страница 107](http://html1.mh-extra.com/html/mitsubishi/melfa-4d-2cg5100-pkg-e/melfa-4d-2cg5100-pkg-e_instruction-manual_1808016107.webp)
9
Detailed Explanation of Functions
Vision Sensor Dedicated Commands and Status Variables
9-96
(3) NVLOAD (network vision sensor load)
[Function]
Loads the specified vision program into the vision sensor.
[Format]
NVLOAD
□
#<Vision sensor number>,”<Vision program (job) name>”
[Term]
<Vision sensor number>
(Can not be omitted)
This specifies the number of the vision sensor to control.
Setting range: 1 - 8
<Vision program (job) name>
(Can not be omitted)
Specifies the name of the vision program to start.
The vision program extension (.job) can be omitted.
The only characters that can be used are "0" - "9", "A" - "Z", "a" - "z", "-", and "_".
[Sample sentence]
100 IF M_NVOPEN(1)<>1 THEN 'If vision sensor number 1 log on is not complete
110 NVOPEN “COM2:” AS #1 'Connects with the vision sensor connected to COM2.
120 ENDIF
130 WAIT M_NVOPEN(1)=1 ' Connects with vision sensor number 1 and waits for logon to be
completed.
140 NVLOAD #1,”TEST” 'Loads the "Test".
150 NVPST #1, ””,”E76”,”J81”,”L84”,0,10
'Receives the recognition count recognized with the "Test" program from the E76 cell and the
recognition results from cells J81 through L84, and stores them in P_NVS1().
160
・・・・
300 NVCLOSE #1 'Cuts the line with the vision sensor connected to COM2.
[Explanation]
1) Loads the specified vision program into the specified vision sensor.
2) This command moves to the next step at the point in time when the vision program is loaded into the
vision sensor.
3) If the program is cancelled while this command is being executed, it stops immediately.
4) If the specified <vision program name> is already loaded, the command ends with no processing.
5) When this command is used with multi-tasking, it is necessary to execute the NVOPEN command in the
task using this command. Also, use the <vision sensor number> specified with the NVOPEN command.
6) A program start condition of "Always" and the continue function are not supported.
7) If an interrupt condition is established while this command is being executed, the interrupt processing is
executed immediately.
[Errors]
1) If data type for an argument is incorrect, a
"syntax error in input command statement"
error is
generated.
2) If there is an abnormal number of command arguments (too many or too few), an
"incorrect argument
count"
error occurs.
3) If the <vision sensor number> is anything other than "1" through "8", an
"argument out of range"
error
occurs.
4) If the NVOPEN command is not opened with the number specified as the <vision sensor number>, an
"abnormal vision sensor number specification"
error occurs.
5) If the <vision program name> exceeds 15 characters, an
"abnormal vision program name"
error
occurs.
6) If a <vision program name> uses a character other than "0" – "9", "A" – "Z", "-", or "_" (including
lowercase letters), an
"abnormal vision program name"
error occurs.
7) If the program specified in the <vision program name> is not in the vision sensor, a
"vision program
does not exist"
error occurs.
8) If the vision sensor is "offline", the
"Put online"
error occurs, so put the vision sensor "Online".
9) If the communications line is cut while this command is being executed, an
"abnormal
communications"
error occurs and the robot controller side line is closed.