It looks to me like Ian and John are talking about two different things. A
stepping motor is usually used to drive an axis. On these types of machines
an axis has limits. An axis such as x,y, or z can not be programed to free run.
I my opinion if you want to free run a stepping motor then try using a micro
controler to feed step and direction signals into the stepping motor driver.
John
----- Original Message ----
From: John Kasunich <[EMAIL PROTECTED]>
To: Enhanced Machine Controller (EMC) <[email protected]>
Sent: Thursday, July 17, 2008 5:30:21 PM
Subject: Re: [Emc-users] stepgen velocity mode - was independent stepper driver
Ian W. Wright wrote:
> Hi,
>
> I'm still struggling to understand HAL and how I can make this stepper
> free-run, preferably at a commanded speed and I don't seem to be getting
> very far on.
Have you sat down at your computer and actually done the exercises
described in the HAL tutorial at
http://www.linuxcnc.org/docview/html//hal_tutorial.html
You can read until you are tired, but there is no substitute for simply
trying things.
> One thing which I have realised and can't find any mention
> of in the literature I have found so far, is that I don't know how the
> starting and stopping of the stepper and specifying its velocity would
> be handled in AXIS.
AXIS doesn't stop and start the spindle, EMC does. AXIS is the user
interface, EMC is the core of the control, and HAL is between EMC and
your motors.
EMC's motion controller has HAL pins as listed on this webpage (which I
included in my last message):
http://www.linuxcnc.org/docview/html//config_emc2hal.html#r1_1_1
Those pins are controlled by EMC, based on your g-code or the GUI
buttons you click on.
> While the literature says that stepgen will run in
> velocity mode and says how the pins etc. should be connected, I can't
> find any descriptions or examples of its use in .INI files and don't see
> how it would appear in AXIS or be commanded from a G-code file. John
> refers to using G62 - G65
What? In my last email I said:
>> For a lathe, you start the spindle by issuing "M3S1500" (for
>> 1500 RPM). Once it is started, you can change speed by issuing
>> another S command - S500 will change to 500 RPM. M5 stops the
>> spindle. These M codes have absolutely nothing to do with
>> position control of an A axis.
>> For a mill with an A axis, the work is rotated using A axis
>> position commands such as "G0 A90", or "G1 F30 A180". The
>> spindle control codes M3, M5, etc, control the milling spindle
>> holding the cutting tool, not the chuck holding the workpiece.
M3/4/5 are used to turn the spindle on and off, Sxxxx is used to set the
speed to xxxx. I never said anything about G62-5.
> but, while I can see these in a FANUC
> description, the only reference I have found to them in EMC is one
> saying that they are not implemented. Would I perhaps have to make a
> special button/slider or whatever in AXIS to control the velocity? Does
> anyone have any experience of this please...?
Spindle velocity is controlled by the S word in your g-code program. If
you are referring to spindle control outside of your program, there are
two ways:
1) MDI - in MDI mode, you simply enter g-code commands, and EMC executes
them as if they were part of a program. So you can enter M3 to start
the spindle, and S500 to set the speed to 500 RPM.
2) Manual mode - manual mode is the mode you use for jogging around,
homing the machine, etc. There is a spindle-start and spindle-stop
button on the manual mode tab in AXIS. There are also keyboard
shortcuts to start and stop the spindle. I believe there are ways to
change the speed in manual mode, but since I don't use them I can't
answer that from memory - read the help screen.
It doesn't matter HOW you tell EMC to start the spindle - whether in
manual mode, MDI, or an M3 command in a program, EMC will always do the
same thing. The HAL pins motion.spindle-on and motion.spindle-forward
will become TRUE, and the pin motion.spindle-speed-out will become equal
to the desired speed in RPM. Your job in HAL is to connect those pins
to the enable and velocity command pins of a stepgen so the motor will turn.
Regards,
John Kasunich
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users