Why parallel port for CNC control?
Timothy D. Swieter
Posts: 1,613
I have had an interest in home manufacturing and CNC for a while. Over the weekend I was reading the latest Make Magazine and it occurred to me that so many CNC drivers and software programs rely on the parallel port. Now, we have all read the articles and forum posts with lamenting at the lack of serial ports on computers, but aren't parallel ports heading down the same path?
I understand that the parallel port is used as digital I/O to make the stepper drivers move or to get feedback from a switch input, but why not use serial or USB and put a simple microcontroller in between the PC and the stepper driver? For home CNCing you want to keep the smarts in the computer because computers are cheap and easily available. For a home CNC person they don't want to have to learn some other complicated device or pay for it. However I could see a serial or USB micro to parallel port device being a good thing to open up the computers that can be used for controlling the CNC machine. The device wouldn't have to be expensive or complicated. In fact it could be as simple as a 'smart' usb/serial to parallel port driver.
The problem with just creating it is that there doesn't appear to be a protocol for communicating. Thus anything created would be target to one specific software or platform, unless they were all open enough to incorporate a driver to send commands over usb/serial. There would have to be a protocol for sending an instruction or set of instructions out the usb/serial port, having the micro execute them and then ask for more from the PC.
I know we have several people on the forum who are into the CNC arena more than I am so I am eager to learn if this idea has been tried or if there are other reasons that the Parallel port is used.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
Post Edited (Timothy D. Swieter) : 2/2/2010 7:51:24 AM GMT
I understand that the parallel port is used as digital I/O to make the stepper drivers move or to get feedback from a switch input, but why not use serial or USB and put a simple microcontroller in between the PC and the stepper driver? For home CNCing you want to keep the smarts in the computer because computers are cheap and easily available. For a home CNC person they don't want to have to learn some other complicated device or pay for it. However I could see a serial or USB micro to parallel port device being a good thing to open up the computers that can be used for controlling the CNC machine. The device wouldn't have to be expensive or complicated. In fact it could be as simple as a 'smart' usb/serial to parallel port driver.
The problem with just creating it is that there doesn't appear to be a protocol for communicating. Thus anything created would be target to one specific software or platform, unless they were all open enough to incorporate a driver to send commands over usb/serial. There would have to be a protocol for sending an instruction or set of instructions out the usb/serial port, having the micro execute them and then ask for more from the PC.
I know we have several people on the forum who are into the CNC arena more than I am so I am eager to learn if this idea has been tried or if there are other reasons that the Parallel port is used.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
Post Edited (Timothy D. Swieter) : 2/2/2010 7:51:24 AM GMT
Comments
If you made a $10 widget that did the same thing but using USB and a driver that worked pretty much anywhere, and sent them FOC to all the guys who write the control software, with a simply description of how they could do what they needed to do, you'd sell them like hotcakes. Until you can get the price down to nothing though, you are competing against the millions of old 386 machines lying around with Parallel ports that run tried and tested software.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Life may be "too short", but it's the longest thing we ever do.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out the Propeller Wiki·and contribute if you can.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
buffer to fill and then some time much later the pins get changed one at a time after the packet is sent one bit
at a time. Serial has latency. The switch from IDE/PATA to SATA drives makes no sense at all to me, since you are
accessing the hard drive 1 bit at a time instead of 16 or more bits at a time, obviously 16 times slower at least,
and with 16 times the buffer latency. It makes even less sense for multicore. Maybe that explains why someone
complained to me that an old DOS game runs slowly on their new machine, while it runs so fast on my Celeron
that I can't play it, things go too fast for me to control or even SEE.
Parallel is virtually instantaneous. Serial is guaranteed to be delayed.
Which is better, running a race starting on a line across a wide track,
or standing in a queue line with one person in front and everyone else behind another person on a narrow walkway?
I remember intel's bogus huge pentium II and pentiumIII, with the fake hologram chips, and their claim that the
laws of physics forced them to be made like that, but in laptops they used regular normal chips that looked like
pentium 1 and pentium 4. It's like if you sell training wheels for cars, or ice cube trays for ovens,
someone will buy them!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I should be typing in Spin now.
Chips with less pins. Much easier to get timing to align (Let's try and layout a board that works at 3Ghz with 2 balanced conductors, now try it for 20 parallel conductors). Point to point (no master/slave excrement). Less board realestate for connectors. Cheaper connectors/cables. Differential signaling, so better SNR and longer cables.. want to go on?
All in all, it's actually a much simpler interface to make go *fast*. Quite logical if you think about it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Life may be "too short", but it's the longest thing we ever do.
http://www.tigerdirect.com/applications/category/category_slc.asp?CatId=471
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tia'Shar Manetheren
The parallel port drivers dramatically reduce development time for the product. With a parallel port and an 8255 or similar latch/distributor a power supply and some beefy transistors, your stepper driver is done.
With serial controllers there has to be some intelligence on the driver board in terms of command interpretation and buffering which means development in a second software environment besides windoze.
Time is money, programming time is more.
J-
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent!
Send $1 to CannibalRobotics.com.
This is interesting feedback. I venture to guess that a USB/Serial protocol doesn't exist because it has been so easy to use the Parallel Port. At some point using the LPT gained momentum and that is why everyone is still using it today - but that doesn't mean that everyone still will be using it tomorrow or next year. If there was a standard for how to package and send commands from software like Mach3 or EMC2 to something as simple like an 8/16/32 bit micro whose only purpose is to translate between I/O and USB/Serial then we would see development in that area. I think some agreement or standard needs to help push in that direction. Maybe not a formal standard, but something not unlike the parallel port where a couple people start using, it gains momentum and then becomes a bit of a standard by default. Open source hardware/software could help push this movement.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
BTW I have seen LPT to USB adapters everywhere ...
personly I feel LPT is the standard and that if you buy a $20K CNC that a free adapter should come too .... kinda like how parallax offers in the same online store BS2 serial boards with a adapter or plain .
Peter KG6LSE
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Carpe Ducktum" "seize the tape!!"
peterthethinker.com/tesla/Venom/Venom.html
Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway. —Tanenbaum, Andrew S.
LOL
If you offload enough of the intelligence to an external peripheral (a little computer or microcontroller in a box), you can get away with serial or usb. If you can download the entire motion program to the external device and then just monitor it from the PC then serial or usb are fine. The Makerbot works this way - you download the program and then the AVR chip it uses does all the work.
A lot of PC based motion control has traditionally been done using fancy cards installed in the PC that control external motors. They are essentially "computers on a PC card" that sit inside your computer.
Also, USB to LPT adapters are notoriously bad and should be eliminated from the face of the earth. They often don't even work well with printers. There are numerous USB to parallel output devices that work much better (including chips from FTDI) - just don't let a printer interface try to get in the way.
It's easy to confuse a DB25 serial port with a DB25 parallel port,they're·not the same.
Not all CNC Apps use the parallel port, Take a look at FLASHCUT. Its USB based.
The parallel port is nothing more than a serial to parallel shift register.Once the register is loaded, the enable pin is set and all the data is paralleled out at the same time.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
Post Edited ($WMc%) : 2/4/2010 2:20:21 AM GMT
How so? They are different genders.
There is nothing "serial" about a Parallel port.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Life may be "too short", but it's the longest thing we ever do.
1 - Low cost parallel port boards available for all PC bus versions.
2 - The parallel port quickly became a standard fixture on the motherboard.
3 - Could be controlled by simple print commands from most languages.
4 - Relatively simple to control directly from lowwer level languages.
5 - The basic pinout was well known. At least 8 output pins plus a strobe, and a minimum of 2 input pins.
6 - Simple to interface to external circuitry. In many cases a simple '373 was enough.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
How does the front side bus and the back side bus on a home PC get loaded from a single core CPU?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
A latch.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Life may be "too short", but it's the longest thing we ever do.
Not even close.
You still have 1 life-line left, would You like to call a friend courtesy of AT&T?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
No room for a parallel port card in a CubieTruck....
Parallel ports are already obsolete, and for my CNC machine that I wanted to run Mach 3 on, I had to go onto Craigslist where I found a big fat HONKING desktop. It could double as a boat anchor.
Fun Fact: The standard used in your parallel port requires that any pin may be accidentally connected to another without any damage to anything. I think that's pretty cool.
I'd like to see a Prop-based solution to this. There are some good contributors on the forum making progress.
For me, right now in the middle of my CNC build, I went with Mach3 and a setup from China (Board TB6560).
Just as an aside, I hear people talking about getting a parallel card for their laptop. I don't even know where one would go on my laptop, there's no room.
Good point! Mach3 actually do work with external devices, at least one of which has both an Ethernet AND USB interface. I am sure these guys would be open to collaborating on such a development because they are in the business of selling the software.
You guy's realize this is a four year old thread?
Still may be pertinent.
LOL...too funny! But a great idea is a great idea....the external stuff that is available for Mach3 is way more spendy than need be!
And so, it is a legacy choice that lives on for all the old junk hoarders out their that want to scrounge for a 3-D printer.
LinuxCNC supports it, but also supports serial via USB and regular serial.
++++++++++++
What is wrong with supporting legacy devices that can use an old junker of a computer? Linux runs wonderfully on these devices.
Do we always have to go shopping for new stuff for a new project?
If I spend as much on woodworking equipment as I have spent on computer upgrades, I would actually have something of a decent woodshop and maybe some really nice custom furnature to show for the cash outlay.
As it is, I have boxes of disks, and cables, and other stuff.
In LinuxCNC does eliminate a layer of boards to translate motor control from serial to stepper pulses. So there is a cost savings.
Same reason I keep at least three 486 machines running to keep old DOS based parallel based EPROM Programmers running. I think I have a fourth if I need it. An plenty of 8 GB hard Drives.
Hey Loopy, have you located a serial device supported by LinuxCNC or do I misunderstand?
And yes, I know this is a very old thread.
LinuxCNC can support serial devices as is -- either RS232, RS485 (likely a best), or USB. But if you want to know about controller boards, they do exist.
Arduino has a firmware that is supposed to work, called Grbl. But it won't support 3-D printers, just CNC. At this juncture, there is nothing for the Propeller to work with the LinuxCNC. It is a shame, but maybe someone can work off of the Grbl code to create a board.
Why is RS485 the best interface for serial?
1. Resistance to noise in what is likely to be a hostile industrial motor environment.
2. Can easily out-distance USB cables, so computers don't have to be exposed to grease and other risks of damage.
Try to port the Grbl code to a Propeller with Martin H.'s library of code. Look for Propelleruino. Go to page 1 for video.
Propelleruino video