×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Canon DSLR focus module

  • Posts: 302
  • Thank you received: 46

Replied by Markku on topic Canon DSLR focus module

Hi Walter,

It sounds much like something I was experiencing for a while ago..
Check this thread: www.indilib.org/forum/focusers-filter-wh...-behavior.html#93579
Br,
/Markku
8 months 7 hours ago #95365

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

  • Posts: 604
  • Thank you received: 281

Replied by John on topic Canon DSLR focus module

Hi WalterZambotti,

Hopefully, Markku's suggestions on backlash will help, but if not, please post some screenshots of what you're doing and what the focus parameters are.
8 months 2 hours ago #95371

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

  • Posts: 20
  • Thank you received: 1
Here is a screen shot taken from an Intel Linux system :

Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
indi-gphoto/jammy,now 3.2+t202308011023~ubuntu22.04.1 amd64 [installed,automatic]
kstars-bleeding/jammy,now 6:3.6.6+202308180900~ubuntu22.04.1 amd64 [installed]



The image in the shot is taken indoors and is typical when being extremely over exposed.

Process is irrelevant as this example is just using manual focusing.

From the the screenshot (starting at 50000 not shown) I have focused outward (350-100 = 250 steps) which resulted in the Steps = 50450 instead of 50250 (not shown) and then a focus inward by 250 steps which instead of returning me back to 50000 resulted in 50700.

This value (50700) is the result of adding the following 50000 + 350 + 100 + 250 = 50700. So every step amount regardless of in or out just keeps adding to the step counter.
Last edit: 7 months 4 weeks ago by WalterZambotti.
7 months 4 weeks ago #95379
Attachments:

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

  • Posts: 604
  • Thank you received: 281

Replied by John on topic Canon DSLR focus module

Thanks for the info.

Can you post a picture of the Mechanics tab (with backlash fields please). And when you say " I have focused outward (350-100 = 250 steps) " what exactly did you do to achieve this?
7 months 4 weeks ago #95380

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

  • Posts: 20
  • Thank you received: 1
John wrote : And when you say " I have focused outward (350-100 = 250 steps) " what exactly did you do to achieve this?

The driver does this automatically. It's not me!

When there is an outwards focus the driver automatically adds 100 steps to the desired amount moves that amount and then subtracts 100 steps in the other direction and moves back to achieved the initial desired amount. But it only does this for outward focus. Why?

To compensate for backlash. So moving 250 steps inwards is simply that a movement inwards of 250 steps. But an outward step of 250 is achieved by moving 350 and returning 100 steps (which equals 250). You can see this in the log window. When I pressed the focus out(ward) button the driver converted that to a 350 outward plus 100 inward. I didn't do that. The driver does that in order to compensate for backlash. Backlash compensation is only necessary in one arbitrary direction and the driver has chosen outward.

This is a common way to eliminate backlash. Always finishing off by moving in the same direction. So the driver always wants to finish with an inward focus even if doing an outward focus. And this is good and correct. So to get 250 outward the driver must move more than 250 than come back. The value it moves past the require value is arbitrary but it looks like they chose a plain round number (100) as the compensation amount.

So the rule for backlash compensation is always to finish off moving in the same direction. Any direction will do for a focuser. So if you look through the log the last step will always be an inward movement.

What is more important is that when the driver adds a inward step amount (for any reason, either explicit or for backlash) it should be a subtraction (not an addition) to the "Step:" counter. Only outward movements should represent an addition to the "Step:" counter.

This is the mistake the driver doing at the moment it is adding both inward and outward moves to the step counter. It should not be adding inward movements but instead should be subtracting them from the Step counter.
Last edit: 7 months 4 weeks ago by WalterZambotti.
7 months 4 weeks ago #95392

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

  • Posts: 20
  • Thank you received: 1

Picture of Mechanics tab as requested:

7 months 4 weeks ago #95395
Attachments:

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

  • Posts: 604
  • Thank you received: 281

Replied by John on topic Canon DSLR focus module

You have AF Overscan set to 100 which will add 100 ticks to all outward movements. Then reverse in by 100 ticks to the requested position...


Set this to 0 to stop this effect.

The Steps Counter gets its information from the driver. It does not keep its own score. The driver reports "I'm at XXXXX", and the steps counter is updated to XXXXX.

As to why the reversing 100 ticks sends the camera 100 ticks outward rather than inward I don't know. I suppose the obvious thing to say is that AF Overscan is incompatible with your camera/device driver.
7 months 4 weeks ago #95399
Attachments:

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

  • Posts: 20
  • Thank you received: 1
That will only fix inward steps for the overscan/backlash.

It still leaves the inward steps for the manual focus and inward steps for the auto focus algorithms accumulating the wrong way.

Is there some setting that will fix those as well or is it better to fix the underlying issue of none of the inward movements being accumluated correctly?
7 months 3 weeks ago #95431

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

  • Posts: 20
  • Thank you received: 1
After setting the overscan value to zero I tested the outward focus (first screenshot) and I now get the correct value of 50250.



I then pressed the inward button (second screen shot) in an attempt to return to 50000 but it went to 50500.



So I feel the issue is not whether overscan is supported but rather incorrect accumulation for any inward step, regardless of the origin (overscan, manual button or auto focusing)
Last edit: 7 months 3 weeks ago by WalterZambotti.
7 months 3 weeks ago #95432
Attachments:

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

  • Posts: 604
  • Thank you received: 281

Replied by John on topic Canon DSLR focus module

Hi Walter,

Thanks for the additional info. I've not seen this before. Could you set logging like this (verbose focus, driver and Indi set), repeat the out and in test, and post the log on here, please.

7 months 3 weeks ago #95434
Attachments:

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

  • Posts: 20
  • Thank you received: 1
Log as requested.

I performed a couple of inward and outward movements. One with overscan and one without.

File Attachment:

File Name: log_19-15-53.txt
File Size:147 KB
7 months 3 weeks ago #95438
Attachments:

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

  • Posts: 604
  • Thank you received: 281

Replied by John on topic Canon DSLR focus module

Hi Walter,

Thanks for the log. I think I can see the problem, although I haven't been able to reproduce it in a simulator environment, but I think that is because the environment doesn't resemble your equipment closely enough.

So it looks like your focuser (which I assume is built into your canon) doesn't keep score of absolute position itself but moves relative to where it is. Does that make sense? This isn't a problem of course, I'm just making sure I understand the scenario properly.

Anyway, I will continue to try to reproduce the scenario in my test region. Assuming I can do that and then make some code change to fix it, are you able to take off-cycle code changes? That means can you build Kstars from source yourself, or are you able to take one of the bleeding-edge executables and run that? Since I don't have a DSLR myself I will only be able to do the most basic testing so would rely on you to test any changes (assuming I am actually able to make them, of course).
7 months 3 weeks ago #95449

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

Time to create page: 0.479 seconds