Just getting your 42 cameras to work (at ALL) is a very big first step, but a little more details on your rig (+ photo's) also would help.And is your multi-camera built, by you, from scratch or partly bought second-hand. ??
And if not, your "42 cameras" what Canon model are they. ??H-H
My guess is the devil is in the details regarding the "red wire SYNC USB-2 HACK".
Edit #1 Also refer to the Multi-Camera post's regarding Rig Construction, USB-2 Wiring, Camera Power Supply etc.
There is info about that in a few threads. Start with this one ?Re: Noob question, how to run multicam.lua on chdkptp
!mc:init_sync()!return mc:cmdwait('shoot_hook_sync',{syncat=100})
Language never seems to be a problem for anyone using this forum. We manage.
In multicam, you can execute any Lua on all the cameras using the "call" or "pcall" commands
!mc=require('multicam')!mc:connect()!mc:start()!return mc:cmdwait('rec')!mc:cmdwait('call usb_force_active(1)')!mc:cmd('call usb_sync_wait(1);shoot()')!mc:cmd('exit')
I added that to multicam.lua and completed a quick test, on a single camera, here https://chdk.setepontos.com/index.php?topic=12827.msg128700#msg128700
- Add in the multicam.lua the scripts that I did to download and delete the photos. To not need to exit a script and call another.
Seriously, I'll try to understand what you're saying, if all other attempts fail, I'll look more closely until I understand that.
My guess is the devil is in the details regarding the "red wire SYNC USB-2 HACK".What happens to the voltage between the USB-2 Black and Red wires a you progressively add more cameras."...Seriously, I'll try to understand what you're saying, if all other attempts fail, I'll look more closely until I understand that...""...I can tell you some little things about wiring that I learned from my project...""...To start, usb 2.0 cables should only be used from the camera to the first hub, after it only usb 3.0 cables and usb 3.0 hubs. You gain more cable length and improve transmission quality. It sounds silly and wrong, but in practice, tested and approved....""...test sync with the 42 cameras again...."
My guess is, still, the details regarding what happens to the voltage between the USB-2 Black and Red wires and what happens when you have no cameras and then progressively add more cameras. I think what is happening is that the "red wire SYNC USB-2 HACK" is dropping below the switching threshold.
FWIW, you should be able to return status in the normal way in the camera side code. What you probably don't want to do is used cmdwait while messing with the physical USB connection, since it tries to repeatedly poll the camera. All communication in the CHDK PTP protocol is actually initiated by the PC side, sending or returning from lua just queues a message.You could use wait_status_msg (see the end of mc:cmd in multcam.lua) to get status after you know are done with the hardware USB trigger.
function cmds.usb_sync_wait() usb_force_active(1) usb_sync_wait(1) press('shoot_full') -- if usb does not transistion from +5V to 0V within 10 secs, hook is automatically released for i=1, 1000, 1 do sleep(10) if get_usb_power(1) == 0 then break end end sleep(mc.shoot_hold) release('shoot_full') wait_timeout_write_status(get_shooting,false,100,mc.shoot_complete_timeout,'get_shooting timeout')end
!mc=require('multicam')!mc:connect({list='C:/CHDKPTP/listfile'})!mc:start()!return mc:cmdwait('rec')!return mc:cmdwait('preshoot')!mc:cmd('usb_sync_wait') -->> then waited a couple of seconds after black lcd and manually switched port from +5V to 0V !return mc:wait_status_msg('usb_sync_wait',{}) -->> probably about 30 seconds later
C:\WINDOWS\system32>c:/chdkptp-test/chdkptp -i___> !mc=require('multicam')___> !mc:connect({list='C:/CHDKPTP/listfile'})+ 1:Canon PowerShot SX150 IS b=\\.\libusb0-0001--0x04a9-0x3234 d=bus-0 s=689D5005104943C09E988E4EA8301E22___> !mc:start()___> !return mc:cmdwait('rec')rec=true,{ [1]={ failed=false, done=true, status={ cmd="rec", status=true, }, },}___> !return mc:cmdwait('preshoot')preshoot=true,{ [1]={ failed=false, done=true, status={ cmd="preshoot", status=true, }, },}___> !mc:cmd('usb_sync_wait')usb_sync_wait___> !return mc:wait_status_msg('usb_sync_wait',{})=true,{ [1]={ failed=false, done=true, status={ cmd="usb_sync_wait", status=true, }, },}___>
*Am I correct to imagine the loop I inserted in the camera-side code could seriously impact an actual multicam implementation synchronisation
At what instant could it be safer to start polling the camera for status again (I would plan to send the ucontroller voltage change command from the same Autoit script that performs the !return mc:wait_status_msg('usb_sync_wait',{}) command)? ...e.g a specific number of ms after USB transistion.
I don't think you need that loop at all though, the final wait_status will wait for the shot to complete, which can only happen after the USB signal (or something times out). All you have to do is ensure shoot_full is held long enough to trigger the shot, which is handled by sleep(mc.shoot_hold)
If it's needed at all, I don't see any reason you should need to wait more a few tens of ms, i.e.: don't try to do USB protocol communication at the same moment you are messing with the +5v. Even if it's mostly OK, there likely some potential for EMI.
Started by flarn2006 Feature Requests
Started by binarystatue « 1 2 3 4 » General Help and Assistance on using CHDK stable releases
Started by Jaki « 1 2 3 » General Help and Assistance on using CHDK stable releases
Started by dayzman General Help and Assistance on using CHDK stable releases
Started by emerrryjones General Help and Assistance on using CHDK stable releases