- Posts: 97
- Thank you received: 0
Spindle ccw hanging
A minimum speed was configured in my .pref file as follows
spindle_bar_min = 550
changing this to the following corrected all of the issues and everything works as expected:
spindle_bar_min = -3800.0
I may be just overlooking something really simple here. Spindle control going in the cw direction works fine, comes on when I click the button in gmoccapy and turns off when I click it again. The ccw direction however doesn't work at all. Furthermore, if I try to run the spindle in the ccw direction first it seems to hang and neither direction will work at that point until I restart linuxcnc. I have been watching the hal status and everything toggles and changes just like the cw direction except hm2_5i25.0.gpio.029.out. I can disconnect the net spindle-ccw hm2_5i25.0.gpio.029.out and do setp hm2_5i25.0.gpio.029.out 1 and the output works just fine, just doesn't work from gmoccapy when I click the button. Here is what I have in my hal:
# --- SPINDLE-CW ---
setp hm2_5i25.0.gpio.028.is_output 1
setp hm2_5i25.0.gpio.028.invert_output 1
net spindle-cw hm2_5i25.0.gpio.028.out
# --- SPINDLE-CCW ---
setp hm2_5i25.0.gpio.029.is_output 1
setp hm2_5i25.0.gpio.029.invert_output 1
net spindle-ccw hm2_5i25.0.gpio.029.out
# ---setup spindle control signals---
net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
net spindle-vel-cmd-rpm <= motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs <= motion.spindle-speed-out-abs
net spindle-enable <= motion.spindle-on
net spindle-cw <= motion.spindle-forward
net spindle-ccw <= motion.spindle-reverse
net spindle-brake <= motion.spindle-brake
net spindle-revs => motion.spindle-revs
net spindle-at-speed => motion.spindle-at-speed
net spindle-vel-fb-rps => motion.spindle-speed-in
net spindle-index-enable <=> motion.spindle-index-enable
# ---Setup spindle at speed signals---
sets spindle-at-speed true
Please Log in to join the conversation.
what VFD is it
Then the out signals shoudt be set beond the NET loaded
so
IS the VFD set to FORWARD REVERSE by parameter
is the VFD made to take forward Rev change without a Stop signal present
CAN the VFD take the Rev signal while speed is not zero
Most got also a sequ of signal folowing to get reverse
Please Log in to join the conversation.
Please Log in to join the conversation.
Some VFDs need spindle-on for FWD and spindle-on + reverse for REV.
Is it possible that this is what you enabled with manual HAL?
Please Log in to join the conversation.
That is the Hal command I manually input. As long as the outputs go low the vfd and spindle behave appropriately. When I click or touch the CW button in gmoccapy it turns green and the spindle turns on. When I click or touch the CCW button in gmoccapy it turns green, halshow shows all of the relevant signals changing state except for hm2_5i25.0.gpio.029.out. The only way to get that output to pull low is the manual entry of the Hal command. Also halshow does confirm that there is a net between hm2_5i25.0.gpio.029.out and spindle-ccw. Maybe I'm not explaining properly, I can take some screenshots/pictures when I get back in the shop tonight.
Please Log in to join the conversation.
Please Log in to join the conversation.
a net signal consist of three parts
net <signalname> <hal_pin> <= <hal_pin>
In your case, I do not see the signal names, so the first entry will be taken as signal name!
Please try the following:
- go to settings page
- open hal_show
- Click the whatch tab
- add the following pin to whatch page
* spindle.0.on
* spindle.0.forward
* spindle.0.reverse
* spindle.0.speed-in
* spindle.0.speed-out
Leave the page visible and open and try the forward button, spindle.0.on
* spindle.0.forward
* spindle.0.speed-in
* spindle.0.speed-out
should change their values
now press stop,
all go to off and values zero
now press reverse:
* spindle.0.on
* spindle.0.reverse
* spindle.0.speed-in
* spindle.0.speed-out
The values do change?
report about the results!
Norbert
Please Log in to join the conversation.
I am using the master pin names, yours may vary a little bit.
Norbert
This is a very simple spindle control with PWM and parport:
Please Log in to join the conversation.
- Mike_Eitel
- Offline
- Platinum Member
-
- Posts: 1018
- Thank you received: 0
When you want to reverse, you must have the run signal go low for a short time. Otherwise direction is not reacting on the input.
Mike
Please Log in to join the conversation.
I can't take all the credit:newbynobi wrote: Sorry for telling you, but you hal file is a mess
# Generated by PNCconf at Sun Dec 31 20:00:49 2006
# If you make changes to this file, they will be
# overwritten when you run PNCconf again
newbynobi wrote: a net signal consist of three parts
net <signalname> <hal_pin> <= <hal_pin>
In your case, I do not see the signal names, so the first entry will be taken as signal name!
Please try the following:
- go to settings page
- open hal_show
- Click the whatch tab
- add the following pin to whatch page
* spindle.0.on
* spindle.0.forward
* spindle.0.reverse
* spindle.0.speed-in
* spindle.0.speed-out
Leave the page visible and open and try the forward button, spindle.0.on
* spindle.0.forward
* spindle.0.speed-in
* spindle.0.speed-out
should change their values
now press stop,
all go to off and values zero
now press reverse:
* spindle.0.on
* spindle.0.reverse
* spindle.0.speed-in
* spindle.0.speed-out
The values do change?
report about the results!
Norbert
I don't have those exact signal in my hal tree, however I do have the following:
First screen shot is after starting up linuxcnc
Attachment not found
Second is with CW button depressed, the output changes state and the spindle and vfd respond accordingly
Attachment not found
Third is with the CCW button depressed, nothing seems to work
Attachment not found
Fourth shows the net in hal
Attachment not found
I could take a screen shot but it wouldn't show anything, after trying the ccw button the cw button stops working and just flashes green and then turns itself off and wont work. Hopefully this will clear some things up, thank you in advance for the assistance. Also one last thought, the vfd doesn't control the spindle speed, The spindle has a gearbox on it and it is controlled independently of the vfd.
Please Log in to join the conversation.
