From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I contro CANON A620 through SDK

Hello.
     I will control a digital camera (Canon Power Shot A620) with PRSDK.dll in LabVIEW. But I can't get the device informations with the 'PR_GetDeviceList' functions. Who can tole me the reason? Thanks.
    There are PRSDK.DLL, .h files and my vi  in the attachment.
 
 
Leevy
email: leevy@263.net
MSN: gdliwei@263.net
 
0 Kudos
Message 1 of 4
(3,553 Views)
Who can tell me? Thanks
0 Kudos
Message 2 of 4
(3,535 Views)
Leavy,
      I have no Cannon's camera in my hand, therefore I cannot try your code. Maybe you can contact the dll's vender to get more information about the function. Is any successful story about calling this function?
 
0 Kudos
Message 3 of 4
(3,515 Views)


@leevy wrote:
Hello.
     I will control a digital camera (Canon Power Shot A620) with PRSDK.dll in LabVIEW. But I can't get the device informations with the 'PR_GetDeviceList' functions. Who can tole me the reason? Thanks.
    There are PRSDK.DLL, .h files and my vi  in the attachment.
 
 
Leevy
email: leevy@263.net
MSN: gdliwei@263.net
 


LabVIEW arrays are NOT and I mean NOT C string pointers!!!!!

Therefore you can't construct a cluster containing arrays to pass to a function that expects C string pointers. Also your function does not expect C string pointers but embedded constant sized C string arrays. This is something you can sort of create by creating a correctly sized array first, convert that to a cluster where the cluster size option has been set correctly and then add that cluster into the top level cluster.

The pBufferSize parameter is most likely not the number of records you enter in but instead the number of bytes your pointer (cluster) provides. Calculating that is an interesting exercise in understanding C datatypes.

All in all you are in an interesting learning experience that will lead you down the road of understanding C datatypes and C specific details. If you want to do that together with the inevitable crashes or exception messages is up to you. Another approach would be to buy a ready made toolkit such as here. Mention that you need support for the PRSDK as Canon has various different SDKs for different camera models.

Rolf Kalbermatter


Message Edited by rolfk on 01-09-2008 03:03 PM
Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(3,504 Views)