M3 etc focus move - General Help and Assistance on using CHDK stable releases - CHDK Forum  

M3 etc focus move

  • 48 Replies
  • 6364 Views
M3 etc focus move
« on: 26 / June / 2022, 11:39:51 »
Advertisements
@c_joerg

I’ve tried to solve a specific need I have, but can only find approximate work arounds.

The need is to calculate the number of steps, moving with call_event_proc("EFLensCom.MoveFocus", -1, 1), from the current focus to the macro end stop.

The problem I have is that, in a loop to move, how can I know when I’ve reached the macro stop.

If I access the canon lower, say, focus distance, this is only accurate to the nearest cm.

Can you think of a way to detect I’ve reach the macro stop?

Cheers

Garry
« Last Edit: 26 / June / 2022, 12:27:09 by pigeonhill »

*

Offline c_joerg

  • *****
  • 1251
Re: M3 etc focus move
« Reply #1 on: 26 / June / 2022, 13:25:12 »
I don't have a solution for that either.

I either do a test run without recording or I break off manually by looking at the peaking.
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

Re: M3 etc focus move
« Reply #2 on: 26 / June / 2022, 13:50:20 »
I don't have a solution for that either.

I either do a test run without recording or I break off manually by looking at the peaking.

Unfortunately I’m trying to find an auto method, I was hoping that there might me an error code to look for, but AFAIK call_event_proc("EFLensCom.MoveFocus", -1, 1) doesn’t return any values, error codes or other values.

Oh well, such is life.


*

Offline reyalp

  • ******
  • 14117
Re: M3 etc focus move
« Reply #3 on: 26 / June / 2022, 23:53:28 »
While working on this https://chdk.setepontos.com/index.php?topic=14554.10 I noticed a EOS M cams have a function PrintFALensInfoData, which gets a bunch of lens related values and outputs them,
One of the values AbsDisFar, which I believe is what we called focus_distance_upper elsewhere. Other include FocusPos and FocusPosSize, which seem like they might be relevant.

If someone can do the following with chdkptp (or equivalent standalone Lua), I'd be interested to see the resulting AdjLog.txt
Code: [Select]
=return call_event_proc('FA.Create')
=return call_event_proc('StartLogOut',-2,0x1000,0)
=return call_event_proc('PrintFALensInfoData')
=return call_event_proc('OutputLogToFile')
download AdjLog.txt
If PrintFALensInfoData returns -1, you call
Code: [Select]
=return call_event_proc('InitializeAdjustmentSystem')
and call PrintFALensInfoData again.
You could call PrintFALensInfoData after setting focus to the ends of the available range.

Other possibly relevant eventprocs are GetEFLensFocusPositionWithoutLensCom and GetEFLensFocusPositionWithLensCom
I think these should both return the position, and print it AdjLog.txt if enabled.
Don't forget what the H stands for.


Re: M3 etc focus move
« Reply #4 on: 27 / June / 2022, 01:42:59 »
While working on this https://chdk.setepontos.com/index.php?topic=14554.10 I noticed a EOS M cams have a function PrintFALensInfoData, which gets a bunch of lens related values and outputs them,
One of the values AbsDisFar, which I believe is what we called focus_distance_upper elsewhere. Other include FocusPos and FocusPosSize, which seem like they might be relevant.

If someone can do the following with chdkptp (or equivalent standalone Lua), I'd be interested to see the resulting AdjLog.txt
Code: [Select]
=return call_event_proc('FA.Create')
=return call_event_proc('StartLogOut',-2,0x1000,0)
=return call_event_proc('PrintFALensInfoData')
=return call_event_proc('OutputLogToFile')
download AdjLog.txt
If PrintFALensInfoData returns -1, you call
Code: [Select]
=return call_event_proc('InitializeAdjustmentSystem')
and call PrintFALensInfoData again.
You could call PrintFALensInfoData after setting focus to the ends of the available range.

Other possibly relevant eventprocs are GetEFLensFocusPositionWithoutLensCom and GetEFLensFocusPositionWithLensCom
I think these should both return the position, and print it AdjLog.txt if enabled.

Sorry, not in a position to help on this, but I hope others can.

*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: M3 etc focus move
« Reply #5 on: 27 / June / 2022, 10:59:44 »
M10_100d_6112 with STM 15-45  :)
Code: [Select]
FileName A/AdjLog.txt

 BuffSize 4096



Firmware Ver GM1.10D
Mar 18 2016  08:31:04

---- FA LensInfo ---
 LensID                     : 0x1039
 FocalLength                : 0015 [mm]
 FL_Wide                    : 0015 [mm]
 FL_Tele                    : 0045 [mm]
 AbsDisFar                  : 0037 [cm]
 AVEF                       : 0x25
 AVO                        : 0x25
 AVMAX                      : 0x50
 LensType (0:EF 1:EFM)      : 0x1
 ExtenderType (0xFF:Non)    : 0xff
 PO                         : 0x23
 PO 0                       : 0x116
 PO 5                       : 0x102
 PO 10                      : 0x112
 PO 15                      : 0x10
 ZoomPos                    : 0x3f
 ZoomPosSize                : 0x3f
 FocusPos                   : 0x19
 FocusPosSize               : 0x1f
--------------------
M100-6087...   8)
Code: [Select]
Firmware Ver GM1.00A
Jun 26 2017  12:23:15

---- FA LensInfo ---
 LensID                     : 0x103d
 FocalLength                : 0018 [mm]
 FL_Wide                    : 0018 [mm]
 FL_Tele                    : 0150 [mm]
 AbsDisFar                  : 65535 [cm]
 AVEF                       : 0x26
 AVO                        : 0x26
 AVMAX                      : 0x50
 LensType (0:EF 1:EFM)      : 0x1
 ExtenderType (0xFF:Non)    : 0xff
 PO                         : 0x31
 PO 0                       : 0xcd
 PO 5                       : 0xe6
 PO 10                      : 0xdc
 PO 15                      : 0xde
 ZoomPos                    : 0x3f
 ZoomPosSize                : 0x3f
 FocusPos                   : 0x0
 FocusPosSize               : 0x1f
--------------------

M3-6112...  ::)
Code: [Select]
Firmware Ver GM1.21A
Oct 15 2019  21:23:39

---- FA LensInfo ---
 LensID                     : 0x1033
 FocalLength                : 0022 [mm]
 FL_Wide                    : 0011 [mm]
 FL_Tele                    : 0022 [mm]
 AbsDisFar                  : 0063 [cm]
 AVEF                       : 0x30
 AVO                        : 0x30
 AVMAX                      : 0x58
 LensType (0:EF 1:EFM)      : 0x1
 ExtenderType (0xFF:Non)    : 0xff
 PO                         : 0x31
 PO 0                       : 0xcb
 PO 5                       : 0xd2
 PO 10                      : 0xd0
 PO 15                      : 0xd0
 ZoomPos                    : 0x0
 ZoomPosSize                : 0x3f
 FocusPos                   : 0xc
 FocusPosSize               : 0x1f
--------------------

« Last Edit: 27 / June / 2022, 11:55:46 by Caefix »
All lifetime is a loan from eternity.

*

Offline c_joerg

  • *****
  • 1251
Re: M3 etc focus move
« Reply #6 on: 27 / June / 2022, 11:59:35 »
If PrintFALensInfoData returns -1, you call
Code: [Select]
=return call_event_proc('InitializeAdjustmentSystem')
and call PrintFALensInfoData again.


Without 'InitializeAdjustmentSystem' you only get an empty file.

Got a crash with chdkptp

Code: [Select]
ERROR: a script is already running
ERROR: not connected

AdjLog includes 4 tries with EFM 15-45

15mm Far
15mm Near
45mm Far
45mm Near
« Last Edit: 27 / June / 2022, 12:01:22 by c_joerg »
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline c_joerg

  • *****
  • 1251
Re: M3 etc focus move
« Reply #7 on: 27 / June / 2022, 12:00:57 »
Sorry, not in a position to help on this, but I hope others can.

You can run attached script
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd


*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: M3 etc focus move
« Reply #8 on: 27 / June / 2022, 12:10:53 »
Sorry, not in a position to help on this, but I hope others can.

You can run attached script
Glad you found a workaround.  :D A couple of notes:

2) Zadig (https://zadig.akeo.ie/) may be more convenient than the configurator included with libusb (It's required on windows 10, where it pretty much seems to Just Work for me. I haven't had a 7 install for many years so I don't know how it works there.)

Edit: ZoomPosition seems 0 in max tele.
« Last Edit: 27 / June / 2022, 12:21:50 by Caefix »
All lifetime is a loan from eternity.

*

Offline c_joerg

  • *****
  • 1251
Re: M3 etc focus move
« Reply #9 on: 27 / June / 2022, 12:16:52 »
Attached ROMLOG.LOG from Crash
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal