Re: [MacRuby-devel] CNC Machine control using USB to IEEE 1284 Parallel port adapter
Hello, Long time lurker making first post here. You could use an Arduino and do the real time pulse generation stuff on that. Then just write a macruby app that serialises the commands and feeds them to the Arduino which interprets them and flips the necessary IO pins on and off. It's years since I looked at this stuff but I seem to remember that CNC commands work such that they could be grouped into a single machining operation. Hypothetical example to cut a slot on a horizontal miller: Start milling cutter, start carriage +z, stop carriage, start carriage +x, stop carriage, start carriage -z, stop carriage, stop cutter. You could load that whole sequence into the Arduino if you break it down into groups like this. Put the arduino in a plastic box with a parallel port on one end and usb cable coming out the other? I don't know for sure that this would work, but in my experience microcontrollers are much simpler to do real time stuff on because they have pretty much no software stack compared to a desktop PC. Will On 18 Jan 2012, at 09:10, macruby-devel-request@lists.macosforge.org wrote:
Hi,
I've become interested in Computer Numeric Control (CNC) machine control. I find there is very little support for the Macintosh platform and many PC programs for the task have a crude user interface so I would like to create a Macintosh CNC application using MacRuby.
CNC programs and motor drivers generally use the LPT parallel port output from a PC in the basic unidirectional mode. Most PC CNC apps do not support PC laptops due to processor sleep logic interfering with stepper motor timing. I would need a similar fast interface on the Mac.
I have a Prolific 2305 based USB to IEEE 1284 adapter cable that I would like to use. Mac OS recognizes the device as an "IEEE-1284 Controller" in the USB device tree and I can add a generic print queue for the device, but I don't know how to connect to the device at high speed as the printer controller does.
Prolific provides documentation for the simple report protocol for the device. I suspect that an appropriate driver already exists for this device but how would I find it?
Thanks, Bob Rice
Hi Will, Thanks for the info on Arduino - looks like some interesting possibilities there. I didn't realize that Arduino had several different boards available. I may be able to connect one or more boards to a DB25 parallel connector to control my HobbyCNC micro-stepping driver board. Thanks, Bob Rice On Jan 18, 2012, at 10:33 AM, Will Thorne wrote:
Hello,
Long time lurker making first post here. You could use an Arduino and do the real time pulse generation stuff on that. Then just write a macruby app that serialises the commands and feeds them to the Arduino which interprets them and flips the necessary IO pins on and off. It's years since I looked at this stuff but I seem to remember that CNC commands work such that they could be grouped into a single machining operation. Hypothetical example to cut a slot on a horizontal miller: Start milling cutter, start carriage +z, stop carriage, start carriage +x, stop carriage, start carriage -z, stop carriage, stop cutter. You could load that whole sequence into the Arduino if you break it down into groups like this. Put the arduino in a plastic box with a parallel port on one end and usb cable coming out the other? I don't know for sure that this would work, but in my experience microcontrollers are much simpler to do real time stuff on because they have pretty much no software stack compared to a desktop PC.
Will
On 18 Jan 2012, at 09:10, macruby-devel-request@lists.macosforge.org wrote:
Hi,
I've become interested in Computer Numeric Control (CNC) machine control. I find there is very little support for the Macintosh platform and many PC programs for the task have a crude user interface so I would like to create a Macintosh CNC application using MacRuby.
CNC programs and motor drivers generally use the LPT parallel port output from a PC in the basic unidirectional mode. Most PC CNC apps do not support PC laptops due to processor sleep logic interfering with stepper motor timing. I would need a similar fast interface on the Mac.
I have a Prolific 2305 based USB to IEEE 1284 adapter cable that I would like to use. Mac OS recognizes the device as an "IEEE-1284 Controller" in the USB device tree and I can add a generic print queue for the device, but I don't know how to connect to the device at high speed as the printer controller does.
Prolific provides documentation for the simple report protocol for the device. I suspect that an appropriate driver already exists for this device but how would I find it?
Thanks, Bob Rice
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
On 18 Jan 2012, at 15:33, Will Thorne wrote:
Hello,
Long time lurker making first post here. You could use an Arduino and do the real time pulse generation stuff on that. Then just write a macruby app that serialises the commands and feeds them to the Arduino which interprets them and flips the necessary IO pins on and off. It's years since I looked at this stuff but I seem to remember that CNC commands work such that they could be grouped into a single machining operation. Hypothetical example to cut a slot on a horizontal miller: Start milling cutter, start carriage +z, stop carriage, start carriage +x, stop carriage, start carriage -z, stop carriage, stop cutter. You could load that whole sequence into the Arduino if you break it down into groups like this. Put the arduino in a plastic box with a parallel port on one end and usb cable coming out the other? I don't know for sure that this would work, but in my experience microcontrollers are much simpler to do real time stuff on because they have pretty much no software stack compared to a desktop PC.
Hi, Another lurker making a first post here! I'm getting into CNC Arduino and I've been doing very much what you describe. I've currently got a lathe/mill (Sieg C1 lathe + X1 head) that I've got driven by three steppers (Vexta PK545) with their driver modules directly hooked to an Arduino. I initially custom programmed the Arduino for each job, but now I'm sending simple commands from OSX and the Arduino parses the commands and bit bashes to step the motors. There's one step connection and one direction connection per motor, and one common "engage" connection to let me manually position; 7 outputs total. At the moment I'm manually sending CNC commands using screen, plus I've got a few custom routines as command line C binaries (drill a big hole with a small end mill and do a crib board ;-) I hadn't thought of using MacRuby for this... Bill
A little OT, but it seems like there is healthy interest for doing CNC machining from OS X, with or without MacRuby, I am currently working on an AVR/Arduino based solution myself, so anybody know of a topical ML and/or Wiki, or is there interest in setting up a site, or project on github/launchpad to gather code, docs, war stories? On 19 January 2012 22:21, Bill Hill <mail@wbh.org> wrote:
On 18 Jan 2012, at 15:33, Will Thorne wrote:
Hello,
Long time lurker making first post here. You could use an Arduino and do the real time pulse generation stuff on that. Then just write a macruby app that serialises the commands and feeds them to the Arduino which interprets them and flips the necessary IO pins on and off. It's years since I looked at this stuff but I seem to remember that CNC commands work such that they could be grouped into a single machining operation. Hypothetical example to cut a slot on a horizontal miller: Start milling cutter, start carriage +z, stop carriage, start carriage +x, stop carriage, start carriage -z, stop carriage, stop cutter. You could load that whole sequence into the Arduino if you break it down into groups like this. Put the arduino in a plastic box with a parallel port on one end and usb cable coming out the other? I don't know for sure that this would work, but in my experience microcontrollers are much simpler to do real time stuff on because they have pretty much no software st ack compared to a desktop PC.
Hi, Another lurker making a first post here! I'm getting into CNC Arduino and I've been doing very much what you describe. I've currently got a lathe/mill (Sieg C1 lathe + X1 head) that I've got driven by three steppers (Vexta PK545) with their driver modules directly hooked to an Arduino. I initially custom programmed the Arduino for each job, but now I'm sending simple commands from OSX and the Arduino parses the commands and bit bashes to step the motors. There's one step connection and one direction connection per motor, and one common "engage" connection to let me manually position; 7 outputs total. At the moment I'm manually sending CNC commands using screen, plus I've got a few custom routines as command line C binaries (drill a big hole with a small end mill and do a crib board ;-) I hadn't thought of using MacRuby for this... Bill _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Hi, Thanks for all of the replies. I was looking for a Mac based CNC program long ago and was amazed that there still is little or none. I don't have a lot of time in this yet, but I was able to design a nice CNC UI and basic motion engine easily using MacRuby. There is certainly enough interest for me to continue on this project. I like the Arduino solution and ordered a nano board. The Atmel 328P should be able to generate the fast pulse train required for the highest micro-stepping resolution. Bob Rice On Jan 19, 2012, at 4:21 PM, Bill Hill wrote:
On 18 Jan 2012, at 15:33, Will Thorne wrote:
Hello,
Long time lurker making first post here. You could use an Arduino and do the real time pulse generation stuff on that. Then just write a macruby app that serialises the commands and feeds them to the Arduino which interprets them and flips the necessary IO pins on and off. It's years since I looked at this stuff but I seem to remember that CNC commands work such that they could be grouped into a single machining operation. Hypothetical example to cut a slot on a horizontal miller: Start milling cutter, start carriage +z, stop carriage, start carriage +x, stop carriage, start carriage -z, stop carriage, stop cutter. You could load that whole sequence into the Arduino if you break it down into groups like this. Put the arduino in a plastic box with a parallel port on one end and usb cable coming out the other? I don't know for sure that this would work, but in my experience microcontrollers are much simpler to do real time stuff on because they have pretty much no software st ack compared to a desktop PC.
Hi, Another lurker making a first post here! I'm getting into CNC Arduino and I've been doing very much what you describe. I've currently got a lathe/mill (Sieg C1 lathe + X1 head) that I've got driven by three steppers (Vexta PK545) with their driver modules directly hooked to an Arduino. I initially custom programmed the Arduino for each job, but now I'm sending simple commands from OSX and the Arduino parses the commands and bit bashes to step the motors. There's one step connection and one direction connection per motor, and one common "engage" connection to let me manually position; 7 outputs total. At the moment I'm manually sending CNC commands using screen, plus I've got a few custom routines as command line C binaries (drill a big hole with a small end mill and do a crib board ;-) I hadn't thought of using MacRuby for this... Bill _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
participants (4)
-
Bill Hill
-
Dömötör Gulyás
-
Robert Rice
-
Will Thorne