Script from VB or VBA - page 2 - Script Writing - CHDK Forum supplierdeeply

Script from VB or VBA

  • 12 Replies
  • 6239 Views
Re: Script from VB or VBA
« Reply #10 on: 13 / August / 2013, 03:37:58 »
Advertisements
Hi dqj_99 - interesting stuff !

i'd be interested to know if this basic approach could be extended to a large number of cameras [like 100 !]

Any comment appreciated.

I'm a C#/VB.NET programmer with 10+ years of experience. Can you send me whatever documentation you have to cireharrelson@gmail.com? You have to spell "cire" backwards to try and fool the spammers.

Thanks for you awesomeness!

Eric Harrelson

*

Offline reyalp

  • ******
  • 13621
Re: Script from VB or VBA
« Reply #11 on: 13 / August / 2013, 17:02:34 »
There are some threads elsewhere on synchronising cameras, but the main issue would I think be how to connect 100 devices via USB. You might look at virtual USB over Ethernet. If you were wanting to transfer the images back though, I think the I/O rate might be too much, I suspect about 10 to 20 might work if you could figure out the connectivity angle.
FWIW, you can control multiple cameras from a single instance of chdkptp using the built in Lua API. I don't know what the limits are. The cameras can be operated in parallel (in the sense that you can tell one to start shooting and then command another without waiting for the shot to finish), but actual PTP commands and data transfers can only involve one camera at a time.

You can also use multiple instances of chdkptp, but in this case, some care needs to be taken to avoid breaking the connections to other cameras. Some notes here http://chdk.setepontos.com/index.php?topic=6231.msg96441#msg96441

If you are controlling chdkptp from an external problem, launching an instance once and piping to it's standard input will be more efficient than launching a new instance each time you want to issue a command. Note that most of chdkptp is written in Lua, so you can add custom commands or application specific logic without too much difficulty. It's not terribly well documented at this point, but I'm happy to answer questions.

chdkptp does build and run fine on raspberry pi, and should be relatively easy to build on similar SBCs.

edit:
There is also dotnet client library: http://chdk.setepontos.com/index.php?topic=9148.0

I don't know what the current status is.
« Last Edit: 13 / August / 2013, 17:09:08 by reyalp »
Don't forget what the H stands for.

Re: Script from VB or VBA
« Reply #12 on: 15 / August / 2013, 09:57:59 »
Quote
If you are controlling chdkptp from an external program, launching an instance once and piping to it's standard input will be more efficient than launching a new instance each time you want to issue a command.

That would probably be a better way of communicating with the camera. I'd be interested to try piping commands to and from chdkptp if I could figure out how to do this in VBA in such a way that I could poll the stdout without locking up Excel until data was available.

I found that using

strText = objExecObject.StdOut.ReadLine()

caused VBA to wait for the next line of data, with loss of usability in Excel. It's propably just my lack of knowledge about this type of object.

Any suggestions appreciated.

Derek Johnson



 

Related Topics