Hello Guest it is March 28, 2024, 05:29:40 PM

Author Topic: Trying to get Mach3/Mach4 to work with Dorna Robot G2Core Arduino Due 5-axis  (Read 1814 times)

0 Members and 1 Guest are viewing this topic.

I have a Dorna Robot which is a 5 axis robot that uses Arduino Due/G2core.  I want to speed the robot up and use arduino due thats installed in the controller.  It was originally setup for G2core but I heard that it is buggy so thinking to flash to GRBL then using Mach3 or Mach4 to control.  Any suggestions?  Do I need any external hardware?

I will be attaching a fancy cognex 2d camera to PC for robotic guidance and part inspection.  Will Mach4 be better for this?

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Neither Mach3 or Mach4 support full kinematic motion for robot arm control however there is a 'teach' function whereby a sequence of (5 or 6 axis) movements can be recorded and then repeated as desired (bit like the operation of a robot arm in a car body welding shop).

Tweakie.
PEACE
Or indeed GRBL.!
I asked chatgpt this is the response I got:

Mach3 and Mach4 are both CNC software programs that can be used to control CNC machines. They both support full kinematic motion, which means they are able to control the movement of the machine in all three axes (X, Y, and Z) and can perform a wide range of motion commands, including linear and circular interpolation, helical motion, and more.

Mach3 and Mach4 are capable of controlling CNC machines with 5 axes, but the level of support for kinematic motion in 5 axes may vary depending on the specific version and configuration of the software. Some versions of Mach3 and Mach4 support 5-axis motion control using specialized plugins or add-ons, while others may not have built-in support for 5-axis motion control.
Additionally, The five-axis functionality also depends on the capability of the controller used in the CNC machine. It is recommended to check with the software and controller manufacturer for specific details on 5-axis motion control support.


Mach3 was suggested by the manufacturer over g2core as g2core open source has some bugs.  It can be done and can make the robot move much faster.  There is a g2core plugin for mach4 not sure about mach3.
Well despite the great press it's getting at the moment I don't think chatGPT is all that reliable when it comes to given good factual answers, based on some recent personal experience.  I think there is also a misunderstanding both perhaps on the part of chatGPT and your manufacturer as to what g2core does compared with Mach3/4.  Mach is not just, or even, a motion controller as I understand it.  Mach3 can control motion using stepper type motors with what amounts to a parallel port plugin which is the "motion controller" part.  Though I understand there is a PP plugin for Mach4 it is deprecated and an external motion controller is preferred - which might logically be g2core or GRBL but neither of those are supported.  There is a range of motion controllers for Mach that connect using either Ethernet or USB - their suppliers need to implement the API to Mach which is not open.  Though Mach can certainly control 4 axes, and might do 5, it is optimised to run CNC machining define by G-code commands rather than a robot.
Hi,
Mach, be it Mach3 OR Mach4 is a Gcode interpreter and trajectory planner. Its output is a string of numeric data, in 32 bit integer blocks that describe the controlled point in 1 millisecond time slices.
To my knowledge neither g2core nor GRBL can accept the numeric data that Mach produces.

A motion controller, for example an Ethernet SmoothStepper, has a plugin which is software that adapts the motion controller to Mach....but the same basic scheme is in action,
ie Mach produces a stream of numeric data, and the motion controller converts that data to pulse stream suitable for the axis motor drives.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
I am trying to remove g2core/grbl from my system.  The controller already has a microprocessor (arduino due) wired up to servos.  I am hoping for a solution that does not require me to do any rewiring.  There are alot of wires for 5 axis and it already has a usb output/input.  Hoping to reflash firmware on arduino due so that it works with mach3/4.  Please tell me if not possible.  Hacking wires is not my specialty.
Hi,
from what I can see it looks like the Arduino is the motion controller, but I know of NO Arduino based controller that accepts trajectory data
from either Mach3 or Mach4.

If you want to do that then get an Ethernet SmoothStepper and use the SmoothStepper to signal your five axis drives. The you could use Mach3
or Mach4, but note that Mach is a Gcode interpreter.....I'm not at all sure it will drive a robot arm.

Can you post a pic of the robot? If the robot has X, Y, A, and B axes then maybe, but if the axes are not orthongal then you require a kinematic
solver, and that is not what Mach does.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
« Last Edit: January 16, 2023, 02:53:15 AM by Reckless »
Hi,
that is a robot arm with three rotating joints that I can see.  Gcode cannot drive that.

Gcode, at least lets start with just three axis Gcode, describes the movement of a machine along the X axis,
Y axis and Z axis all mutually orthogonal to each other. If you have a Gcode file like this:

G1 X 100
G1 Y100
G1 Z 100
G1 X0 Y0 Z0

then the machine moves to 100mm in the X direction, then it moves 100mm in the Y direction, then 100mm in the Z direction,
and the last line causes all three axes to move at once it a straight line from (100,100,100) to (0,0,0).

In order for your robot arm to describe a 100mm linear movement requires coordinated action between the three rotating joints.
This is done by a 'kinematic solver'. If you wish to make for instance a linear move of 100mm in a given direction at a given speed
the you need some software that can 'solve' for the required commands to each of the three rotating joints so that motion can be achieved.
The relationship between the three rotating joints is not necessarily constant either.

Mach is not, nor will it ever be a kinematic solver. If you have a separate program that does the kinematics then you could potentially use Mach
to signal the motor drives, not a very practical solution. It would be a bit like translating English into Chinese and the Chinese to Russian, when it would
be better to translate direct from English to Russian and skip the Chinese bit altogether.

I don't think Mach is going to help you. Mach is a GCode interpreter and orthogonal trajectory planner, great for CNC machines and 3D printers,
CNC lathes and CNC Laser tables but no good for robot kinematics. You are barking up the wrong tree.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'