MTConnect.NET-AgentModule-FanucAdapter
7.2.0.105-prerelease
See the version list below for details.
dotnet add package MTConnect.NET-AgentModule-FanucAdapter --version 7.2.0.105-prerelease
NuGet\Install-Package MTConnect.NET-AgentModule-FanucAdapter -Version 7.2.0.105-prerelease
<PackageReference Include="MTConnect.NET-AgentModule-FanucAdapter" Version="7.2.0.105-prerelease" />
<PackageVersion Include="MTConnect.NET-AgentModule-FanucAdapter" Version="7.2.0.105-prerelease" />
<PackageReference Include="MTConnect.NET-AgentModule-FanucAdapter" />
paket add MTConnect.NET-AgentModule-FanucAdapter --version 7.2.0.105-prerelease
#r "nuget: MTConnect.NET-AgentModule-FanucAdapter, 7.2.0.105-prerelease"
#:package MTConnect.NET-AgentModule-FanucAdapter@7.2.0.105-prerelease
#addin nuget:?package=MTConnect.NET-AgentModule-FanucAdapter&version=7.2.0.105-prerelease&prerelease
#tool nuget:?package=MTConnect.NET-AgentModule-FanucAdapter&version=7.2.0.105-prerelease&prerelease

MTConnect Fanuc Adapter Agent Module
This Agent Module reads data directly from a Fanuc CNC using FOCAS over Ethernet, so no separate adapter is required. The paths, axes and spindles are read from the CNC when it connects and the Device is built to match.
Supported controls: Series 0i, 16i, 18i, 21i, 30i, 31i, 32i and 35i (Embedded Ethernet or Fast Ethernet with FOCAS enabled).
FOCAS Libraries
The Fanuc FOCAS libraries are not included and must be obtained from Fanuc (FOCAS2 library). Copy the libraries next to the Agent executable:
- 64-bit Agent:
Fwlib64.dlland the 64-bit series libraries (ex.fwlib30i64.dll,fwlib0iD64.dll,fwlibe64.dll) - 32-bit Agent:
Fwlib32.dlland the 32-bit series libraries (ex.fwlib30i.dll,fwlib0iD.dll,fwlibe1.dll)
If the libraries are missing, an error is logged and the Device stays UNAVAILABLE.
CNC Setup
Enable FOCAS on the CNC's Ethernet port (Embedded Ethernet / FOCAS2 setting screen) and note the TCP port (typically 8193).
Configuration
modules:
- fanuc-adapter:
deviceKey: M1
server: 192.168.1.70
port: 8193
deviceKey- The UUID or Name of the Device that observations are added to.createDevice- Whentrue(default), the module adds a Device nameddeviceKeyand updates it with the model, paths, axes and spindles read from the CNC. Set tofalseto use a Device defined in a Devices file instead.deviceUuid- The UUID of the Device created whencreateDeviceistrue. Defaults todeviceKey.server- The IP address or hostname of the CNC.port- The FOCAS port of the CNC. Default is8193.responseTimeout- The FOCAS communication timeout (in milliseconds, rounded up to whole seconds). Default is5000.readInterval- The interval (in milliseconds) between reads of the CNC. Default is1000.slowReadInterval- The interval (in milliseconds) between reads of the timers and the work offset. Default is10000.workPositions- Whentrue, absolute (work coordinate) positions are read in addition to machine positions. Default isfalse.axisLoads- Whentrue(default), the servo load of each axis is read.spindleLoad- Whentrue(default), the spindle load is read.overrides- Whentrue(default), the feedrate, rapid and spindle overrides are read from the CNC interface signals (G0012, G0014, G0030, G0096).toolNumberVariable- The custom macro variable read for the tool number. Default is4120(the modal T code). Many machines store the tool in the spindle in another variable; set it here, or0to disable.workOffset- Whentrue(default), the active work offset is read from macro variable #4014.partCountParameter- The parameter read for the part count. Default is6711(parts machined). Set to0to disable.
DataItems
If you use your own Device (createDevice: false), it needs DataItems whose id or name match the keys below. Path keys are used as-is for path 1 and prefixed with p{n}_ for other paths (ex. p2_execution). Axis keys use the axis name read from the CNC, including its suffix (ex. x_act, x1_act).
Read every cycle (readInterval)
| Key | DataItem | Source |
|---|---|---|
avail |
AVAILABILITY | AVAILABLE while connected, otherwise UNAVAILABLE |
estop |
EMERGENCY_STOP | cnc_statinfo |
mode |
CONTROLLER_MODE | cnc_statinfo (MEM / RMT = AUTOMATIC, MDI = MANUAL_DATA_INPUT, EDIT = EDIT, JOG / HANDLE / INC / REF = MANUAL) |
execution |
EXECUTION | cnc_statinfo (reset = READY, START = ACTIVE, HOLD = FEED_HOLD, STOP = STOPPED, MSTR = INTERRUPTED; STOPPED in emergency stop) |
program |
PROGRAM | cnc_exeprgname (or cnc_rdprgnum on older controls) |
line |
LINE_LABEL | cnc_rdseqnum (sequence number N) |
partCount |
PART_COUNT | cnc_rdparam 6711 |
tool |
TOOL_NUMBER | cnc_rdmacro 4120 |
feedrate |
PATH_FEEDRATE (ACTUAL) | cnc_rdspeed (mm/s; feed per revolution is converted using the spindle speed) |
feedOverride |
PATH_FEEDRATE_OVERRIDE (PROGRAMMED) | G0012 (%) |
rapidOverride |
PATH_FEEDRATE_OVERRIDE (RAPID) | G0014 / G0096 (%) |
system |
SYSTEM (Condition) | cnc_rdalmmsg2: one FAULT per active alarm (native code ex. PS0010), WARNING for battery / fan / other warnings |
speed |
ROTARY_VELOCITY (ACTUAL) | cnc_rdspeed (or cnc_acts) (RPM) |
spindleLoad |
LOAD | cnc_rdspmeter (%) |
spindleOverride |
ROTARY_VELOCITY_OVERRIDE | G0030 (%) |
{axis}_act |
POSITION / ANGLE (ACTUAL) | cnc_rdposition machine position (mm or degrees) |
{axis}_work |
POSITION / ANGLE (ACTUAL) | cnc_rdposition absolute position (workPositions: true), referencing the Device's work coordinate system |
{axis}_load |
LOAD | cnc_rdsvmeter (%) |
Read every slowReadInterval
| Key | DataItem | Source |
|---|---|---|
firmware |
FIRMWARE (VERSION) | cnc_sysinfo (series and version) |
powerOnTime |
EQUIPMENT_TIMER (POWERED) | cnc_rdtimer 0 (seconds) |
operatingTime |
EQUIPMENT_TIMER (OPERATING) | cnc_rdtimer 1 (seconds) |
cuttingTime |
EQUIPMENT_TIMER (WORKING) | cnc_rdtimer 2 (seconds) |
cycleTime |
PROCESS_TIMER (PROCESS) | cnc_rdtimer 3 (seconds) |
workOffset |
WORK_OFFSET | cnc_rdmacro 4014 (ex. 54) |
The CNC model (ex. 30i-M) from cnc_sysinfo is used for the Device Description.
Notes
- FOCAS functions the CNC does not support (or that need an option that is not installed) are logged once and not read again until the CNC reconnects.
- The tool number, work offset and overrides depend on the custom macro option and the standard CNC interface signals. Check the values against the CNC screens when setting up a new machine.
License
This application and its source code is licensed under the MIT License and is free to use. The Fanuc FOCAS libraries are licensed separately by Fanuc.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 is compatible. net462 is compatible. net463 was computed. net47 is compatible. net471 is compatible. net472 is compatible. net48 is compatible. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.1
- MTConnect.NET-Common (>= 7.2.0.105-prerelease)
-
.NETFramework 4.6.2
- MTConnect.NET-Common (>= 7.2.0.105-prerelease)
-
.NETFramework 4.7
- MTConnect.NET-Common (>= 7.2.0.105-prerelease)
-
.NETFramework 4.7.1
- MTConnect.NET-Common (>= 7.2.0.105-prerelease)
-
.NETFramework 4.7.2
- MTConnect.NET-Common (>= 7.2.0.105-prerelease)
-
.NETFramework 4.8
- MTConnect.NET-Common (>= 7.2.0.105-prerelease)
-
.NETStandard 2.0
- MTConnect.NET-Common (>= 7.2.0.105-prerelease)
-
net10.0
- MTConnect.NET-Common (>= 7.2.0.105-prerelease)
-
net6.0
- MTConnect.NET-Common (>= 7.2.0.105-prerelease)
-
net7.0
- MTConnect.NET-Common (>= 7.2.0.105-prerelease)
-
net8.0
- MTConnect.NET-Common (>= 7.2.0.105-prerelease)
-
net9.0
- MTConnect.NET-Common (>= 7.2.0.105-prerelease)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on MTConnect.NET-AgentModule-FanucAdapter:
| Package | Downloads |
|---|---|
|
MTConnect.NET-Applications-Agents
MTConnect.NET-Applications-Agents contains classes to fully implement an MTConnect Agent application. Supports MTConnect versions up to 2.7. Supports .NET Framework 4.6.1 up to .NET 10 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 7.2.0.105 | 126 | 11/21/2026 |
| 7.2.0.105-prerelease | 122 | 11/21/2026 |
| 7.2.0.103-prerelease | 131 | 11/20/2026 |