Interval Script with power down (M3 / M10) - LUA Scripting - CHDK Forum supplierdeeply

Interval Script with power down (M3 / M10)

  • 3 Replies
  • 464 Views
Interval Script with power down (M3 / M10)
« on: 22 / December / 2019, 11:12:29 »
Advertisements
I try to write an interval script with power down for my M3 following Reply #475.
https://chdk.setepontos.com/index.php?topic=12542.msg137151#msg137151

How should the script look like?
I have now written a script that only takes one picture and then executes a power_down_for_seconds (). I then enabled autostart for the script. That also works so far.
But how can I disable the autostart now? If I remove the battery, the script will start again immediately. I have now replaced the file CCHDK4.CFG. Is there any other way?

How can I get information from the previous recording now? About a file?

What happens to the script parameters if I change them? Are the current ones then used?
M100 100a, M3 101a, 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline srsa_4c

  • ******
  • 4148
Re: Interval Script with power down (M3 / M10)
« Reply #1 on: 22 / December / 2019, 12:24:19 »
I guess the script has to be coded to handle the various circumstances.
You can enable/disable autorun via set_config_value. You could also store the script state in an ini file - there's a library for that in CHDK/lualib.

Re: Interval Script with power down (M3 / M10)
« Reply #2 on: 23 / December / 2019, 07:18:44 »
You can enable/disable autorun via set_config_value.
 

Thank you very much. That was a good tip. Can I use any reference for the ID 120?
Code: [Select]
set_config_value(120,0)
If I activate Autostart for the script in the CHDK Menu, this value is deactivated after a restart. So that it remains activated permanently, I first have to switch on Autostart and then leave the ALT mode. Only then will the parameter be saved. Is there any other way to save this parameter permanently?
I notice this Problem also, when the camera crashes.

You could also store the script state in an ini file - there's a library for that in CHDK/lualib.

That would be the next step.
I disabled the automatic senor cleaning at start up. First version of the script attached.
 
« Last Edit: 25 / December / 2019, 07:59:06 by c_joerg »
M100 100a, M3 101a, 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

Re: Interval Script with power down (M3 / M10)
« Reply #3 on: 25 / December / 2019, 08:01:37 »
My first Version of an Interval script with power down options for EOS M3 and M10

Operation:
The script checks whether an ini file is available (A / CHDK / DATA / PowDownInt.ini)
If there is no INI file, then
- If an INI file with default values is created
- Autostart for scripts is switched on
If an INI file is available, the information it contains is read.

The INI file contains the number of recordings already made and a time stamp for the next shoot. The Power Down Options is designed so that the script has to wait approx. 2-3s before the next shoot.

After the picture has been taken, the power down function is called. The power down time is the interval time minus 10sec. Switching the camera on and off takes about 8 seconds. The rest of the time is a reserve for synchronization.

The script terminates when the number of shoots has been reached, the menu button has been pressed or the storage capacity of the SD card is too small.

If the termination is successful
- deleted the INI file
- Autostart for scripts switched off

If the termination occurs in another way (e.g. removal of the battery), the INI file must be deleted manually.

A LOG file is also created (A / CHDK / DATA / PowDownInt.csv).

This script only makes sense for long interval times. The automatic sensor cleaning and IS should be switched off.
M100 100a, M3 101a, 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd


 

Related Topics