I happened to be experimenting with the APEX UBasic statements over the weekend using my SX20 and got even different results. My values varied from:
a very dark room with no lights & dark overcast night (-908)
room using daylight (207)
same room at night using Tunsten lighting (250)
I haven't been able to test outside during sunlight yet since it's been raining with a heavy overcast the last few days. You'll see in the script that I was using the following UBasic statements: get_user_av96, get_user_tv96, get_bv96, and get_sv96
The script does have one PropCas statement for the SX20 that I use to indicate which mode I was using for the test at the time (just rem the statement or remove). The only parameter is for saving the results to a file for later so that I could compare results (1=log results, anything else just display to OSD). The LOG file is created in the CHDK/LOGS folder and the name uses the hour/minute to keep multiple log files separate. The logged data looks like:
Date: 15/3/2011
Time: 18:47:46
Mode:Av
Av:F/2.8
Tv:1/30
ISO:AutoISO
av96=294 tv96=480
bv96=138 sv96=603
When you aren't saving the data to a log file, the script will wait for you to press the set button at the end. This keeps the displayed info for review until you are done. Here's the script I used when testing:
@title APEX_96
@param a Save results (1=yes)
@default a 0
if a<>1 then goto "skip_save"
z=get_time 0
y=get_time 1
x=get_time 2
m=get_time 3
n=get_time 4
p=get_time 5
g=x*100+y
if g<1 then g=1
if g>9999 then g=9999
print_screen g
print "Date: "m"/"n"/"p
print "Time: "x":"y":"z
print " "
:skip_save
rem *** SX20 ***
get_prop 50 B
if B=8228 then print "Mode:Custom"
if B=-32767 then print "Mode:Manual"
if B=-32766 then print "Mode:Av"
if B=-32765 then print "Mode:Tv"
if B=-32764 then print "Mode:Program"
if B=-32768 then print "Mode:Auto"
if B=-32755 then print "Mode:Portrait"
if B=-32756 then print "Mode:Landscape"
if B=-32757 then print "Mode:Night Snapshot"
if B=-32249 then print "Mode:Sports"
if B=16402 then print "Mode:Sunset"
if B=-32246 then print "Mode:Stitch Assist"
if B=2600 then print "Mode:Movie"
rem *** SX20 ***
press "shoot_half"
sleep 600
x=get_user_av_id
gosub "prnt_av"
x=get_user_tv_id
gosub "prnt_time"
x=get_iso
gosub "prnt_iso"
get_user_av96 A
get_user_tv96 T
print "av96="A" tv96="T
get_bv96 B
get_sv96 S
print "bv96="B" sv96="S
if a=1 then goto "done"
gosub "wait_loop"
goto "done"
:prnt_time
if x=-12 then print "Tv:15s"
if x=-11 then print "Tv:13s"
if x=-10 then print "Tv:10s"
if x=-9 then print "Tv:8s"
if x=-8 then print "Tv:6s"
if x=-7 then print "Tv:5s"
if x=-6 then print "Tv:4s"
if x=-5 then print "Tv:3.2s"
if x=-4 then print "Tv:2.5s"
if x=-3 then print "Tv:2s"
if x=-2 then print "Tv:1.6s"
if x=-1 then print "Tv:1.3s"
if x=0 then print "Tv:1s"
if x=1 then print "Tv:0.8s "
if x=2 then print "Tv:0.6s"
if x=3 then print "Tv:0.5s"
if x=4 then print "Tv:0.4s"
if x=5 then print "Tv:0.3s"
if x=6 then print "Tv:1/4"
if x=7 then print "Tv:1/5"
if x=8 then print "Tv:1/6"
if x=9 then print "Tv:1/8"
if x=10 then print "Tv:1/10"
if x=11 then print "Tv:1/13"
if x=12 then print "Tv:1/15"
if x=13 then print "Tv:1/20"
if x=14 then print "Tv:1/25"
if x=15 then print "Tv:1/30"
if x=16 then print "Tv:1/40"
if x=17 then print "Tv:1/50"
if x=18 then print "Tv:1/60"
if x=19 then print "Tv:1/80"
if x=20 then print "Tv:1/100"
if x=21 then print "Tv:1/125"
if x=22 then print "Tv:1/160"
if x=23 then print "Tv:1/200"
if x=24 then print "Tv:1/250"
if x=25 then print "Tv:1/320"
if x=26 then print "Tv:1/400"
if x=27 then print "Tv:1/500"
if x=28 then print "Tv:1/640"
if x=29 then print "Tv:1/800"
if x=30 then print "Tv:1/1000"
if x=31 then print "Tv:1/1250"
if x=32 then print "Tv:1/1600"
if x=33 then print "Tv:1/2000"
if x=34 then print "Tv:1/2500"
if x=35 then print "Tv:1/3200"
return
:prnt_iso
if x=0 then print "ISO:AutoISO"
if x=1 then print "ISO:50(80)"
if x=2 then print "ISO:100"
if x=3 then print "ISO:200"
if x=4 then print "ISO:400"
if x=5 then print "ISO:800"
if x=6 then print "ISO:1600"
if x=7 then print "ISO:3200"
if x=-1 then print "ISO:HiISO"
return
:prnt_av
if x=9 then print "Av:F/2.8"
if x=10 then print "Av:F/3.2"
if x=11 then print "Av:F/3.5"
if x=12 then print "Av:F/4.0"
if x=13 then print "Av:F/4.5"
if x=14 then print "Av:F/5.0"
if x=15 then print "Av:F/5.6"
if x=16 then print "Av:F/6.3"
if x=17 then print "Av:F/7.1"
if x=18 then print "Av:F/8.0"
return
:wait_loop
wait_click
is_key k "set"
if k=1 then goto "exit_wait"
goto "wait_loop"
:exit_wait
return
:done
release "shoot_half"
print_screen 0
end
Might be interesting to hear what others get using the script. During the experimenting over the weekend, I found that the av96 and tv96 values were comparable to what shows in the UBasic manual, so I'm hoping that the bv96 an sv96 values also are correct for the SX20. I posted the av96 & tv96 results I found using my SX20 in the SX20 forum here:
http://chdk.setepontos.com/index.php?topic=4348.msg62913#msg62913