Thanks Reyalp, I got that bit in and it seems to be recording the Bv value right off the bat now.
The main difference between this and the original yass02.bas script is the logging. The log file will record the following parameters in this order:
Hour;Minute;Second;Month;Day;Year;Shot #;Tv96;Sv96;Av96;Bv96;Voltage
I include the voltage so I can see a discharge profile for the batteries I'm using. Currently I'm using this script with an A570is hooked up to a 6v lantern battery through a home made voltage regulator. And for some completely unknown reason, the camera shuts off after about half an hour. Battery is still fully charged. Oh well... one thing at a time I guess. For now, the script works and logs everything I wanted it to.
The whole script is as follows for anyone who cares:
@title yass02a
rem Script to shoot time-lapse videos of sunsets
rem based on sunste4.bas v. 4, Fbonomi apr 30th 2008
rem v. yass01a, modified by Soulf2 dec 28th 2009
rem v. yass02, modified by Soulf2 Mar 10th 2010
rem v. yass02a, modified by jono1515 Aug 13 2012
rem Released under GPL
@param a Delay each photo(sec)
@default a 1
@param b Limit Tv
@default b -414
rem (-414=20 sec; -384=15 sec; -320=10 sec; -224=5 sec.)
@param c Default Sv
@default c 385
rem (480=160)
@param d Limit Sv
@default d 385
rem (776=1250 ISO; 960=5000)
@param e Guess mode limit
@default e -576
@param f Slope in guess mode
@default f 200
@param q 0-4,6,8:L,M1,M2,M3,S,TS,W
@default q 0
@param g RAW 0=off 1=on
@default g 0
@param h Free Disk MB Shut down
@default h 8
@param u Focus 0=norm 1=mac 3=inf
@default u 3
@param v Img Quality 0=SF 1=F 2=N
@default v 0
print_screen 1
print "Yet Another Sunset Script"
i=h*1024
set_prop 213 0
set_raw g
set_prop 143 2
set_prop 218 q
set_prop 145 3
set_prop 216 0
set_prop 5 0
set_prop 6 u
set_prop 57 v
x=e
get_tv96 T
p=1
press "shoot_half"
release "shoot_half"
:loop press "shoot_half"
while get_shooting <> 1
sleep 100
wend
k=get_free_disk_space
if k < i then shut_down
get_bv96 B
get_av96 A
get_vbatt R
W=get_time 0
L=get_time 1
J=get_time 2
I=get_time 3
O=get_time 4
M=get_time 5
T=B-A
T=T+c
if T>e then
X=T
Y=c
else
x=x-f
if x>b then
X=x
Y=c
else
X=b
Y=c+b-x
if Y>d then
Y=d
endif
endif
endif
set_sv96 Y
set_tv96_direct X
shoot
print "SHOOT ",J,L,W,O,I,M,p,X,Y,A,B,R
p=p+1
sleep a*500
goto "loop"