Skip to main content
Skip table of contents

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

Parameter

Parameter NameData TypeDefault ValueDescription

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

ValueDescription

Handle

Success (return handle value)

errorCode

Error code (refer to focas_get_error_str)

Exception

ExceptionDescription

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

PY
ErrCode, hMachineCenter = focas_connect("10.10.0.95", 8193, 10)
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.