I want to get coordinate values (X, Y, Z), current speed, etc. from CNC Machine to my IoT platform using MQTT or get data of coordinates using the OPC server for analysis purposes. How can I do that? Help is appreciated.
I get what you are asking but as you already have the GCode you have the coordinates and estimated speed, you could analyze that pretty easily. Unless you are actually trying to compare the GCode to actual.
I am not sure what, if anything, is available via the ISP header but if such data is available it would be easy enough to have something with a UART (Arduino, ESP32, …) and write a repeater using the MQTT “pubsub” library.
I have a spare controller and always intended on having a look for doing similar things. Perhaps I’ll dust it off and see…
Thank you for your reply. If you find anything please let me know. I am a little bit confused about the supported communication protocol for Shapeoko 4 controller such as Modbus, HTTP request, or any other protocol for getting data to my IoT platform. Any information regarding this is appreciated.
The controller implements a serial interface over a USB port. It receives GRBL commands as text and usually responds with ok or error. No modbus, no HTTP, no ICMP etc. It’s not an IoT device - just a controller.
To capture real-time data (edit: without additional hardware) you’d need to use a gcode sender on your PC that allows you to intercept this communication stream, parse and interpret the data, and then post it to your own capture service (your IoT platform).
Carbide Motion doesn’t currently have a way to intercept this communication.
What @Gerry said. Carbide 3D’s controllers are GRBL, which means literally just an Arduino. The only protocol it speaks is UART, which is wired directly into a USB/UART bridge so that the computer can talk to it.
Even if you intercept the G-code, you basically need to run a G-code simulator to interpret it.
Better would be to use a G-code sender that supports some kind of API. cncjs is web-based so well-suited to this. Somebody has already written a cncjs/MQTT bridge that captures the metrics you’re interested in.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.