Skip to content

Fanuc Focas Ethernet

The EMQX Neuron FOCAS driver supports the use of the FOCAS2 protocol for data acquisition and writing for various types of FANUC devices (including multi-path devices). It supports coordinates, operating status, alarms, operation information, macro variables, parameters, diagnostic data, program data, tool offset, tooling, tool life, PMC, and more.

Support arch: amd64, armv7

Parameter Configuration

ParameterDescription
hostdevice ip address
portdevice port, default 8193
timeoutconnection timeout, default 3000ms

Support Data Type

  • uint8
  • int8
  • uint16
  • int16
  • uint32
  • int32
  • uint64
  • int64
  • float
  • double
  • bit
  • string

CNC Data

Address Format

address[.m][.n][.l][@p]

The address can support up to 3 parameters, with the @ symbol specifying the channel where the address is located.

Tag Identifier (Address)DescriptionData TypeParametersRemarks
actfActual feed rateint64/uint64-
absolute.mAxis absolute positionint64/uint64Axis numberIncludes tool offset, may not match the display on the CNC
absolute2.mAxis absolute position 2int64/uint64Axis numberData is consistent with the CNC interface
machine.mAxis machine positionint64/uint64Axis number
relative.mAxis relative positionint64/uint64Axis numberIncludes tool offset, may not match the display on the CNC
relative2.mAxis relative position 2int64/uint64Axis numberData is consistent with the CNC interface
distance.mAxis remaining distanceint64/uint64Axis number
actsActual spindle speedint64/uint64-
acts2.mActual spindle speed 2int64/uint64Spindle number
skipAxis skip positionint64/uint64Axis number
srvdelayAxis servo delayint64/uint64Axis number
accdecdlyAxis acceleration/deceleration delayint64/uint64Axis number
spcss_srpmSpindle speed conversionint64/uint64-
spcss_sspmSpecified surface speedint64/uint64-
spcss_smaxMaximum spindle speed for the fixtureint64/uint64-
movrlap_input.mInput overlapping motion valueint64/uint64Axis number
movrlap_output.mOutput overlapping motion valueint64/uint64Axis number
spload.mSpindle loadint32/uint32Spindle number
spmaxrpm.mMaximum spindle speed ratioint32/uint32Spindle number
spgear.mSpindle gear ratioint32/uint32Spindle number
runStateOperating stateint32/uint32-1: Fault 2: Running 3: Idle
controlModeControl modeint32/uint32-0: MID 1: AUTO 3: EDIT 5: JOB 8: INC feed 9: REFERENCE 10: ReMoTe
programMainMachining program namestring-
mainProgramNoMain program numberint16/uint16-
subProgramNoSub program numberint16/uint16-
alarmAlarm IDint32/uint32-0: WS 1: PW 2: IO 3: PS
alarmMsg.mAlarm contentstringm as numberRange is 1-16
param.m.nParameterint32/uint32m as parameter ID, n as axis numberIf not axis-related, set to 0
alarmMsg2.m.nAlarm content 2int16/uint16/stringm as number, n as value parameterm range is 1-16, n=0 for alarm type, n=1 for alarm number, n=2 for alarm content
macroTypeMacro variable typeint16/uint16-
macroInfo.mMacro variable informationint16/uint16n as value parametern=0 for number of local variables, n=1 for public variable indicator
macro.m.nMacro variableint32/uint32m as variable ID, n as value parametern=0 for macro variable value, n=1 for decimal places
paraNum.mNumber of parametersint16/uint16n as value parametern=0 for minimum number of parameters, n=1 for maximum number, n=3 for total number of parameters
pitchInfoNum.mNumber of pitch error compensation dataint16/uint16-
pitch.mPitch error compensation dataint8/uint8m as number
tool.m.nTool dataint64/uint64m as tool number, n as value variablem starts from 1, n=0 for tool number, n=1 for usage count, n=2 for tool life, n=3 for rest life
toolf2.m.nTool data 2int64/uint64m as tool number, n as value variablem starts from 1, n=0 for tool number, n=1 for usage count, n=2 for tool life, n=3 for rest life
toolOffset.m.nTool offset dataint32/uint32m as tool number, n as tool offset typem starts from 1, n is related to the specific system model, e.g., for 0i-D, n=0 for radius wear, n=1 for radius shape, n=2 for length wear, n=3 for length shape
toolOffsetRange.m.n.lTool offset data setting rangeint32/uint32m as tool number, n as tool offset type, l as value typem starts from 1, n is related to the specific system model, e.g., for 0i-D, n=0 for radius wear, n=1 for radius shape, n=2 for length wear, n=3 for length shape, l=0 for minimum value, l=1 for maximum value, l=2 for status
toolOffsetInfo.mTool offset informationint16/uint16m as tool offset typem=0 for memory type, m=1 for the number of available tool offsets, n=2 for tool offset types
wkcdsfms.mWorkpiece coordinate offset measurement valueint32/uint32Axis numberNot supported in M series
wkcdshft.mWorkpiece coordinate offset valueint32/uint32Axis numberNot supported in M series
wksftRange.m.nWorkpiece coordinate offset value rangeint32/uint32m as axis number, n as value parametern=0 for minimum value, n=1 for maximum value, n=2 for status, Not supported in M series
zofs.m.nWorkpiece zero offset valueint32/uint32m as workpiece zero offset number, n as axis number
zofsInfoNumNumber of workpiece zero offset valuesint32/uint32-
zofsRange.m.n.lWorkpiece zero offset setting rangeint32/uint32m as workpiece coordinate offset number, n as axis number, l as value typel=0 for minimum value, l=1 for maximum value, l=2 for status
blkCountBlock counterint32/uint32--
execProgCurrently truly executed program segmentstring-
mdiPntrMDI execution informationint32/uint32-Readable only when the device is in MDI mode
programMainFileMain program file informationstring-
pdfCurDirCurrent program directorystring-
pdfDrive.mProgram device informationstringm as device numberm starts from 1
progInfo.mProgram management informationint32/uint32m as value parameterm=0 for number of registered programs, m=1 for number of available programs, m=2 for used memory character count, m=3 for unused memory character count
seqNumProgram sequence numberint32/uint32-
exaxisName.m.nControl axis and spindle namestringm as axis type, n as numberm=0 for control axis, m=1 for spindle, n starts from 1
axisName.mControl axis nameint8/uint8m as numberm starts from 1
hndintrpt.m.nHandwheel interrupt valueint32/uint32m as type, n as numberm=0 for input, m=1 for output, n starts from 1
spdlName.mSpindle nameint8/uint8m as numberm starts from 1
spmeter.m.nSpindle load percentageint32/uint32m as type, n as numberm=0 for spindle load, m=1 for spindle motor load, n starts from 1
svmeter.mServo load percentageint32/uint32m as numberm starts from 1
almhisnoNumber of historical alarmsint16/uint16-
almhistry.m.nHistorical alarm contentint16/uint16/stringm as number, n as value parameterm starts from 1, n=0 for alarm type, n=1 for alarm number, n=2 for alarm content
omhisnoNumber of historical extra operation informationint16/uint16-
omhistry.m.nHistorical extra operation information contentint16/uint16/stringm as number, n as value parameterm starts from 1, n=0 for display flag, n=1 for operation information number, n=2 for operation information content
ophisnoNumber of historical operation informationint16/uint16-
ophistry.m.nHistorical operation information contentint16/uint16m as number, n as value parameterm starts from 1
timer.m.nDate and timeint16/uint16m as type, n as value parameterm=0 for date, n=0 for year, n=1 for month, n=2 for day; m=1 for time, n=0 for hour, n=1 for minute, n=2 for second
diagdata.m.n.lDiagnostic dataint32/uint32m as diagnostic number, n as axis number, l as value parameterl=0 for diagnostic value, l=1 for decimal point
opmsg.m.nCurrent operation informationint16/uint16/stringm as number, n as value parameterm starts from 1, n=0 for type, n=1 for number, n=2 for content
tlGrpinfo.m.nTool life management informationint32/uint32m as tool group number, n as value parameterm starts from 1, n=0 for tool quantity, n=1 for remaining tool quantity, n=2 for tool life, n=3 for tool usage life, n=6 for tool warning life

TIP

The number of axes starts from 1 and increases according to the actual number of axes. To use the tool life management function, the corresponding parameters on the device must be enabled. If the parameter address does not set @p, it defaults to path 1.

CNC address example

addressdescription
actfread actual feed rate
absolute.1read absolute position of no.1 axis
absolute.1@2read absolute position of no.1 axis by path2
machine.3read machine position of no.3 axis
spload.1read load information of no.1 spindle
spmaxrpm.3read maximum r.p.m ratio of no.3 spindle
param.6712.0parts total
param.6711.0parts count
param.6750.0power on time
param.6753.0cutting on time
macro.3142.0Value of macro variable #3142
tool.1.0Tool number 1
tool.1.1Usage count of tool number 1
tool.1.2Total life of tool number 1
tool.1.3Warning life of tool number 1
diagdata.1333.1.0Data of diagnostic number 1333 of axis 1
tlGrpinfo.1.1Remaining tool life of tool life group 1
toolOffset.1.2Length wear of tool number 1
wksftRange.1.0Minimum value of workpiece coordinate offset value range of axis 1 (Not supported in M series)
zofs.1.1Workpiece zero offset value of no.1 for axis 1

PMC Data

Address Format AREA ADDRESS[.BIT][.LEN][@p]

tag addressdescriptiondata typeaccess
Amessage demandallread/write
Ccounterallread/write
Ddata tableallread/write
Eextended relayallread/write
Fsignal to CNC -> PMCallread
Gsignal to PMC -> CNCallread/write
Kkeep relayallread/write
Minput signal from other deviceallread/write
Noutput signal from other deviceallread/write
Rinternal relayallread/write
Tchangeable timerallread/write
Xsignal to machine -> PMCallread
Ysignal to PMC -> machineallread/write

PMC address example

addressdata typedescrption
A0uint8/int8/uint16/int16/uint32/int32/int64/uint64/float/doublePMC message demand,address 0
A0.1bitPMC message demand ,no.1 bit of address 0
A0.0bitPMC message demand ,no.0 bit of address 0
A0.2stringPMC message demand ,address 0 starts with a string of length 2
D0.2stringPMC data table ,address 0 starts with a string of length 2
D0.7bitPMC data table ,no.7 bit of address 0
G12uint8PMC signal to PMC -> CNC ,address 12, 255-(G12),feedrate overriden
G30uint16PMC signal to PMC -> CNC ,address 30, spindle overriden