Steve Blackmore wrote: > Hi guys, I'm trying to configure my spindle so I can get forward and > reverse. > > There is a relay that connects to fwd/rev and another relay that cuts > the common supply to the outputs of that relay. > > I've got it set so pin16 enables the relay and gives me cw. > I've got pin 17 set for ccw - that isn't connected to anything (the > relay is a NO/NC type) so when 16 isn't enabled it gives me ccw. > > The other relay is connected to pin 14 and set for spindle-on. > > The problem is stepconf has linked spindle-on to pwmgen??? > > When you try and run - it fails with "pin motion.spindle-on" is already > linked? > > The relevant parts of the hal file follow > > > net spindle-cmd <= motion.spindle-speed-out => pwmgen.0.value
The following line creates a signal called spindle-enable, that is driven by motion.spindle-on and drives pwmgen.0.enable > net spindle-enable <= motion.spindle-on => pwmgen.0.enable > net spindle-pwm <= pwmgen.0.pwm This line tries to create another signal called spindle-on, that is driven by motion.spindle-on and drives nothing. You can't do that. > net spindle-on <= motion.spindle-on > net spindle-cw <= motion.spindle-forward > net spindle-ccw <= motion.spindle-reverse > > I want spindle-on to enable pin14 AND pwmgen.0.enable - how do I do it? You need to create one signal that is driven by motion.spindle-on and drives both pwmgen.0.pwm and parport.0.pin14. You can either name that signal spindle-enable, by editing the first line from: net spindle-enable <= motion.spindle-on => pwmgen.0.enable to: net spindle-enable <= motion.spindle-on => pwmgen.0.enable parport.0.pin-14-out My email client wrapped the above command, it should all be on one line. You can also name the signal spindle-on by removing the first line and editing the second one to be: net spindle-on motion.spindle-on pwmgen.0.enable parport.0.pin-14-out Note that the arrows are totally optional, they help a human understand the file but are ignored by EMC. I left them out of the second version so it would be shorter and not get wrapped. In general, a signal can be driven by one source, and drive as many loads as you want. Just keep adding pin names to the net line. Regards, John Kasunich > > Thanks > > Steve Blackmore > -- > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users