- Posts: 572
- Thank you received: 0
SIeg X3 + 5i25 + 7i76 - Can't get speed control to respond.
I am having trouble getting speed control to work under LinuxCNC control. I connected the wires that went to the speed pot to the TB4 connector on the 7i76 and then ran PNCconf and copied the entries from the .hal & .ini file to my actual .hal & .ini files. Right now I'm just trying to get the spindle to respond to speed changes. There are no provisions for on/off or reverse yet. Right now the spindle just runs at one slow speed. Any idea what I am doing wrong? These are my ini and hal file entries below.
Thanks
John
.ini file
[SPINDLE_9]
P = 0.0
I = 0.0
D = 0.0
FF0 = 1.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 3600.0
OUTPUT_SCALE = 5142
OUTPUT_MIN_LIMIT = 0
OUTPUT_MAX_LIMIT = 3600
.hal
#*******************
# SPINDLE S
#*******************
setp pid.s.Pgain [SPINDLE_9]P
setp pid.s.Igain [SPINDLE_9]I
setp pid.s.Dgain [SPINDLE_9]D
setp pid.s.bias [SPINDLE_9]BIAS
setp pid.s.FF0 [SPINDLE_9]FF0
setp pid.s.FF1 [SPINDLE_9]FF1
setp pid.s.FF2 [SPINDLE_9]FF2
setp pid.s.deadband [SPINDLE_9]DEADBAND
setp pid.s.maxoutput [SPINDLE_9]MAX_OUTPUT
setp pid.s.error-previous-target true
net spindle-index-enable <=> pid.s.index-enable
net spindle-enable => pid.s.enable
net spindle-vel-cmd-rpm => pid.s.command
net spindle-vel-fb-rpm => pid.s.feedback
net spindle-output <= pid.s.output
#Start of new code 02/04/2018
# ---digital potentionmeter output signals/setup---
setp hm2_5i25.0.7i76.0.0.spinout-minlim [SPINDLE_9]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i76.0.0.spinout-maxlim [SPINDLE_9]OUTPUT_MAX_LIMIT
setp hm2_5i25.0.7i76.0.0.spinout-scalemax [SPINDLE_9]OUTPUT_SCALE
net spindle-output => hm2_5i25.0.7i76.0.0.spinout
net spindle-enable => hm2_5i25.0.7i76.0.0.spinena
net spindle-ccw => hm2_5i25.0.7i76.0.0.spindir
#End of new code 02/04/2018
# ---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.
I would also check the values of:
hm2_5i25.0.7i76.0.0.spinout-minlim
hm2_5i25.0.7i76.0.0.spinout-maxlim
hm2_5i25.0.7i76.0.0.spinout-scalemax
hm2_5i25.0.7i76.0.0.spinout
hm2_5i25.0.7i76.0.0.spinena
either with halmeter or watch ( when the spindle is enabled and set for full speed )
Please Log in to join the conversation.
I'll check those values.
Thanks
John
Please Log in to join the conversation.
hm2_5i25.0.7i76.0.0.spinout-maxlim = 3600
hm2_5i25.0.7i76.0.0.spinout-scalemax = 5147
hm2_5i25.0.7i76.0.0.spinout - I can't find the last two which is probably the problem.
hm2_5i25.0.7i76.0.0.spinena
I'm going to do some searching on that.
That search lead me to another thread where these commands were recommended. I ran them and spinena=FALSE, spindir=FALSE
halcmd getp hm2_5i25.0.7i76.0.0.spinout-minlim
halcmd getp hm2_5i25.0.7i76.0.0.spinout-maxlim
halcmd getp hm2_5i25.0.7i76.0.0.spinout-scalemax
halcmd getp hm2_5i25.0.7i76.0.0.spinout
halcmd getp hm2_5i25.0.7i76.0.0.spinena
halcmd getp hm2_5i25.0.7i76.0.0.spindir
Also this recommendation for testing:
net spindle-enable hm2_5i25.0.7i76.0.0.spinena
net spindle-vel-cmd-rpm-abs hm2_5i25.0.7i76.0.0.spinout
net spindle-ccw hm2_5i25.0.7i76.0.0.spindir
Thanks
John
Please Log in to join the conversation.
If you are in the Axis interface you can use the halmeter (one per pin) from the machine menu, or use "show hal configuration" in the same menu to bring up Halshow. You can add pins one at a time to the "Watch" tab and they will update in real time.
Also, you can save and load Watch tab setups, and you can't save dozens of halmeters.
Please Log in to join the conversation.
I have a similar benchtop mill, but it's strictly manual for now. As I researched CNC conversion options, I came across that controller upgrade.
Please Log in to join the conversation.
CNCZombie wrote: If you need another approach to consider, this may help: littlemachineshop.com/products/product_v...uctID=4645&category=
I have a similar benchtop mill, but it's strictly manual for now. As I researched CNC conversion options, I came across that controller upgrade.
I looked at that but I have an X3 and not the SX3. I did get mine working and I got a display on the screen to show the RPM's that the spindle is turning based on feed back from an optical sensor I put on the spindle. Now I am trying to get the PID to bring the actual RPM to the commanded RPM and set the spindle-at-speed and allow motion to commence. I am going to write up my problems and solutions once I get this all working so it is in one place. Most of the info needed is out there. It's just that it is all over the place.
Thanks
John
Please Log in to join the conversation.
John
Please Log in to join the conversation.
andypugh wrote: getp is a bit of a tedious way to check HAL pin values.
If you are in the Axis interface you can use the halmeter (one per pin) from the machine menu, or use "show hal configuration" in the same menu to bring up Halshow. You can add pins one at a time to the "Watch" tab and they will update in real time.
Also, you can save and load Watch tab setups, and you can't save dozens of halmeters.
I have been using the Halmeter watch tab. I think I did it that way so I could cut & paste the results.
Thanks
John
Please Log in to join the conversation.
JohnnyCNC wrote: Sort of. I could not stop the spindle only get it down to really slow. Then I checked the voltage on the wiper pin (TB3-2) and at the lowest setting there was still .94 volts which the XMT board saw as a command to run.
It would be best to set up the spindle-enable output of the 7i76 to turn the spindle properly on and off. Is that an option?
Please Log in to join the conversation.
