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

Interval Script with power down (M3 / M10)

  • 16 Replies
  • 1486 Views
*

Offline c_joerg

  • *****
  • 1016
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?

Update:
  Add Script Version 0.5

  Version 0.6
     - Add M100
     - Restart in record mode
« Last Edit: 12 / November / 2020, 13:35:23 by c_joerg »
M100 100a, M3 101a, G9x II (1.00c), 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

  • ******
  • 4342
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.

*

Offline c_joerg

  • *****
  • 1016
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, G9x II (1.00c), 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 c_joerg

  • *****
  • 1016
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.

Update:
  Script can be found in first post
« Last Edit: 08 / November / 2020, 04:31:09 by c_joerg »
M100 100a, M3 101a, G9x II (1.00c), 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 c_joerg

  • *****
  • 1016
Re: Interval Script with power down (M3 / M10)
« Reply #4 on: 09 / November / 2020, 04:29:47 »
I have now done the first long test with my M3.Two weeks with an interval of 5 minutes. Around 4000 pictures were taken during this time.

I checked ‚GetCameraInformationData‘ and the Power On Counter increase by 4000.
https://chdk.setepontos.com/index.php?topic=12542.300

The switch-off time jitters. At 5 minutes, that's about 5 seconds. But that is not important for recordings of this kind.

I expanded the script in the first post. You can activate time synchronization if you want. You can also switch an LED for external synchronization.

The video shows the first test as a 25 minute and a 5 minute interval.

@Mlapse
As you can see on the log file, the tick counter is reset ever restart.


M100 100a, M3 101a, G9x II (1.00c), 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 Mlapse

  • ****
  • 292
  • A480 A490 S95 M10
Re: Interval Script with power down (M3 / M10)
« Reply #5 on: 09 / November / 2020, 06:13:50 »
As you can see on the log file, the tick counter is reset ever restart.

thanks c_joerg
if I understand the log and what you are writing, the tick counter is reset every 5 minutes. very impressive.
downtime is a lot shorter than with the regular reboot, that takes 20 seconds or more if you have a large sd card.

so it seems it is time for me to find another digic6 cam to try this properly with my setup.
i'm not sure yet if a G or M series is best suited for my purpose, so it might take some time to figure that out.
frustration is a key ingredient in progress

*

Offline c_joerg

  • *****
  • 1016
Re: Interval Script with power down (M3 / M10)
« Reply #6 on: 09 / November / 2020, 06:26:22 »
i'm not sure yet if a G or M series is best suited for my purpose, so it might take some time to figure that out.

Not sure if a G support the power down function.
Right now, the script works only for EOS M3 and M10.
I think, it will also work with M100...

M100 100a, M3 101a, G9x II (1.00c), 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 Mlapse

  • ****
  • 292
  • A480 A490 S95 M10
Re: Interval Script with power down (M3 / M10)
« Reply #7 on: 09 / November / 2020, 06:41:09 »
Not sure if a G support the power down function.

i am a bit worried about the life expectancy of the M series.
but this at least narrows down my choices :)
So i'll go looking for another M cam
frustration is a key ingredient in progress


*

Offline c_joerg

  • *****
  • 1016
Re: Interval Script with power down (M3 / M10)
« Reply #8 on: 09 / November / 2020, 07:20:11 »
i am a bit worried about the life expectancy of the M series.

Not me…
There is no better value for money. I have already seen an M10 + EF-EFM adapter for well under 100 €. An adapted EF lens can then continue to be used.
M100 100a, M3 101a, G9x II (1.00c), 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 Mlapse

  • ****
  • 292
  • A480 A490 S95 M10
Re: Interval Script with power down (M3 / M10)
« Reply #9 on: 09 / November / 2020, 08:51:26 »
i do agree that the M series is better value for money, bigger sensor, more lens options, less old technology.
looking at used ones, a second hand 2 year old hardly used M10 is offered for slightly less than an 8 year old scratched and abused G1x.

however, i'm more concerned about the wear and life expectancy of the shutter/curtain.

when my m10 was still working i could feel that shutter on the cam with every shot, i do not feel that on the s or a series cams....
maybe the a series don't even have a mechanical shutter, but the s does.
I assumed this slam-shake was because the shutter is bigger, thus has more mass and might move quicker to open or close.
banging in the side with every shot.
and that gave me the idea it might not last as long as something with a smaller sensor and thus lighter shutter.

the G would therefore be something in the middle, bigger than the 1/1.7 of the S, but a lot smaller than the aps-c of the M.
I do agree this is all speculation since i have not tested this, but i do know my s series easaly make it over 100K shots, i have one that made more than 1M shots.

« Last Edit: 09 / November / 2020, 09:13:56 by Mlapse »
frustration is a key ingredient in progress

 

Related Topics