Chris Radek wrote: >On Fri, Mar 21, 2008 at 01:46:24PM -0400, Patrick Ferrick wrote: > > >>Apparently, a PLC (either hardware or software based) is >>traditiuonally used for such purposes. It seems to me, though, that a >>plc + ladder logic programming is capable mainly of sensing switches >>and turning on and off relays...which is great if you have a >>toolchanger that only needs to be told _when_ to change tools and >>_what_ tool to use, but not how to physically spin steppers to >>accomplish this. I would really like to be able to take advantage of >>the kinematics etc. that EMC provides to move the extra steppers, but >>it's looking like I might have to create a "semi-smart" toolchanger >>that can be commanded with HAL+ClassicLadder. >> >> > >If you use HAL+ClassicLadder you have a lot of options not available >on a generic PLC. > >For instance imagine a turret that you want to turn to one of four >positions. Set a mux4's inputs to the preset positions. Feed the >mux's output to a stepgen. Set stepgen's accel limit, velocity limit, >and scale to match your motor. Suddenly you can move the motor >smoothly to one of four preset positions. If you use a comparator >block to compare that stepgen's commanded and feedback positions, you >know when it gets there. A little synchronization with ladder and you >have a tool turret. > >Note this scheme gives you positional control of the stepper. This >means you probably need some way to "home" the turret, which would >most easily be done by starting up with it already in a certain >position. > > Even homing can be accomplished in HAL+classic ladder. You can add a correction to the tool position by placing a sum2 after the mux4 (this may require a trivial new component - a 2-input integer summer). One wa yof doing this would be to output increasing "offsets" to this sum block while looking for a home switch closure. Once the home switch is found, the all of the turret position values will now be offset by this correction factor.
As Chris said - lots of possibilities here. One thing to note - you probably wouldn't want to control the turret with G-code, even if you could. Changing tools and moving them around are separate actions, so there's no need for coordinated motion between the two activities. It just opens up possibilities for errors down the road. - Steve ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users