Program stops executing after spindle-at-speed reached

More
19 Oct 2018 09:36 #119064 by deemoss
Hi Guys,

I have incorporated the Huanyang VFD via RS485 and can control it and receive feedback, which is a great success for me.

When I run the axis.ngc demo, the program waits for spindle-at-speed to become true (as it should), and then moves the z-axis down (as it should). However, it then stops executing on line 17.

It is interesting, when I comment out the line net spindle-at-speed => spindle.0.at-speed in the my-mill.hal, the program runs ok (albeit not waiting for the spindle to reach its set speed)

I have captured this behaviour, see below:


Why could this be?

Cheers,
Dimos

Please Log in or Create an account to join the conversation.

More
19 Oct 2018 10:04 #119067 by cmorley
can you post your config files please?

Chris M

Please Log in or Create an account to join the conversation.

More
19 Oct 2018 10:09 #119069 by cmorley
How long ago did you last push changes into master?
The spindle work has had a few bug fixes pushed.
Though this may be another one to squash...

Chris M

Please Log in or Create an account to join the conversation.

More
19 Oct 2018 10:37 #119070 by deemoss
Thanks Chris,

Following are the spindle related lines:

my-mill.hal
net spindle-cmd-rpm     <= spindle.0.speed-out
net spindle-cmd-rpm-abs <= spindle.0.speed-out-abs
net spindle-cmd-rps     <= spindle.0.speed-out-rps
net spindle-cmd-rps-abs <= spindle.0.speed-out-rps-abs
net spindle-at-speed    => spindle.0.at-speed

custom.hal
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyS5 -p none -r 9600 -S 24000
setp vfd.enable 1
net spindle-cmd-rpm-abs                        => vfd.speed-command 
net spindle-cw          spindle.0.forward      => vfd.spindle-forward 
net spindle-ccw         spindle.0.reverse      => vfd.spindle-reverse 
net on

custom_postgui.hal
loadrt scale
loadrt mult2 count=1

addf scale.0 servo-thread
addf mult2.0 servo-thread

net spindle-at-speed    vfd.spindle-at-speed    => pyvcp.spindle-at-speed-led
net pyvcp-spindle-rpm   vfd.spindle-speed-fb    => pyvcp.spindle-speed
net pyvcp-modbus-ok     vfd.hycomm-ok           => pyvcp.hycomm-ok
# dimos display current and volts
setp scale.0.gain 0.1  # divides vfd.ACV by 10 to produce real value
#   Connect spindle volts to scaler
net pyvcp-spindle-voltage-scale       vfd.ACV         => scale.0.in
#   Connect scaler output to pyvcp
net pyvcp-spindle-voltage             scale.0.out     => pyvcp.spindle-volts
net pyvcp-spindle-amps  vfd.OutA                => pyvcp.spindle-amps
net pyvcp-spindle-voltage   =>  mult2.0.in0
net pyvcp-spindle-amps      =>  mult2.0.in1         
net pvcp-spindle-power      mult2.0.out         => pyvcp.spindle-power

pyvcp_option.hal
# net spindle-cmd-rpm-abs    => pyvcp.spindle-speed

# **** force spindle at speed indicator true because we have no feedback ****

# net spindle-at-speed => pyvcp.spindle-at-speed-led
# sets spindle-at-speed true

Please Log in or Create an account to join the conversation.

More
19 Oct 2018 10:51 #119072 by deemoss
Forgot to add, I run version 2.8 pre 1

Please Log in or Create an account to join the conversation.

  • andypugh
  • andypugh's Avatar
  • Away
  • Moderator
  • Moderator
More
19 Oct 2018 12:46 - 19 Oct 2018 12:48 #119073 by andypugh
When did you last pull a new version? I fixed a spindle-at-speed bug on the 8th of October

github.com/LinuxCNC/linuxcnc/commit/eb8d...c5c65be12b6f62ec5141

In fact I fixed that _exact_ bug, as reported here by Rene:

github.com/LinuxCNC/linuxcnc/issues/504
Last edit: 19 Oct 2018 12:48 by andypugh.
The following user(s) said Thank You: deemoss

Please Log in or Create an account to join the conversation.

More
19 Oct 2018 16:11 #119080 by deemoss
Thanks guys!

Pulled the latest version and the bug is gone!

On another note, with reference to the hal excerpts above, could I consolidate some of the spindle related lines into one or two hal files?

Chees,
Dimos

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
19 Oct 2018 16:44 - 19 Oct 2018 16:45 #119081 by tommylight
Most probably yes. Not sure about the Pyvcp.
Last edit: 19 Oct 2018 16:45 by tommylight. Reason: More info
The following user(s) said Thank You: deemoss

Please Log in or Create an account to join the conversation.

Time to create page: 0.164 seconds
Powered by Kunena Forum