soft-limit / ini-file
- tomjack
- Offline
- New Member
-
Less
More
- Posts: 2
- Thank you received: 0
22 Dec 2010 18:40 #6215
by tomjack
soft-limit / ini-file was created by tomjack
Hello,
excuse me please for my bad English. My School-Time is long ago.
I hope you can understand my problem.
In the INI-File I have write for the Z-Axis MIN_LIMIT -244 / MAX_LIMIT 0.
That means, my Work-Zone ist from Z -244 to Z0. This works very good.
For the Automatic Tool Change, i must drive the Z-Axis to Z+200.
I must drive over the LIMIT for the Tool Change.
For the automatic Tool Change i will write a subroutine or a comp.
When i change the INI-File MAX_LIMIT +200 i have problems with the JOG, out of Tool-Change the Z-Axis don“t drive to Z+200.
My question is now, can I Cange the MAX_LIMIT-Variable/Parameter in the Tool-Change subroutine?
When the Tool-Change is done i must change the Variable to the first Value.
The other Way, is there in EMC a second Limit for the JOG? Perhaps a save Zone?
Thank You for help.
Greetings, Tom
excuse me please for my bad English. My School-Time is long ago.
I hope you can understand my problem.
In the INI-File I have write for the Z-Axis MIN_LIMIT -244 / MAX_LIMIT 0.
That means, my Work-Zone ist from Z -244 to Z0. This works very good.
For the Automatic Tool Change, i must drive the Z-Axis to Z+200.
I must drive over the LIMIT for the Tool Change.
For the automatic Tool Change i will write a subroutine or a comp.
When i change the INI-File MAX_LIMIT +200 i have problems with the JOG, out of Tool-Change the Z-Axis don“t drive to Z+200.
My question is now, can I Cange the MAX_LIMIT-Variable/Parameter in the Tool-Change subroutine?
When the Tool-Change is done i must change the Variable to the first Value.
The other Way, is there in EMC a second Limit for the JOG? Perhaps a save Zone?
Thank You for help.
Greetings, Tom
Please Log in or Create an account to join the conversation.
- BigJohnT
-
- Offline
- Administrator
-
Less
More
- Posts: 7000
- Thank you received: 1175
22 Dec 2010 23:41 #6219
by BigJohnT
Replied by BigJohnT on topic Re:soft-limit / ini-file
Tom,
AFAIK, there is only one software limit in EMC for each axis end point and no way to override the limit with HAL pins, but I might be wrong and don't know it.
I assume the tool change area is not the normal area that you will be milling but it is still a safe area to move to?
John
AFAIK, there is only one software limit in EMC for each axis end point and no way to override the limit with HAL pins, but I might be wrong and don't know it.
I assume the tool change area is not the normal area that you will be milling but it is still a safe area to move to?
John
Please Log in or Create an account to join the conversation.
- tomjack
- Offline
- New Member
-
Less
More
- Posts: 2
- Thank you received: 0
08 Jan 2011 16:20 #6546
by tomjack
Replied by tomjack on topic Re:soft-limit / ini-file
Thank you John for your answer.
I think you have properly understood my problem.
The tool change is not in the area of milling.
Maybe I can instal in parallel with the Z-axis a W-axis?
For example: The Z axis with the software limit is the area of milling.
The W axis with the other software limit is the area of the tool change.
The question is: How do I connect both axes with one engine?
Can I connect Z and W axis with one Stepgen?
Thank you for your help.
Happy New Year.
Greetings, Tom
I think you have properly understood my problem.
The tool change is not in the area of milling.
Maybe I can instal in parallel with the Z-axis a W-axis?
For example: The Z axis with the software limit is the area of milling.
The W axis with the other software limit is the area of the tool change.
The question is: How do I connect both axes with one engine?
Can I connect Z and W axis with one Stepgen?
Thank you for your help.
Happy New Year.
Greetings, Tom
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23323
- Thank you received: 4948
08 Jan 2011 19:25 - 08 Jan 2011 21:43 #6550
by andypugh
Replied by andypugh on topic Re:soft-limit / ini-file
tomjack wrote:
It would need a bit of cleverness in the HAL file to get a "bumpless transfer".
You would need a mux function to swap the input to the stepgen from the Z axis to the W axis
www.linuxcnc.org/docview/html/man/man9/mux2.9.html
You might want to use a linear A axis, I know it is wrong, but you might find you have to have ABCU&V to get a W. However, experiment first to see if that is the case. You will certainly need all 9 [AXIS_N] stanzas in the INI file, though they can be blank, I think, for the unused axes. You need to configure the COORDINATES and possibly GEOMETRY parameters in the INI file. You definitely need AXES=9 to have an active W axis.
You can't just transfer the input to the stepgen from Z to W, as that will lead to uncontrolled movement on the switch. I think the solution is to use a comp function
www.linuxcnc.org/docview/html/man/man9/comp.9.html
with the .out pin operating the mux2. That way the stepgen will always take the value of the larger of W or Z. You would normally "park" W at -250 or similar, then a G0 W200 would do nothing until W was equal to Z, at which point control of the stepgen would transfer to the W axis and you can drive to your +200 position. Then as you drive W back to -250, at the moment that the position is fractionally less than Z, then Z will take over control again.
This is only first-order bumpless, there is still a step change in velocity. It might be that the STEPGEN_MAXACCEL will handle this if tuned correctly, otherwise you will need to add a limit3 function between the mux2 and the stepgen.
www.linuxcnc.org/docview/html/man/man9/limit3.9.html
I have only discussed the logic here, if you need any help with the HAL implementation, feel free to ask.
That's a very interesting idea, and ought to work well. Very ingenious.Maybe I can instal in parallel with the Z-axis a W-axis?
You could, yes.The question is: How do I connect both axes with one engine?
Can I connect Z and W axis with one Stepgen?
It would need a bit of cleverness in the HAL file to get a "bumpless transfer".
You would need a mux function to swap the input to the stepgen from the Z axis to the W axis
www.linuxcnc.org/docview/html/man/man9/mux2.9.html
You might want to use a linear A axis, I know it is wrong, but you might find you have to have ABCU&V to get a W. However, experiment first to see if that is the case. You will certainly need all 9 [AXIS_N] stanzas in the INI file, though they can be blank, I think, for the unused axes. You need to configure the COORDINATES and possibly GEOMETRY parameters in the INI file. You definitely need AXES=9 to have an active W axis.
You can't just transfer the input to the stepgen from Z to W, as that will lead to uncontrolled movement on the switch. I think the solution is to use a comp function
www.linuxcnc.org/docview/html/man/man9/comp.9.html
with the .out pin operating the mux2. That way the stepgen will always take the value of the larger of W or Z. You would normally "park" W at -250 or similar, then a G0 W200 would do nothing until W was equal to Z, at which point control of the stepgen would transfer to the W axis and you can drive to your +200 position. Then as you drive W back to -250, at the moment that the position is fractionally less than Z, then Z will take over control again.
This is only first-order bumpless, there is still a step change in velocity. It might be that the STEPGEN_MAXACCEL will handle this if tuned correctly, otherwise you will need to add a limit3 function between the mux2 and the stepgen.
www.linuxcnc.org/docview/html/man/man9/limit3.9.html
I have only discussed the logic here, if you need any help with the HAL implementation, feel free to ask.
Last edit: 08 Jan 2011 21:43 by andypugh.
Please Log in or Create an account to join the conversation.
- BigJohnT
-
- Offline
- Administrator
-
Less
More
- Posts: 7000
- Thank you received: 1175
08 Jan 2011 21:33 #6556
by BigJohnT
Replied by BigJohnT on topic Re:soft-limit / ini-file
Tom,
That is beyond my guesspertice
John
That is beyond my guesspertice

John
Please Log in or Create an account to join the conversation.
- dm17ry
-
- Offline
- Elite Member
-
Less
More
- Posts: 186
- Thank you received: 74
12 Jun 2017 17:15 #94430
by dm17ry
Replied by dm17ry on topic soft-limit / ini-file
i've found this old thread while looking for a solution at similar situation. want to share another idea, which may be obvious though. but anyway.
since it is possible to dynamically change the value of ini.2.max_limit pin i do the following which seems to be working for me:
.ini:
[AXIS_2]
MAX_LIMIT = 0
MAX_LIMIT_TOOLCHANGE = 200
postgui.hal:
loadrt mux2
addf mux2.0 servo-thread
setp mux2.0.in0 #<_ini[AXIS_2]MAX_LIMIT>
setp mux2.0.in1 #<_ini[AXIS_2]MAX_LIMIT_TOOLCHANGE>
net extend_z_max motion.digital-out-10 => mux2.0.sel
net z-max-limit mux2.0.out => ini.2.max_limit
change.ngc:
M64 P#10 ; enable off-limit movement
G53 G0 Z[#<_ini[CHANGE_POSITION]Z>]
...
G53 G0 Z[#<_ini[AXIS_2]MAX_LIMIT>]
M65 P#10 ; restore z max limit
since it is possible to dynamically change the value of ini.2.max_limit pin i do the following which seems to be working for me:
.ini:
[AXIS_2]
MAX_LIMIT = 0
MAX_LIMIT_TOOLCHANGE = 200
postgui.hal:
loadrt mux2
addf mux2.0 servo-thread
setp mux2.0.in0 #<_ini[AXIS_2]MAX_LIMIT>
setp mux2.0.in1 #<_ini[AXIS_2]MAX_LIMIT_TOOLCHANGE>
net extend_z_max motion.digital-out-10 => mux2.0.sel
net z-max-limit mux2.0.out => ini.2.max_limit
change.ngc:
M64 P#10 ; enable off-limit movement
G53 G0 Z[#<_ini[CHANGE_POSITION]Z>]
...
G53 G0 Z[#<_ini[AXIS_2]MAX_LIMIT>]
M65 P#10 ; restore z max limit
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23323
- Thank you received: 4948
15 Jun 2017 13:08 #94533
by andypugh
Just as explanation: It wasn't possible to do this when the thread was current, those pins did not exist then.
Replied by andypugh on topic soft-limit / ini-file
i've found this old thread while looking for a solution at similar situation. want to share another idea, which may be obvious though. but anyway.
since it is possible to dynamically change the value of ini.2.max_limit pin
Just as explanation: It wasn't possible to do this when the thread was current, those pins did not exist then.
Please Log in or Create an account to join the conversation.
Time to create page: 0.069 seconds