Connecting Vision Sensor To Robot Controller - Omron FH Series Connection Manual

Vision sensor
Hide thumbs Also See for FH Series:
Table of Contents

Advertisement

6.1.

Connecting Vision Sensor to Robot Controller

For connecting the Vision Sensor to the Robot Controller, follow the procedures below.
* Omitted (Refer to the source code)
1
Declare internal variables.
Execute the initialization function (fhdefglobal) for external variables.
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; (2)Initialaize global variables
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
CALL
socket_no = 0
err_no = success
cur_local_coord = 0
cur_tool_coord = 0
cmd_res = 0
TYPE
Set the IP address and the port number of the Vision Sensor to the variables.
3
(When changing those from the default.)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; (1)Set the network configuration
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$ip_address =
$port_no =
retries_connect =
timeout_connect =
retries_connect =
timeout_connect =
Set the variables as arguments for the connection function (fhconnect) to the
4
Vision Sensor (FH server) and execute it.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; (2)Connect to the FH server
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
WHILE
err_no)
END
TYPE
fhdefglobal()
"Initialization Done."
You have to configure the following communication settings.
"10.5.5.100"
"9876"
2
;times
4
;sec
2
;times
4
;sec
bconnected ==
0
DO
CALL
fhconnect($ip_address, $port_no, retries_connect, timeout_connect, socket_no,
; Error check
IF
err_no <> success
THEN
TYPE
"ERROR: fhsample_main(): Connection failed.
GOTO
11
END
"Connection Done."
Initialization function for external variables
IP address
Port number
Connection function with the Vision Sensor (FH server)
30
Exit:", err_no

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fh-5050

Table of Contents