11
General Mach Discussion / Re: Arduino - Mach 3 - Gcode M6 T0101
« on: March 28, 2022, 02:12:37 PM »
another thing, as I'm using Arduino mega with a CNC shield mounted at the top. Won't this interfere ?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
In the Arduino sketch you can do an if statement in the main loop. You can read the value of a register from Mach3 modbus or the state of a pin which can be connected to an output pin from Mach.
In the tool change macro you can either turn an output on and off to signal the arduino to start the tool change sequence. Or change the value of a user DRO which can be read in brains and then to modbus. Then you can do a while statement in the tool change macro which waits for the input from Arduino to finish the tool change macro.