Skip to main content
Version: 2.6

FANUC Device Commands

FANUC Control Driver offers several commands for tool and file management.

NOTE

The Id must be generated each time a device configuration is created!

Overview

NOTE

NOTE: Nc{n} stands for the n-th Nc channel to be addressed.

File Handling

CommandDescriptionCapability
Nc{n}.deleteAllProgramsDeletes all Nc programs.ProgramManagement
Nc{n}.deleteProgramDeletes a specific Nc program.ProgramManagement
Nc{n}.readFileReads a file from FANUC controlProgramManagement
Nc{n}.writeFileWrites a file to FANUC controlProgramManagement
Nc{n}.writeMDIWrites data to the Manual Data Input Buffer (MDI)ProgramManagement
Nc{n}.readDirContentReads directory content from ncProgramManagement
Nc{n}.createDirectoryCreates a new NC directory (only for 0i-D/F and 3xi )ProgramManagement
Nc{n}.deleteDirectoryDeletes a NC directory (only for 0i-D/F and 3xi )ProgramManagement
Nc{n}.getCurrentDirectoryGets the current NC directory (only for 0i-D/F and 3xi )ProgramManagement
Nc{n}.changeCurrentDirectorySets the current NC directory (only for 0i-D/F and 3xi )ProgramManagement

FANUC also supports stream based transmissions. This allows to transmit binary as well as very large files (> 10MB).

NOTE

Some services like OPC-UA Server have transmission limits. Use stream based transmissions and limit the transmission size when reading or writing parts of the file.

Command AddressDescriptionCapability
Nc{n}.openDncStreamOpens a dnc stream for reading or writing.ProgramManagement (and DirectDNC for direct DNC)
Nc{n}.closeDncStreamCloses a dnc streamProgramManagement (and DirectDNC for direct DNC)
Nc{n}.readDncStreamReads from the dnc streamProgramManagement (and DirectDNC for direct DNC)
Nc{n}.writeDncStreamWrite to the dnc streamProgramManagement (and DirectDNC for direct DNC)
Nc{n}.getDncStreamStatusGets the status of the dnc streamProgramManagement (and DirectDNC for direct DNC)

Nc Program Handling

CommandDescriptionCapability
Nc{n}.selectProgramSelects an Nc program for execution.ProgramManagement
Nc{n}.selectSequenceNrSelects a block by given sequence number.ProgramManagement
Nc{n}.selectBlockNrSelects a block by given its number.ProgramManagement

Tool Management

CommandDescriptionCapability
Nc{n}.deleteToolRecordRemoves a tool from the tool management tableToolLifeManagement
Nc{n}.readToolRecordReads a tool from the tool management tableToolLifeManagement
Nc{n}.writeToolRecordWrites a tool to the tool management tableToolLifeManagement
Nc{n}.clearToolLifeDataClears the life counter of a specific tool group.ToolLifeManagement
Nc{n}.writeToolLifeGroupInfoWrites tool life group information.ToolLifeManagement

Other Commands

CommandDescriptionCapability
Global.ReadValueReads any value from the FANUC
Global.WriteValueWrites any value to the FANUC
Nc{n}.resetExecutes the external reset
Nc{n}.clearAlarmClears the PS100/101 alarms
Nc{n}.synchTimesynchronize the time and date with the FANUC control.

File Handling

Older FANUC controls support only program numbers instead of names. The commands return o{number}, eg. o0001.

IMPORTANT

Use always "o" + number as program name. For 0i-D/F; 3xi series the parameter "Name" could be any alphanumeric name.

For 0i-D/F and for 3xi controls, the default directory is normally //CNC_MEM/USER/PATH{n} where {n} is the channel number of the NC path.

ReadDirectory

Reads a directory content from the NC control. The content is returned in a JSON format.

NOTE

Requires the ProgramManagement capability.

Address: Nc{n}.readDirContent

ArgumentDirectionDescriptionData Type
NameInputdirectory name. If empty, the current directory is returned.System.String
ContentOutputJSON formatted directory contentSystem.String

Example from a device info file:

{
"Id": "<generate your own id>",
"Name": "ReadDirectory",
"Type": "CommandNode",
"Address": "Nc1.readDirContent",
"Arguments": [
{
"Name": "Name",
"Type": "Input",
"DataType": "System.String",
"Description": "Directory Name"
},
{
"Name": "Content",
"Type": "Output",
"DataType": "System.String",
"Description": "Directory Content"
}
]
}

The content is returned as JOSN formatted text.

  • 16i, 18i, 21i: Program number, comment, size and modification date are returned.
  • 0i-D, 0i-F, 3xi: file/subdirectory name, comment, size and modification date are returned.
  • all others: Only program number, comment and size are returned

Example of a 30i-A (reading directory: //CNC_MEM/USER/PATH1)

[
{
"Name": "SAMPLE",
"Comment": "ROUGH",
"Size": 26000,
"ModificationAt": "2014-11-17T14:28:18"
},
{
"Name": "O10",
"Comment": "TEST",
"Size": 500,
"ModificationAt": "2022-12-18T00:28:54"
}
]

MakeDirectory

Creates a sub directory within the selected Nc directory.

NOTE

Requires the ProgramManagement capability.

Address: Nc{n}.createDirectory

ArgumentDirectionDescriptionData Type
NameInputDirectory nameSystem.String

Example:

{
"Id": "<generate your own id>",
"Name": "MakeDirectory",
"Type": "CommandNode",
"Address": "Nc1.createDirectory",
"Arguments": [
{
"Name": "Name",
"Type": "Input",
"DataType": "System.String"
}
]
}

DeleteDirectory

Deletes a sub directory within the selected Nc directory.

NOTE

Requires the ProgramManagement capability.

Address: Nc{n}.deleteDirectory

ArgumentDirectionDescriptionData Type
NameInputDirectory nameSystem.String

Example:

{
"Id": "<generate your own id>",
"Name": "DeleteDirectory",
"Type": "CommandNode",
"Address": "Nc1.deleteDirectory",
"Arguments": [
{
"Name": "Name",
"Type": "Input",
"DataType": "System.String"
}
]
}

GetCurrentDirectory

Gets the current directory of the Nc.

NOTE

Requires the ProgramManagement capability.

Address: Nc{n}.getCurrentDirectory

ArgumentDirectionDescriptionData Type
NameOutputDirectory nameSystem.String
NOTE

Available only for 0i-D/F and 3xi series.

Example:

{
"Id": "<generate your own id>",
"Name": "GetCurrentDirectory",
"Type": "CommandNode",
"Address": "Nc1.getCurrentDirectory",
"Arguments": [
{
"Name": "Name",
"Type": "Output",
"DataType": "System.String"
}
]
}

SetCurrentDirectory

Sets the current directory of the Nc.

NOTE

Requires the ProgramManagement capability.

Address: Nc{n}.changeCurrentDirectory

ArgumentDirectionDescriptionData Type
NameInputDirectory nameSystem.String
NOTE

Available only for 0i-D/F and 3xi series.

Example:

{
"Id": "<generate your own id>",
"Name": "SetCurrentDirectory",
"Type": "CommandNode",
"Address": "Nc1.changeCurrentDirectory",
"Arguments": [
{
"Name": "Name",
"Type": "Input",
"DataType": "System.String"
}
]
}

ReadFile

Reads a text or ASCII based file from the NC control.

Note

Requires the ProgramManagement capability.

Address: Nc{n}.readFile

ArgumentDirectionDescriptionData Type
NameInputProgram or filenameSystem.String
TypeInputFile type (default = 0)System.Int32
ContentOutputText contentSystem.String

Following file types are supported:

  • 0: NC program (ISO)
  • 1: Tool offset data
  • 2: Parameter
  • 3: Pitch error compensation data
  • 4: Custom macro variables
  • 5: Work zero offset data
  • 18: Rotary table dynamic fixture offset

Example:

{
"Id": "<generate your own id>",
"Name": "ReadFile",
"Type": "CommandNode",
"Address": "Nc1.readFile",
"Arguments": [
{
"Name": "Name",
"Type": "Input",
"DataType": "System.String",
"Description": "File name"
},
{
"Name": "Type",
"Type": "Input",
"DataType": "System.Int32",
"Description": "File type"
},
{
"Name": "Content",
"Type": "Output",
"DataType": "System.String",
"Description": "File Content"
}
]
}

WriteFile

Writes a text or ASCII based file to the NC control.

Note

Requires the ProgramManagement capability.

Address: Nc{n}.writeFile

ArgumentDirectionDescriptionData Type
NameInputProgram or filenameSystem.String
TypeInputFile type (default = 0)System.Int32
ContentInputText contentSystem.String

Following file types are supported:

  • 0: NC program (ISO)
  • 1: Tool offset data
  • 2: Parameter
  • 3: Pitch error compensation data
  • 4: Custom macro variables
  • 5: Work zero offset data
  • 18: Rotary table dynamic fixture offset

Example:

{
"Id": "<generate your own id>",
"Name": "WriteFile",
"Type": "CommandNode",
"Address": "Nc1.writeFile",
"Arguments": [
{
"Name": "Name",
"Type": "Input",
"DataType": "System.String",
"Description": "File name"
},
{
"Name": "Type",
"Type": "Input",
"DataType": "System.Int32",
"Description": "File type"
},
{
"Name": "Content",
"Type": "Input",
"DataType": "System.String",
"Description": "File Content"
}
]
}

DeleteFile

Deletes a specific nc file within the selected Nc directory.

Note

Requires the ProgramManagement capability.

Address: Nc{n}.deleteProgram

ArgumentDirectionDescriptionData Type
NameInputProgram or filenameSystem.String

Example:

{
"Id": "<generate your own id>",
"Name": "DeleteFile",
"Type": "CommandNode",
"Address": "Nc1.deleteProgram",
"Arguments": [
{
"Name": "Name",
"Type": "Input",
"DataType": "System.String",
"Description": "Program Name"
}
]
}

Delete All Files

Deletes all program within the selected Nc directory.

Note

Requires the ProgramManagement capability.

Address: Nc{n}.deleteAllPrograms

Example:

{
"Id": "<generate your own id>",
"Name": "DeleteAllFiles",
"Type": "CommandNode",
"Address": "Nc1.deleteAllPrograms",
"Arguments": []
}

Dnc Stream Handling

The dnc stream handling can be used for following applications:

  • active transmission of NC programs (small and large files)
  • passive transmission of NC programs dynamically requested by the controller.
NOTE

The stream handling requires ProgramManagement for regular NC file transmission, and DirectDNC capabilities for direct DNC transmissions.

OpenFileStream

Opens the dnc stream for reading or writing depending on the AccessMode.

Address: Nc{n}.openDncStream

ArgumentDirectionDescriptionData Type
NameInputProgram or filenameSystem.String
TypeInputFile type.System.Int32
AsyncTokenInput [OPT]Token for async callbackSystem.Int32
AccessModeInputAccess mode (Read or Write)System.Int32
HandleOutputFile handleSystem.Int32

See DNC Model - OpenFileStream for details on arguments and return values.

NOTE

Other than the standard DNC, the argument FileType is required. See FileTypes to check the allowed file types for reading. See FileTypes to check the allowed file types for writing.

Example:

{
"Id": "<generate your own id>",
"Name": "OpenFileStream",
"Type": "CommandNode",
"Address": "Nc1.openDncStream",
"Arguments": [
{
"Name": "Name",
"Type": "Input",
"DataType": "System.String"
},
{
"Name": "AccessMode",
"Type": "Input",
"DataType": "System.Int32"
},
{
"Name": "Type",
"Type": "Input",
"DataType": "System.Int32"
},
{
"Name": "Handle",
"Type": "Output",
"DataType": "System.Int32"
}
]
}

CloseFileStream

Closes the dnc stream for reading or writing.

Address: Nc{n}.closeDncStream

ArgumentDirectionDescriptionData Type
AsyncTokenInput [OPT]Token for async callbackSystem.Int32
HandleInputFile handleSystem.Int32

See DNC Model - CloseFileStream for details on arguments and return values.

Example:

{
"Id": "5608D2DA-7CAF-416A-B31F-42DF706B9FD0",
"Name": "CloseFileStream",
"Address": "Nc1.closeDncStream",
"ScriptFile": "",
"Type": "CommandNode",
"Arguments": [
{
"Name": "Handle",
"DataType": "System.Int32",
"Description": ""
}
]
}

ReadFileStream

Reads from a dnc stream

Address: Nc{n}.readDncStream

ArgumentDirectionDescriptionData Type
HandleInputFile handleSystem.Int32
MaxBytesInputMaximum number of bytesSystem.Int32
ContentOutputContentSystem.Byte[]
LastContentOutputFlag is the last content has been sent.System.Boolean

See DNC Model - ReadFileStream for details on arguments and return values.

Example:

{
"Id": "C71D6C63-6EEF-4020-98CC-6F3085AF4478",
"Name": "ReadFileStream",
"Address": "Nc1.readDncStream",
"ScriptFile": "",
"Type": "CommandNode",
"Arguments": [
{
"Name": "Handle",
"DataType": "System.Int32",
"Description": ""
},
{
"Name": "MaxBytes",
"DataType": "System.Int32",
"Description": ""
},
{
"Name": "Content",
"DataType": "System.Byte[]",
"Type": "Output",
"Description": ""
},
{
"Name": "LastContent",
"DataType": "System.Boolean",
"Type": "Output",
"Description": ""
}
]
}

WriteFileStream

Writes to a dnc stream

Address: Nc{n}.writeDncStream

ArgumentDirectionDescriptionData Type
HandleInputFile handleSystem.Int32
ContentInputContentSystem.Byte[]

See DNC Model - WriteFileStream for details on arguments and return values.

Example:

{
"Id": "5AAB615E-8663-4B9F-95E2-221317F65E3F",
"Name": "WriteFileStream",
"Address": "Nc1.writeDncStream",
"ScriptFile": "",
"Type": "CommandNode",
"Arguments": [
{
"Name": "Handle",
"DataType": "System.Int32",
"Description": ""
},
{
"Name": "Content",
"DataType": "System.Byte[]",
"Description": ""
}
]
}

GetFileStreamStatus

Gets the status of the dnc stream

Address: Nc{n}.getDncStreamStatus

ArgumentDirectionDescriptionData Type
HandleInputStream handleSystem.Int32
ContentOutputContent (JSON formatted)System.String

See DNC Model - GetFileStreamStatus for details on arguments and return values.

Example:

{
"Id": "5AAB615E-8663-4B9F-95E2-221317F65E3F",
"Name": "GetFileStreamStatus",
"Address": "Nc1.getDncStreamStatus",
"ScriptFile": "",
"Type": "CommandNode",
"Arguments": [
{
"Name": "Handle",
"DataType": "System.Int32",
"Description": ""
},
{
"Name": "Content",
"DataType": "System.String",
"Type": "Output",
"Description": ""
}
]
}

NC Program Handling

Select Main Program

Selects the main program within the selected Nc directory. This command requires the program management capability.

Note

Requires the ProgramManagement capability.

Address: Nc{n}.selectProgram

ArgumentDirectionDescriptionData Type
NameInputProgram or filenameSystem.String

Example:

{
"Id": "<generate your own id>",
"Name": "SelectProgram",
"Type": "CommandNode",
"Address": "Nc1.selectProgram",
"Arguments": [
{
"Name": "Name",
"Type": "Input",
"DataType": "System.String",
"Description": "Program Name"
}
]
}

Important note: This function is released ONLY for 0i-D/F; 30i-A/B and newer series. The parameter “Name” could be any alphanumeric name.

Select Sequence Number

Selects a block by given sequence number.

Address: Nc{n}.selectSequenceNr

ArgumentDirectionDescriptionData Type
NumberInputsequence number (without N)System.Int32

Example:

{
"Id": "<generate your own id>",
"Name": "SelectSequenceNr",
"Type": "CommandNode",
"Address": "Nc1.selectSequenceNr",
"Arguments": [
{
"Name": "Number",
"Type": "Input",
"DataType": "System.Int32",
"Description": "Sequence number"
}
]
}

Select Block Number

Selects a block by given its number.

Address: Nc{n}.selectBlockNr

ArgumentDirectionDescriptionData Type
NumberInputBlock numberSystem.Int32

Example:

{
"Id": "<generate your own id>",
"Name": "SelectBlockNr",
"Type": "CommandNode",
"Address": "Nc1.selectBlockNr",
"Arguments": [
{
"Name": "Number",
"Type": "Input",
"DataType": "System.Int32",
"Description": "Block number"
}
]
}

Write MDI Program

Writes data to the MDI buffer of the CNC.

NOTE

Requires the ProgramManagement capability.

Address: Nc{n}.writeMDI

ArgumentDirectionDescriptionData Type
ContentInputContent of MDI programSystem.String

Example:

{
"Id": "8FEDA09C-C947-4A56-9703-59A6662B0E9F",
"Name": "WriteMDI",
"Type": "CommandNode",
"Address": "Nc1.writeMDI",
"Arguments": [
{
"Name": "Content",
"Type": "Input",
"DataType": "System.String",
"Description": "Content"
}
]
}

Tool Handling

Following tool table fields are accessible:

NameFieldNameDataTypeReadWrite
tool number(T)T_codeSystem.Int32XX
tool life counterlife_countSystem.Int32XX
maximum of tool lifemax_lifeSystem.Int32XX
rest of tool liferest_lifeSystem.Int32XX
state of tool lifelife_statSystem.ByteXX
customizing bitcust_bitsSystem.ByteXX
tool info.tool_infoSystem.UInt16XX
tool length compensation number (H)H_codeSystem.Int16XX
cutter compensation number (D)D_codeSystem.Int16XX
spindle speed (S)spindle_speedSystem.Int32XX
feed rate(F)feedrateSystem.Int32XX
magazine numbermagazineSystem.Int16X-
pot numberpotSystem.Int16X-
tool geometric compensation number(G)G_codeSystem.Int16XX
tool wear compensation number(W)W_codeSystem.Int16XX
tool geometric numbergnoSystem.Int16XX
edge group number(only 0i-F, 30i/31i/32i)grpSystem.Int16XX
edge number(only 0i-F, 30i/31i/32i)edgeSystem.Int16XX
origin magazine number(only 0i-F, 30i/31i/32i)org_magazineSystem.Int16XX
origin pot number(only 0i-F, 30i/31i/32i)org_potSystem.Int16XX
customizing data 1..40custom1 to custom40System.Int32XX
Note

Above customizing data(5-20) are available at only "the additional customized data on tool management function option(5-20)".

Note

Above customizing data(5-40) are available at only "the additional customized data on tool management function option(5-40)".

Read a Tool Record

Reads a tool record from tool management table.

Address: Nc{n}.readToolRecord

The command requires following arguments:

ArgumentDirectionDescriptionData Type
ToolIdInputId of the tool (T)System.Int32
ContentOutputTool record, formatted in JSONSystem.String

Example:

{
"Id": "adb73d17-1ca3-4fe9-adc8-9de21aacec4c",
"Name": "ReadToolRecord",
"Type": "CommandNode",
"Address": "Nc1.readToolRecord",
"Arguments": [
{
"Name": "ToolId",
"DataType": "System.Int32",
"Type": "Input"
},
{
"Name": "Content",
"DataType": "System.String",
"Type": "Output"
}
]
}

Returned content (formatted in JSON):

[
{
"Name": "T_code",
"DataType": "System.Int32",
"Value": 1
},
{
"Name": "life_count",
"DataType": "System.Int32",
"Value": 30
},
{
"Name": "magazine",
"DataType": "System.Int32",
"Value": 1
},
{
"Name": "pot",
"DataType": "System.Int32",
"Value": 0
}
...
]

Create Tool Record

Creates or registers a tool record in the tool management table. Call this command first before you can read/write or delete a tool record.

ArgumentDirectionDescriptionData Type
ToolIdInputId of the tool (T)System.Int32
ContentInputTool record, formatted in JSONSystem.String

Address: Nc{n}.createToolRecord

Example:

{
"Id": "adb73d17-1ca3-4fe9-adc8-9de21aacec4c",
"Name": "CreateToolRecord",
"Type": "CommandNode",
"Address": "Nc1.createToolRecord",
"Arguments": [
{
"Name": "ToolId",
"DataType": "System.Int32",
"Type": "Input"
},
{
"Name": "Content",
"DataType": "System.String",
"Type": "Input"
}
]
}

Writing Tool Record

Writes a tool record to tool management table.

The record must not be complete. Only the values provided are overwritten in the tool table.

ArgumentDirectionDescriptionData Type
ToolIdInputId of the tool (T)System.Int32
ContentInputTool record, formatted in JSONSystem.String

Address: Nc{n}.writeToolRecord

Example:

{
"Id": "adb73d17-1ca3-4fe9-adc8-9de21aacec4c",
"Name": "WriteToolRecord",
"Type": "CommandNode",
"Address": "Nc1.writeToolRecord",
"Arguments": [
{
"Name": "ToolId",
"DataType": "System.Int32",
"Type": "Input"
},
{
"Name": "Content",
"DataType": "System.String",
"Type": "Input"
}
]
}

Deleting Tool Records

Deletes a tool entry from tool management table.

Address: Nc{n}.deleteToolRecord

The command needs following inputs:

ArgumentDirectionDescriptionData Type
ToolIdInputId of the tool (T)System.Int32

Example:

{
"Id": "adb73d17-1ca3-4fe9-adc8-9de21aacec4c",
"Name": "DeleteToolRecord",
"Type": "CommandNode",
"Address": "Nc1.deleteToolRecord",
"Arguments": [
{
"Name": "ToolId",
"DataType": "System.Int32",
"Type": "Input"
}
]
}

Add Tool to Magazine

Registers a tool in a physical magazine place (pot).

Address: Nc{n}.addToolToMagazine

The command needs following inputs:

ArgumentDirectionDescriptionData Type
ToolIdInputId of the tool (T)System.Int32
MagazineIdInputId of the magazine (1..4)System.Int32
MagazinePlaceIdInputId of the place (pot)System.Int32

Example:

{
"Id": "adb73d17-1ca3-4fe9-adc8-9de21aacec4c",
"Name": "AddToMagazine",
"Type": "CommandNode",
"Address": "Nc1.addToolToMagazine",
"Arguments": [
{
"Name": "ToolId",
"DataType": "System.Int32",
"Type": "Input"
},
{
"Name": "MagazineId",
"DataType": "System.Int32",
"Type": "Input"
},
{
"Name": "MagazinePlaceId",
"DataType": "System.Int32",
"Type": "Input"
}
]
}

Remove Tool from Magazine

Removes a tool from a physical magazine place (pot).

Address: Nc{n}.removeToolFromMagazine

The command needs following inputs:

ArgumentDirectionDescriptionData Type
MagazineIdInputId of the magazine (1..4)System.Int32
MagazinePlaceIdInputId of the place (pot)System.Int32

Example:

{
"Id": "adb73d17-1ca3-4fe9-adc8-9de21aacec4c",
"Name": "RemoveFromMagazine",
"Type": "CommandNode",
"Address": "Nc1.removeToolFromMagazine",
"Arguments": [
{
"Name": "MagazineId",
"DataType": "System.Int32",
"Type": "Input"
},
{
"Name": "MagazinePlaceId",
"DataType": "System.Int32",
"Type": "Input"
}
]
}

Clear ToolLife Data

Clears the life counter of a specific tool group. This command requires an argument named GroupNumber. It specifies the group where the life counter should be reset.

Note

Requires the ToolLifeManagement capability.

Address: Nc{n}.clearToolLifeData

ArgumentDirectionDescriptionData Type
GroupNumberInputNumber of group to reset life counterSystem.Int32

Example:

{
"Id": "<generate your own id>",
"Name": "ClearToolLifeData",
"Type": "CommandNode",
"Address": "Nc1.clearToolLifeData",
"Arguments": [
{
"Name": "GroupNumber",
"Type": "Input",
"DataType": "System.Int32",
"Description": "Number of group to reset life counter"
}
]
}

Write ToolLife Group Information

Writes tool life group information.

Note

Requires the ToolLifeManagement capability.

Address: Nc{n}.writeToolLifeGroupInfo

ArgumentDirectionDescriptionData Type
GroupNumberInputTool group numberSystem.Int32
ToolLifeCounterTypeInputTool life counter type (0 = counter, 1 = time)System.Int32
ToolLifeInputTool life in totalSystem.Int32
ToolLifeCounterInputCurrent tool life counterSystem.Int32

Example:

{
"Id": "<generate your own id>",
"Name": "WriteToolLifeGroupInfo",
"Type": "CommandNode",
"Address": "Nc1.writeToolLifeGroupInfo",
"Arguments": [
{
"Name": "GroupNumber",
"Type": "Input",
"DataType": "System.Int32",
"Description": "tool group number",
"MinMaxConstraint": {
"MinValue": 1,
"MaxValue": 999
}
},
{
"Name": "ToolLifeCounterType",
"Type": "Input",
"DataType": "System.Int32",
"Description": "tool life counter type (0 = counter, 1 = time)",
"MinMaxConstraint": {
"MinValue": 0,
"MaxValue": 1
}
},
{
"Name": "ToolLife",
"Type": "Input",
"DataType": "System.Int32",
"Description": "tool life in total"
},
{
"Name": "ToolLifeCounter",
"Type": "Input",
"DataType": "System.Int32",
"Description": "current tool life counter"
}
]
}

Other Commands

ReadValue

Reads synchronously a value from the FANUC Control. All variables can be read with addresses specified in chapter Data Access. The function is global which means that addresses of all Pmc and Nc channels can be passed to the function. The value is returned as a System.String.

Address: Global.ReadValue

Example:

{
"Id": "<generate your own id>",
"Name": "ReadValue",
"Type": "CommandNode",
"Address": "Global.ReadValue",
"Arguments": [
{
"Name": "Address",
"Type": "Input",
"DataType": "System.String",
"Description": "Memory address"
},
{
"Name": "Value",
"Type": "Output",
"DataType": "System.String",
"Description": "Return value"
}
]
}

WriteValue

Writes synchronously a value to the FANUC Control. All variables can be written with addresses specified in chapter Data Access. The function is global which means that addresses of all Pmc and Nc channels can be passed to the function.

Address: Global.WriteValue

Example:

{
"Id": "<generate your own id>",
"Name": "WriteValue",
"Type": "CommandNode",
"Address": "Global.WriteValue",
"Arguments": [
{
"Name": "Address",
"Type": "Input",
"DataType": "System.String",
"Description": "Memory address"
},
{
"Name": "Value",
"Type": "Input",
"DataType": "System.String",
"Description": "Value to write "
}
]
}

Reset

Executes the external resets of the CNC control. Used to reset program execution, clear alarms etc.

Address: Nc{n}.reset

{
"Id": "<generate your own id>",
"Name": "Reset",
"Type": "CommandNode",
"Address": "Nc1.reset",
"Arguments": []
}

Clear Alarm

Clears the alarm state of the CNC. This command requires an argument “Number”:

  • 0: clear PS100 alarm (30i, 0i-D/F, PMi-A:SW100). Corresponds to [CAN] + [RESET] on the MDI operation.

  • 1: clear PS101 alarm (This alarm does not occur at 30i, 0i-D/F, PMi-A). Corresponds to [PROG] + [RESET] on the MDI operation.

Address: Nc{n}.clearAlarm

{
"Id": "<generate your own id>",
"Name": "ClearAlarm",
"Type": "CommandNode",
"Address": "Nc1.clearAlarm",
"Arguments": [
{
"Name": "Number",
"Type": "Input",
"DataType": "System.Int32",
"Description": "0=PS100, 1=PS101 clear",
"MinMaxConstraint": {
"MinValue": 0,
"MaxValue": 1
}
}
]
}

Synchronize Time and Date

Command to synchronize the time and date with the FANUC control. This could be used to synchronize the timer of the control with the HumanOS host IPC. The host timer is the master.

Address: Nc{n}.synchTime

{
"Id": "<generate your own id>",
"Name": "SynchTime",
"Type": "CommandNode",
"Address": "Nc1.synchTime",
"Arguments": []
}