Kirk Wallace wrote: > Yes, I got the brake, forward and reverse relays working right out of > the box, thanks to your hal files. > > The problem is that the speed change stepper has five leads, one 35 Volt > supply and four sink wires. I don't know if this is a common stepper > configuration. I think I can use stepgen type 5 to output to a second > parallel port or maybe spare data out ports on the controller (P8?), > then to a buffer chip and some FET's. What could I use in the hal file > to link stepgen to digital outs on the univpwm card? The limit switches > are already there. Maybe I could wire them to P5 pin 1 and 2 or to an > unused encoder input? Hmm, you should be able to do this. If you look at the configs directory stepper-xyza, the stepgen component is hooked up in stepper_xyza.hal, and the step & direction outputs are hooked up in standard_pinout.hal. If you use a different step_type, you can get quadrature output. These 2 signals can be expanded into the 4 required signals by inverting each one. So, you start with A and B, and with the complements you also get Anot and Bnot. A and Anot will drive the two wires from one phase, and B and Bnot will drive the other phase. If you change the line that installs the driver to read like this :
# install Universal PWM Controller driver loadrt hal_ppmc extradout=0x00 and if you have the Rev 3 update (which you do) this will enable the HAL interface to the P8 connector. What you will see is 8 new HAL pins appear (and 8 parameters to invert them individually, too.) Connect these pins in HAL to the stepgen outputs, and you should be able to drive the motor with a simple driver. How you command stepgen from motion.spindle-incr-speed and motion.spindle-decr-speed is maybe something someone else should answer. Stepgen has a position-cmd input, but you really want to feed it a velocity. I suppose you could keep your own position counter, and increment or decrement it every servo cycle to generate steps at the desired rate. Probably you don't need velocity ramping for this application. > > The part I don't have a clue on yet, is with the high and low speed > clutch. I have them wired to SSR 6 and 7, so I can get them to activate > on their own. I just don't know how EMC handles spindle gear changes. Ahh, it doesn't. > I guess this is what is available from hal: > > Spindle control > > * float iocontro.0.spindle-speed-out > * float iocontrol.0.spindle-speed-in > * bit iocontrol.0.spindle-on > * bit iocontrol.0.spindle-forward > * bit iocontrol.0.spindle-reverse > * bit iocontrol.0.spindle-brake > * bit iocontrol.0.spindle-incr-speed > * bit iocontrol.0.spindle-decr-speed > > I need to study the Mazak setup to see how it's done. Ohhh, you'll get a headache! The Mazak has a gearbox, and needs the motor to be running at very slow speeds while the controller jogs the gear "handle" to nudge it into engagement. With clutches, you likely can engage them either running or stopped. So, the only thing you need to do is decide which clutch to engage when you release the spindle brake. Depending on the current commanded speed, you engage the appropriate clutch immediately when the brake is released. This should get the desired clutch engaged before the motor starts. (There's a delay after the brake is released before the spindle-forward signal is turned on.) Jon ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
