Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ztouch Probing #354

Merged
merged 6 commits into from
Jan 9, 2025
Merged

Conversation

BioCam
Copy link
Contributor

@BioCam BioCam commented Jan 9, 2025

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:
250109_Moschner_ztouch_probe_explainer

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

@rickwierenga rickwierenga merged commit 589debc into PyLabRobot:main Jan 9, 2025
7 checks passed
@BioCam BioCam deleted the Fix-ztouch_probing branch January 10, 2025 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants