|
ProtoCore v0.0.1
Deterministic, zero-heap network stack for embedded targets
|
Layer: L7-Application ยท Flags: PC_ENABLE_OPCUA + PC_ENABLE_ROBOTICS
Turns the board into an OPC UA for Robotics server. OPC 40010-1 ("OPC UA for Robotics - Part 1: Vertical Integration", VDMA / OPC Foundation) is the OPC UA companion specification for industrial robots: it standardizes how a motion device reports its identity and live motion state so any OPC UA client reads the same structure across every vendor. This example exposes that model over OPC UA on TCP/4840 - the twin of example Umati (machine tools).
A MotionDeviceSystem object under the Objects folder, with the standard OPC 40010-1 components (faithful BrowseNames):
You fill a RoboticsMotionDeviceSystem struct and refresh its live fields each loop() from your robot I/O; the server reads straight out of it. pc_robotics_install(&mds) binds the struct and registers the OPC UA Browse + Read resolvers - that is the whole wiring. The axis count is parametric (PC_ROBOTICS_AXES, default 6): each bound axis becomes an Axis_k object with its four live variables.
One companion-spec model, one struct. The values carry the standard OPC 40010-1 BrowseNames, so a generic OPC UA client discovers and reads them the same way it would on a real robot cell. It is a read-only monitoring model (the robot reports, the client observes), built on the OPC UA Binary server from example OpcUa.
SSID / PASSWORD at the top of Robotics.ino.build_opt.h for the Arduino IDE): Any OPC UA client works. With python asyncua:
Browse from Objects to MotionDeviceSystem, then into MotionDevices -> MotionDevice -> Axes -> Axis_1 -> ActualPosition and read it a few times - it tracks the simulated robot. UaExpert and open62541 browse the same tree.
A single MotionDevice / Controller / SafetyState and PC_ROBOTICS_AXES parametric axes are exposed (the common embedded robot). The values are faithfully named per OPC 40010-1; full companion-spec TypeDefinitions, PowerTrains, and advertising the Robotics namespace in the server's NamespaceArray (which needs array-Variant support in the base OPC UA server) are a documented follow-on - a generic OPC UA client still browses the structure and reads every value by BrowseName today.