Definition
focas_connect(ip, port, timeout)
Features
This command is used to connect to the Machine Center Controller. When connected normally, a handle value greater than 0 is returned.
The connectable controllers are as follows.
-
FANUC Series 30i/31i/32i/35i-MODEL B
-
FANUC Series 31i-MODEL B5
-
FANUC Series Power Motion i-MODEL A
-
FANUC Series 0i-MODEL D/F
Parameters
|
Parameter Name |
Data Type |
Default Value |
Description |
|---|---|---|---|
|
ip |
str |
- |
Server IP address: (e.g.) “192.168.137.200” |
|
port |
int |
- |
Server Port number (e.g.) 8193 |
|
timeout |
int |
- |
timeout setting (infinite for 0:, unit: s) |
Return
|
Value |
Description |
|---|---|
|
errorCode |
Error code (refer to focas_get_error_str) |
|
Handle |
Success (return handle value) |
Exception
|
Exception |
Description |
|---|---|
|
DR_Error (DR_ERROR_TYPE) |
Parameter data error occurred |
|
DR_Error (DR_ERROR_VALUE) |
Parameter value is invalid |
|
DR_Error (DR_ERROR_RUNTIME) |
C Extension module error occurred |
|
DR_Error (DR_ERROR_STOP) |
Program terminated forcefully |
Example
ErrCode, hMachineCenter = focas_connect("10.10.0.95", 8193, 10)