Skip to main content
Version: 2.4

Introduction

NUM Flexium Control Driver is part of the HumanOS® Runtime. It allows to integrate NUM Controls into the smart industrial machining platform.

This document explicitly describes the NUM driver. For common description on HumanOS® Runtime, Software Design and device information files, see the "Operation Manual".

NUM Control Driver

The NUM Flexium Control Driver is a ubiquitous hardware abstraction (UHAL) plugin of HumanOS® Runtime. It allows to integrate NUM Controls into the world of Smart Industrial Machining. The plugin is an event-based plugin for high performance.

This manual helps system engineers to configure and maintain the NUM Flexium Control Driver and HumanOS® Runtime setups.

NUM Gateway

The NUM Flexium Control Driver uses the NUM FX Server and optional the Flexium Gateway.

The driver uses the Gateway-Gateway (GW-GW) connection.

Flexium Overview

Contact NUM AG to get the latest version of mentioned packages. These components are included in the NUM HMI package, as well as the Toolkit (license needed). For easy setup just install the HMI package and check following settings when installing:

NUM Installer

NUM Installer

Click yes if the Gateway isn't installed yet:

NUM Installer

After installation, the FXServer needs to be connected to the NUM Control. The FXserver can be found here if installed with standard settings: C:\Program Files\NUM\Flexium HMI\FXServer\Bin

  1. Click on the Symbol in the windows task list:
ImageDescription
FXServer has no connection
FXServer connected to target (careful, if connection gets interrupted symbol doesn't refresh)

Make sure the firewall accepts the outgoing port 1217!

  1. Scan the devices, set your NUM control active, check "Connect by Name" and click "connect".

Fx Server config

  1. Input the address of the gateway in the device information file (address tag). If running HumanOS® directly on the NUM IPC, use "localhost:FxServer" as connection address.

NUM Device Configuration

The NUM Flexium Control Driver needs the FXServer to establish a connection to the NUM Control IPC.

Several connections can be managed by the FXServer, but only one connection can be active. This limits the cardinality of connecting NUM devices to HumanOS® IoT platform:

IMPORTANT

ONE HumanOS® IoT Gateway instance can access only ONE NUM Device.

IMPORTANT

If the HumanOS® IoT Gateway is registered as a service in the system context, the FX server cannot be started via gateway.
You can run the service in the user context or make sure the FX Server is started in some other way.

Device Information File

The NUM Device information file contains

  • Data Access Points
  • Alarm Source

Detailed reference for device information files, see the HumanOS® Operational Manual chapter "Device Information File".

Connection Address

The Addresses for NUM Controls are their serial numbers.

You can find the serial number in Flexium HMI under "Diag; NCCfg".

NUM CNC Configuration

caution

CAUTION: The Address in HumanOS® must be written without a point.

Example: "295754.00" must be "29575400"

Example:

{
"Id": "13E03A96-717E-4672-989C-7BFAF8476B0A",
"Name": "Device",
"DriverId": "EFFD2B2F-89B0-4D38-BAC5-E6BFC3EA7498",
"Address": "29575400",
...
}

Driver Configuration

The driver configuration file is named "settings.json" located in: $(InstallDirectory)\Config\HumanOS.UHAL.NumControl.Flexium\ that contains all settings of the NUM control driver.

Config architecture

NumRoto Configuration

The element "NumRoto" contains all settings that belong to NumRoto. Currently only the data point MachineActivity can be specified here.

Machine Activity Configuration

The MachineActivity element contains the following settings:

AttributeDescriptionData Type
EParameterRegistryKeyRegistry Key of Machine Activity EParameterSystem.String
EParameterRegistryPathRegistry Path of Machine Activity EParameterSystem.String

Configuration Example

Following Example shows a NUM Control Driver Configuration:

{
"Disabled": false,
"NumRoto": {
"MachineActivity": {
"EParameterRegistryKey": "EparamMachineActivity",
"EParameterRegistryPath": "HKEY_CURRENT_USER\\SOFTWARE\\NUMROTO\\NUMROTOplus"
}
},
"Devices": [
{
"MainTaskProcessor": {
"Name": "MainTaskProcessor",
"ProcessingPriority": "Normal",
"MaxSchedulingTimeSlice": 200,
"MinSchedulingTimeSlice": 10
}
}
]
}

Device Commands

NUM Flexium Control Driver offers several commands to control and manage the CNC devices.

danger

These commands can cause unwanted behavior on the CNC machine. The target device is overwritten when sending these commands! Caution when doing so.

Overview

CommandDescription
Cnc{c}.Nc{n}.activateProgramActivates a program for an independent axis channel
Cnc{c}.Common.activateProgramActivates a program for common axis channels
Cnc{c}.Common.resetCncResets the Cnc for common axis channels
Cnc{c}.Nc{n}.startCncStarts the Cnc for an independent axis channel
Cnc{c}.Nc{n}.resetCncResets the Cnc for an independent axis channel
Cnc{c}.Common.startCncStarts the Cnc for common axis channels
Cnc{c}.Nc{n}.stopCncStops the Cnc for an independent axis channel
Cnc{c}.Common.stopCncStops the Cnc for common axis channels
Cnc{c}.Nc{n}.writeCncModeWrites the Cnc mode for an independent axis channel
Cnc{c}.Common.writeCncModeWrites the Cnc mode for common axis channels
Cnc{c}.Cnc.writeParameterWrites an Parameter (E Parameter, ...)

ActivateProgram

Activates a program. There are two possibilities to activate a program:

  • Activate a Program for an independent axis channel, then the NC channel is required.
  • Activate a Program for common axis channels.

You must choose the option with the command address.

ArgumentDescriptionData Type
ProgramNameProgram name to activate. Example: NUM File %123.0 equals program name "123.0".System.String

Example:

{
"Id": "<generate your own id>",
"Name": "Activate Program",
"Type": "CommandNode",
"Address": "Cnc0.Common.activateProgram",
"Arguments": [
{
"Name": "ProgramName",
"DataType": "System.String",
"Type": "Input"
}
]
}

resetCnc

Resets the Cnc. There are two possibilities to reset the Cnc:

  • Reset Cnc for an independent axis channel, then the NC channel is required.
  • Reset Cnc for common axis channels.

You must choose the option with the command address.

This function does not require any arguments.

Example:

{
"Id": "<generate your own id>",
"Name": "Reset Cnc ",
"Type": "CommandNode",
"Address": "Cnc0.Common.resetCnc",
"Arguments": []
}

startCnc

Starts the Cnc. There are two possibilities to start the Cnc:

  • Start Cnc for an independent axis channel, then the NC channel is required.
  • Start Cnc for common axis channels.

You must choose the option with the command address.

This function does not require any arguments.

Example:

{
"Id": "<generate your own id>",
"Name": "Start Cnc ",
"Type": "CommandNode",
"Address": "Cnc0.Common.startCnc",
"Arguments": []
}

stopCnc

Stops the Cnc. There are two possibilities to stop the Cnc:

  • Stop Cnc for an independent axis channel, then the NC channel is required.
  • Stop Cnc for common axis channels.

You must choose the option with the command address.

This function does not require any arguments.

Example:

{
"Id": "<generate your own id>",
"Name": "Stop Cnc ",
"Type": "CommandNode",
"Address": "Cnc0.Common.stopCnc",
"Arguments": []
}

writeCncMode

Writes the Cnc mode. There are two possibilities to write the Cnc mode:

  • Write Cnc mode for an independent axis channel, then the NC channel is required.
  • Write Cnc mode for common axis channels.

You must choose the option with the command address.

ArgumentDescriptionData Type
CncModeCnc mode to activate (See "Dynamic information" in chapter Memory Address)System.Int32

Example:

{
"Id": "<generate your own id>",
"Name": "Select Cnc mode",
"Type": "CommandNode",
"Address": "Cnc0.Common.writeCncMode",
"Arguments": [
{
"Name": "CncMode",
"DataType": "System.Int32",
"Type": "Input"
}
]
}

writeParameter

Writes a Parameter.

caution

Be careful when writing E-Parameters. These values can contain relevant machine configurations.

ArgumentDescriptionData Type
AddressParameter address in Format "Yxxxxx"System.String
ValueValue for this parameter. Caution: Only the Flexium+ CNC Series accept floating point values.System.Double, System.Int32

Example:

{
"Id": "<generaze your own id>",
"Name": "Write E Parameter",
"Type": "CommandNode",
"Address": "Cnc0.Cnc.writeParameter",
"Arguments": [
{
"Name": "Address",
"DataType": "System.String",
"Type": "Input"
},
{
"Name": "Value",
"DataType": "System.Double",
"Type": "Input"
}
]
}

Alarm and Events

To get the alarms the FxLog COM Server is used.

Addresses

The NUM Flexium Control Driver supports CNC Alarms. The Address for the alarms is following:

AddressDescriptionData Type
Cnc{c}.Nc{n}.NcAlarmEvent:0System Alarm and operator message reader.TAlarmEvent[]

Alarm Messages

Messages are not acknowledged by the HumanOS® IoT Platform. Typically, this is done by the NUM system using the RESET button.

The message standard fields are

Field NameDescriptionDataType
ConditionNameContains the alarm number given by the NUM control. Is built of $(error-nr)[$(extension)] e. g. 54[0]System.String
MessageMessage contentSystem.String
SourceNameName of the alarm or message source, e.g. Cnc0/Nc0/RTSMessageSystem.String
ActiveFlag if the alarm is still pending on the NUM sideSystem.Boolean

A more detailed description of Alarm Messages can be found in the operation manual, chapter [AlarmEventPools].

Additional Message Properties

Alarm messages are enriched with additional properties coming from the NUM interface:

Property NameDescriptionDataType
Message:ErrorNumberNative alarm number from NUM controlSystem.String
Message:ExtensionNative extension number from NUM controlSystem.String
Message:ErrorTypeError type, e. g. RTSMessageSystem.String
Message:ErrorIndexError index, that is NcChannel for CNCMessage types or drive address for driver errorsSystem.String
Message:CncBlockNumber of the cnc block (valid for CNC messages)System.String
Message:CncLineLine number (valid for CNC messages, only Flexium+)System.String
Message:AdditionalAdditional error information from NUM controlSystem.String

Customer specific Message Properties

Custom specific messages can be added directly at the task of the device info model. They all must start with "Message:" and are automatically passed to all messages coming from the alarm task.

Example:

"AlarmEventPool": {
"Id": "{6F9BC0F1-0CF1-4537-AFBA-D411277BCAA4}",
"Name": "AlarmEventPool",
"Tasks": [
{
"Id": "{29D076CA-2123-4156-90C2-8D72AB480985}",
"Name": "Standard Messages",
"Address": "Cnc0.Nc0.NcAlarmEvent:0",
"Properties": [
{
"Name": "Message:mqtt:Topic",
"Value": "MachineState/ActAlarms"
}
]
}
]
},

Memory Addresses

This chapter outlines all possible native addresses. These addresses must be configured within the device configuration.

Format

A native NUM address has following format:

{memory base}.{memory channel}.{memory type}.{data type}:{address}(°{axis letter})

{axis letter} is optional and only allowed in Axis

Memory Base

The CNC control provides different bases for memory:

Memory BaseDescription
GlobalGlobal memory base.
Cnc{c}Cnc memory base. For the Num Flexium Control Driver are maximal 16 cnc's available. This number equals the configured cnc Address of the cnc control. (0...15)

Memory Channel

The CNC control provides different channels for memory:

Memory BaseMemory ChannelDescription
GlobalSystemGlobal memory base.
Cnc{c}Nc{n}Nc memory base. For the Num Flexium Control Driver are maximal 8 Nc channels available. This number equals the configured nc Address of the cnc control. (0...7)
Cnc{c}CommonCommon memory base, it means all NC channels together
Cnc{c}CncAll Cnc Data
Cnc{c}PlcAll Plc Data

Memory Type

Each memory base can have one or several memory types.

Memory BaseMemory TypeDescription
SystemControlGlobal CNC Information
Nc{n}ProgramProgram Information
Nc{n}AxisAxis positions and Speeds (absolute pos, machine pos, ...)
Nc{n}DynamicOperation Mode, Feedrate, ...
CncParameterCNC E Parameters
PlcVariablesPlc Variables and E Parameters (e.g. Running state, ...)

Data Types

Data TypeDescriptionSystem Data Type
BoolBit information. 0 = not set; 1 = setSystem.Boolean
Uint8Byte information (unsigned 8bit integer)System.Byte
Uint16Word information (unsigned 16bit integer)System.UInt16
Uint32DWord information (unsigned 32bit integer)System.UInt32
Uint64Long information (unsigned 64bit integer)System.UInt64
Int32Signed integer (32bit)System.Int32
Int64Signed integer (64bit)System.Int64
Float64Floating point number (64bit)System.Double
StringString informationSystem.String

Axis Letters

String DataInt DataDescription
X0Axis name of X Axis
Y1Axis name of Y Axis
Z2Axis name of Z Axis
U3Axis name of U Axis
V4Axis name of V Axis
W5Axis name of W Axis
A6Axis name of A Axis
B7Axis name of B Axis
C8Axis name of C Axis

Examples

Cnc0.Nc0.Program.Int32:1 address of the current program number

Global System Configuration

The global system configuration can only be read or monitored. Writing is not possible.

AddressDescriptionData Type
Global.System.Control.Int32:0Connection status of the control (0 = Disconnected, 1 = Connected)System.Int32
Global.System.Control.String:1Control NameSystem.String
Global.System.Control.String:2Control IdentifierSystem.String
Global.System.Control.Int32:3Get the number of configured CNC axis channelSystem.Int32
Global.System.Control.Int32:4Get the number of NCKsSystem.Int32
Global.System.Control.Int32:5Sign of life toggle bit (in 1 Hz if connected)System.Int32
Global.System.Control.Int32:6Get the number of PLC and NC channelsSystem.Int32

Nc Program Configuration

The Nc Program configuration can only be read or monitored. Writing is not possible.

AddressDescriptionData Type
Cnc{c}.Nc{n}.Program.Int32:0Available G-Function **System.Int32
Cnc{c}.Nc{n}.Program.Int32:1Current programSystem.Int32
Cnc{c}.Nc{n}.Program.Int32:2Current block numberSystem.Int32*
Cnc{c}.Nc{n}.Program.Int32:3Program errorSystem.Int32*
Cnc{c}.Nc{n}.Program.Int32:4Block error numberSystem.Int32*
Cnc{c}.Nc{n}.Program.Int32:5Current toolSystem.Int32*
Cnc{c}.Nc{n}.Program.Int32:6Tool direction **System.Int32
Cnc{c}.Nc{n}.Program.Int32:7Corrector numberSystem.Int32*
Cnc{c}.Nc{n}.Program.Int32:8Left function ** (remaining treatment)System.Int32
Cnc{c}.Nc{n}.Program.Int32:9Current line number (only Flexium+)System.Int32
Cnc{c}.Nc{n}.Program.Int32:11G92F (axes list) ** (only Flexium+)System.Int32
Cnc{c}.Nc{n}.Program.Int32:10Line number in error (only Flexium+)System.Int32
Cnc{c}.Nc{n}.Program.Int32:12Loaded tool number (only Flexium+ and FX server version minimal 4.1.0.0)System.Int32
Cnc{c}.Nc{n}.Program.String:100Get the changing of the the part program number with their call stackSystem.String
Cnc{c}.Nc{n}.Program.String:101Main program nameSystem.String
Cnc{c}.Nc{n}.Program.String:102Comment line of the current main programSystem.String
Cnc{c}.Nc{n}.Program.String:103File name of the current programSystem.String
Cnc{c}.Nc{n}.Program.String:104Current Operator MessageSystem.String
  • The value from control is an Int16 value. But it has been converted to an Int32 value by HumanOS®.

Available G-Function **

Bit NrGFunctionBit NrGFunction
0G0015G22
1G0116G40
2G0217G41
3G0318G42
4G0419G53
6G3820G54
7G0921G29
8G1723G93
9G1924G94
10G1825G95
11G9027G96
12G9128G97
13G7030G20
14G5231G21

Tool Direction **

Bit NrValue
0G16 P+
1G16 Q+
2G16 R+
8G16 P-
9G16 Q-
10G16 R-

Left Function **

Bit NrValue
0G78 P..
1End of external movement (FMEXT)
2Decoded M function
3Encoded M function
4G04
5G09
6Circle execution
7Linear execution
8JOG
11ARUS
13Encoded M function without ack. (before)
15T function

G92F **

Bit NrAxis
0X Axis available
1Y Axis available
2Z Axis available
3U Axis available
4V Axis available
5W Axis available
6A Axis available
7B Axis available
8C Axis available

Dynamic Information

The Dynamic configuration can only be read or monitored. Writing is not possible.

AddressDescriptionData Type
Cnc{c}.Nc{n}.Dynamic.Int32:0Operation Mode **System.Int32
Cnc{c}.Nc{n}.Dynamic.String:0Operation Mode as StringSystem.String
Cnc{c}.Nc{n}.Dynamic.Int32:1Preselected operation mode as intSystem.Int32
Cnc{c}.Nc{n}.Dynamic.Int32:2Feedrate in percentSystem.Int32
Cnc{c}.Nc{n}.Dynamic.String:1Preselected operation mode as stringSystem.String
Cnc{c}.Nc{n}.Dynamic.Float64:3Interpolation feed of the NCSystem.Double
Cnc{c}.Nc{n}.Dynamic.Float64:4Programmed feedSystem.Double

Operation Mode **

ValueOperation Mode
0MDI
1Auto
2Single
3Edit
4Manual
5Rapid
6Test
7Search
8Home
9Shifts
11No Mode
13Load

Nc Axis Configuration

Reading the axis positions.

AddressDescriptionData Type
Cnc{c}.Nc{n}.Axis.Float64:0Machine positionsSystem.Double[]
Cnc{c}.Nc{n}.Axis.Float64:1Offset positions (absolute positions)System.Double[]
Cnc{c}.Nc{n}.Axis.Float64:2End positionsSystem.Double[]
Cnc{c}.Nc{n}.Axis.Float64:3Delta (Distance to go)System.Double[]

Each of these memories can be also read by axis number:

AddressDescriptionData Type
Cnc{c}.Nc{n}.Axis.Float64:0°{y}Machine position of axis {y}System.Double
Cnc{c}.Nc{n}.Axis.Float64:1°{y}Absolute position of axis {y}System.Double
Cnc{c}.Nc{n}.Axis.Float64:3°{y}Distance to go of axis {y}System.Double
Cnc{c}.Nc{n}.Axis.Float64:2°{y}Relative position of axis {y}System.Double

Spindle Data

Reads the spindle information. The spindle number {y} is in rage 0 to 31.

AddressDescriptionData Type
Cnc{c}.Nc{n}.Spindle.Uint8:0°{y}Assigned axis groupSystem.Byte
Cnc{c}.Nc{n}.Spindle.Uint8:1°{y}Mode (Bit0=1 → M3; Bit1=1 → M5; Bit2=1 → M4; Bit3=1 → M19)System.Byte
Cnc{c}.Nc{n}.Spindle.Int32:2°{y}Feedrate override in %System.Int32
Cnc{c}.Nc{n}.Spindle.Float64:3°{y}Programmed spindle speedSystem.Double
Cnc{c}.Nc{n}.Spindle.Float64:4°{y}Real spindle speedSystem.Double
Cnc{c}.Nc{n}.Spindle.Uint8:5°{y}Speed type (Bit0=0 → S5.0; Bit0=1 → S6.0; Bit1=1 → S3.2)System.Byte
Cnc{c}.Nc{n}.Spindle.Uint8:6°{y}Spindle is validSystem.Byte
Cnc{c}.Nc{n}.Spindle.Uint8:7°{y}Logical index in the systemSystem.Byte
Cnc{c}.Nc{n}.Spindle.Uint8:8°{y}Physical addressSystem.Byte

Plc Variables and E Parameters

For reading the plc variables, they must be allowed to read in PLC Project.

With following address, you can read a PLC variable:

Cnc{c}.Plc.Variables.{DataType}:{PLC Address}

For checking a PLC address, you can use the Flexium HMI, go to Variables and write your PLC variable:

Debug NUM variables

Examples:

Cnc0.Plc.Variables.Bool:Application.IoConfig_Globals.Flexium_NCK.RCNC.General.CncError  
Cnc0.Plc.Variables.Bool:Application.IoConfig_Globals.Flexium_NCK.RCNC.General.CncReady
Cnc0.Plc.Variables.Bool:Application.IoConfig_Globals.Flexium_NCK.RCNC.General.ProgramActive
Cnc0.Plc.Variables.Bool:Application.IoConfig_Globals.Flexium_NCK.RCNC.General.ProgramStop
Cnc0.Plc.Variables.Bool:Application.IoConfig_Globals.Flexium_NCK.RCNC.General.Stop
Cnc0.Plc.Variables.Bool:Application.IoConfig_Globals.Flexium_NCK.RCNC.General.Start
Cnc0.Plc.Variables.Bool:Application.IoConfig_Globals.Flexium_NCK.RCNC.General.Reset (only ca. 100ms)

E-Parameters on the PLC can vary, in general there are following parameter arrays with different data types: E10000, E30000, E33000, E36000, E37000

Cnc0.Plc.Variables.Bool:Application.IoConfig_Globals.Flexium_NCK.RCNC.E10000[1]

{
"Id": "<generate your own id>",
"Name": "Read 1 bit from E10000",
"DataType": "System.Boolean",
"DataClass": "Event",
"Address": "Cnc0.Plc.Variables.Bool:Application.IoConfig_Globals.Flexium_NCK.RCNC.General.E10000[1]",
"Access": {
"Read": true,
"Receive": true
}
}

Check the E addresses for their data type. Reading the whole array is not supported by the controller.

NumRoto Parameter MachineActivity

The data point MachineActivity is NUM Roto specific and somewhat special. In the windows registry, it must be specified which EParameter contains the values from the data point MachineActivity. This is described in the driver configuration (see chapter 3).

HumanOS.UHAL.NumControlDriver implements the MachineActivity data point at the following address:

Cnc{c}.Plc.Variables.{DataType}:MachineActivity

Example:

In the windows registry, the following setting is specified:

HKEY_CURRENT_USER\SOFTWARE\NUMROTOplus\ParamMachineActivity contains the value 81000.

NUMROTO Registry Key

In this case, the NumControl driver will replace the address Cnc0.Plc.Variables.String:MachineActivity based on the registry setting with Cnc0.Plc.Variables.String:E81000.

CNC Parameters

For reading an E-Parameter, the parameter must be defined. For further information see the NUM documentation chapter "external parameters".

With following address, you can read an E-Parameter (Address range from 11000-..-..-98431; range not fully continuous):

Cnc{c}.Cnc.Parameter.{DataType}:E{xxxxx}

Ranges and read/write access depend on the used controller and the version, as well as customization through the machine supplier.

For checking an E-Parameter address, you can use the Flexium HMI, go to Variables and write your E-Parameter:

Debug NUM Variables