Scripts are eating my brain! When I install any script it refuses to run - Hello, I'm a NEWBIE - HELP!! (Newbies assistance, User Guides and thank you notes) - CHDK Forum

Scripts are eating my brain! When I install any script it refuses to run

  • 13 Replies
  • 7002 Views
Advertisements
So I've got CHDK on my camera.  I cut and paste the ultra intervelometer script -the second one listed, which I believe is the most updated) onto a notepad and saved it as a .bas file.  Then I copied it into my scripts file, relocked my card, and put it in my camera. I shift over to alt mode, load the scrip with everything on 0 or off except a one second delay of first shot (tried without that, also didn't work) five shots, at an interval of five seconds.  I then formatted the script parameters with a test run of five times to repeat at a delay of five seconds.

When I click on the shooter button, the script starts up, but I can's go beyond that.  I can't get the camera to shoot an image, and I definitely can't get a series of shots.  I can only get as far as it telling me that the script has started.  After that, my camera goes to sleep.

I'm so frustrated.
thanks

M

*

Offline fe50

  • ******
  • 3152
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Scripts are eating my brain! When I install any script it refuses to run
« Reply #1 on: 22 / December / 2008, 20:48:39 »
Hi bikechick,
- which camera model?
- which script, this one UBASIC/Scripts: Ultra Intervalometer ?
- what exactly doe you mean with "After that, my camera goes to sleep" ? (Crash, power-off, only one shoot, any LEDs on...)

Re: Scripts are eating my brain! When I install any script it refuses to run
« Reply #2 on: 23 / December / 2008, 02:34:07 »
Hi fe50,
I'm using an SD1000, and yup, it's the UBASIC ultra intervalometer.  By sleep I mean it freezes (all buttons cease to function) until my auto sleep kicks in.
I think one issue might be that I can't really read code, and because there are a few changes made along the course of the ultra intervalometer page of this wiki, maybe there are changes I'm supposed to be making that I'm not.  Or it's just got bugs with SD1000s.  I have a feeling that I may be the one who's a bit buggy.
thanks for any help!

*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: Scripts are eating my brain! When I install any script it refuses to run
« Reply #3 on: 23 / December / 2008, 04:23:20 »
@fe50
@bikechick

Since i have an ixus70_sd1000, thought i'd offer my help. In order to reproduce this, i need to know:

1) CHDK version
2) exact script text (if modified) or link to script (if non-modified)
3) script parameters (if modified)

wim

BTW, just found this in the wiki:
Quote
== SD450 / IXUS 55 Problem ==

I've used Ultra Intervalometer on my S3 without a problem, however when I used it on my SD450 (IXUS 55), it just shot the first frame and then stopped. I found a solution for that problem. You need to use the "click "shoot_full"" command instead of the "shoot" command. I found the solution posted here by user xnau: Ixus 55 / SD450: First beta version of CHDK port available for 1.00B and 1.00C
« Last Edit: 23 / December / 2008, 05:15:45 by whim »


*

Offline fe50

  • ******
  • 3152
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Scripts are eating my brain! When I install any script it refuses to run
« Reply #4 on: 23 / December / 2008, 08:26:35 »
If the script stops directly after (or better 'in') the shoot command, it's most likely the usual shoot problem on some Ixus models.
The problem there is the shooting_in_progress detection, shoot is caught in an infinite loop in SCRIPT_WAIT_SAVE...

In the german forum this issue is well documented (also by me  ;) ), currently we have it with the Ixus 55 100c and the Ixus 750 100f, the fix (see below) works well there.

It's the 'old', well documented problem, see here: Problem with SCRIPT_WAIT_SAVE in the Ixus55 port.

To fix this SHOOTING_PROGRESS_DONE / propcase205 issue you can remove waiting for SHOOTING_PROGRESS_DONE in \core\kbd.c (line 374 in trunk #649):
Code: (c) [Select]
case SCRIPT_WAIT_SAVE:{
    //if (state_shooting_progress == SHOOTING_PROGRESS_DONE)                  <-------------------------------------
kbd_int_stack_ptr-=1; // pop op.
    return;
Then the value from Script shoot delay (.1s) in the script menu must be adjusted, a value of 20 was reported as save. (This is still the 'old' method in earlier CHDK versions)

To test the shoot command in this case, the following script can be used:
Code: (sdlbasic) [Select]
@title Ixus shoot test
@param a Number of shoots
@default a 8
print a," x, let's start..."
for i = 1 to a step 1
shoot
next i
print i-1," x, ready."
end

When the cam stops 1.) directly after the first shoot, 2.) the image is saved and 3.) the script continues for only 1 loop after pressing PRINT twice - then it is the 'Ixus shoot issue'...

Another working solution: don't use shoot, use click full / half instead...

Re: Scripts are eating my brain! When I install any script it refuses to run
« Reply #5 on: 23 / December / 2008, 15:05:24 »
Hi whim,

here is the script that I used:

rem Author - Keoeeit
rem Written for S-Series
rem Should be okay on others
rem Use Endless mode with caution
rem See documentation for important info
@title Ultra Intervalometer
@param a Delay 1st Shot (Mins)
@default a 0
@param b Delay 1st Shot (Secs)
@default b 0
@param c Number of Shots
@default c 5
@param d Interval (Minutes)
@default d 0
@param e Interval (Seconds)
@default e 0
@param f Interval (10th Seconds)
@default f 5
@param g Endless? No=0 Yes=1
@default g 0

p=a*600+b*10
t=d*600+e*10+f
if c<1 then c=5
if t<1 then t=1
if g<0 then g=0
if g>1 then g=1
if p<0 then p=0
u=t
get_tv h
if h=-12 then t=t+330
if h=-11 then t=t+270
if h=-10 then t=t+210
if h=-9 then t=t+170
if h=-8 then t=t+130
if h=-7 then t=t+110
if h=-6 then t=t+90
if h=-5 then t=t+70
if h=-4 then t=t+60
if h=-3 then t=t+50
if h=-2 then t=t+40
if h=-1 then t=t+35
if h=0 then t=t+18
if h=1 then t=t+15
if h=2 then t=t+13
if h=3 then t=t+11
if h=4 then t=t+10
if h=5 then t=t+8
if h=6 then t=t+6
x=p+(t*(c-1))

print "1 Cycle Time:", x/600; "min", x%600/10; "sec"

goto "interval"

:interval
  if p>0 then gosub "pause"
  for n=1 to c
  print "Shot", n, "of", c
  if n>1 then sleep u*100
  shoot
  next n
  if g=1 then goto "interval" else end

:pause
  n=(a*60)+b
  for m=1 to n
  q=n-m
  print "Intvl Begins:", q/60; "min", q%60; "sec"
  sleep 930
  next m
  return

my chdk version is : ixus70_sd1000-102a-0.8.10-642-full

Script Parameters:

I changed the "delay first shot" to 1 second
number of shots to 5
interval (seconds) to 5
Endless is on no, though I tried it once on yes, and it had the same result.

So basically that one section where it says :
if n>1 then sleep u*100
  shoot
  next n
I replace "shoot" with "click "shoot_full""

Sorry if my questions are so basic.  I sort of understand the format of programming from webdesign, but the language itself is greek to me.

And thanks fe50, but I've looked all through that scriot that I used and I can't find any reference to SHOOTING_PROGRESS_DONE in order to take your advice to remove waiting for SHOOTING_PROGRESS_DONE in \core\kbd.c (line 374 in trunk #649).  Did I totally misunderstand?

Thanks all!

Re: Scripts are eating my brain! When I install any script it refuses to run
« Reply #6 on: 23 / December / 2008, 15:34:00 »
I just tried that replacement, whim, but nothing has changed.  argh.  Taking a break.  I'll try another intervalommeter in the meanwhile and see if I can get something running.
sigh.

M

*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: Scripts are eating my brain! When I install any script it refuses to run
« Reply #7 on: 23 / December / 2008, 15:59:09 »
@bikechick

Good plan, i was also gonna suggest that. IIRC the  CarLapse script is both recent and developed on an i70-sd1000 ....
careyer's latest (?) post has a version 4, you'll need to copy it manually into an empty text file,
rename it to "carlapse.lua", and copy it to CHDK/SCRIPTS.

Note: you'll also need to go to the Night-time time-lapse thread to download "set_14.zip" from the first post there.
It contains in the zip "fb_lib.lua" which you need to copy in the folder CHDK/LUALIB on your card.

I'm now off to try this myself as well ...

wim


*

Offline zeno

  • *****
  • 891
Re: Scripts are eating my brain! When I install any script it refuses to run
« Reply #8 on: 23 / December / 2008, 16:18:32 »
@bikechick

as an alternative to the above suggestions, why not try a really simple script, like this one:
Code: [Select]
rem Really simple intervalometer script
 @title Simple Intervalometer
 @param k Number of  Shots
 @default k 10
 @param i Interval (Seconds)
 @default i 8
 rem ensure values are reasonable
 if k<1 then k=1
 if i<1 then i=1
 if i>1000 then i=1000
 
 rem compute delay in millliseconds
 d = i*1000
 print "delay", i, "shots", k
 for p=1 to k
    print "Shot", p, "of", k
    rem take a picture
    shoot
    rem wait until it's time for the next one
    sleep d
 next p
 end
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

*

Offline fe50

  • ******
  • 3152
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Scripts are eating my brain! When I install any script it refuses to run
« Reply #9 on: 23 / December / 2008, 16:34:44 »
...my chdk version is : ixus70_sd1000-102a-0.8.10-642-full
...And thanks fe50, but I've looked all through that scriot that I used and I can't find any reference to SHOOTING_PROGRESS_DONE in order to take your advice to remove waiting for SHOOTING_PROGRESS_DONE in \core\kbd.c (line 374 in trunk #649).  Did I totally misunderstand?
bikechick, this informations were for wim, it's about a fix for the CHDK source code, not for the script.

Try the following script (use it in Manual mode, with flash Off)
Code: (sdlbasic) [Select]
@title Ixus shoot test
@param a Number of shoots
@default a 8
print a," x, let's start..."
for i = 1 to a step 1
shoot
next i
print i-1," x, ready."
end
If your problem is the "Ixus shoot issue", it should stop directly after the first shoot; after pressing PRINT 2 times it should continue for one shoot and then stop again...

If this litte script takes 8 shots in a row (as it do it on other cameras), then the problem is not the shot command.

Attached you'll find a test version for your camera with the fix for the shoot issue (as explained for wim above):

- Unzip the archiv to the root of your SD card (overwrite your old CHDK files),
- start CHDK, go into the script menu, set Script shoot delay (.1s) to 20,
- load the test script from this post again & start it, now it should work
- then you can test other scripts using the shoot command with this CHDK test version...

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal