Overview

The Fanuc connector provides tag-based read access and on-demand command access to a Fanuc robot controller, using SNPX (data access), Telnet (program/task control), and FTP (diagnostics) interfaces.

Digital I/O and system-variable/register tags are polled on every cycle via SNPX. Program control, port simulation, and variable writes are available on demand via Telnet-based connector methods; controller alarm history is available via an FTP-based method.

The connector detects when the underlying connection is lost and reconnects automatically without blocking the read cycle - reconnection runs on its own dedicated background thread.

Parameters

Name Values Description
Type FANUC The connector type identifier.
IP IP address or hostname The IP address or hostname of the robot controller.
TelnetPwd string Password for the controller's Telnet interface, used for program/task control commands.
FtpUsername / FtpPwd string Credentials for the controller's FTP interface, used for alarm/diagnostic retrieval.
UpdateRate milliseconds (integer) How often the connector polls SNPX for tag updates. Defaults to 1000.
ReconnectDelay milliseconds (integer) Delay between reconnect attempts while the controller is unreachable. Defaults to 5000.
UpdateRate milliseconds (integer) How often the connector polls /current. Defaults to 1000.
ReconnectDelay milliseconds (integer) Delay between reconnect attempts while the Agent is unreachable. Defaults to 5000.

Supported Tag Types:

Tag Type Address Behaviour
Any standard tag $SYSTEMVAR, e.g. $MOR_GRP.$CURRENT_ANG[1] Read-only. A Fanuc system variable or register, read via SNPX.
Any standard tag $SYSTEMVAR[start-end] Read-only. A batch/range of indexed system variables. Requires Parameters[TYPE] (STRING, INTTAG, DECIMAL, or DATA) to specify the tag type assigned to each element.
Bool Tag IOTYPE:ADDRESS, e.g. RDI:1 A single digital I/O point (see IOTYPE table below). Read via SNPX_READIO; write via RunMethod("SNPX_WRITEIO").


IOTYPE
values: RDI/RDO (robot digital I/O), SDI/SDO (system digital I/O), UI/UO (user I/O), WI/WO (weld I/O), AI/AO (analog I/O), GI/GO (group I/O), SI/SO (sensor I/O), WSI (weld sensor input).

Connector Methods

Name Arguments Description
Ftp_GetActiveErrors - Retrieves the controller's active error log via FTP.
Snpx_ClearAlarms - Clears active alarms.
Snpx_CartesianPosition / Snpx_JointPosition - Reads the current cartesian/joint position.
Snpx_UserFrameCartesianPosition / Snpx_UserFrameJointPosition - Reads the current position relative to the active user frame.
Snpx_IntegerSysVar / Snpx_RealSysVar / Snpx_PositionSysVar / Snpx_StringSysVar Var Reads a single named system variable of the given type.
Snpx_IntegerSysVarBatch / Snpx_RealSysVarBatch / Snpx_PositionSysVarBatch / Snpx_StringSysVarBatch - Reads a pre-configured batch of system variables of the given type.
Snpx_NumericRegisters / Snpx_PositionRegisters / Snpx_StringRegisters Index Reads a numeric/position/string register by index.
Snpx_ReadIo / Snpx_ReadAnalogue IOType, Address Reads a single digital or analogue I/O point on demand.
Snpx_WriteIo / Snpx_WriteAnalogue IOType, Address, Value Writes a single digital or analogue I/O point.
Telnet_RunProgram / Telnet_AbortProgram / Telnet_ClearProgram / Telnet_ClearVars / Telnet_ContinueTask / Telnet_HoldTask / Telnet_PauseTask ProgramName Runs or controls the named program/task.
Telnet_AbortAllPrograms - Aborts every running program.
Telnet_Reset - Resets the controller.
Telnet_SetPort / Telnet_SimulatePort Port, Index, Value Sets or simulates a port value.
Telnet_UnsimulatePort Port, Index Clears simulation on a port.
Telnet_UnsimulateAAllPorts - Clears simulation on every port.
Telnet_SetVariable Variable, Value Sets a controller variable via Telnet.

Addressing

The Address field of a tag is either a $-prefixed system variable/register name (optionally with a [start-end] range for a batch, which also requires Parameters[TYPE]), or an IOTYPE:ADDRESS pair for a single digital I/O point. The full SNPX/Telnet/FTP read/write surface is also available on demand via the RunMethod list above, for one-off reads or commands rather than continuous polling.