7.3.2.
fhconnect
Function
Connect to the Vision Sensor
Syntax
fhconnect(fh_socket, retries_connect,timeout_connect,err_no)
Parameters
Argument
fh_socket
retries_connect
timeout_connect Input
err_no
Remarks
Connects to the Vision Sensor specified in the Number of socket parameter.
Request a connection every hour specified in the Connection Timeout Time parameter.
Request a connection as many times as specified in the connection retry count parameter.
Return an error if the connection fails.
Return an error if the parameter is out of the input range
Return Value
Err. No. Error Message
0
-
-1200
ERROR:fhconnect():RETRY:-1200
ERROR: fhconnect():TIMEOUT:-1200
-1202
ERROR: fhconnect():RETRY:-1202
-1204
ERROR: fhconnect():TIMEOUT:-1204
-1900
ERROR:fhconnect():SOCKET_IN_USE:-1900
Precautions
Only one Vision Sensor can be connected to the robot controller.
If you want to connect to another Vision Sensor, disconnect from the connected Vision
Sensor.
Input/Output Data type
Input
Integer
Input
Integer
Integer
Output
Integer
Description
The socket number of connect to Vision
Sensor.
Number of connections retries (0 to 99)
Connection Timeout Time (0 to 99sec)
Error number
Store the result of the execution of this
function.
Description
normal termination
Out of connection retry count
input range
Connection Timeout Time
Input Range
Connection retry count over
Connection timeout time is
over.
Socket is in used.
42