I'm starting up a blog at http://ckcnc.wordpress.com to document what I'm working on. There's nothing much there yet but there will be more over the next couple weeks. I've got all the pieces working, what I need to do know is tighten everything up. I'm designing a board that will have two encoders (MPG and Spindle/FRO) and switches for axis and scale selection, continuous feed, and cycle start/pause/single block, plus maybe a few extra depending on what I can squeeze in.
What I'm playing with right now is adding an LCD display that could act as a remote DRO, which would be really nice to have on a pendant. It's tempting because a 20x4 display can convey a ton of information with 6 output pins from the Arduino. But, I am running tight on pins as it is, and I feel like I'd prefer to have hard LEDs for things like the axis and scale selections, rather than forcing people to read an LCD. Of course, a Max7219 -segment LED driver gives me 64 outputs from 3 pins, so maybe if I can get both to work.... more power! But I'm also unsure about how much data I can reliably push through the wire. I can do all the core stuff with single-byte messages very easily, but a DRO message requires 7 for a value like X12.345 (using ASCII), and it gets messier if your messages have different lengths. So I'm just not sure how far I am from running into contentions between, say, HAL pushing position updates to the DRO, and the MPG wanting to move the axis. In principle there's plenty of bandwidth at slightly higher speeds like 19200 or 57600bps, but my sense is these can be sufficiently less reliable that I'd prefer to be really conservative, especially if I start selling the board. Anyway, for your hacking in the meantime, my main suggestion is to build the stack up in stages like this: - Write your Arduino sketch with one or two inputs and outputs. Test it with the serial monitor until it's doing exactly what you think it should. - Write a minimal Python program you can run from the command line, and make it talk to the Arduino, again using the serial monitor to verify everything. - Add the HAL component to the Python program, and test it from the command line with halrun to verify it's setting pin values as you expect. - THEN, and only then, link it up with your GUI of choice. Basically, my experience was that the vast majority of my problems were actually in getting Python and the Arduino to communicate as I wanted. Getting Python to communicate with HAL was almost trivial. Colin- > Your post was quite timely for me as I just recieved an Arduino with the > intention of creating exactly the same setup for my gantry router. If you > could > share your code it would be a tremendous help and quite possibly save me > from > having my head explode. :) > ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users