×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Robofocus - 'Busy' state produces tty timeout / bogus

  • Posts: 23
  • Thank you received: 2

Yes Gene, of course. Here you have the log of that session.

File Attachment:

File Name: log_20-13-33.txt
File Size:264 KB


Thanks for your help, and regards.

Jordi.
1 year 5 months ago #86905
Attachments:

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

  • Posts: 23
  • Thank you received: 2
Hi Alfred, welcome to the thread!

Ok, I tested thoroughly with usleep(1200). It works in so far as I do not get any timeout errors. Fine!
 
However, I encountered a strange behaviour:
If I press the "focus in" button once and wait till the focuser has finished its move, everything is fine.
If I press the "focus in" buttone while the focuser is still moving, this is what happens:
1. Press "focus in" button


Very interesting. I also wanted to test that <strong>usleep</strong>, it's great reading that it works for you!

And about that strange behaviour... What about the debug log? All clicks should move a fixed amount of ticks/steps and go to an absolute position. Do you have a backlash value defined?

Regards from Barcelona,

Jordi.
Last edit: 1 year 5 months ago by Jordi Sesé. Reason: quote not showing
1 year 5 months ago #86906

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

  • Posts: 23
  • Thank you received: 2
I think I worked out your *strange behaviour*, Alfred. I guess the target focus position gets updated the moment we click, calculating the destinantion position adding to the current position, and not the to the end of the previous click (the ongoing movement)

In this log, every click should move 500 steps, but look what happens every time we meet <strong>Focusing outward by 500 steps</strong>

<code>
[2022-10-04T19:45:43.663 CEST INFO ][ org.kde.kstars.indi] - OnFocus : "[INFO] Focuser is moving to position 6500 "
[2022-10-04T19:45:43.894 CEST DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 6004 State: Busy
[2022-10-04T19:45:45.460 CEST DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 6038 State: Busy
[2022-10-04T19:45:47.026 CEST DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 6168 State: Busy
[2022-10-04T19:45:48.587 CEST DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 6324 State: Busy
[2022-10-04T19:45:50.152 CEST DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 6461 State: Busy
[2022-10-04T19:45:51.718 CEST DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 6496 State: Busy
[2022-10-04T19:45:53.282 CEST DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 6500 State: Busy
[2022-10-04T19:45:53.312 CEST INFO ][ org.kde.kstars.indi] - OnFocus : "[INFO] Focuser reached requested position. "
[2022-10-04T19:45:58.067 CEST INFO ][ org.kde.kstars.ekos.focus] - "Focusing outward by 500 steps..."
[2022-10-04T19:45:58.083 CEST INFO ][ org.kde.kstars.indi] - OnFocus : "[INFO] Focuser is moving to position 7000 "
[2022-10-04T19:45:59.443 CEST DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 6520 State: Busy
[2022-10-04T19:46:01.005 CEST DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 6604 State: Busy
[2022-10-04T19:46:02.567 CEST DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 6760 State: Busy
[2022-10-04T19:46:03.248 CEST INFO ][ org.kde.kstars.ekos.focus] - "Focusing outward by 500 steps..."
[2022-10-04T19:46:03.263 CEST INFO ][ org.kde.kstars.indi] - OnFocus : "[INFO] Focuser is moving to position 7260 "
[2022-10-04T19:46:04.123 CEST INFO ][ org.kde.kstars.ekos.focus] - "Focusing outward by 500 steps..."
[2022-10-04T19:46:04.138 CEST DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 6916 State: Busy
[2022-10-04T19:46:04.159 CEST INFO ][ org.kde.kstars.indi] - OnFocus : "[INFO] Focuser is moving to position 7260 "
[2022-10-04T19:46:04.861 CEST INFO ][ org.kde.kstars.ekos.focus] - "Focusing outward by 500 steps..."
[2022-10-04T19:46:04.881 CEST INFO ][ org.kde.kstars.indi] - OnFocus : "[INFO] Focuser is moving to position 7416 "
[2022-10-04T19:46:05.693 CEST DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 7071 State: Busy
[2022-10-04T19:46:07.254 CEST DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 7227 State: Busy
[2022-10-04T19:46:08.815 CEST DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 7372 State: Busy
[2022-10-04T19:46:10.379 CEST DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 7410 State: Busy
[2022-10-04T19:46:11.945 CEST DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 7416 State: Busy
[2022-10-04T19:46:11.975 CEST INFO ][ org.kde.kstars.indi] - OnFocus : "[INFO] Focuser reached requested position. "

</code>

Not sure if this is a bug or a feature... anyway, it explains what you see. Besides, this was with another focuser I had nearby (DIY OnFocus), which proves it has nothing to do with our Robofocus, it's the way eKos works.

Regards,

Jordi.
Last edit: 1 year 5 months ago by Jordi Sesé. Reason: explain indi driver used
1 year 5 months ago #86910

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

  • Posts: 985
  • Thank you received: 160
The only timeout error I still get (with usleep 1200) is a "TTY error detected3:" right after connecting the Robofocus device. The "multiple press" issue is irrelevant to Ekos AFAIAC as Autofocus should work perfectly well despite it. I attach my latest logfile. Looks good to me...
1 year 5 months ago #86917
Attachments:

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

  • Posts: 276
  • Thank you received: 52
Hi Alfred,

Prior to adding the usleep, did you also see this error at startup?
The system is queueing back to back operations so is hard to tell which one kicked the error
[2022-10-05T00:01:15.445 CEST INFO ][ org.kde.kstars.ekos] - "RoboFocus focuser is online."
[2022-10-05T00:01:15.475 CEST DEBG ][ org.kde.kstars.indi] - RoboFocus : "[DEBUG] Update Backlash: 6.90317e-310 "
[2022-10-05T00:01:15.475 CEST DEBG ][ org.kde.kstars.indi] - RoboFocus : "[DEBUG] CMD (0X46 0X42 0X30 0X30 0X30 0X30 0X30 0X30 0XFFFFFFA8) "
[2022-10-05T00:01:15.475 CEST DEBG ][ org.kde.kstars.indi] - RoboFocus : "[DEBUG] Update Motor Settings: Duty (0), Delay (0), Ticks(0) "
[2022-10-05T00:01:15.475 CEST DEBG ][ org.kde.kstars.indi] - RoboFocus : "[DEBUG] CMD (0X46 0X43 0X30 0X30 0X30 0X30 0X30 0X30 0XFFFFFFA9) "
[2022-10-05T00:01:15.480 CEST DEBG ][ org.kde.kstars.indi] - RoboFocus : "[DEBUG] Get switch status... "
[2022-10-05T00:01:15.480 CEST DEBG ][ org.kde.kstars.indi] - RoboFocus : "[DEBUG] CMD (0X46 0X50 0X30 0X30 0X30 0X30 0X30 0X30 0XFFFFFFB6) "
[2022-10-05T00:01:18.368 CEST INFO ][ org.kde.kstars.indi] - RoboFocus : "[ERROR] TTY error detected3: Timeout error "

Just below the above, another set of backlash that seems to take ~50ms to signal success

[2022-10-05T00:01:18.427 CEST DEBG ][ org.kde.kstars.indi] - RoboFocus : "[DEBUG] Update Backlash: 4.64331e-310 "
[2022-10-05T00:01:18.427 CEST DEBG ][ org.kde.kstars.indi] - RoboFocus : "[DEBUG] CMD (0X46 0X42 0X32 0X30 0X30 0X31 0X30 0X30 0XFFFFFFAB) "
[2022-10-05T00:01:18.474 CEST DEBG ][ org.kde.kstars.indi] - RoboFocus : "[DEBUG] Configuration successfully saved for FOCUS_BACKLASH_TOGGLE. "


Gene
Last edit: 1 year 5 months ago by Gene N.
1 year 5 months ago #86932

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

  • Posts: 985
  • Thank you received: 160
Hi, Gene!

Gene: "Prior to adding the usleep, did you also see this error at startup?"

The "Unknown error while reading Robofocus power switch settings. " message always comes up, yes.

Gene: "Just below the above, another set of backlash that seems to take ~50ms to signal success"

I have no idea why it does set backlash twice but it was the same before, too. I'll attach a logfile taken with the original robofocus.cpp version for comparison.
Last edit: 1 year 5 months ago by Alfred.
1 year 5 months ago #86936
Attachments:

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

  • Posts: 985
  • Thank you received: 160
BTW, does backlash compensation do smaller steps than normal? When my focuser moves 200 steps out and I set backlash to 200, the "backlash 200" are MUCH smaller than the 200 "normal" focuser steps. Is this intended or should backlash compensation steps be the same as "normal movement" steps?
1 year 5 months ago #87070

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

Time to create page: 0.357 seconds