what i'm trying to make is a rig with 2 cams that shoot syncronised without end. i'm not that interested in getting it right up until the milisecond, but the closer i get, the better.
i was thinking of using multicam for that or use an usb 5v pulse.
multicam wasn't written to be an intervalometer. The main use case it was written for is rigs with large numbers of cameras in a studio type setting, generally the kind of thing in the threads linked from
https://chdk.fandom.com/wiki/Multiple_Cameras_using_CHDK.
While multicam can shoots bursts with an interval, the script does not change exposure during the burst. The idea for bursts was mainly that you could do bracketing using CHDK native bracketing, or the subject could be rotated on a turntable or things like that.
Bursts of hundreds or or thousands of shots would likely have other problems.
Of course, it's all Lua code, so in principle you can add whatever you want.
however, i would like the cams to keep shooting even if the pc is not available with the risk of loosing syncronisation due to rtc differences between cameras.
this means something has to run cam side that keeps the interval going if there is no message from the pc within the set time.
This sounds complicated, and again, not really a scenario multicam was written to support. The multicam script will keep running if the PC goes way (like any other PTP script) but all actions are in response to messages sent by the PC.
If you run a script from within multicam using loadfile, the multicam script will not see any other commands from the PC until the loadfile script ends.
If you really need this kind of failover, trying to build it on multicam will probably be more complicated than designing something specifically for this purpose. If it were my project, I I'd probably start by looking for ways to make the PC part reliable enough not to need it.
seperate, but related:
i also have this one project that is running for over 4 years now with one stand alone cam. this cam needs occasional syncronisation with time and i do that by hand.
i wrote a simple line to only set the clock: press the button and all active cams will be set.
since mc already had utc and a fairly accurate timing loop it looked most obvious for me to use that.
For a single camera, there's no reason to use multicam. You can use cli command, or the functions it uses in camclockutil.lua.
i was thinking of connecting the pc every now and then to that cam to set the clock.
this can be done each time i exchange the sd card, but ideally i think it should be possible to do that at any given moment during the script run (reboot, between shots, maybe once a day)
should this entail stopping the cam side script, setting rtc, starting the cam side script?
chdkptp uses a CHDK Lua function to set time. So if another script that is not aware of chdkptp is running, you'd need to stop it.
In principle you could modify your script to check for a message like multcam.lua does, but it would be complicated: You can't just send message that says "set the time to X:Y:Z" because if the script is in the middle of shooting, it could be seconds before it checks for the message. So you'd need one message from the PC that says "let me know when you're ready to set the clock", then a response from the script that says "ready" and waits for a response that has the actual time to set.