109
Set the variables as arguments for the robot motion sample function
(fhsample_move) and execute it.
WARNING
These operations drive the robot.
Operate the robot in the state whereby pressing the
[Emergency stop] button can stop its motion anytime.
7.4.
Executing Measurements on Vision Sensor and Getting
Measurement Results
For a processing to execute measurements on the Vision Sensor and to get the
measurement results, follow the procedures below.
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; (3)Register the current position of the robot to the FH before measurement
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
CALL
fhsample_chgscn
(socket_no, retry_count, time_out, scene_no, err_no)
; Error check
IF
err_no <> success
THEN
GOTO
10
END
TYPE
"Register the current robot position Done."
Before executing measurements, execute the current position registration
command execution sample function (fhsmaple_regpos) to the Vision Sensor.
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; (4)Execute measurement and get the measurement results of the FH
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
CALL
fhsample_chgscn
(socket_no, retry_count, time_out, scene_no, err_no)
; Error check
IF
err_no <> success
THEN
TYPE
"ERROR: fhsample_main(): Measure on the Vision controller failed:"
, err_no
GOTO
10
END
Execute the measurement command execution sample function (fhsmaple_trig)
to the Vision Sensor.
3
; Measurement results
res_cmd_pos_x = param[
0
]
res_cmd_pos_x = param[
1
]
res_cmd_pos_x = param[
2
]
res_cmd_pos_x = param[
3
]
res_cmd_pos_x = param[
4
]
res_cmd_pos_x = param[
5
]
TYPE
"Measurement Done"
Set the measurement results to the variables.
Current position registration command execution sample function
Measurement command execution sample function