Jack Ensor wrote: > I couldn't find an example emc setup in the EMC2 distribution that I could > use > very readily for my particular setup. > > What I have is a Bridgeport which has an old "Bandit" CNC. I intend to > salvage > its stepper drivers which each require a quadrature input along with an enable > signal. Therefore, I am looking for an example which outputs these signals > from > two parallel ports. > > Is something like this available?
We can't have samples for every possible machine, there are thousands of possibilities. One of EMC's great strengths is that you can configure it for just about any machine. So you need to learn how to modify an existing configuration to meet your needs. In your case, you need two things: 1) you need to change your step generators from step/dir to quadrature. In section 7.1 of http://linuxcnc.org/docs/HAL_Documentation.pdf (page 68 or so) you will find documentation for the software step generator. It can do 15 different kinds of step waveforms. Traditional step/dir is type zero, and quadrature is type 2. Somewhere in your hal files (probably in core_stepper.hal) is a line that looks like: loadrt stepgen step_type=0,0,0 If you want all three axes to use quadrature, change it to: loadrt stepgen step_type=2,2,2 Also in core_stepper.hal, you will find lines like: newsig Xstep bit linkps stepgen.0.step Xstep (similar for dir, and for each axis) These lines define HAL signals that carry step and dir to the parport. You no longer have step and dir signals, you have quadrature phase-A and phase-B, so you need new signals. You should change them to: newsig X_phaseA bit linkps stepgen.0.phase-A X_phaseA (similar for phaseB, and for each axis) 2) You want to customize the pinout and use two parallel ports. First you need to load drivers for two ports. Somewhere in your hal files (probably in standard_pinout.hal) is a line that looks like: loadrt hal_parport cfg="0x0378" If your second port is at address 0x0278, then change that line to loadrt hal_parport cfg="0x0378 0x0278" There are other options for the parport as well (you can convert some of the output pins to inputs, for example. See the Hal manual mentioned earlier for the details. (Section 6.1, page 52) Once the second port is loaded, you need to connect your new phaseA and phaseB signals to certain pins. The original standard_pinout.hal has lines like: linksp Xstep => parport.0.pin-03-out That line sends X axis step pulses out of pin 3 of the first parallel port. If you want the X axis phase B signal to come out of pin 4 on the second parallel port, change it to: linksp XphasA => parport.1.pin-04-out Regarding the stepper drive enables - core_stepper.hal creates signals called Xen, Yen, Zen. Use linksp commands similar to the ones above to connect those signals to whatever parport pins you need. All of this stuff (and more) is in the manual, but you have to read it and you have to figure out what you need. We cannot possibly have sample configurations to meet everybody's needs. They are "samples" after all - they are meant to be a starting point that you can customize to meet your own specific needs. Regards, John Kasunich ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users