How to Use Servo Spindle as 'C' axis
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 18460
- Thank you received: 5042
25 Jun 2017 16:08 - 25 Jun 2017 16:33 #94930
by PCW
Replied by PCW on topic How to Use Servo Spindle as 'C' axis
I think you dont need to change the stepgens mode (it would always be in velocity mode)
you would just change the source of the stepgens velocity command (from spindle speed command in spindle mode to PID output in position mode)
I think the component that does this would be similar to the orient component. Switching to velocity mode is trivial.
switching to position (axis) mode requires at least that the integer turns part of the stepgen position feedback to PID be
removed via a local offset and then a move to the current axis position (assuming you want to switch to axis mode without re-homing)
Velocity and accel limits for this move can be done with the limit2 component.
Edit:
I don't think there's any issue with the stepgen position rolling over, since this is a 64 bit floating point number
you would just change the source of the stepgens velocity command (from spindle speed command in spindle mode to PID output in position mode)
I think the component that does this would be similar to the orient component. Switching to velocity mode is trivial.
switching to position (axis) mode requires at least that the integer turns part of the stepgen position feedback to PID be
removed via a local offset and then a move to the current axis position (assuming you want to switch to axis mode without re-homing)
Velocity and accel limits for this move can be done with the limit2 component.
Edit:
I don't think there's any issue with the stepgen position rolling over, since this is a 64 bit floating point number
Last edit: 25 Jun 2017 16:33 by PCW.
Please Log in or Create an account to join the conversation.
- Simpson36
- Offline
- Senior Member
-
Less
More
- Posts: 59
- Thank you received: 1
25 Jun 2017 17:11 #94931
by Simpson36
Replied by Simpson36 on topic How to Use Servo Spindle as 'C' axis
Thanks you for the response.
I'm confused about 'modes'. I thought I had it figured out there is a velocity mode and a position mode . . mutually exclusive.
You have mentioned 'spindle mode' and 'position mode' both of which exist within a permanent 'velocity' mode.
Would you mind explaining the relationships here? I'm thinking that the method used by 'orient' would have significant advantages for the mill spindle, if for no other reason, then in very quickly orienting the drive dogs for the ATC.
To move beyond that application, I feel like I need a better grasp of the players, so I don't know specifically where to begin.
I think I need to apply 'orient' method to my brain, because I'm just not getting this.
Do 'spindle' and 'position' go together or 'velocity' and 'position'. How are 'position' mode data fed to 'velocity' mode if they are mutually exclusive?
I'm confused about 'modes'. I thought I had it figured out there is a velocity mode and a position mode . . mutually exclusive.
You have mentioned 'spindle mode' and 'position mode' both of which exist within a permanent 'velocity' mode.
Would you mind explaining the relationships here? I'm thinking that the method used by 'orient' would have significant advantages for the mill spindle, if for no other reason, then in very quickly orienting the drive dogs for the ATC.
To move beyond that application, I feel like I need a better grasp of the players, so I don't know specifically where to begin.
I think I need to apply 'orient' method to my brain, because I'm just not getting this.
Do 'spindle' and 'position' go together or 'velocity' and 'position'. How are 'position' mode data fed to 'velocity' mode if they are mutually exclusive?
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 18460
- Thank you received: 5042
25 Jun 2017 17:52 #94932
by PCW
Replied by PCW on topic How to Use Servo Spindle as 'C' axis
The stepgen mode is a low level hal setting. It need not ever change from velocity mode
what changes is the signal that drives the velocity command.
In spindle mode (direct velocity mode) the wiring is like this
motion.spindle-speed-out -->xxxx.0.stepgen.03.velocity-cmd
In position (axis) mode the (simplified) wiring is like this:
joint.3.motor-pos-cmd --> pid.3.command
xxxx.03.stepgen.yy.position-fb --> joint.3.motor-pos-fb
pid.3.output-->xxxx.0.stepgen.03.velocity-cmd
This re-wiring can be done in a component or using one of the the existing mux components
what changes is the signal that drives the velocity command.
In spindle mode (direct velocity mode) the wiring is like this
motion.spindle-speed-out -->xxxx.0.stepgen.03.velocity-cmd
In position (axis) mode the (simplified) wiring is like this:
joint.3.motor-pos-cmd --> pid.3.command
xxxx.03.stepgen.yy.position-fb --> joint.3.motor-pos-fb
pid.3.output-->xxxx.0.stepgen.03.velocity-cmd
This re-wiring can be done in a component or using one of the the existing mux components
The following user(s) said Thank You: Simpson36
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23279
- Thank you received: 4933
26 Jun 2017 00:15 #94946
by andypugh
I think that both these issues can be addressed by connecting the C axis (typically joint.5.motor-position-cmd) to the orient.N.angle pin.
Replied by andypugh on topic How to Use Servo Spindle as 'C' axis
The orient component certainly has possibilities, but as is stands, if I understand it correctly from reading the man page, it is limited to a sweep of a single revolution, so it would need to be modified so that an infinite number of steps and/or degrees could be specified.
A potential problem is, again if I understand it correctly, that Orient does not seem to have an axis associated with it. I.e . there seems no mechanism by which g-code could command indexing. ex.(G1 C250 Fxx).
I think that both these issues can be addressed by connecting the C axis (typically joint.5.motor-position-cmd) to the orient.N.angle pin.
The following user(s) said Thank You: Simpson36
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23279
- Thank you received: 4933
26 Jun 2017 00:19 #94947
by andypugh
It's actually a 64-bit integer step accumulator multiplied by a 32-bit scale. But it won't ever wrap in the expected life of the universe.
On the scale of tens of billions of spindle revolutions you eventually end up with sub-degree resolution.
Replied by andypugh on topic How to Use Servo Spindle as 'C' axis
I don't think there's any issue with the stepgen position rolling over, since this is a 64 bit floating point number
It's actually a 64-bit integer step accumulator multiplied by a 32-bit scale. But it won't ever wrap in the expected life of the universe.
On the scale of tens of billions of spindle revolutions you eventually end up with sub-degree resolution.
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 18460
- Thank you received: 5042
26 Jun 2017 03:45 #94951
by PCW
Replied by PCW on topic How to Use Servo Spindle as 'C' axis
Yeah, I was thinking of the loss of precision of the hal position (64 bit float)
a 32 bit float hal pin would go bad pretty quickly with large turn counts
a 32 bit float hal pin would go bad pretty quickly with large turn counts
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23279
- Thank you received: 4933
26 Jun 2017 09:20 #94966
by andypugh
Replied by andypugh on topic How to Use Servo Spindle as 'C' axis
Actually, I think the scale is double (64 bits).
But, the fact that total steps is kept as a 64-bit integer means that any spindle would wear out before wrapping the counts.
But, the fact that total steps is kept as a 64-bit integer means that any spindle would wear out before wrapping the counts.
Please Log in or Create an account to join the conversation.
- Simpson36
- Offline
- Senior Member
-
Less
More
- Posts: 59
- Thank you received: 1
26 Jun 2017 18:25 #94998
by Simpson36
Replied by Simpson36 on topic How to Use Servo Spindle as 'C' axis
Thanks again for the info and especially the examples. That makes it SO much easier by providing a starting point.
I have used the mux component so I am familiar with it . . somewhat.
Assuming the inputs would be muxed using logical OR into xxxx.0.stepgen.03.velocity-cmd
Then I have one more question before digging into this. In my use of mux, I do not recal there being an explicit forced switch . . i.e. IN#1/IN#2 (or equiv).
Question: is there an explicit trigger for mux, if so I must have missed the instructions. Can someone point to them?
If there is NOT a switch for the mux, then is it safe to assume that the 'Spindle' and the 'C' would not be active at the same time and therefor safe to mux without explicit control of the mux?
What is driving that question is concern over potentially unwanted buffered data in the two inputs to the mux.
I will have other questions for sure, but this will get me going.
Thanks!
I have used the mux component so I am familiar with it . . somewhat.
Assuming the inputs would be muxed using logical OR into xxxx.0.stepgen.03.velocity-cmd
Then I have one more question before digging into this. In my use of mux, I do not recal there being an explicit forced switch . . i.e. IN#1/IN#2 (or equiv).
Question: is there an explicit trigger for mux, if so I must have missed the instructions. Can someone point to them?
If there is NOT a switch for the mux, then is it safe to assume that the 'Spindle' and the 'C' would not be active at the same time and therefor safe to mux without explicit control of the mux?
What is driving that question is concern over potentially unwanted buffered data in the two inputs to the mux.
I will have other questions for sure, but this will get me going.
Thanks!
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23279
- Thank you received: 4933
27 Jun 2017 12:32 #95037
by andypugh
Yes, the "sel" pin or pins choose which input is active.
linuxcnc.org/docs/2.7/html/man/man9/mux2.9.html
Is appropriate for choosing between two float values.
Replied by andypugh on topic How to Use Servo Spindle as 'C' axis
Question: is there an explicit trigger for mux,
Yes, the "sel" pin or pins choose which input is active.
linuxcnc.org/docs/2.7/html/man/man9/mux2.9.html
Is appropriate for choosing between two float values.
The following user(s) said Thank You: Simpson36
Please Log in or Create an account to join the conversation.
- Simpson36
- Offline
- Senior Member
-
Less
More
- Posts: 59
- Thank you received: 1
27 Jun 2017 14:20 #95053
by Simpson36
Replied by Simpson36 on topic How to Use Servo Spindle as 'C' axis
Perfect! Thanks!
Please Log in or Create an account to join the conversation.
Time to create page: 0.065 seconds