Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi everyone,
In PR #260 I created
STAR.ztouch_probe_z_height_using_channel()
.This function had a hidden bug that I missed which is being fixed in this PR:
Problem Statement
The previous implementation of
STAR.ztouch_probe_z_height_using_channel()
does return the correct z-height of the material it detects.But its
start_pos_search
attribute has been incorrect:I believed that he firmware commands for this attribute represent the z_position of the tip_bottom because the
STAR.request_z_pos_channel_n(channel_idx)
returns the tip_bottom.I now figured out this is false -> the firmware commands expect the z_position of the channel_head_bottom!
This means that every time
start_pos_search
, and we assume the tip_bottom to go to that z_coordinate to start the search, the tip actually moves at default speed (i.e. very fast) 59.9 mm further down in the z-dimension!(59.9 mm when using a 300ul or a standard teaching needle)
This will most likely result in a crash of the tip into the item it is aimed at measuring.
Interestingly, this crash does not hinder the ztouch method, it still works. But the potential crash is not intended and probably not very good for the channels!
The most likely reason as to why this issue has stayed undetected thus far is that people haven't extensively specified
start_pos_search
until now but instead left this attribute out, leaving it to default, i.e. the search starts at the safe_z_height.PR Content
I am fixing this issue by adapting the start position based on the length of the tip /needle that is attached to the channel - the tip's fitting_depth, visualised in this infographic:
With these fixes in place
start_pos_search
appears to work exactly as expected on our machines:->
start_pos_search
= the z-height at which the tip_bottom starts searching for an item below it