The software that controls the machine and converts G-code into pulses that are sent to the electronics. Examples Mach3 and EMC2.
By eldersoares
Hi everyone!

I'm a programmer, I used to program high level graphic languages but now I’ve started a project where my app must connect to a machine via usb-db25 parallel and send data to start a motor in 2 directions, change the velocity, stop it, turn leds on and off and receive data when a sensor says that the top or bottom of the movement has been reached.

I REALLY HAVE NO IDEA how to do it! I've been searching a lot on forums but i don't have much (or any) knowledge in electronics. The machine is being built with some microcontrollers, i think, with a parallel port. I was told I just had to tell the builders which pins I would use to send/receive each signal. I have an usb-parallel adapter that windows recongnizes as "IEEE 1284". I think I should send data to some port that is assigned to this adapter, or to the usb slot I connected it to. That's everything I can tell you for now. If someone helps me, it will be very appreciated!!!!!

Thank you in advance!!!
User avatar
By AJ Quick
It sounds like you're working on something very custom and unrelated to CNC.

There is going to be some overlap though with how the CNC electronics work however. First of all. It is possible that the USB -> DB25 adapter you have is not an actual DB25 replacement, but rather a printer adapter. If it is, it is likely not capable of pulsing at the proper speed to ensure proper stepper control.

Something like an Arduino could actually accomplish what you are after fairly easily. You could even control it from the computer using USB.

You would need to write a sketch that has a few pins defined for digital output, a few for inputs. It might even be as easy as pulsing the stepper from the Arduino (at a particular rate to specify velocity), and then checking if a limit switch has been triggered on the input.

Steve, Thanks for letting us know. I believe the[…]

What are your DIP switches set to? They can cause […]

CNC electronic questions?

AJ, Thanks a lot for your help,

Testing the 3 Axis Controller

I had replied to your email, but I'll post this he[…]