Can a script blank the display? A590IS - page 2 - Script Writing - CHDK Forum

Can a script blank the display? A590IS

  • 23 Replies
  • 13323 Views
Re: Can a script blank the display? A590IS
« Reply #10 on: 22 / February / 2009, 15:29:06 »
Advertisements
Ok, I did a test of the Ultra Intervalometer, and it worked exactly as you predicted.  I set everything up on the script with the display on, went back into normal mode, turned off the display with DISP, and then went into ALT mode and pressed the shutter button.  It worked fine.   The display stays off the whole time unless I have Review activated, in which case it does whatever that setting is after each shot and then goes dark again until the next shot.

Is a script able to test the state of the physical DISP button - whether it is being depressed?  If so, I could add that test to the loop.  That would let me turn the display on manually while the script is running to see how things are going, then turn it back off again.

On the other question - so, motion detection required the display to be on, so the sensor will be on, but the backlight can still be off.  Right?
 

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Can a script blank the display? A590IS
« Reply #11 on: 22 / February / 2009, 15:51:02 »
Is a script able to test the state of the physical DISP button - whether it is being depressed?  If so, I could add that test to the loop.  That would let me turn the display on manually while the script is running to see how things are going, then turn it back off again.

http://chdk.wikia.com/wiki/CHDK/MoreBest#New_uBASIC_and_LUA_Scripting_Commands.21

is a generic shortcut to propcase DISPLAY_MODE as listed in http://chdk.wikia.com/wiki/PropertyCase and CHDK/LUALIB/GEN/propset*.lua.

On the other question - so, motion detection required the display to be on, so the sensor will be on, but the backlight can still be off.  Right?

Yes.

Re: Can a script blank the display? A590IS
« Reply #12 on: 13 / March / 2009, 12:33:17 »
I've run into a snag on this project.  The idea is an intervalometer script that operates with the display off so as to maximize battery life.  But I also wanted to fix all the exposure settings, including focus, so that everything will be constant throughout the timelapse sequence, so that settings don't appear to "hunt" or "wander".

But in the A590IS at least, when you turn off the display with the Disp button, it goes back into autofocus and stays there.  This is the case whether CHDK is loaded or not.

Does anyone know of a way around this?  I see that I can override subject distance in CHDK, but it appears I can only do than in manual focus mode, so that doesn't help because I can't even get into ALT mode in manual focus with the display off.  Is there any way to effectively fix focus even though it's still in autofocus mode?

I know I can stick something in the AV jack, or perhaps turn off the backlight in the script, but was hoping to have the display and sensor completely off to save power.


*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Can a script blank the display? A590IS
« Reply #13 on: 13 / March / 2009, 13:12:40 »
I believe you don't actually want to idle in manual focus, because it consumes more current than manual focus. You probably should just override focus if you can. The focus mechanics will move before each shot, but that should draw less current compared to idling in manual focus.

Re: Can a script blank the display? A590IS
« Reply #14 on: 13 / March / 2009, 16:57:08 »
I believe you don't actually want to idle in manual focus, because it consumes more current than manual focus. You probably should just override focus if you can. The focus mechanics will move before each shot, but that should draw less current compared to idling in manual focus.


The timelapse I'm working on will be of a portrait being painted.  So the canvas will occupy the entire frame, or close to it, and will begin with plain white.  There won't be anything to autofocus on.  Moreover, in some frames the artist's arm and hand, and perhaps even his head,  will be in the frame, and in others not.  I don't want autofocus to try to follow all of that.  I just want to manually set the focus on the canvas and make it stay there no matter what else is going on.

Unless I can get the script to fix the focus in some way, I don't know of any alternative than to idle in manual focus mode.  I'll try overriding, but it clearly says it only works in manual focus mode.  Well, unless can I switch into and out of manual focus from within the script.

And in this case, I'm shooting for a frame every 4 seconds, so there may not be a lot of actual idling.

Is it true that manual focus requires the display to be on to work?  I guess this must me so, although it's not clear why.  I mean, even without CHDK and scripts, you might want to set manual focus, and then turn off the display and use the viewfinder to save power.  But Canon apparently won't let you do that.

Re: Can a script blank the display? A590IS
« Reply #15 on: 13 / March / 2009, 17:45:52 »
The script currently uses the Shoot command to take pictures, but I see this in the docs:

shoot  --  Records an image.

This command is similar to the click "shoot_full" command (see below), but it waits for the camera to perform some normally automatic actions, such as auto-focusing, charging the flash, etc. For example: if in AUTO, P, Tv, Av, or any SCN modes, using the "shoot" command causes the camera to check focus and exposure for each shot. When "shoot" is used in intervalometer scripts this far surpasses the camera's own built-in intervalometer in that the camera only sets exposure and focus once for the initial exposure, as if it was only using the "click 'shoot_full'" command. This "shoot" command in an intervalometer script allows it to compensate for all the things that can change over the course of many minutes and hours.

Well, of course the supposedly inferior method is exactly what I want.  But does the above imply that using click "shoot_full" will prevent the camera from changing focus even if it is in autofocus mode?  If so, I could put a nice test pattern poster in the canvas position, and have the script take one "shoot" pic, then remove the poster and have the script 'click "shoot_full"' thereafter.  Anyone have experience with shoot_full with respect to autofocus?

Edit:  Well, I gave it a try, but shoot_full appears to be no different from shoot, at least with respect to autofocus on the A590IS.  The focus adjusts in either case.  Oh well.
« Last Edit: 13 / March / 2009, 19:25:48 by peabody »

Re: Can a script blank the display? A590IS
« Reply #16 on: 13 / March / 2009, 21:35:07 »
I believe I have a solution.

It uses the obscure command set_aflock(1).  The beginning of my script now has this sequence:

sleep 2500
press "shoot_half"
sleep 2500
set_aflock(1)
release "shoot_half"

The first sleep is just to let the camera stop jiggling after I push the shutter button to start the script.  Then there's a half-press to let the autofocus lock in (allowing more sleep time to make sure it finished doing that).  Then the aforementioned set_aflock(1), which appears to behave the same way as MF at whatever the current focus is, followed by a release of the half-press.  It may not need to be that complicated, but this does work on my camera.  But unlike MF, it works with the display turned off.

Of course this means I have to have something in front of the camera at the intended focus distance that it can lock onto each time I start the script.  So it's not quite as convenient as MF in that regard.  But once AF is locked, it appears to stay locked from then on, using either "shoot" or 'click "shoot_full"' for subsequent exposures.  It's not clear what it takes to release the aflock, short of power cycling.

Each time the camera takes a pic, I can hear it making noises, more than it does in MF mode.  So it may be going through the motions of focusing, but just ignoring the result.  I don't know.  Anyway, I'll do a full intervalometer test tomorrow to confirm this works,and to see how many pictures I get on a battery charge.

Thanks for your help, fudgey.




Re: Can a script blank the display? A590IS
« Reply #17 on: 14 / March / 2009, 07:43:58 »
I believe I have a solution.
It uses the obscure command set_aflock(1).


Not so obscure, see Example 9 here :  http://stereo.jpn.org/eng/sdm/ubasic.htm

for the commands 'lock_autofocus/unlock_autofocus'

sleep_for 1000
press "shoot_half"
sleep_for 1000
lock_autofocus
"! locked"
"! 'AFL' top left"


'AFL' refers to the autofocus-locked status that will automatically be displayed at top left of screen.


« Last Edit: 14 / March / 2009, 07:45:45 by Microfunguy »

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Can a script blank the display? A590IS
« Reply #18 on: 14 / March / 2009, 08:47:53 »
Your 4 second interval is quite fast, the sensor OFF time will not be hugely long compared to its ON time. It's possible that the sensor and its peripherals consume more current while powering up than when it's operating normally, decreasing the gain from shutting it down between shots. It would be nice to see a battery life comparison to find out if this is worth the trouble compared to AV plug method.

For longer life of the camera's mechanical parts it's probably for the best to have it make as little sound as possible when shooting timelapses, and switching the sensor on/off does make my camera click. So if there's little gain in battery life, it's probably for the best to have the sensor powered on always.


Re: Can a script blank the display? A590IS
« Reply #19 on: 14 / March / 2009, 12:12:21 »
Your 4 second interval is quite fast, the sensor OFF time will not be hugely long compared to its ON time. It's possible that the sensor and its peripherals consume more current while powering up than when it's operating normally, decreasing the gain from shutting it down between shots. It would be nice to see a battery life comparison to find out if this is worth the trouble compared to AV plug method.

For longer life of the camera's mechanical parts it's probably for the best to have it make as little sound as possible when shooting timelapses, and switching the sensor on/off does make my camera click. So if there's little gain in battery life, it's probably for the best to have the sensor powered on always.



Well, if I'm going to leave the sensor on, I think that also means leaving the display on.  And in that case, I would have the choice of using MF mode, which produces little mechanical noise, or stick with aflock, which produces a good bit more, presumably in both cases with a plug in the AV jack.

I'm currently trying out aflock with the display off to see how many pics I get from freshly charged batteries.  Maybe I'll be able to try one of the other options after that's done.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal