ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
umati.h File Reference

umati - OPC UA for Machine Tools (OPC 40501-1) information model (PROTOCORE_ENABLE_UMATI). More...

#include "protocore_config.h"

Go to the source code of this file.

Classes

struct  UmatiIdentification
 MachineTool identification (OPC 40501-1 Identification, subtype of Machinery MachineIdentification). More...
 
struct  UmatiChannel
 One Channel's live monitoring values (OPC 40501-1 ChannelType, common subset). More...
 
struct  UmatiSpindle
 One Spindle's live monitoring values (OPC 40501-1 SpindleType, common subset). More...
 
struct  UmatiAxis
 One linear Axis' live monitoring value (OPC 40501-1 LinearAxisType, common subset). More...
 
struct  UmatiMachineTool
 The whole MachineTool the server exposes. Own it in your sketch and refresh its fields each loop from your machine I/O; the umati resolvers read straight out of it (no copy). String fields may be null (served as an empty String). More...
 
struct  UmatiNs
 Dispatch table. Addressed by offset, so the layout is asserted below. More...
 

Macros

#define UMATI_NS_URI   "http://opcfoundation.org/UA/MachineTool/"
 The OPC UA for Machine Tools companion-spec namespace URI (OPC 40501-1).
 

Typedefs

typedef enum PROTO_ENUM_PACKED UmatiOperationMode
 MachineTool OperationMode (OPC 40501-1 MachineOperationMode). Exposed as Int32; the numeric values follow the companion-spec enumeration. The machine reports its current mode.
 
typedef enum PROTO_ENUM_PACKED UmatiChannelState
 Channel state (OPC 40501-1 ChannelState). Exposed as Int32; the numeric values follow the companion-spec enumeration.
 

Enumerations

enum  PROTO_ENUM_PACKED {
  UMATI_OP_OTHER = 0 , UMATI_OP_MANUAL = 1 , UMATI_OP_MDA = 2 , UMATI_OP_AUTOMATIC = 3 ,
  UMATI_OP_SETUP = 4 , UMATI_CH_INTERRUPTED = 0 , UMATI_CH_RESET = 1 , UMATI_CH_RUNNING = 2 ,
  UMATI_CH_WAITING = 3
}
 MachineTool OperationMode (OPC 40501-1 MachineOperationMode). Exposed as Int32; the numeric values follow the companion-spec enumeration. The machine reports its current mode. More...
 
enum  PROTO_ENUM_PACKED {
  UMATI_OP_OTHER = 0 , UMATI_OP_MANUAL = 1 , UMATI_OP_MDA = 2 , UMATI_OP_AUTOMATIC = 3 ,
  UMATI_OP_SETUP = 4 , UMATI_CH_INTERRUPTED = 0 , UMATI_CH_RESET = 1 , UMATI_CH_RUNNING = 2 ,
  UMATI_CH_WAITING = 3
}
 Channel state (OPC 40501-1 ChannelState). Exposed as Int32; the numeric values follow the companion-spec enumeration. More...
 

Functions

 PROTOCORE_NS_LAYOUT (UmatiNs, bind, install)
 
void protocore_umati_bind (uint8_t *work, const UmatiMachineTool *mt)
 Bind the MachineTool the resolvers serve. mt must outlive the .
 
void protocore_umati_install (uint8_t *work, const UmatiMachineTool *mt)
 Convenience: bind mt and register both resolvers on the OPC UA .
 
uint8_t * protocore_umati_span (void)
 The PROTOCORE_UMATI_BORROW bytes this module's state lives in.
 

Variables

PROTOCORE_NS UmatiNs Umati PROTOCORE_UNUSED = {.bind = protocore_umati_bind, .install = protocore_umati_install}
 Module namespace.
 

Detailed Description

umati - OPC UA for Machine Tools (OPC 40501-1) information model (PROTOCORE_ENABLE_UMATI).

umati ("universal machine technology interface") is the OPC UA companion specification for machine tools (VDW / OPC Foundation, OPC 40501-1, namespace http://opcfoundation.org/UA/MachineTool/). It standardizes how a machine tool exposes its identity and live state so any umati / OPC UA client (the umati dashboard, UaExpert, python asyncua, ...) reads the same structure across vendors.

This module builds the MachineTool address space on top of the OPC UA Binary server (services/opcua, PROTOCORE_ENABLE_OPCUA): it registers a Browse + Read resolver that answers for the MachineTool node hierarchy and serves live values out of a caller-owned UmatiMachineTool struct you refresh in your loop. No heap, no stdlib - the model is a fixed node table, the values are pointers/scalars in your struct.

Model exposed (BrowseNames per OPC 40501-1), under the Objects folder:

MachineTool Identification Manufacturer, Model, SerialNumber, YearOfConstruction, SoftwareRevision, ProductInstanceUri Monitoring MachineTool OperationMode, PowerOnDuration Channel ChannelState, FeedOverride, RapidOverride, ActiveProgram Spindle RotationSpeed, OverrideValue, IsRotating Axis_X/Y/Z ActualPosition Production ActiveProgram, ProducedPartCount Notification ActiveMessage, Severity

The model is read-only (a monitoring model - the machine reports, the client observes). Scope note: a single Channel/Spindle and three linear axes are exposed (the common embedded machine); the values carry faithful BrowseNames, but the companion-spec TypeDefinitions and the NamespaceArray entry for the MachineTool URI (which needs array-Variant support in the base server) are a documented follow-on

  • a generic OPC UA client still browses the structure and reads every value by BrowseName today.

work is PROTOCORE_UMATI_BORROW bytes the CALLER took, at an address it knows. It is not held past the call, so nothing here aliases it. How those bytes are carved is this module's and is never named here.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file umati.h.

Macro Definition Documentation

◆ UMATI_NS_URI

#define UMATI_NS_URI   "http://opcfoundation.org/UA/MachineTool/"

The OPC UA for Machine Tools companion-spec namespace URI (OPC 40501-1).

Definition at line 53 of file umati.h.

Typedef Documentation

◆ UmatiOperationMode

MachineTool OperationMode (OPC 40501-1 MachineOperationMode). Exposed as Int32; the numeric values follow the companion-spec enumeration. The machine reports its current mode.

◆ UmatiChannelState

Channel state (OPC 40501-1 ChannelState). Exposed as Int32; the numeric values follow the companion-spec enumeration.

Enumeration Type Documentation

◆ PROTO_ENUM_PACKED [1/2]

MachineTool OperationMode (OPC 40501-1 MachineOperationMode). Exposed as Int32; the numeric values follow the companion-spec enumeration. The machine reports its current mode.

Enumerator
UMATI_OP_OTHER 

a mode outside the ones below.

UMATI_OP_MANUAL 

hand / jog operation.

UMATI_OP_MDA 

manual data automatic (single-block MDI).

UMATI_OP_AUTOMATIC 

running a stored program automatically.

UMATI_OP_SETUP 

set-up / preparation.

UMATI_CH_INTERRUPTED 

program interrupted / feed hold.

UMATI_CH_RESET 

channel reset (no program active).

UMATI_CH_RUNNING 

a program is executing.

UMATI_CH_WAITING 

waiting (e.g. for a synchronization / dwell).

Definition at line 59 of file umati.h.

◆ PROTO_ENUM_PACKED [2/2]

Channel state (OPC 40501-1 ChannelState). Exposed as Int32; the numeric values follow the companion-spec enumeration.

Enumerator
UMATI_OP_OTHER 

a mode outside the ones below.

UMATI_OP_MANUAL 

hand / jog operation.

UMATI_OP_MDA 

manual data automatic (single-block MDI).

UMATI_OP_AUTOMATIC 

running a stored program automatically.

UMATI_OP_SETUP 

set-up / preparation.

UMATI_CH_INTERRUPTED 

program interrupted / feed hold.

UMATI_CH_RESET 

channel reset (no program active).

UMATI_CH_RUNNING 

a program is executing.

UMATI_CH_WAITING 

waiting (e.g. for a synchronization / dwell).

Definition at line 72 of file umati.h.

Function Documentation

◆ PROTOCORE_NS_LAYOUT()

PROTOCORE_NS_LAYOUT ( UmatiNs  ,
bind  ,
install   
)

◆ protocore_umati_bind()

void protocore_umati_bind ( uint8_t *  work,
const UmatiMachineTool *  mt 
)

Bind the MachineTool the resolvers serve. mt must outlive the .

Parameters
workPROTOCORE_UMATI_BORROW bytes the caller took. Not held past the call.
mtMt

◆ protocore_umati_install()

void protocore_umati_install ( uint8_t *  work,
const UmatiMachineTool *  mt 
)

Convenience: bind mt and register both resolvers on the OPC UA .

Parameters
workPROTOCORE_UMATI_BORROW bytes the caller took. Not held past the call.
mtMt

◆ protocore_umati_span()

uint8_t * protocore_umati_span ( void  )

The PROTOCORE_UMATI_BORROW bytes this module's state lives in.

Stated beside the namespace rather than on it: an entry takes a borrow, and this is where that borrow comes from. Taken once from the end of the pool, which no mark and no release walks, so the state lasts the life of the program.

Returns
the span.

Variable Documentation

◆ PROTOCORE_UNUSED

PROTOCORE_NS UmatiNs Umati PROTOCORE_UNUSED = {.bind = protocore_umati_bind, .install = protocore_umati_install}

Module namespace.

Definition at line 169 of file umati.h.