Re: [MacRuby-devel] CNC Machine control using USB to IEEE 1284 Parallel port adapter

2012-01-20 Thread Dömötör Gulyás
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  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
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] Phantom closed windows in document based apps

2012-01-20 Thread Milos & Slavica
Hi,

Has anyone seen this problem:

- Start a new Xcode project with the MacRuby document-based application 
template. 

- Open a number of windows.

- Close a window (leaving others open).

- Then do:  NSApp.windows.map {|win| p win.windowController.document}

- This produces something like:
#
#
nil
#

Notice the “nil”. It appears that, without any additional code, template apps 
fail to release window controllers, which keeps their windows and views in 
memory even after the close operation. (Objective-c template, on the other 
hand, successfully releases window controllers on close.) It is interesting in 
the above console result that the controller did close (or at least decouple) 
the associated document. 

Is this somehow peculiar to my setup, or is it a deeper problem? What can I do 
about it?

Many thanks in advance!

Milos


On 22 Dec 2011, at 12:02, Andy Stechishin wrote:

> I cannot say or certain why the problem occurred. I did further
> investigation on another computer and the problem did not repeat with
> the same same code. I then rebooted the first computer and the problem
> went did not occur.
> 
> I apologize for not posted that the problem was corrected to the list.
> In all honesty, when I never received any responses, I was not sure
> the email ever made it on the list.
> 
> As I am still running Snow Leopard on all of my systems, I continue to
> run XCode 4.0.2. I have had no further problems as described below.
> The advice to upgrade is well-meant but not possible with the current
> version of the OS that is running. I am planning to begin the upgrade
> process in the break between Christmas and New Years.
> 
> Andy Stechishin
> 
> On Thu, Dec 22, 2011 at 1:59 AM, Maik Kempe  wrote:
>> Hi all,
>> 
>> I know, it is a lame advice but maybe you should upgrade Xcode / MacRuby. 
>> Then you can create a Document based application via the wizard which works 
>> like charm for me.
>> 
>> If everything is not working, drop me a line and i can send you the 
>> generated skeleton from the wizard.
>> 
>> On Dec 22, 2011, at 8:46 AM, Min Soo Kim wrote:
>> 
>>> Hi Andy Stechishin,
>>> 
>>> I am have the same problem as you.
>>> It seems that no one is answering to your question.
>>> Have you find a what the problems was?
>>> 
>>> Thank you in advance
>>> 
>>> Min Soo Kim
>>> 
>>> 
>>> On Jul 23, 2011, at 12:46 PM, Andy Stechishin wrote:
>>> 
 I am trying to make a Document based MacRuby application. I create the
 new project in Xcode4 (4.0.2) and immediately select build and run.
 The application starts but there is no "Untitled" window and the
 File->New and File->Open menu options are greyed out. Following the
 same sequence of actions except choosing an Objective-C based
 application, the "Untitled" Window appears and the menu options are
 active. I have compared the project contents, the xib files (including
 File Owners and First Responders) and linked frameworks and can find
 no difference that would explain the different operation. It would
 seem that there is some problem with NSDocumentController in the
 MacRuby version. It is either not there or has been added properly to
 the responder chain.
 
 Am I missing something? Or is this a defect? Has anyone else
 encountered this and found a work around?
 
 Andy Stechishin
 ___
 MacRuby-devel mailing list
 [email protected]
 http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>> 
>>> ___
>>> MacRuby-devel mailing list
>>> [email protected]
>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>> 
>> Maik Kempe
>> Br∑αkíηg £ímíτs | impossible = POSSIBLE
>> 
>> --
>> 
>> Br∑αkíηg £ímíτs
>>  [email protected]
>>  breaking-limits.com
>> 
>> ___
>> MacRuby-devel mailing list
>> [email protected]
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] CNC Machine control using USB to IEEE 1284 Parallel port adapter

2012-01-20 Thread Robert Rice
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 s
 t
> 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
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] CNC Machine control using USB to IEEE 1284 Parallel port adapter

2012-01-20 Thread Rich Morin
Using a general-purpose OS (eg, Mac OS X) for real-time
applications is a bit of a tarpit.  So, I like the idea
of using an Arduino (etc) for this sort of thing.

That said, there are some things that will cause problems
even in an Arduino.  For example, taking raw input from a
switch or button may cause the Arduino to see a bunch of
momentary spikes as the mechanical contacts settle.

So, consider using some sort of hardware input filtering
(eg, a one-shot or some analog filtering).  This will be
far easier than trying to make your code handle the extra
interrupts.

-r
-- 
http://www.cfcl.com/rdmRich Morin
http://www.cfcl.com/rdm/resume [email protected]
http://www.cfcl.com/rdm/weblog +1 650-873-7841

Software system design, development, and documentation
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] CNC Machine control using USB to IEEE 1284 Parallel port adapter

2012-01-20 Thread Robert Rice
Hi Rich,

Switch de-bounce logic in the Arduino would be a nice feature.

I'm thinking that probably I could offload most or all of the motion engine to 
the Atmel µP. That would be desirable to to keep motors synchronized within a 
half micro-step while doing linear and circular interpolation. Probably it 
would also be desirable to process limit switch input in the µP.

Thanks,
Bob Rice


On Jan 20, 2012, at 3:43 PM, Rich Morin wrote:

> Using a general-purpose OS (eg, Mac OS X) for real-time
> applications is a bit of a tarpit.  So, I like the idea
> of using an Arduino (etc) for this sort of thing.
> 
> That said, there are some things that will cause problems
> even in an Arduino.  For example, taking raw input from a
> switch or button may cause the Arduino to see a bunch of
> momentary spikes as the mechanical contacts settle.
> 
> So, consider using some sort of hardware input filtering
> (eg, a one-shot or some analog filtering).  This will be
> far easier than trying to make your code handle the extra
> interrupts.
> 
> -r
> -- 
> http://www.cfcl.com/rdmRich Morin
> http://www.cfcl.com/rdm/resume [email protected]
> http://www.cfcl.com/rdm/weblog +1 650-873-7841
> 
> Software system design, development, and documentation
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel