On Fri, 2011-08-12 at 16:49 -0400, cogoman wrote: ... snip > I have a seminal idea I'm trying to reason out (or away.) A while > ago there was a thread here about interfacing to an ARM micro-controller > on the parallel port. I expected EMC2 to read position data for 4 or 5 > axes from the P-port, read homing and limit switch states, do some > calculations with the data, and then send velocity information for 5 > axes back to the P-port. I'm thinking about a stepper system that would > use existing P-port messages and act like a servo system to EMC2, but > cost a lot less than a real servo system. I was hoping EMC2 would ask > for information, and get back a series of bytes that covers all it needs > to know, then do multiple writes in a clump; so the micro-controller > wouldn't have to drop everything for long. Address-data address-data > address-data seems like a lot of overhead. > I'd just hate to have to write a new interface for a > micro-controller. More work. Of course I'll probably never get to > implementing any of this, but I like to dream. I'm definitely an idea > hamster.
Have you checked out the AVR and Modbus pages on the wiki? http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?AVR http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?FPGA http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?VFD_Modbus The AVR page has sample code for EMC2 and AVR. Oops, I went through the page and found an SPP example with an EMC2 component, but no AVR code. I think I have the code in the shop somewhere, if you might be able to use it. The hard part of the code was learning how to use a counter to make a PWM output to a motor driver. The easy bit was to read eight digital input pins and store the data into the PWM counter register. It has been quit a while since I have worked on it and I don't think I implemented any communication control or more than one register, so it might not be of much use. The Modbus links are for an example register based control. Modbus goes through serial or Ethernet links, but Modbus code could be modified to use a parallel link. The VFD page is just more Modbus stuff. -- Kirk Wallace http://www.wallacecompany.com/machine_shop/ http://www.wallacecompany.com/E45/index.html California, USA ------------------------------------------------------------------------------ FREE DOWNLOAD - uberSVN with Social Coding for Subversion. Subversion made easy with a complete admin console. Easy to use, easy to manage, easy to install, easy to extend. Get a Free download of the new open ALM Subversion platform now. http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
