SIeg X3 + 5i25 + 7i76 - Can't get speed control to respond.
- JohnnyCNC
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 562
- Thank you received: 106
05 Feb 2018 23:37 #105464
by JohnnyCNC
SIeg X3 + 5i25 + 7i76 - Can't get speed control to respond. was created by JohnnyCNC
Hi Guys,
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
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 or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18594
- Thank you received: 5115
06 Feb 2018 00:08 #105468
by PCW
Replied by PCW on topic SIeg X3 + 5i25 + 7i76 - Can't get speed control to respond.
Do you measure ~10V across the 7I76's analog spindle power pins ( - TB4 pin1 + on TB4 pin3 )
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 )
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 or Create an account to join the conversation.
- JohnnyCNC
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 562
- Thank you received: 106
06 Feb 2018 00:20 #105472
by JohnnyCNC
Replied by JohnnyCNC on topic SIeg X3 + 5i25 + 7i76 - Can't get speed control to respond.
I measured it at 6.43 across the pot and across the TB4 Spindle+ and Spindle-.
I'll check those values.
Thanks
John
I'll check those values.
Thanks
John
Please Log in or Create an account to join the conversation.
- JohnnyCNC
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 562
- Thank you received: 106
06 Feb 2018 00:44 - 06 Feb 2018 00:56 #105473
by JohnnyCNC
Replied by JohnnyCNC on topic SIeg X3 + 5i25 + 7i76 - Can't get speed control to respond.
hm2_5i25.0.7i76.0.0.spinout-minlim = 0
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
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
Last edit: 06 Feb 2018 00:56 by JohnnyCNC.
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23323
- Thank you received: 4948
26 Feb 2018 19:20 #106552
by andypugh
Replied by andypugh on topic SIeg X3 + 5i25 + 7i76 - Can't get speed control to respond.
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.
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 or Create an account to join the conversation.
- DanMN
-
- Offline
- Senior Member
-
Less
More
- Posts: 74
- Thank you received: 10
26 Feb 2018 19:27 #106553
by DanMN
Replied by DanMN on topic SIeg X3 + 5i25 + 7i76 - Can't get speed control to respond.
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 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 or Create an account to join the conversation.
- JohnnyCNC
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 562
- Thank you received: 106
26 Feb 2018 21:01 - 27 Feb 2018 00:55 #106570
by JohnnyCNC
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
Replied by JohnnyCNC on topic SIeg X3 + 5i25 + 7i76 - Can't get speed control to respond.
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
Last edit: 27 Feb 2018 00:55 by JohnnyCNC.
The following user(s) said Thank You: DanMN
Please Log in or Create an account to join the conversation.
- JohnnyCNC
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 562
- Thank you received: 106
27 Feb 2018 01:28 - 27 Feb 2018 01:32 #106594
by JohnnyCNC
Replied by JohnnyCNC on topic SIeg X3 + 5i25 + 7i76 - Can't get speed control to respond.
The problem I had with the getting spindle to work was knowing what connections can be made without frying the Mesa 7i76 or the XMT controller card in the X3. Electronics wise the important thing with the XMT controller and some other Chinese speed controls is that what ever control you are using to replace the potentiometer must be optically isolated. The Mesa 7i76 provides a suitable interface. I had two problems with making this connection. The first was that when I measure the voltage across the pot in t he X3 it was like 6.49 volts. When I removed the pot it was 12 volts open circuit, I connected the wires that used to go to the pot to the 7i76 TB3 pins. TB3-1=Neg, TB3-2=Wiper, TB3-3=Pos. Then the voltage between TB3-1 & TB3-2 was 6.43. Not enough current to feed the 7i76 device. PCW recommended connecting a 12 volt wall wart across the TB3-1 & TB3-3. I did that and now it was working. 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. I tried a diode in series with the wiper lead but that didn't quite do it so I put a 10K resistor in instead and that did it. This setup did yield about 1300 more RPM because the top end voltage is higher. Next I added a optical sensor to the spindle so I could get a spindle speed signal into LinuxCNC and a display on the screen showing the RPM. Now I am trying to get all this HAL stuff straight in my head.
John
John
Last edit: 27 Feb 2018 01:32 by JohnnyCNC.
The following user(s) said Thank You: DanMN
Please Log in or Create an account to join the conversation.
- JohnnyCNC
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 562
- Thank you received: 106
27 Feb 2018 01:37 #106595
by JohnnyCNC
I have been using the Halmeter watch tab. I think I did it that way so I could cut & paste the results.
Thanks
John
Replied by JohnnyCNC on topic SIeg X3 + 5i25 + 7i76 - Can't get speed control to respond.
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 or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23323
- Thank you received: 4948
27 Feb 2018 10:53 #106612
by andypugh
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?
Replied by andypugh on topic SIeg X3 + 5i25 + 7i76 - Can't get speed control to respond.
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 or Create an account to join the conversation.
Time to create page: 0.149 seconds