CNC AXIS IN PARKING MODE
- papagno-source
- Offline
- Premium Member
-
Less
More
- Posts: 113
- Thank you received: 7
20 Nov 2025 19:01 #338821
by papagno-source
CNC AXIS IN PARKING MODE was created by papagno-source
Good morning everyone.
I need to replace an old Siemens CNC.
I'd like to try Linux CNC, but the machine is a boring machine with a Z-axis that can be controlled manually or via CNC.
Let me explain. The Z-axis performs normal axis reference and moves in jog+ and jog- directions, with the position controlled by an optical scale.
However, the operator can press a mechanical selector, which allows the axis to be moved with a mechanical handwheel and, when desired, re-engage the axis in the CNC.
Clearly, the current CNC disables the axis drive when the mechanical handwheel is selected.
The axis on the current CNC goes into park mode, meaning the commanded position follows the feedback position, and when the mechanical handwheel is disengaged, the CNC does not enter a following error.
With Linux CNC, I could disable the drive and move the axis with the mechanical handwheel, but as soon as I disable the handwheel and enable the drive again, the CNC displays the following error because the commanded position doesn't follow the feedback position.
Is there a way to mimic the behavior of the Siemens CNC?
Thanks for support
I need to replace an old Siemens CNC.
I'd like to try Linux CNC, but the machine is a boring machine with a Z-axis that can be controlled manually or via CNC.
Let me explain. The Z-axis performs normal axis reference and moves in jog+ and jog- directions, with the position controlled by an optical scale.
However, the operator can press a mechanical selector, which allows the axis to be moved with a mechanical handwheel and, when desired, re-engage the axis in the CNC.
Clearly, the current CNC disables the axis drive when the mechanical handwheel is selected.
The axis on the current CNC goes into park mode, meaning the commanded position follows the feedback position, and when the mechanical handwheel is disengaged, the CNC does not enter a following error.
With Linux CNC, I could disable the drive and move the axis with the mechanical handwheel, but as soon as I disable the handwheel and enable the drive again, the CNC displays the following error because the commanded position doesn't follow the feedback position.
Is there a way to mimic the behavior of the Siemens CNC?
Thanks for support
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 1129
- Thank you received: 398
20 Nov 2025 23:04 #338839
by Hakan
Replied by Hakan on topic CNC AXIS IN PARKING MODE
Just to come up with something, doesn't necessarily mean it is practical
- set f-error-limit to a lot
- get feedback position
- fast forward to feedback position (servo off)
- reset f-error-lim and re-engage the servo
Maybe this can be done in a g-code macro.
- set f-error-limit to a lot
- get feedback position
- fast forward to feedback position (servo off)
- reset f-error-lim and re-engage the servo
Maybe this can be done in a g-code macro.
The following user(s) said Thank You: tommylight, langdons
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11582
- Thank you received: 3896
21 Nov 2025 04:02 #338849
by rodw
Replied by rodw on topic CNC AXIS IN PARKING MODE
You should be able to create component that sets feedback = commanded pos when the handwheel is engaged. the cia402 component does this...
Please Log in or Create an account to join the conversation.
- papagno-source
- Offline
- Premium Member
-
Less
More
- Posts: 113
- Thank you received: 7
21 Nov 2025 18:51 #338915
by papagno-source
Replied by papagno-source on topic CNC AXIS IN PARKING MODE
Thanks for the replies.
The solution of increasing the tracking value and resetting the axis is impractical and technically incorrect.
The servos are analog and controlled by Mesa boards.
Isn't there a component that creates the command position = position read by the transducer?
Or is there a way to modify the Trivkins kinematics?
The solution of increasing the tracking value and resetting the axis is impractical and technically incorrect.
The servos are analog and controlled by Mesa boards.
Isn't there a component that creates the command position = position read by the transducer?
Or is there a way to modify the Trivkins kinematics?
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 17531
- Thank you received: 5125
21 Nov 2025 21:49 #338927
by PCW
Replied by PCW on topic CNC AXIS IN PARKING MODE
Isn't there a component that creates the command position = position read by the transducer?
LinuxCNC does this (sets commanded position to actual position) when motion is disabled, but it's global (all joints)
It might require a modification of LinuxCNCs motion component to do this correctly on a joint by joint basis
LinuxCNC does this (sets commanded position to actual position) when motion is disabled, but it's global (all joints)
It might require a modification of LinuxCNCs motion component to do this correctly on a joint by joint basis
The following user(s) said Thank You: langdons
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11582
- Thank you received: 3896
22 Nov 2025 02:07 #338944
by rodw
Replied by rodw on topic CNC AXIS IN PARKING MODE
Try the attached component
Untested. Probably has some typos but the logic should be sound.
sudo apt install linuxcnc-uspace-dev
sudo halcompile freewheel.compUntested. Probably has some typos but the logic should be sound.
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11582
- Thank you received: 3896
22 Nov 2025 02:21 #338946
by rodw
Replied by rodw on topic CNC AXIS IN PARKING MODE
Ooops, I did not set pos_cmd_out but its not needed and could be removed from the component
component freewheel "Allows moving a joint by hand if a pin is enabled"
pin in float pos_cmd_in "pos command in (joint.N.pos_cmd)" ;
pin in float pos_fb_in "feedback command in (joint.N.pos_fb)";
pin in bit isfreewheeling "set to true to enable freewheeling";
pin out float pos_fb_out "modified feedback command out";
function _;
license "GPL";
author "Rod Webster";
;;
FUNCTION(_) {
if(isfreewheeling)
pos_fb_out = pos_cmd_in;
else
pos_fb_out = pos_fb_in;
}Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 17531
- Thank you received: 5125
22 Nov 2025 16:46 #338978
by PCW
Replied by PCW on topic CNC AXIS IN PARKING MODE
You don't need a new component for connecting commanded to feedback position
when the joint is disengaged, and the mux component can already do this function.
That is not the tricky part anyway, the tricky part is returning to LinuxCNC control after
the hand motions were completed.
Ideally there would be a per joint enable signal (that forced LinuxCNCs internal commanded
position to track the feedback position when disabled) but lacking that, a simple hal profile
generator (using limit3 for example) could be enabled to move to the original position
before control is handed back to LinuxCNC.
when the joint is disengaged, and the mux component can already do this function.
That is not the tricky part anyway, the tricky part is returning to LinuxCNC control after
the hand motions were completed.
Ideally there would be a per joint enable signal (that forced LinuxCNCs internal commanded
position to track the feedback position when disabled) but lacking that, a simple hal profile
generator (using limit3 for example) could be enabled to move to the original position
before control is handed back to LinuxCNC.
Please Log in or Create an account to join the conversation.
- papagno-source
- Offline
- Premium Member
-
Less
More
- Posts: 113
- Thank you received: 7
22 Nov 2025 16:53 #338979
by papagno-source
Replied by papagno-source on topic CNC AXIS IN PARKING MODE
Good morning everyone and thanks for the replies.
It's clearly a machine axis, the Z axis.
The machine is old, and in some operations, it's more convenient to be able to drill manually. We're talking about a machine that works with enormous cast iron bases, 10 meters long, so it must have maximum flexibility.
Rown, basically, using your component, I would have:
net Zenable joint.2.amp-enable-out pid.2.enable isfreewheeling
net Zpos-cmd joint.2.motor-pos-cmd pid.2.command
net Zpos-fb joint.2.motor-pos-fb pid.2.feedback
But I don't understand where to connect: pos_fb_out
It's clearly a machine axis, the Z axis.
The machine is old, and in some operations, it's more convenient to be able to drill manually. We're talking about a machine that works with enormous cast iron bases, 10 meters long, so it must have maximum flexibility.
Rown, basically, using your component, I would have:
net Zenable joint.2.amp-enable-out pid.2.enable isfreewheeling
net Zpos-cmd joint.2.motor-pos-cmd pid.2.command
net Zpos-fb joint.2.motor-pos-fb pid.2.feedback
But I don't understand where to connect: pos_fb_out
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11582
- Thank you received: 3896
23 Nov 2025 03:55 #339024
by rodw
As far as the enable input, I wasn't sure. I thought it might be connected to a button on your GUI.
Another left field but more work idea would be to add a 100 ppr MPG wheel and manually jog the axis by hand. There are hale examples in the docs
Replied by rodw on topic CNC AXIS IN PARKING MODE
Looks like from your hal it should be connected to pid.2.feedback You want the component to sit between the motor feedback and the pidBut I don't understand where to connect: pos_fb_out
As far as the enable input, I wasn't sure. I thought it might be connected to a button on your GUI.
Another left field but more work idea would be to add a 100 ppr MPG wheel and manually jog the axis by hand. There are hale examples in the docs
Please Log in or Create an account to join the conversation.
Time to create page: 0.091 seconds