Control of two Shapeoko XXL simultaneously

I have been tasked with a project to implement a system to inspect manufactured material across an X-Y grid. Should I used Carbide 3D hardware, I will need to control and synchronize the motions of two Shapeoko XXL machines through one PC. My control program will be custom code (I will be writing it myself) that addresses the corresponding serial ports on each XXL. I have in the past successfully controlled one XXL with this approach. I am concerned that the PC will only see one serial port, but be blind to the other. Is it technically possible to connect to two XXL machines at the same time? If so, what challenges should I anticipate as I write my code?

What do you mean by inspect?

Do the machines need to run in sync? (Both moving in the same axis at the same time) How close do you need to hold this?

It sounds like an application that needs a custom designed XYZ stage with a PLC, but that is going to be about 2 orders of magnitude higher than 2 shapeokos.

1 Like

While folks have managed this by running two different installations of Carbide Motion, this is not a supported configuration.

My suggestion instead would be to use CM4 running on a pair of Intel Compute Sticks or something similar, then connect to them using the pendant interface over port 8080 — folks have worked up code for this (look for “Stream Deck”) and it should be feasible then to send a command to each machine and have them move as close to in synch as network latency and Grbl timing will allow. You might want to check in w/ the Grbl folks on GitHub or see if @chamnit will chime in here.

My use of these machines is anything but normal. I am foregoing the cutting tool, and replacing it with antennas which will be used to measure a sheet of material. This will require an antenna on either side (top and bottom) of the sheet. My (rough) plan is to forego the bed of the XXL, and stack the two XXL machines using an 80-20 based frame. Each XXL would be programmed to move in sync with the other. A little lag in synchronization of motion is not a big problem; the antennas stop and dwell in a position periodically.

I recognize that I am trying something that it was never intended for, but as you alluded to, if I can make two XXLs work, it is by far the less expensive option.

1 Like

I think as long as your programming language can open and keep two serial ports separate, I don’t see an issue with controlling two Grbl-based machines with one computer/interface program. I’m not a Python expert, but I think it is able to do this. Most other full-featured programming languages should be the same. This should be easy to check.

The trick will be managing two streams simultaneously.

2 Likes

I am using MATLAB. I should be able to open two serial ports connections, and simply name them ‘topCNC’ and ‘bottomCNC’. Have you seen examples using analogous configurations (i.e. two XXL machines or similar)?

1 Like

@JPM, for your application, is there a reason they need to be two, independently controlled machines?

1 Like

Given the size of the parts, it is a matter of geometric convenience.

1 Like

My point being that, if all you need is synchronized motion, I’d consider using one controller that would send motion control signals to discreet motor drivers. Basically, in the same way the Shapeoko already sends the same step and direction signals to two Y drivers, you would do that with four. And two X’s and Z’s (if you need them).

This would simplify the implementation. I do need to control the Z axis on each independently however. The z-height represents the distance to the sample, and may be changed based upon the thickness of the sample.

1 Like

Though not quite the same, but very similar in some regards, I currently have three ESP32 MCU development boards connected to this PC and can easily send firmware to each of them independently since although they appear to have identical signatures, they are all on different ports.

The difficulty is not communicating with both independently, but with identifying which one is which since they will both have the same USB profile. Perhaps the program can have a ‘which one is which’ init phase where you pick one of the ports, send an instruction, and ask “which one moved?”

1 Like

At the same time, though?

My experience has been that my USB communication suffered when trying to communicate with two machines. I definitely wouldn’t trust it to keep two machines in exact synchronization.
I don’t write software though, so…

1 Like

I have done this myself, with 3 machines at once. (My own software)
A Nomad 883.1, an OpenBuilds Lead/BlackBox, and an arduino with shield.
You just need to manage COM3/COM4/COM5 etc yourself, but works good.
now keeping the motions in sync i have not done, but you could easily if you had pauses at measurement locations

2 Likes

@Gerry If you dont unplug and replug the devices their identifier doesnt change.
you can always plug in the top one, find the com port, then plug in the bottom one

1 Like

Will that hold through shutting down and restarting the computer? What if one of the machines isn’t powered up when you start the computer?

Is there any reason to believe that the COM port will be assigned by when it is turned on? Presumably, I could do something like the following at startup or initialization…

  1. User plugs the USB cords into the computer for each router if not already plugged in with the CNC power off.
  2. Prompt the user to turn on CNC1
  3. In code, try to connect to via COM3
  4. Prompt the user to turn on CNC2
  5. In code, try to connect via COM4

These attempts to connect could also be a scan for plausible COM ports till one is found, or options are exhausted.

1 Like