Hello Guest it is March 28, 2024, 08:45:06 PM

Author Topic: what is Mach3 sending to the controller over the USB connection?  (Read 3014 times)

0 Members and 1 Guest are viewing this topic.

Is Mach3 sending step pulses, some higher level trajectory information, or perhaps even g-codes? Perhaps different USB controllers accept different level inputs. Is there an easier way than snooping on the USB port to tell what's going back and forth?
For what it's worth, I'm using a Xulifeng Mach3 USB Board, sometimes labeled as the AKZ250. The USB interface is handled by an ATMEL mcu, it looks like the stepper pulse formation in going on in an Altera CPLD.

Re: what is Mach3 sending to the controller over the USB connection?
« Reply #1 on: April 09, 2015, 08:45:33 PM »
I have the same board, and was wondering the same thing.  If you find out please let me know.  It actually works quite well too.

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: what is Mach3 sending to the controller over the USB connection?
« Reply #2 on: April 09, 2015, 09:04:05 PM »
The Mach3 plugin SDK might have the info you're looking for.
http://www.machsupport.com/software/downloads-updates/#tabs-5

It's not sending g-code or step pulses.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: what is Mach3 sending to the controller over the USB connection?
« Reply #3 on: April 10, 2015, 12:01:05 PM »
As Gerry noted, it's not sending g-code or step pulses. What it is sending is a bit of a mystery to me. The USB probe shows a pretty constant interaction - packets going back and forth every couple of  milliseconds. Not enough for steps, way too much to be any sort of high level trajectory control.

I've looked at the SDK but unfortunately it contains no documentation other than commented code (or at least none that I could find.) Kind of a hard way to get an overview of how the interface is designed.

I haven't been able to force the error to occur while the USB snoop was in operation, so I don't know where it's occurring. The nature of the problem appears to be that a move is commanded but at some point the movement stops but Mach 3 thinks it's continuing to the end of the commanded motion, then motion starts up again with the next g-code, but the machine has lost position, possibly by thousands of counts (many inches). This failure could be anywhere - the PCs USB stack, the controller, ... hard to tell, esp since it's random.

I suppose something to try is the read-ahead latency in the plug-in, though without repeatability knowing if it fixed the error will be hard to determine.