How to set a fixed ISO on a S110 through PTP - Script Writing - CHDK Forum

How to set a fixed ISO on a S110 through PTP

  • 5 Replies
  • 3811 Views
How to set a fixed ISO on a S110 through PTP
« on: 17 / March / 2014, 05:33:56 »
Advertisements
I'm trying to set the ISO value using LUA commands through a PTP connection. My idea was to set market values but I cannot seem to get my head around how to set them.

Looking at the ISOOVR.lua test script I expect the two following methods to be usefull:

Code: [Select]
set_config_value(106, 1) // This should let me specify an ISO instead of auto?
set_config_value(105, is_market_to_real(...market_iso_value...)) // Set an actual ISO value
Running the above with ISO values 800 and 1600 I get the following results in P-mode:

Code: [Select]
set_record(1)
set_config_value(106, 1)
set_config_value(105, 486) // ISO 800 in real value.
press 'shoot_full'

set_config_value(105, 972) // ISO 1600 in real value.
press 'shoot_full'

Looking at the EXIF data from the above 2 images, I get the following ISO values:

ISO 800:
Code: [Select]
ISO         : 1000
Camera ISO  : Auto
Auto ISO    : 486
Base ISO    : 200

ISO 1600:
Code: [Select]
ISO         : 2000
Camera ISO  : Auto
Auto ISO    : 486
Base ISO    : 200

Both a bit far from what I would expect.

Is there a better way to set the ISO?

Regards, Casper
« Last Edit: 18 / March / 2014, 04:19:27 by Chau »

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: How to set a fixed ISO on a S110 through PTP
« Reply #1 on: 17 / March / 2014, 06:45:13 »
Use chdkptp in cli mode. Make a connection and go to the record mode. You can add options for the shoot command. See the description in usage.txt: https://www.assembla.com/code/chdkptp/subversion/nodes/496/trunk/USAGE.TXT

Code: [Select]
shoot -isomode=800This line takes a picture with ISO800 (market value).

msl
CHDK-DE:  CHDK-DE links

Re: How to set a fixed ISO on a S110 through PTP
« Reply #2 on: 18 / March / 2014, 04:18:34 »
Hi msl.

Thanks for your answer.

Use chdkptp in cli mode. Make a connection and go to the record mode. You can add options for the shoot command. See the description in usage.txt: https://www.assembla.com/code/chdkptp/subversion/nodes/496/trunk/USAGE.TXT

Code: [Select]
shoot -isomode=800This line takes a picture with ISO800 (market value).

For testing I am using chdkptp (in CLI mode), but I need to be able to configure the camera using LUA commands. I tried to use the set_config_value approach because its used in the LUA test script, but using set_sv96 doesn't seem to do the trick either.

So maybe I'm doing something wrong, but in that case, I don't know what it is?

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: How to set a fixed ISO on a S110 through PTP
« Reply #3 on: 18 / March / 2014, 07:32:27 »
I think, using set_config_value() is not the best idea. set_sv96() before the shoot command is the better way. The camera should not be in autoISO mode.

There are also functions to convert ISO values: iso_to_sv96(), iso_market_to_real() and more.

msl
CHDK-DE:  CHDK-DE links

Re: How to set a fixed ISO on a S110 through PTP
« Reply #4 on: 18 / March / 2014, 10:00:57 »
I think, using set_config_value() is not the best idea. set_sv96() before the shoot command is the better way. The camera should not be in autoISO mode.

Maybe its the auto iso that is bothering me. How do I disable it and can it be done through PTP/LUA?

*

Offline reyalp

  • ******
  • 14125
Re: How to set a fixed ISO on a S110 through PTP
« Reply #5 on: 18 / March / 2014, 16:46:14 »
I tried to use the set_config_value approach because its used in the LUA test script, but using set_sv96 doesn't seem to do the trick either.
use
Code: [Select]
set_iso_mode(value)
to do the same thing. You can see all the camera side code used for the shoot command in lua/rlibs.lua

If you use set_sv96 etc over PTP, you need to be aware that most overrides are reset between script calls. Each lua command is a new script. so doing something like
=set_sv96(...)
=shoot()
Instead, you would need to do
=set_sv96(...) shoot()
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal