Make communication between industrial machines easier to update and iterate. #35
Replies: 7 comments
-
|
CNC machines are typically updated or reprogrammed via UART (Universal Asynchronous Receiver/Transmitter) by following this general process: 1. Connect to the CNC Controller via UART
2. Enter Programming or Update Mode
3. Upload New Program or Firmware
4. Verification
5. Restart or Resume Operation
Notes:
If you need specifics for a particular CNC controller model or brand, let me know! |
Beta Was this translation helpful? Give feedback.
-
|
Absolutely! Let’s build on the CNC update/reprogramming process via UART with more specifics, practical steps, and how microcontrollers or your proposed device could be involved. Detailed Process: CNC Machine Update/Reprogramming via UART1. Establishing UART Communication
2. Entering Programming/Update Mode
3. Uploading the Program/Firmware
4. Verification & Validation
5. Restart/Reboot
How Your Proposed Device Could Improve This Process
Example ScenarioImagine you’re updating multiple CNC machines:
|
Beta Was this translation helpful? Give feedback.
-
|
Your USB dongle, based on the Tpico C3 (RP2040 + ESP32), can receive a variety of data from a CNC machine during operation. Here’s a detailed look: Types of Data the Dongle Can Receive from CNC Machines1. Machine Status and Health
2. Live Process Data
3. Operational Feedback
4. Production Metrics
5. Diagnostic and Debug Data
How the Dongle Can Relay This DataUSB Serial Relay
Network Relay (via ESP32)
Security/Tagging Layer (via RP2040)
Custom Interface
Use Cases Enabled
If you want more detail, such as sample data formats, integration ideas, or specifics for a certain CNC protocol (Fanuc, Siemens, GRBL, etc.), let me know! |
Beta Was this translation helpful? Give feedback.
-
|
Certainly! Here’s how your USB dongle could receive and relay operational data from CNC machines using either Fanuc or GRBL controllers: Data Types from Fanuc and GRBL CNC MachinesFanucFanuc controllers are found in industrial CNC machines and support extensive status and diagnostic output via serial, including UART/USB. Common Data Received:
How the Dongle Relays This Data:
GRBLGRBL is open-source and widely used in desktop CNC and laser machines, communicating over USB/UART with plain text. Common Data Received:
How the Dongle Relays This Data:
Sample Data FormatsFanuc Example: Fanuc may use proprietary protocol, so you may need a parser or FOCAS library for advanced data. GRBL Example: GRBL outputs are ASCII, easy for microcontrollers to process. Relay Use Cases
Integration Workflow with Your Device
If you want Python/C++/MicroPython code samples for parsing or relaying Fanuc or GRBL data, or recommendations on dashboard software, let me know your preferred tech stack or workflow! |
Beta Was this translation helpful? Give feedback.
-
|
Great! Here’s a practical example and workflow for parsing and relaying CNC data (Fanuc or GRBL) using a MicroPython-based USB dongle (Tpico C3 with RP2040 + ESP32): 1. MicroPython Setup
2. GRBL Data Parsing Example (MicroPython)GRBL data is plain ASCII and lends itself well to MicroPython parsing. import machine
import time
# Set up UART for GRBL
uart = machine.UART(0, baudrate=115200, tx=machine.Pin(0), rx=machine.Pin(1))
def parse_grbl_status(line):
# e.g. <Idle|MPos:123.456,67.890,0.123|FS:500,0>
if line.startswith('<') and line.endswith('>'):
# Remove brackets
line = line[1:-1]
parts = line.split('|')
status = parts[0]
mpos = None
for p in parts[1:]:
if p.startswith('MPos:'):
mpos = p[5:]
return {' |
Beta Was this translation helpful? Give feedback.
-
|
I'll do a multi-angle research pull — UART industrial protocols, GRBL/Fanuc parsing at the embedded level, and power-efficient middleware patterns for your dual-MCU architecture. Good depth now. Let me compile this into a structured extension of Discussion #35. Extended Research: Discussion #35 — Industrial Machine CommunicationThis pulls the thread forward across four dimensions: GRBL protocol internals, RP2040 hardware architecture for UART parsing, Fanuc/FOCAS realities, and the open standards layer that sits above all of it. 1. GRBL Protocol — Precision Details for the ParserThe original thread treated GRBL as "easy ASCII." Here's what that actually means at the byte level: GRBL v1.1 communicates at 115200 baud, 8N1 (no parity, 8 data bits, 1 stop bit). It is full duplex. The basic unit of communication is a line, delimited by carriage return ( This asymmetry matters for your parser — your RX state machine needs to handle There are three message types: G-code blocks, system commands, and real-time control commands. Real-time commands can be sent at almost any time and are picked directly from the incoming serial stream. Of these, only For flow control, if no response is expected, the delay between two successive real-time commands should be at least 25ms to prevent commands being dropped. GitHub Key architectural implication for the BABB dongle: Your RP2040 parser needs two distinct modes — a line-buffered mode for G-code/system commands, and a character-by-character intercept mode for real-time commands (0x80–0xFF range in extended ASCII). All real-time overrides and future real-time commands are defined in the extended-ASCII character space — not easily typeable, which prevents accidental commands from G-code files containing those characters. GitHub Every message type from GRBL has a unique prefix to help GUIs immediately determine what the message is and parse it accordingly without having to know context. GitHub This makes prefix-based dispatch ( 2. RP2040 UART Architecture — DMA + PIO is the Right PatternThe previous discussion stub used blocking DMA-backed ring buffer via PIO The RP2040's DMA controller has 12 independent channels that can run concurrently. Each DMA channel can independently read from one address and write to another, optionally incrementing one or both pointers — performing transfers on behalf of the processor while the processor carries out other tasks or enters a low power state. MicroPython A PIO-based UART RX library with optional DMA buffering exists for the RP2040, using a ring buffer with configurable size via Critical caveat on the hardware UART + DMA combination: Whenever a flash page is erased on the RP2040, all CPU activities including interrupts are paused. This causes data loss when using the UART hardware FIFO, which is only 32 bytes. DMA solves this by writing incoming bytes directly into a ring buffer in RAM without CPU involvement. GitHub This is a direct concern for your architecture: if the RP2040 is scanning/tagging files (writing to flash), it will drop UART bytes unless you're using DMA. The fix is DMA into a sufficiently large RAM ring buffer before any flash operations occur. Dual-core division of labor (C SDK pattern):
Various hardware events can trigger interrupts — GPIO pin changes, timer expiry, or DMA transfer completion. The interrupt handler pattern for UART RX: set an exclusive handler with 3. FOCAS — The Hard Truth for Fanuc IntegrationThe previous thread treated Fanuc/FOCAS as roughly equivalent to GRBL in accessibility. It is not. FOCAS is a set of library files (DLL) that, when embedded in an application, can access almost all information inside the CNC. The FANUC FOCAS libraries access the CNC using either Ethernet or HSSB (High-Speed Serial Bus). MachineMetrics There is no raw serial/UART access equivalent to GRBL — Fanuc's UART port is typically for DNC (Direct Numerical Control) file transfer, not live telemetry. FOCAS is composed of two components: FOCAS1 for Ethernet communication, and FOCAS2 for HSSB. Common data available includes CNC state, part count, program name, tool and work offsets, alarm text, feed overrides, parameters, positional data, and spindle speed. MachineMetrics The licensing barrier: FOCAS has two required components — software on the CNC side (a paid option that the machine builder must have opted into) and the PC-side library. Without the CNC-side option, even if you have the library, it won't function. Without FOCAS, the alternative is Custom MACRO B system variables. Practical Machinist Strategic implication for BABB: Don't treat FOCAS as a UART-level interface. It lives at the Ethernet/application layer and requires Windows DLL linkage. The practical path for your dongle with legacy Fanuc machines is either the DNC serial port (G-code file transfer only, no live telemetry) or, for newer machines, acting as a lightweight Ethernet agent. For the dongle form factor, GRBL and grblHAL are the actionable near-term targets. 4. The Open Standards Layer — MTConnect and OPC-UAThis is where the discussion needs to extend strategically for your company goals. MTConnect is read-only, meaning machine data cannot be modified and written back to a machine. OPC UA allows reading and writing of data points. MTConnect is best suited for monitoring equipment with standardized functions like CNC controls. OPC UA is better when the machine needs specific feedback to automate its functions. MachineMetrics MTConnect dates to 2006 and uses a well-defined data model presented in XML format over HTTP. Three software components make up an implementation: adapter (as required), agent, and client. PTC The OPC Foundation and MTConnect organization have formed a joint working group to combine OPC UA and MTConnect into a complete industrial interoperability standard — MTConnect provides semantic definitions while OPC UA provides transport, security, scalability, and reliability. OPC Foundation Why this matters for BABB specifically: MTConnect's adapter layer is the insertion point for your dongle. Rather than being a proprietary monitoring device, the BABB dongle could implement the MTConnect adapter interface — making it a standards-compliant data source for any MTConnect client (dashboards, MES systems, ERP). This is a significant commercial differentiator: your device speaks the language enterprise software already understands, without requiring software integration work from the customer. The adapter is the lightweight piece — it runs on the edge device (your dongle's ESP32), reads from the CNC via UART/Ethernet, and outputs the MTConnect data stream. The agent (which formats and serves XML over HTTP) can run on a connected PC or a small companion device. 5. ESP32 as Transparent Bridge — Verified PatternDroneBridge for ESP32 implements a transparent, bidirectional serial-to-WiFi bridge. It supports standard WiFi connections to an access point and can also operate as a standalone access point. The ESP-NOW mode offers a connectionless and encrypted alternative to traditional WiFi. ArduPilot This is a proven architecture for exactly what Discussion #35 describes — the ESP32-C3 in your Tpico C3 is well-suited to this role. The key addition from your security architecture is that the transparent bridge is not fully transparent: the RP2040 sits in the data path between the CNC UART and the ESP32, parsing and validating before forwarding. Espressif's own USB bridge project: Espressif maintains an official Summary of Extensions to Add to Discussion #35The thread should be extended with these threads:
|
Beta Was this translation helpful? Give feedback.
-
|
Good — got the live version index. Here's the full picture: State of the MTConnect / OPC UA Working GroupMTConnect Standard — Current Version StatusThe current release is MTConnect Version 2.5.0, published January 5, 2026. Documents span five parts. The prior stable release was Version 2.2.0 (August 2023). The Version 2.0.0 baseline was released May 2022. mtconnect The release cadence since going model-based has been:
Starting with Version 2.0, the MTConnect information model is provided in SysML using an XMI Model Interchange file rather than text documents. The 2.0 Agent was a full rewrite using a modern HTTP server and pluggable architecture, supporting TLS/certificates, extensible plug-in protocols, and third-party plug-ins including the OPC UA MTConnect Companion Spec, Kafka, InfluxDB, and MQTT data sources. AMT Version 2.0 added maintenance data items, parts and processes vocabulary, operational modes for systems and components, support for recipes in heat-treat and PLC-based equipment, fixture support, and part counts. Design World Online The model browser, schema files (XML and JSON), and the C++ agent are all available at The Joint Working Group — What Was Actually ProducedThe MOU between MTConnect Institute and OPC Foundation dates to September 2010. The JWG was formally reconstituted in April 2018 to revise the original 2014 companion specification. The OPC Foundation and MTConnect Institute released the jointly developed "OPC Unified Architecture for MTConnect Companion Specification Part 1" in September 2019. It expresses the MTConnect stream and device information models via the OPC UA modeling language, bringing data type enforcement, separation of the information model definition from its implementation, and improved security via OPC UA end-to-end encryption. OPC Foundation NIST tested Version 1.02 of the companion specification, developing an OPC UA Server, an OPC UA Client, a probe that translates MTConnect XML structures to the MTConnect OPC UA Companion XML format, an MTConnect XML data parser, and a device simulator. Testing confirmed that varying data structures and objects passed through the server and were received accurately by the client. NIST A proof-of-concept Node.js implementation of the MTConnect OPC UA Companion Specification ( The current specification and nodeset files are hosted at the OPC Foundation site and require a free OPC account to download. The GitHub repo is The UMATI ComplicationThis is the significant geopolitical fracture in the standards space that affects BABB's positioning. The MTConnect/OPC UA Companion Specification may compete in part or in whole with the VDW/OPC UA Companion Specification for Machine Tools, the flagship standard of the UMATI (Universal Machine Tool Interface) brand. When a public UMATI release becomes available, the MTConnect Institute stated it would seek to harmonize and provide translation tools. MTConnect OPC 40501 — the UMATI/VDW OPC UA for Machine Tools specification — was created by a Joint Working Group between VDW (German Machine Tool Builders' Association) and the OPC Foundation, comprising over 90 companies and nearly 200 participants worldwide. It monitors the machine tool and provides a job monitoring and management interface based on ISO 22400 KPI definitions. Available free at UMATI partner machine tool providers include Citizen, Fanuc, Heidenhain, Mazak, Mitsubishi, and Okuma. For equipment already embedding MTConnect, UMATI may require a protocol adapter. MachineMetrics So in practice there are now two competing OPC UA companion specifications for machine tools:
Both use OPC UA as transport. They share some definitions but diverge in structure and stakeholder requirements. Commercial and open-source utilities to harmonize and co-deploy MTConnect and OPC UA are under development. MTConnect What This Means for BABBThree practical conclusions: 1. MTConnect is the right near-term target for North American shops. The C++ agent is open source, actively maintained through 2.5 as of January 2026, and the adapter pattern is lightweight enough to run on the ESP32. Most North American CNC buyers and MES software vendors know MTConnect; it's the common denominator on US shop floors. 2. UMATI/OPC 40501 is the right long-term target for European and Tier-1 industrial customers. Fanuc, Heidenhain, Mazak, and Siemens are all UMATI signatories. If BABB ever sells into automotive or aerospace supply chains, UMATI compliance will be expected. 3. The adapter layer is BABB's leverage point in both cases. Neither standard prescribes what sits between the machine's physical interface and the data stream — that's where the BABB dongle lives. The dongle reads raw UART/serial, the ESP32 formats and publishes. Whether it publishes as MTConnect XML over HTTP or as an OPC UA node is a software configuration choice, not a hardware change. Building the adapter to support both output formats is the commercially durable architecture. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Via software, hardware and standards.
Beta Was this translation helpful? Give feedback.
All reactions