step direction spindle also functions as C axis
- stevestice
- Offline
- Junior Member
-
Less
More
- Posts: 28
- Thank you received: 0
20 Jul 2012 00:24 #22231
by stevestice
Replied by stevestice on topic Re:step direction spindle also functions as C axis
Hi sorry I am not very good at explaining myself. I am going with steppers at this time and planning on an encoder for the spindle and c axis. I guess what I was trying to say was that as long as my step dir config works with my steppers now I can switch to my servos and gecko drives when I build a mill later on. I have been working on the hal file I have part of the a axis/spindle figured out I think but still not sure what commands to link m3,m4 and m5 to the step and dir. I will attach my hal file and go back to the manuals Thanks Steve
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23238
- Thank you received: 4912
21 Jul 2012 00:20 #22257
by andypugh
Replied by andypugh on topic Re:step direction spindle also functions as C axis
I am working on it.
The INI file would be convenient to have too.
The INI file would be convenient to have too.
Please Log in or Create an account to join the conversation.
- stevestice
- Offline
- Junior Member
-
Less
More
- Posts: 28
- Thank you received: 0
21 Jul 2012 11:38 #22265
by stevestice
Replied by stevestice on topic Re:step direction spindle also functions as C axis
Hi Thanks for the help. Here is the ini file. Steve
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23238
- Thank you received: 4912
21 Jul 2012 20:33 - 21 Jul 2012 23:57 #22297
by andypugh
Replied by andypugh on topic Re:step direction spindle also functions as C axis
This is certainly something that makes more sense as a custom component, but this way is at least more portable.
The way it works is to use a velocity-mode stepgen like you already had, and a PID component to use the velocity-mode stepper for positioning.
When you stop the spindle the HAL components wait for the spindle to stop (using ddt and near) and sets an enable flag. This triggers the storage of a rounded-down version of the current stepgen position (using a mux2, conv_float_s32 and conv_s32_float)
The commanded A-axis position is then added to the rounded stepgen position, and becomes the target for the PID control loop that moves the stepper in angular position mode.
You need to tune the stepgen.3.maxaccel and pid.0.Pgain to work together. If the Pgain is high relative to the maxaccel and maxvelocty then the spindle will oscillate wildy when coming to rest.
Note that in this config the A axis controls spindle angle, and is set so that positions are from 0 to 1 for a full revolution. A scale component with a gain of 1/360 could change this.
In "spindle mode" it is controlled by the usual M3 M4 M5 and S commands.
The way it works is to use a velocity-mode stepgen like you already had, and a PID component to use the velocity-mode stepper for positioning.
When you stop the spindle the HAL components wait for the spindle to stop (using ddt and near) and sets an enable flag. This triggers the storage of a rounded-down version of the current stepgen position (using a mux2, conv_float_s32 and conv_s32_float)
The commanded A-axis position is then added to the rounded stepgen position, and becomes the target for the PID control loop that moves the stepper in angular position mode.
You need to tune the stepgen.3.maxaccel and pid.0.Pgain to work together. If the Pgain is high relative to the maxaccel and maxvelocty then the spindle will oscillate wildy when coming to rest.
Note that in this config the A axis controls spindle angle, and is set so that positions are from 0 to 1 for a full revolution. A scale component with a gain of 1/360 could change this.
In "spindle mode" it is controlled by the usual M3 M4 M5 and S commands.
Attachment gang_stepper.ini not found
Last edit: 21 Jul 2012 23:57 by andypugh.
Please Log in or Create an account to join the conversation.
- stevestice
- Offline
- Junior Member
-
Less
More
- Posts: 28
- Thank you received: 0
21 Jul 2012 23:41 #22304
by stevestice
Replied by stevestice on topic Re:step direction spindle also functions as C axis
Hi Thanks again for the help. I will set it up later tonight. Steve
Please Log in or Create an account to join the conversation.
- stevestice
- Offline
- Junior Member
-
Less
More
- Posts: 28
- Thank you received: 0
21 Jul 2012 23:50 #22305
by stevestice
Replied by stevestice on topic Re:step direction spindle also functions as C axis
Hi I am unable to download the files steve
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23238
- Thank you received: 4912
21 Jul 2012 23:58 #22307
by andypugh
Replied by andypugh on topic Re:step direction spindle also functions as C axis
stevestice wrote:
I tried to be too clever.
Try again? I changed the links to point to uploaded files.
Hi I am unable to download the files steve
I tried to be too clever.
Try again? I changed the links to point to uploaded files.
Please Log in or Create an account to join the conversation.
- stevestice
- Offline
- Junior Member
-
Less
More
- Posts: 28
- Thank you received: 0
22 Jul 2012 00:07 #22309
by stevestice
Replied by stevestice on topic Re:step direction spindle also functions as C axis
Hi got the hal file get a not found error on the ini steve
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23238
- Thank you received: 4912
22 Jul 2012 09:43 #22314
by andypugh
Replied by andypugh on topic Re:step direction spindle also functions as C axis
stevestice wrote:
Strange.
OK, just add PGAIN, IGAIN and DGAIN to the [AXIS_3] section of your existing INI.
Hi got the hal file get a not found error on the ini steve
Strange.
OK, just add PGAIN, IGAIN and DGAIN to the [AXIS_3] section of your existing INI.
Please Log in or Create an account to join the conversation.
- stevestice
- Offline
- Junior Member
-
Less
More
- Posts: 28
- Thank you received: 0
22 Jul 2012 13:03 #22317
by stevestice
Replied by stevestice on topic Re:step direction spindle also functions as C axis
Hi I should have said when I downloaded the files I got the hal but get a 404 not found error on the ini file Thanks Steve
Please Log in or Create an account to join the conversation.
Time to create page: 0.116 seconds