Dear all,
I have a really big trouble for my machine, I would like to configure on emc2
my
3 axis stone lathe,
I explain you exactly how i would like it work :
When I start my machine it should be like a "normal lathe" I mine 2 axis and
the
spindle control as velocity mode, I was thinking to make a function like M101
(for example) who will be able to switch my spindle as full C axis and
automatically make origin.
I need that to make cylindric column or column with engraving or grooving
My machine use 3 steppers (2 for the axis and 1 for the spindle)
My problem is I saw on wiki that it's not possible to hook 2 functions in 1
output so I don't know how I can do that easily
I was thinking to make like in a hold configure with the linksp and unlinksp
but I'm not sure it will work well. Now my machine use net function and you
cannot unlink ports with hal
Or use logical function in2, or but I don't understand how i can use them
If it's possible to make in the M101 file hal command who can unlink my ports
and hook them to the C axis ?
Thanks for your help and sorry for my bad english
Moustapha Elhima
+33 6 09 99 21 97
P Penser à préserver l'environnement avant d'imprimer ce message. Merci
________________________________
De : John Kasunich <jmkasun...@fastmail.fm>
À : ELHIMA Moustapha <melh...@yahoo.com>
Envoyé le : Dim 25 avril 2010, 16h 18min 31s
Objet : Re: [Emc-users] stepgen velocity mode - was independent stepper driver
On Sun, 25 Apr 2010 05:03 -0700, "ELHIMA Moustapha" <melh...@yahoo.com>
wrote:
> Dear John,
>
> You wrote on a forum 2 years ago :
>
> "No, we are not talking about two different things. In the first post of
> this thread, Ian explained that he wants to use a stepper motor for the
> spindle of a lathe.
>
> EMC is modular, and its step generator can easily be used independently
> to "free run" a stepper. No micro controller is needed.
>
> Regards,
>
> John Kasunich"
> I would like to configure a step motor as spindle for my machine (it's a
> lathe) I have try many thinks and never work the last one was :
>
> loadrt stepgen step_type=0,0,0,0 ctrl_type=p,v,p,p
For a lathe, don't you only need three stepgens? One for
X, one for Z, and one for the spindle? Why are you using 4?
Also, it seems strange that you didn't put the spindle at
the end: "ctrl_type=p,p,v". You can do it any way you want,
just make sure you connect everything properly. In your case
X would go to stepgen 0, and Z to stepgen 2, so that you leave
stepgen 1 free for the spindle.
> loadrt scale
>
> addf scale.0 servo-thread
Did you also add the step generator functions to the servo
and base threads? Check the documentation or use "halcmd
show funct" to get the exact thread names, but it will look
something like this:
addf stepgen.make-pulses base-thread
addf stepgen.capture-position servo-thread
^^^^ should be early in the thread
other servo thread "addf" lines go here
addf stepgen.update-freq servo-thread
^^^^ should be last in the thread
If you don't have those lines, none of the stepgens will work,
and you didn't mention that - so I assume you have them and just
didn't paste them into the message.
> net spindle-cmd-rpm <= motion.spindle-speed-out => scale.0.in
> setp scale.0.gain 0.01666667
> net spindle-cmd-rps <= scale.0.out => stepgen.1.velocity-cmd
> setp stepgen.1.position-scale 200
> setp stepgen.1.maxvel 40
> setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL
> net spindle-step <= stepgen.1.step => parport.0.pin-14-out
> net spindle-dir <= stepgen.1.dir => parport.0.pin-16-out
>
> net spindle_on <= motion.spindle-on => stepgen.1.enable
All of this seems reasonable.
> I don't know how to do it never work, that would be nice to get some help
> thanks
>
"It never work" doesn't tell me anything. Do you get an error
message when you try to start EMC? Does EMC fail to start but
no error message? Does EMC start but none of your steppers work?
Does EMC start, X and Z work, but the spindle doesn't turn? Does
the spindle turn, but not at the proper speed?
Every one of those possibilities has a different cause and different
things to check. I cannot help you without more information.
When testing, you should always start EMC from a terminal shell,
so that you can see any error or warning messages.
HAL has several tools like halmeter and halscope that let you
examine signals to troubleshoot. Assuming that EMC starts and
the only problem is the spindle not running, use halmeter to
examine the relevant signals and pins.
For example, use MDI to send S600 M3. That should turn the spindle
on at 600 RPM. Then use halmeter to look at spindle-cmd-rpm. It
should be 600. spindle-cmd-rps should be 10. spindle-on should be
true. Then check the pins - stepgen.1.velocity-cmd should be 10,
and stepgen.1.enable should be true. You can also check the stepgen
by looking at its feedback, stepgen.1.position. If steps are being
generated, the feedback will be changing.
If everything ahead of the stepgen seems OK, then check its outputs.
Halmeter will work for the dir pin, but you will probably need to
use halscope for the step pin, since it is mostly false with only
short pulses that go true.
One last suggestion - send your questions to the emc-users mailing
list, not to any one individual. There are over 600 people who can
help you on the list. 600 helpers is better than one.
Regards,
John Kasunich
--
John Kasunich
jmkasun...@fastmail.fm
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers