G43.1 Dynamic Tool Length Measurement - Program Exceeds machine maximum on axis

More
29 Nov 2021 17:48 #227932 by harry4516
I understand what you explain, maybe this is an issue only in Axis-GUI. I'm using qtdragon and don't have a problem with boundaries check.
Anyway, boundaries check should only be done against the machine limits. G43.1 changes (at least in qtdragon) only G45 coordinates, not machine coordinates. In your code above you are mixing machine limits with tool length which could cause problems. But, I don't use axis, so maybe its different there.

Back to the limit problem of the tool-change code.
The calculation with variables #2002 and #2003 is not working correctly. Usually they are the same and don't have any effect. But as these are global variables they could get a value from somewhere else and then the strangest things happen. I have tested it for a week and never got reliable results, including the limit problem discussed here.

I have changed the code into two files, one for reference measurement and the second for use (M6) during normal operation.
Maybe it is useful for somebody, its attached here. We are using it for a few days and didn't have any more problems.
 
Attachments:

Please Log in or Create an account to join the conversation.

More
01 Dec 2021 19:22 #228144 by +Jan+
Good evening,
thanks for the macros, I will have a look. 

The calculation with variables #2002 and #2003 is not working correctly. 


I can't confirm this, as long as no other macro uses the same parameters there should be no problems. The tool measurement works stable for me with the code since weeks. After I have measured the tool after starting Linuxcnc I set Z0 to sacrificial plate level with another macro (see attachment) or manually to another point. When I do this, there are no problems except for the faulty preview (which also shows up with an empty remap file). I hope to get around to experimenting with D2inventory's hints in the next few days.

Best regards

Jan 

File Attachment:

File Name: messen_z.ngc
File Size:1 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
20 Apr 2022 11:41 #240730 by andypugh

if o.canon.max_extents_notool[i] > machine_limit_max[i]:
to:
[code]if o.canon.max_extents_notool[i] + (o.last_tool_offset[i] / 25.4) > machine_limit_max[i]:[/i][/i][/i]
[/i][/i][/code]
 

This seems to be something missed as G43.1 was introduced some time after Axis was completed. 

Did you create the pull request? I think that units conversion is handled by some functions in the axis code:
github.com/LinuxCNC/linuxcnc/blob/master...scripts/axis.py#L285


 

Please Log in or Create an account to join the conversation.

More
01 Jul 2022 11:21 #246350 by d2inventory

Did you create the pull request? I think that units conversion is handled by some functions in the axis code:
github.com/LinuxCNC/linuxcnc/blob/master...scripts/axis.py#L285



I have now :D

Please Log in or Create an account to join the conversation.

Time to create page: 0.269 seconds
Powered by Kunena Forum