PDA

View Full Version : CNC controller with serial (RS232) communication



rnr107
27-02-2012, 05:30 PM
Hi all,
I am looking for a CNC controller that would take G-code in via RS232 / USB or LAN and generate the pulse for stepper drivers.
Is there anything like that on the marcket at a reasonable price?

I am trying to get away from Windows timing problems...

Ta,
RNR

Jonathan
27-02-2012, 05:58 PM
For USB...

Smoothstepper is popular:
http://www.warp9td.com/ (http://www.warp9td.com/)

There's also CNCUSB:
www.planetcnc.com

LAN interfaces seem to generally be a lot more expensive, some examples here:

www.slidesandballscrews.com

I'm sure you'll find more.

To 'get away from Windows timing problems' you could just use EMC2:
www.linuxcnc.org

That doesn't entirely eliminate the 'problem', but do you need to? Clearly many people use the parallel port, so what are you making that requires a better interface or is it just for convenience?

rnr107
27-02-2012, 07:44 PM
Hi Jonathan,
I don't requiere a better connection, EMC2 would be fine... But I try to get it working many times, I can't get it control my spindle. How do I get a 0-10V output? (with Mach3 I just use a small board that is control by Pulse/Dir just like a stepper controller).
Also, windows is causing timing issues I am also runing out of space in my tiny workshop, and was thinking of using a mini PC to replace my current desktop. Unfortunatly these do no come with parallel port... :(

I looked at Smoothstepper solution, but it is USA based... Can we get them in UK ?

Robin Hewitt
27-02-2012, 09:23 PM
I am trying to get away from Windows timing problems...


Both my milling machines run on USB. When I started writing the code to do it everything seemed straight forwards. I didn't find the big snag until I added a pause button. It's not too bad, you start with a bit of panic braking and after that you have all the time in the world to sort out how you are going to get back up to speed. If it takes a whole second to sort the mess out you would never notice because the machine is paused, but it ain't easy to make it bullet proof :naughty:

I have a basic system that works and it is totally convenient to take a Win 7 laptop to the machine, plug in a USB and start cuttting but I would never describe it as commercial. I don't know of any convenient standard protocol for sending the data and interrogating the mill. All the big machine makers have their own protocols and use Ethernet. Maybe we should start a MyCNC thread and hammer out a protocol that covers all the bases and define our own standard so anyone can make the harware. I am quite happy to offer mine as a start point, but I doubt many would agree with it or even join in :smile:

audioandy
27-02-2012, 09:31 PM
There is no problem buying the Smoothstepper from the States, I like many others here in the UK have purchased one with no problems other than the dreaded import and VAT charges.

There is supposed to be an LAN version released soon.

Andy

rnr107
27-02-2012, 10:05 PM
I doubt many would agree with it or even join in :smile:

I would! :)

Andy, Thank you for confirming! Are they any good the Smoothstepper? Does they come with a Windows software?

RNR

audioandy
27-02-2012, 10:24 PM
Hi
I like the smooth stepper for the simple reason I can use a laptop to run my machine and it does what is says on the tin, smooths out the motion.
The only software you get with the smooth stepper is the driver for MACH the idea of the smooth stepper is to take all the donkey work from your pc so no timing issues.

Robin Hewitt
28-02-2012, 01:49 AM
I would! :)

Brave ! Here's a taster... :smile:

Firstly we don't know which serial port holds the USB to serial adaptor with a mill on the end of it so the software has to find it. We can draw the tool paths on the screen and have lots of neat buttons but how to find the mill?

USB devices can be either Hand Held or serial. The latter is a lot more friendly so best to go with that so as not to frighten people off writing controllers.

We can ask Windows for a list of available serial ports then send an ASCII ENQuiry character to each in turn and see what comes back. ENQ is kind of safe to send to any serial device. Now the mill is USB it can be anywhere on the list, we can't insist on COM1: it could be COM17: for all we know. The mill controller responds to ENQ with a filename, if that name exists on disk we have found a mill and we have a text file that defines it. Windows likes text files and they are dead easy to update with NotePad.

If we have more than one mill connected then we should have more than one mill definition file. The software can ask which one you want. If definition files include pet names for the mills the choice won't be gobble-de-gook. If you only have one mill definition file, it knows where to go. We could just insist you only plug one mill in at a time but how boring is that when you can run multiple mills simultaneously in different windows?

The software now hits a Windows snag. If a program doesn't release the processor umpteen times a second it will be declared as "Not responding", unfriendly and needs to be time sliced. Don't want that. My way to get around it is to start a second program that goes around in a loop, real easy to "spawn" off a new program you just write a subroutine that returns twice.

My version of this seperate program sends an 'S' on the USB which is my request for the mill status. The status will be several bytes long so while waiting for them to arrive I can releases the processor and keep Windows happy. Once I have the status I know what the mill is doing, where it is, the current feed rate, what space is available in the buffers, have we been paused etc. I can then update it accordingly, give my main program the opportunity to update the PC screen then loop back to the top for another status request.
Is anyone still with me? :naughty:

rnr107
28-02-2012, 08:39 AM
I still here... understood 90% of it... :) I did not think about the multiple mill I have to say... in my case I just have 1 :)
A Boxford 260 VMC. I just don't have the physical space for more. (I had to take the 260VMC out of its enclosure to make it fit, BTW, that is not an easy task, as it is glue/cemented to the enclosure on the base. If anybody interested in doing the same, let me know I'll give you the procedure)
Would love a CNC Bridgy!

Back on tracks:
For the multiple mill we could use multithreading process using .net. We have a piece of sofware at work design to talk to 8 electronic devices on the same time via 8 COM port. It works a bit like your idea of a seperate program runing a loop in the background, exept it is an other thread / process in the main program.
As long as your CPU suppots mutithreading (I guess all do these days) then it should work...

RNR

m.marino
28-02-2012, 11:31 AM
Andy,

the ethernet option is out and so far is showing to be a bit of improvement over the USB in that you don't the grounding issue that some of the USB cables cause with the USB SS (smoothstepper). I don't have one yet and YET is the watch word there. Everything I have read on it in the different forums that have info on it says that it for al purposes brings Mach up to full speed (at 4Mhz you would expect that) and with 51 I/O options you would be hard put for us small shop users or a hobby CNC user to max out the inputs/outputs on a board.

Hope that helps a bit and good luck.

Michael

rnr107
28-02-2012, 03:31 PM
I like the smooth stepper for the simple reason I can use a laptop to run my machine and it does what is says on the tin, smooths out the motion.

That's all I needed to know. :)


The only software you get with the smooth stepper is the driver for MACH

Great, I have a Mach3 licence... So just what I needed.


Thanks Andy!

RNR

Robin Hewitt
28-02-2012, 03:53 PM
As long as your CPU suppots mutithreading (I guess all do these days) then it should work...


Doing a proper job with Windows 7 isn't hard but there is no market for it because everyone is hung up on Mach. People have tried but the only real way to do it is an open source group effort defining a protocol for sending data between PC, mill and pendant with no patents, no licences and no secrets. That way anyone can make their own mill driver boards and write software. If everyone sticks to the same standard protocol users can then mix and match competing products to find the best combination for them. Single source systems which disappear if someone goes down the tubes are not attractive, you feel too vulnerable. It needs to be a group effort because only an enthusiastic user base will suck people in.

ptjw7uk
28-02-2012, 06:16 PM
If you want a serial controller then Conqueror Desigb & engineering have a kit of parts for one for 125 plus vat

Peter

http://www.eaziform.co.uk/index.php?products,m401

rnr107
28-02-2012, 06:35 PM
Hi Peter,
Nice found! :)
Have you tryed this controller already? any good?
Also, does it come with a Mach3 plugins or does it has its own software?

RNR

ptjw7uk
28-02-2012, 07:11 PM
I have one of their control boxes which runs on their own software, works fine for me!
The main reason I went with them was that it was all in a box ready to go, as at the time I was busy doing the mill mechanics.
Plus the fact I am not enamoured of windows control of a machine as it often buggers off doing its own thing etc.

Peter

rnr107
28-02-2012, 09:49 PM
I am not enamoured of windows control of a machine as it often buggers off doing its own thing etc

I know exactly what you mean mate.... :tongue: