- Configuring LinuxCNC
- Configuration Tools
- PnCConf Wizard
- Lathe Spindle Control Help Needed in PNCCONF
Lathe Spindle Control Help Needed in PNCCONF
- Mr. Technical
- Offline
- Premium Member
Less
More
- Posts: 80
- Thank you received: 1
08 Oct 2014 00:25 #51861
by Mr. Technical
Lathe Spindle Control Help Needed in PNCCONF was created by Mr. Technical
Hi Guys,
After several months of focusing on different projects, I'm back at the lathe. I'm having some problems with scaling the S code so that the RPM value that I type into MDI matches the actual speed of the spindle. The lathe has an encoder driven directly off of the spindle, and it appears to be scaled correctly (as confirmed by a photo tach). By that I mean that I'm using a PYVCP panel that shows the RPM from the encoder, and it matches the true RPM.
I have a gearbox, but I'm not working with that yet. For testing purposes, I keep the gearbox in low gear, which at full motor speed has a top spindle speed of 660 RPM.
If I enter M3 S1, the spindle starts spinning at 66 RPM. As you'd expect, if I enter S10, it spins at full speed (660 RPM in this gear). The problem is that I'd like to be able to enter the desired RPM, not the voltage that is to be output to the VFD.
How can I get the scale on the speed input to match the RPM from within PNCCONF?
Thanks in advance for any help.
Mr. Technical
After several months of focusing on different projects, I'm back at the lathe. I'm having some problems with scaling the S code so that the RPM value that I type into MDI matches the actual speed of the spindle. The lathe has an encoder driven directly off of the spindle, and it appears to be scaled correctly (as confirmed by a photo tach). By that I mean that I'm using a PYVCP panel that shows the RPM from the encoder, and it matches the true RPM.
I have a gearbox, but I'm not working with that yet. For testing purposes, I keep the gearbox in low gear, which at full motor speed has a top spindle speed of 660 RPM.
If I enter M3 S1, the spindle starts spinning at 66 RPM. As you'd expect, if I enter S10, it spins at full speed (660 RPM in this gear). The problem is that I'd like to be able to enter the desired RPM, not the voltage that is to be output to the VFD.
How can I get the scale on the speed input to match the RPM from within PNCCONF?
Thanks in advance for any help.
Mr. Technical
Please Log in or Create an account to join the conversation.
08 Oct 2014 02:42 #51864
by ArcEye
Replied by ArcEye on topic Lathe Spindle Control Help Needed in PNCCONF
Hi
You will need to attach the actual hal and ini files that pncconf produced, for us to be able to see how your spindle is being driven.
In basic terms, your scale factor from commanded speed input to the actuating method, whatever that is, is 66x too high.
If you are getting a true 66 rpm at 1 and 660 at 10, that is truly linear and should be easily scaled.
regards
You will need to attach the actual hal and ini files that pncconf produced, for us to be able to see how your spindle is being driven.
In basic terms, your scale factor from commanded speed input to the actuating method, whatever that is, is 66x too high.
If you are getting a true 66 rpm at 1 and 660 at 10, that is truly linear and should be easily scaled.
regards
Please Log in or Create an account to join the conversation.
- Mr. Technical
- Offline
- Premium Member
Less
More
- Posts: 80
- Thank you received: 1
08 Oct 2014 04:31 #51865
by Mr. Technical
Replied by Mr. Technical on topic Lathe Spindle Control Help Needed in PNCCONF
Of course, sorry about that. I didn't have the files with me when I sent the first post. They are attached below. Thanks,
Mr. Technical
Mr. Technical
Please Log in or Create an account to join the conversation.
08 Oct 2014 11:42 #51873
by cmorley
Replied by cmorley on topic Lathe Spindle Control Help Needed in PNCCONF
in pncconf 's spindle page
analog mn limt = -10
analog max limit = 10
analog max scale = 10
change that last one to 660
max scale should be set to the max rpm the spindle drive gives when the analog voltage to it is at the max limit.
so 660 is the max velocity when the drive is supplied 10 volts (max limit) so that is the scaling.
If you wish to edit the INI file directly - under the [SPINDLE_9] heading, look for:
OUTPUT_SCALE = 10.0
OUTPUT_MIN_LIMIT = -10.0
OUTPUT_MAX_LIMIT = 10.0
change the first one to 660
This might not be perfect in the mid range - it depends on the drives linearity and somewhat the 7i77 (though I believe that's pretty good)
Chris M
analog mn limt = -10
analog max limit = 10
analog max scale = 10
change that last one to 660
max scale should be set to the max rpm the spindle drive gives when the analog voltage to it is at the max limit.
so 660 is the max velocity when the drive is supplied 10 volts (max limit) so that is the scaling.
If you wish to edit the INI file directly - under the [SPINDLE_9] heading, look for:
OUTPUT_SCALE = 10.0
OUTPUT_MIN_LIMIT = -10.0
OUTPUT_MAX_LIMIT = 10.0
change the first one to 660
This might not be perfect in the mid range - it depends on the drives linearity and somewhat the 7i77 (though I believe that's pretty good)
Chris M
Please Log in or Create an account to join the conversation.
08 Oct 2014 18:31 #51890
by andypugh
How many gears do you have?
Does your motor drive have any speed feedback to LinuxCNC?
It is possible for LinuxCNC to be configured to auto-detect the selected gear by looking at the ratio of actual spindle speed and motor speed (actual motor speed for preference, but commanded motor speed works OK with my system)
Replied by andypugh on topic Lathe Spindle Control Help Needed in PNCCONF
I have a gearbox, but I'm not working with that yet. For testing purposes, I keep the gearbox in low gear, which at full motor speed has a top spindle speed of 660 RPM
How many gears do you have?
Does your motor drive have any speed feedback to LinuxCNC?
It is possible for LinuxCNC to be configured to auto-detect the selected gear by looking at the ratio of actual spindle speed and motor speed (actual motor speed for preference, but commanded motor speed works OK with my system)
Please Log in or Create an account to join the conversation.
- Mr. Technical
- Offline
- Premium Member
Less
More
- Posts: 80
- Thank you received: 1
08 Oct 2014 23:26 #51903
by Mr. Technical
Replied by Mr. Technical on topic Lathe Spindle Control Help Needed in PNCCONF
Hi Chris,
Thanks for the tip. I had tried that originally, but here's what happened when I did.
I entered M3 S100 (or S200, S300 etc.) and the spindle only spun at ~10RPM. Apparently there is something limiting the spindle speed that I haven't found yet. Any ideas what that might be?
Andy,
I have 3 gears available. The motor itself does not have any feedback mechanism currently, since it is a replacement for the original FANUC one.
Thanks to you both for looking at this.
Mr. Technical
Thanks for the tip. I had tried that originally, but here's what happened when I did.
I entered M3 S100 (or S200, S300 etc.) and the spindle only spun at ~10RPM. Apparently there is something limiting the spindle speed that I haven't found yet. Any ideas what that might be?
Andy,
I have 3 gears available. The motor itself does not have any feedback mechanism currently, since it is a replacement for the original FANUC one.
Thanks to you both for looking at this.
Mr. Technical
Please Log in or Create an account to join the conversation.
09 Oct 2014 11:39 #51914
by cmorley
Replied by cmorley on topic Lathe Spindle Control Help Needed in PNCCONF
Then I need you to investigate where the error is.
set the s speed to say 100 then:
use halmeter to check the value of spindle-vel-cmd
and check the actual voltage output of the 7i77
record all that.
now do that with 200 300 400 etc till 660
then post the answers.
What are you using to drive the spindle? a VFD or similar?
Chris M
set the s speed to say 100 then:
use halmeter to check the value of spindle-vel-cmd
and check the actual voltage output of the 7i77
record all that.
now do that with 200 300 400 etc till 660
then post the answers.
What are you using to drive the spindle? a VFD or similar?
Chris M
Please Log in or Create an account to join the conversation.
- Mr. Technical
- Offline
- Premium Member
Less
More
- Posts: 80
- Thank you received: 1
09 Oct 2014 21:03 #51917
by Mr. Technical
Replied by Mr. Technical on topic Lathe Spindle Control Help Needed in PNCCONF
Hi Chris,
I am using a VFD (Hitachi SJ700-2) to drive the spindle. It takes +- 10V control signals.
If I enter S1, the velocity cmd is 1, and the voltage sent to VFD is 1V.
If I enter S2, the velocity cmd is 2, and the voltage sent to VFD is 2V.
This continues up to S10 which is top speed (660 RPM in this gear)..
At S11, the velocity cmd is 11, but the voltage sent to the VFD is maxed out at 10V.
At S100, the velocity cmd is 100, but the voltage sent to the VFD is maxed out at 10V.
At S660, the velocity cmd is 660, but the voltage sent to the VFD is maxed out at 10V and so on.
I get the feeling that there's a bit set somewhere to scale the S command itself that I'm missing. Is there a way to scale that?
Mr. Technical
I am using a VFD (Hitachi SJ700-2) to drive the spindle. It takes +- 10V control signals.
If I enter S1, the velocity cmd is 1, and the voltage sent to VFD is 1V.
If I enter S2, the velocity cmd is 2, and the voltage sent to VFD is 2V.
This continues up to S10 which is top speed (660 RPM in this gear)..
At S11, the velocity cmd is 11, but the voltage sent to the VFD is maxed out at 10V.
At S100, the velocity cmd is 100, but the voltage sent to the VFD is maxed out at 10V.
At S660, the velocity cmd is 660, but the voltage sent to the VFD is maxed out at 10V and so on.
I get the feeling that there's a bit set somewhere to scale the S command itself that I'm missing. Is there a way to scale that?
Mr. Technical
Please Log in or Create an account to join the conversation.
09 Oct 2014 21:28 - 09 Oct 2014 21:31 #51919
by cncbasher
Replied by cncbasher on topic Lathe Spindle Control Help Needed in PNCCONF
did you change in your ini file ?
OUTPUT_SCALE = 10.0 to 660
in your attached ini you have
OUTPUT_SCALE = -10.0 so this limits to 10 rather than 660
OUTPUT_SCALE = 10.0 to 660
in your attached ini you have
OUTPUT_SCALE = -10.0 so this limits to 10 rather than 660
Last edit: 09 Oct 2014 21:31 by cncbasher.
Please Log in or Create an account to join the conversation.
- Mr. Technical
- Offline
- Premium Member
Less
More
- Posts: 80
- Thank you received: 1
09 Oct 2014 22:08 #51920
by Mr. Technical
Replied by Mr. Technical on topic Lathe Spindle Control Help Needed in PNCCONF
Now it looks like we're getting somewhere! I had set that in the INI file, but I accidentally changed it back. Here's what is happening once I set that back to 660:
Spindle velocity command still always displays what I entered in the MDI field.
At S1, the voltage sent to the VFD is .034V.
At S2, the voltage sent to the VFD is .051V.
At S3, the voltage sent to the VFD is .063V.
At S4, the voltage sent to the VFD is .080V.
At S5, the voltage sent to the VFD is .094V.
At S6, the voltage sent to the VFD is .111V.
At S7, the voltage sent to the VFD is .124V.
At S8, the voltage sent to the VFD is .141V.
At S9, the voltage sent to the VFD is .153V.
At S10, the voltage sent to the VFD is .172V.
Any S value above 10 just outputs .172V to the VFD.
At S5, the actual RPMs are around 5, and at S10, they are around 10 RPM.
Since the voltage to the VFD won't go any higer than .172V, 10 RPM is all I can get out of the spindle.
We're getting warmer...
Mr. Technical
Spindle velocity command still always displays what I entered in the MDI field.
At S1, the voltage sent to the VFD is .034V.
At S2, the voltage sent to the VFD is .051V.
At S3, the voltage sent to the VFD is .063V.
At S4, the voltage sent to the VFD is .080V.
At S5, the voltage sent to the VFD is .094V.
At S6, the voltage sent to the VFD is .111V.
At S7, the voltage sent to the VFD is .124V.
At S8, the voltage sent to the VFD is .141V.
At S9, the voltage sent to the VFD is .153V.
At S10, the voltage sent to the VFD is .172V.
Any S value above 10 just outputs .172V to the VFD.
At S5, the actual RPMs are around 5, and at S10, they are around 10 RPM.
Since the voltage to the VFD won't go any higer than .172V, 10 RPM is all I can get out of the spindle.
We're getting warmer...
Mr. Technical
Please Log in or Create an account to join the conversation.
Moderators: cmorley
- Configuring LinuxCNC
- Configuration Tools
- PnCConf Wizard
- Lathe Spindle Control Help Needed in PNCCONF
Time to create page: 0.081 seconds