NEWS
LinuxCNC 2.5.2 Release
There are no translations available.

LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release
There are no translations available.

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
There are no translations available.

New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum Using LinuxCNC G Code m3 stops axis movement

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: m3 stops axis movement

m3 stops axis movement 19 Jun 2012 03:02 #21087

  • er11cul
  • er11cul's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
I tried to work on a machine which fits in no conventional
group, but it is compareable to a lathe.

If I program something like:
g01 x100
m3 s300
g01 x200

The machine stops for at about one second while
executing the m3 (setting spindle speed) command.
Why is that? Any Idea to avoid this delay?

It is a big problem for me, because an unwanted delay breaks
the function of my machine.

Executing M3 should be independend from axes movement, shouldn't it?

thank you
The administrator has disabled public write access.

Re:m3 stops axis movement 19 Jun 2012 04:49 #21089

  • andypugh
  • andypugh's Avatar
  • OFFLINE
  • Moderator
  • Posts: 4140
  • Thank you received: 141
  • Karma: 130
er11cul wrote:
The machine stops for at about one second while
executing the m3 (setting spindle speed) command.
Why is that? Any Idea to avoid this delay?
That isn't something that I have seen (and would cause real problems with constant-surface-speed mode on a lathe.)
Do you have the spindle-at-speed pin connected in HAL? Where did you get the configuration from?
Spindle-at-speed pauses motion until a spindle-good signal is received. Some example and simulated configs have this connected.
It is a big problem for me, because an unwanted delay breaks
the function of my machine.
Is M3 setting an actual spindle speed, or is it being used for something else? There may be more appropriate ways to do it.
The administrator has disabled public write access.

Re:m3 stops axis movement 19 Jun 2012 05:28 #21096

  • er11cul
  • er11cul's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
andypugh wrote:
That isn't something that I have seen (and would cause real problems with constant-surface-speed mode on a lathe.)
Do you have the spindle-at-speed pin connected in HAL? Where did you get the configuration from?

I connected the spindle to "Spindle PWM" as suggested by the stepconf wizard.
This is where I got my confuguartion from.
Ths Spindle PWM signal is transformed to 0-10V by external electronic and goes to my frequency converter input.
Spindle-at-speed pauses motion until a spindle-good signal is received. Some example and simulated configs have this connected.
There is no hardware connection for such a signal.
Is M3 setting an actual spindle speed, or is it being used for something else? There may be more appropriate ways to do it.
Only for spindle speed.
My machine consists of a spindle one axis and two end-switches only. No more.
I have to set the spindle speed and move with the (X) axis.
What would be a more appropriate way to set the spindle speed?
I tried also things like
G01 X200 S300
with the same result.

Thanks
The administrator has disabled public write access.

Re:m3 stops axis movement 19 Jun 2012 09:20 #21114

  • andypugh
  • andypugh's Avatar
  • OFFLINE
  • Moderator
  • Posts: 4140
  • Thank you received: 141
  • Karma: 130
er11cul wrote:
Spindle-at-speed pauses motion until a spindle-good signal is received. Some example and simulated configs have this connected.
There is no hardware connection for such a signal.

I am puzzled then. Can you share your HAL file with us?
The administrator has disabled public write access.

Re:m3 stops axis movement 20 Jun 2012 01:25 #21140

  • er11cul
  • er11cul's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hal_parport cfg="0x378 out  "
loadrt stepgen step_type=0,0,0
loadrt pwmgen output_type=0

addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf pwmgen.make-pulses base-thread
addf parport.0.write base-thread

addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
addf pwmgen.update servo-thread

net spindle-cmd <= motion.spindle-speed-out => pwmgen.0.value
net spindle-enable <= motion.spindle-on => pwmgen.0.enable
net spindle-pwm <= pwmgen.0.pwm
setp pwmgen.0.pwm-freq 60.0
setp pwmgen.0.scale 1166.66666667
setp pwmgen.0.offset 0.114285714286
setp pwmgen.0.dither-pwm true

net xstep => parport.0.pin-02-out
net xdir => parport.0.pin-03-out
net spindle-pwm => parport.0.pin-16-out
setp parport.0.pin-17-out-invert 1
net xenable => parport.0.pin-17-out


net max-home-x <= parport.0.pin-10-in-not
net min-x <= parport.0.pin-11-in-not
net estop-ext <= parport.0.pin-15-in


setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 1
setp stepgen.0.dirhold 62000
setp stepgen.0.dirsetup 62000
setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable axis.0.amp-enable-out => stepgen.0.enable
net max-home-x => axis.0.home-sw-in
net min-x => axis.0.neg-lim-sw-in
net max-home-x => axis.0.pos-lim-sw-in

setp stepgen.1.position-scale [AXIS_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 1
setp stepgen.1.dirhold 62000
setp stepgen.1.dirsetup 62000
setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL
net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable axis.1.amp-enable-out => stepgen.1.enable

setp stepgen.2.position-scale [AXIS_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 1
setp stepgen.2.dirhold 62000
setp stepgen.2.dirsetup 62000
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL
net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable axis.2.amp-enable-out => stepgen.2.enable

net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in

net tool-number <= iocontrol.0.tool-prep-number
net tool-change-loopback iocontrol.0.tool-change => iocontrol.0.tool-changed
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
The administrator has disabled public write access.

Re:m3 stops axis movement 20 Jun 2012 04:59 #21144

  • andypugh
  • andypugh's Avatar
  • OFFLINE
  • Moderator
  • Posts: 4140
  • Thank you received: 141
  • Karma: 130
I can't see anything wrong there. Which doesn't mean that there might not be something I am not seeing.

What is the g-code doing? Are you using G33, G33.1 or G95?
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 0.837 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.