CNC — Computerized Numerical Control
CNC — Computerized Numerical Control machines. Six enums for axis state, one structured position type, no upstream dependency cascade.
OPC UA companion specification for CNC machine controllers — the
control side of milling machines, lathes, machining centres.
Distinct from MachineTool, which models the machine itself; CNC
covers the controller's runtime state.
What's in the package
| Artefact | Count |
|---|---|
| Enums | 6 |
| DTOs | 1 |
| Codecs | 1 |
| Registrars | 1 (CNCNodeSetRegistrar) |
Note the registrar's non-standard name (CNCNodeSetRegistrar,
not CNCRegistrar) — the spec's XML root element is CNCNodeSet.
Loading
use PhpOpcua\Client\ClientBuilder;
use PhpOpcua\Nodeset\CNC\CNCNodeSetRegistrar;
$client = ClientBuilder::create()
->loadGeneratedTypes(new CNCNodeSetRegistrar())
->connect('opc.tcp://cnc-controller.local:4840');
Direct dependencies
None — CNC is independent of Machinery / MachineTool, even though it conceptually fits underneath them. Combine manually if your target server publishes both.
Notable types
Types\CncPositionDataType— a typed axis position record (units, value, increments).
Notable enums
CncAxisStateEnum— per-axis state (idle, moving, alarmed)CncOperationModeEnum,CncProgramStateEnum,CncChannelStateEnum— controller-level statesCncAlarmSeverityEnum,CncAlarmCategoryEnum
Pair with MachineTool — most servers publish both, the auto-cast and DTO decoding cover the typed paths, NodeIds from both specs flow through the same client.