106
Moving the robot to the robot
approach position at
measurement
Read the robot approach distance from
the Vision Sensor and add the reading to
the measurement results. Set it as
arguments of a robot motion sample
function and execute the function.
▼
Moving the robot to the robot
command position at
measurement
Set the measurement results as
arguments of a robot motion sample
function and execute the function.
▼
Disconnecting the Vision Sensor
from the robot controller
Execute a disconnection function to the
Vision Sensor.
7.1.
Connecting Vision Sensor to Robot Controller
For connecting the Vision Sensor to the Robot Controller, follow the procedures below.
1
* Omitted (Refer to the source code)
Declare internal variables.
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; (2)Initialaize global variables
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
CALL
fhdefglobal
()
err_scene_no =
-
1000
;Scene No. error
min_scene_no =
0
;Mim scene No.
max_scene_no =
127
;Max scene No.
socket_no =
0
err_no = success
TYPE
"Initialization Done."
Execute the initialization function (fhdefglobal) for external variables.
3
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; (1)Set the network configuration
; You have to configure the following communication settings.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$ip_address =
"10.5.5.100"
$port_no =
"9876"
retries_connect =
2
;times
timeout_connect =
4
;sec
retries_connect =
2
;times
timeout_connect =
4
;sec
Set the IP address and the port number of the Vision Sensor to the variables.
(When changing those from the default.)
IP address
Port number
Initialization function for external variables