33
6.1.
Connecting Vision Sensor to Robot Controller
For connecting the Vision Sensor to the Robot Controller, follow the procedures below.
1
Declare internal variables.
* Omitted (Refer to the source code)
2
Execute the initialization function (fhdefglobal) for external variables.
'Set Parameter value
CallProc fhdefglobal()
3
Set the IP address and the port number of the Vision Sensor to the
variables. (When changing those from the default.)
'Set network parameter
fh_ip_address = 100
fh_port_no = 9876
fh_retries_connect = 2
fh_timeout_connect = 4
4
Start the user task for Connect to FH server.
'Set the user task do nothing
fh_usertaskfunc_no = 0
'Start User Task
FORKMCR 990, 10000
CallProc fhsample_main()
5
Set the variables as coordinate number. No.0 as local coordinate (Robot
coordinate system), No.32 as tool coordinate (Flange coordinate system).
Execute the function(fhreflectcoord) to change the coordinate.
'Set the coordinate
set_local_coord_no = 0
set_tool_coord_no = 32
'Change coordinate
CallProc fhreflectcoord(set_local_coord_no,set_tool_coord_no)
'Error check
If fh_err_number <> fh_success
GoTo *CLOSE_SAMPLE
ENDIF
IP address
Port number
Initialization function for external variables
Start the user task program
Call main function
Содержание Vision Sensor FH Series
Страница 1: ...Robot Connection Guide NACHI FUJIKOSHI CORP Edition Vision Sensor FH Series Vision System Z464 E1 01 ...
Страница 14: ...12 ...
Страница 63: ......