I think this is quite easy to do. Basically your cups already arrive aligned, so most of the job is already done.
First thing, you need to make the end of your production line longer, what I mean here is that, in the first picture you posted, the cups are all aligned on those 6 metal rods. Make those longer, at least as long as a full row in your tray.
Let’s say that the end of your production line is the X axis. You need to make a custom center carriage who takes a full row of cups at once directly from the end of your production line, then puts them down on the tray. That’s quite easy to do, just attach an aluminum square tube under the central carriage and attach your succions cups to this aluminum tube. Make some physical endstop clamps on your oustide tubes so that the travel is limited only to the necessary travel distance on X. Done.
Next line of cups, this time with one less cup, you very slightly move on the X axis by the distance of one cup, pick up the cups, move the Y axis on about 2/3rd of a cup distance and half a cup distance on the X axis, and finally move down to place the cups on the tray. Repeat these operations until one tray is done.
Since during the second row one of the succion cup will not hold vacuum (because there is one cup less to be taken), it is possible that you will need some kind of solenoid valve to cut the vacuum specifically to this succion cup. I think it is possible to do easily by connecting a simple push switch connected to a relay that will activate the solenoid when the center carriage reaches this specific position on X axis. Doesn’t even need to be connected to the rest of the system, simple on and off.
Once the tray is done, use the extruder change feature of marlin. This way you can call for a pause, until the operator presses a button. This will leave the operator as much time as he needs to place the new tray.
Once the operator presses the button, the process is started again. You also need to make sure that the tray is properly positionned to begin with, so make some kind of jig in order for it to be only put in the right spot.
There’s no need for any centering device in my opinion. As long as they are aligned in the end of the production line, which is super easy to do since from what I can see on your picture it is already the case, then I see no problem whatsoever. If really this turns out to be a proble, then there is an easy solution: make some kind of cones with the succion cups in the middle: the cones will automatically center the cups until they meet the succion cups at the bottom. Then you’ll have the right spacing and position every time.
I think is is pretty easy to do hardware wise, just need to make some kind of feature to hold as many succion cups necessary to pick up a full line on your center carriage, the rest is pretty much unchanged from a standard MPCNC. The X axis travel distance will be very small, it just needs to be around one cup diameter. So basically that can be extremely fast because all your travel distances will be greatly reduced on the X axis. The only long travels will be on Y axis at the very end of a tray, and on Z axis.
You can use a normal version of marlin to control the CNC, and all the programming work will be done through trial and error of a Gcode file. Once you get your Gcode written as you need, then as long as you don’t change your tray or your cups sizes it should work all the time. Once your code works for one tray, just copy paste it as many times as you want to create a big Gcode file that you will be able to repeat all day long. The point of this is to be able to restart a new tray just by pressing a button, instead of having to start a new job for each tray. So basically, you have your gcode in the SD card reader of the machine and after each tray you press the button to continue. At the end of the day you switch off the machine. Next day, you come back to work, switch on the machine, select “print from SD”, then select your file and you’re good to go for a new day.
You can even add the filament detection option in marlin in order to make sure that there are some cups ready in the end of the production line in the first place, so that you don’t continue picking stuff if the row isn’t full.
Electronics wise, you’ll need at the minimum an arduino mega, a ramps board, either DRV8825 drivers if you’re fine with the speeds I described earlier, or some beefier drivers capable of higher voltages, some power supplies, one or two electric relays and some pneumatic actuators. That should be pretty cheap. My advice would be to beef up the Z axis motor since it’s usually the slowest and you will have a bit of added weight with the succion cups, their support bracket and the air lines. You’ll also have to calculate the height of your machine carefully, it needs to have enough clearance to pick up the cups and lift them over the metal rods of your production line.
The only problem I can foresee is that if there is an error somewhere during the process (one cups falls off or something like that), then it might be a bit complicated to recover from it, you’ll either have to restart the new tray from scratch or to reassort it manually. But It’s not a big deal IMO, any machine would probably face the same problem without very complicated and expensive closed loop control.
Other that that, I think it should work fine and I’m pretty sure it’ll be very easy and fun to make it work