On this page
FANUC CNC 0i
This plugin connects to a FANUC CNC 0i, polls PMC byte areas, and provides dedicated operations for machine status, macros, tool offsets, alarms, programs, and directories. Authorized users can also write values and execute controls. It is named FANUC CNC 0i in the device selector.
See Collection Configuration for common channel, device, variable, and import operations. This page covers only CNC 0i settings, PMC addresses, special methods, and dedicated debug functions.
Compatible devices and models
| Device series / model examples | Connection requirements |
|---|---|
| FANUC CNC 0i series | The CNC must expose the Ethernet interface used by this plugin. PMC, macro-variable and program-transfer availability depends on the controller version and installed options. |
CNC network and PMC comparison
- Confirm the CNC Ethernet interface IP, mask and data-service TCP port, commonly
8193for this plugin. FTP settings for file transfer do not replace this data interface. For a multi-path machine, record the required path number. - Create a TCP client channel to that endpoint. Operation path starts at
1; compare alarms, coordinates and programs on the same path. - Find a known byte such as
R100in CNC PMC diagnostics. Create a gatewayBytevariable atR100, array length1, and compare values at the same time.100is a decimal byte offset, not a WORD index. - A Byte array of length
16atR100coversR100–R115. An Int32 consumes four bytes per element; plan subsequent addresses accordingly.
Packing, text and dedicated data
Maximum PMC packing bytes limits a combined read without changing address units. For range errors, shorten the read and avoid inaccessible addresses before adjusting the limit. Macro number 100 is an argument to ReadMacroAsync, not PMC address R100.
Text encoding applies to programs and alarm text. Match it to the CNC character set; changing it does not repair numeric PMC data. Maximum program bytes limits the complete program, whereas blockSize controls transfer chunks. Obtain device directories and names from a directory query before reading programs.
Open the plugin
Open Development Configuration → Collection Configuration, create a TCP client channel and device, and select FANUC CNC 0i. The common CNC 0i TCP port is 8193.
Supported scope
| Item | Description |
|---|---|
| Channel | TCP client. Confirm that the Gateway can reach the CNC IP and port. |
| Data types | Byte, Int16, UInt16, Int32, UInt32, Int64, UInt64, Float, Double, and String. |
Plugin properties
| Setting | Default | Range | Description |
|---|---|---|---|
| Operation path | 1 | 1 to 32767 | Target path on a multi-path machine, starting at 1. |
| Text encoding | GB2312 | Valid encoding name | Encoding used for programs, alarms, and text. Check the CNC character set when text is corrupted. |
| Maximum PMC batch bytes | 1024 | 1 to 65535 | Maximum consecutive bytes in one cyclic PMC read. |
| Maximum program bytes | 16777216 | 1 to 268435456 | Maximum bytes allowed for a program read or write. |
Address rules
- Cyclic variables support PMC byte areas
G,F,Y,X,A,R,T,K,C,D, andE. - Address numbers are decimal, for example
R0andD100. - Consecutive length is measured in bytes. Adjacent variables must not overlap the bytes occupied by their data types.
- Use the special methods or dedicated debug panel for system status, alarms, macros, offsets, programs, directories, and controls.
Special methods
Status and operating data
| Method | Purpose | Parameters |
|---|---|---|
ReadSystemInfoAsync | Read system information | - |
ReadSpeedAsync | Read feed and spindle speed | - |
ReadFeedOverrideAsync | Read feed override | - |
ReadSpindleOverrideAsync | Read spindle override | - |
ReadCurrentProgramInfoAsync | Read current program information | - |
ReadProgramNumberAsync | Read current program number | - |
ReadLanguageAsync | Read CNC language | - |
ReadAxisLoadsAsync | Read axis loads | - |
ReadSpindleLoadAsync | Read spindle load | - |
ReadCoordinatesAsync | Read coordinates | - |
ReadAlarmsAsync | Read alarm list | - |
ReadTimeSecondsAsync | Read accumulated time | timeType: time type |
ReadAlarmStatusAsync | Read alarm state | - |
ReadStatusAsync | Read operating state | - |
ReadAxisNamesAsync | Read axis names | - |
ReadSpindleNamesAsync | Read spindle names | - |
ReadDiagnosticsAsync | Read diagnostic data | number: start; length: count; axis: axis number |
ReadWorkpieceSizesAsync | Read workpiece sizes | - |
ReadDateTimeAsync | Read CNC date and time | - |
ReadCurrentProductionCountAsync | Read current production count | - |
ReadExpectedProductionCountAsync | Read target production count | - |
ReadOperatorMessagesAsync | Read operator messages | - |
Macros and tool offsets
| Method | Purpose | Parameters |
|---|---|---|
ReadMacroAsync | Read one macro | number: macro number |
ReadMacrosAsync | Read consecutive macros | number: start; length: count |
WriteMacrosAsync | Write consecutive macros | number: start; values: value array |
ReadToolOffsetsAsync | Read tool offsets | toolCount: tool count |
ReadCurrentToolNumberAsync | Read current tool number | - |
WriteToolLengthShapeAsync | Write tool-length geometry offset | tool: tool number; offset: value |
WriteToolLengthWearAsync | Write tool-length wear offset | tool; offset |
WriteToolRadiusShapeAsync | Write tool-radius geometry offset | tool; offset |
WriteToolRadiusWearAsync | Write tool-radius wear offset | tool; offset |
ReadToolGroupAsync | Read a tool group | groupId: group number |
ReadCurrentToolGroupAsync | Read current tool group | - |
ClearToolGroupsAsync | Clear tool groups | start: first group; end: last group |
PMC and raw memory
| Method | Purpose | Parameters |
|---|---|---|
ReadPmcAsync | Read PMC bytes | address: PMC address; length: bytes |
WritePmcAsync | Write PMC bytes | address; data: byte array |
ReadRawDataAsync | Read raw memory | code: function code; start; end |
WriteRawDataAsync | Write raw memory | code; start; data: byte array |
Programs and directories
| Method | Purpose | Parameters |
|---|---|---|
ReadProgramListAsync | Read program list | - |
ReadCurrentProgramFragmentAsync | Read current program fragment | - |
ReadForegroundDirectoryAsync | Read foreground directory | - |
ReadDirectoryCountAsync | Read directory count | path: device directory |
ReadDirectoryAsync | Read a directory | path: device directory |
ReadProgramByNumberAsync | Read program by number | programNumber; devicePath |
ReadProgramByNameAsync | Read program by name | programName; devicePath |
WriteProgramFileAsync | Write a program from a Gateway file | filePath; blockSize; devicePath |
WriteProgramAsync | Write program text | program; blockSize; devicePath |
SetCurrentProgramAsync | Select current program by number | programNumber |
SetCurrentProgramFileAsync | Select current program by file name | programName |
StartProcessingAsync | Start machining | - |
DeleteProgramAsync | Delete a program | programNumber |
DeleteFileAsync | Delete a file | fileName |
Macro, offset, PMC, raw-memory, and program writes, tool-group clearing, program selection/start, and deletion change the CNC. Use an allowed operating mode, back up affected data, and prepare a stop or rollback action first.
Device debug
Open Development Configuration → Collection Configuration, select the FANUC CNC 0i device, open Protocol Debug at the top of the workspace.
| Feature | Purpose |
|---|---|
| Machine Status | Reads system, operating, speed, coordinate, load, and alarm state. |
| Macros | Reads or writes consecutive macros by start number and count. |
| Tools and Offsets | Reads offsets and tool groups and writes offsets or clears groups. |
| PMC / Raw | Reads or writes PMC and raw memory. |
| Programs and Directories | Lists and reads programs/directories and writes, selects, starts, or deletes programs. |
Machine status
Macros

Tools and offsets

PMC and raw memory

Programs and directories

Begin with read-only machine-status, macro, PMC, or directory queries. Every red write, clear, start, or delete command requires site safety confirmation.
Verify the configuration
- Confirm that the runtime instance is available and can read system and machine status.
- Create one test PMC variable and compare its current value with the CNC screen or maintenance tool.
- Read one macro and the program directory in the dedicated panel.
- Test a write only during an approved maintenance window, using a dedicated test number, then read it back immediately.
Troubleshooting
| Symptom | Check |
|---|---|
| Data session cannot start | CNC IP, port 8193, network, operation path, and CNC Ethernet function. |
| PMC variable has no value | Byte area, decimal address, data type, batch size, and variable interval. |
| Text is corrupted | Text encoding, CNC language, and program-file encoding. |
| Program read is truncated | Maximum program bytes, device directory, program permission, and network stability. |
| Special method fails | Method parameters, current path, CNC mode, and operation permission. |
| Write or control is rejected | CNC operating mode, write protection, site interlocks, user permission, and parameter range. |
Related links
- Collection Configuration: Common channel, device, variable, import, and debug operations.
- Plugin Manual Index: Other collection and data-forwarding plugins.