What is strange, after reading your post, is when I use pos=call_event_proc('GetFocusLensMoveMinPosition') or pos=call_event_proc('GetFocusLensMoveMaxPosition'), I get -3200 or 3200 returned and the lens doesn't move. I'm in MF mode.I was expecting to see the lens move.
@reyalp Thanks to your help I've made progress and believe I'm ready to code up a new script for focus and exposure bracketing.
Strangely in this demo script I can't seem to get the get_dofinfo giving me the focus position. It always seems to return 0.
test = call_event_proc('GetFocusLensCurrentPosition') qq=call_event_proc('MoveFocusLensWithPosition',100,0,0)
con 5> =return call_event_proc('GetFocusLensMoveMinPosition'), call_event_proc('GetFocusLensMoveMaxPosition')6:return:136:return:1651con 6> =set_zoom(100)con 7> =return call_event_proc('GetFocusLensMoveMinPosition'), call_event_proc('GetFocusLensMoveMaxPosition')8:return:138:return:3467
It seems you expect MoveFocusLensWithPosition to do a relative move, i.e. + or - form the current position. This is not how it works. It does an absolute move. To get a relative move, you should add or subtract from the value returned by GetFocusLensCurrentPosition.
Additional observation:On G7 X, the range returned by GetFocusLensMove*Position does seem to vary with zoom:Code: [Select]con 5> =return call_event_proc('GetFocusLensMoveMinPosition'), call_event_proc('GetFocusLensMoveMaxPosition')6:return:136:return:1651con 6> =set_zoom(100)con 7> =return call_event_proc('GetFocusLensMoveMinPosition'), call_event_proc('GetFocusLensMoveMaxPosition')8:return:138:return:3467
QuoteIt seems you expect MoveFocusLensWithPosition to do a relative move, i.e. + or - form the current position. This is not how it works. It does an absolute move. To get a relative move, you should add or subtract from the value returned by GetFocusLensCurrentPosition. I can confirm that the move is relative. That is, I tested multiple calls and tested the position after the move call. It all matched. I really appreciate your warnings. I must say, so far all looks good. If I don’t use MoveFocusLensWithPosition, is there any other route to getting a P&S cam to move the lens in steps?Cheers
I can confirm that the move is relative.
connected: Canon PowerShot ELPH 180, max packet size 512con 7> =return call_event_proc('Mecha.Create')1:return:0con 1> reccon 2> =return call_event_proc('GetFocusLensMoveMinPosition'), call_event_proc('GetFocusLensMoveMaxPosition')3:return:403:return:1840con 3> =set_mf(true)con 4> =return call_event_proc('GetFocusLensCurrentPosition')5:return:770con 5> =return call_event_proc('MoveFocusLensWithPosition',600,0,0)6:return:0con 6> =return call_event_proc('GetFocusLensCurrentPosition')7:return:600con 7> =return call_event_proc('MoveFocusLensWithPosition',770,0,0)8:return:0con 8> =return call_event_proc('GetFocusLensCurrentPosition')9:return:770
If I don’t use MoveFocusLensWithPosition, is there any other route to getting a P&S cam to move the lens in steps?
as far as i could determine, the p&s don't have an actual stepper motor. this results in the step not being at the same focus point between (re)boots or when zooming.
Started by eltomek Script Writing
Started by lngndvs Creative Uses of CHDK
Started by dvip General Discussion and Assistance
Started by fvfvfv Hello, I'm a NEWBIE - HELP!! (Newbies assistance, User Guides and thank you notes)
Started by reyalp « 1 2 » General Discussion and Assistance