LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

digital camera and LabVIEW

Has anyone ever controlled a canon digital camera from LabVIEW?  I am using a Canon EOS Kiss REBEL 300D.
I tried using the software from the following link (http://www.hytekautomation.com/Downloads.html)  , but the "take a picture" button was disabled.
 
I did download the SDK from canon but am not sure if LabVIEW can handle some of the data types to pass to the DLLs.
Here is one example of a function

cdCAPI RCOpenSource ( cdSourceInfo* pSourceInfo, cdHSource* pSource )

where cdSourceInfo is defined as:

typedef struct{

cdSourceType SurceType; // Type of the device

cdUInt32 rsrvd; // Reserved

cdStr63 Name; // Device model name

//(Invalid if cdSRC_TYPE_HOST)

#ifndef macintosh

cdStr63 NameInOS; // Device model name in OS

#endif

cdPortType PortType; // Port type

cdPortDescripUnion u; // Union of I/O port descriptor

} cdSourceInfo;

Thanks for any help.

0 Kudos
Message 1 of 12
(8,777 Views)

Hello rohrdt,

The key to calling a function like that is to identify the intrinsic C datatype that the particular parts of the struct are using.  In other words, you need to find out exactly what a cdSourceType is.  This also applies to the other data types that are used in the struct.  I would assume that a cdUInt32 is a 32 bit unsigned integer.  For the other data types, they should be defined in a header file that came with your driver.   Once you know what these data types map to, you should be able to pass the appropriate numeric or string through the Call Library Function Node.

Hope that helps.

Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 2 of 12
(8,756 Views)
hi,
i am also facing the same problem , the buttons get disabled when trying to run the VI.i need to control my digital canon camera (power shot g3) using labview.i have applied for canon SDK, but no reply from them yet , i am waiting for a reply from them. has any one worked on it ?.if so can you please help me.

thanks and regards,
sundar,
0 Kudos
Message 3 of 12
(8,707 Views)
Hi Sundar,
I have not had much luck with getting LabVIEW to control the Canon camera.
I am still trying to get their SDK integrated into LabVIEW.
When you get the SDK and work with it a little let me know if you are successful.
I know a little about the SDK and might be able to answer some questions.
Thanks
0 Kudos
Message 4 of 12
(8,691 Views)

hi,

as of now i have got a liitle control of the canon camera.

i am trying to integrate the DLL from the PSremote s/w .

http://www.breezesys.com/PSRemote/

i was able to control the shutter , aperture and zoom .

but not able to get the image into labview .

can u give a copy of the SDK ....since i dont have a copy to work now,

thanks and regards,

sundar

0 Kudos
Message 5 of 12
(8,678 Views)
The SDK that I downloaded was developed for the EOS models.
I am not sure if that will work with your powershot.
But if you want I can send it to you.
I am not sure how to get it to you because it is >250MB.
0 Kudos
Message 6 of 12
(8,653 Views)
Hi,
Could I look at the VIs that you used to control the camera?
That might help me see what I am doing wrong.
Thanks
0 Kudos
Message 7 of 12
(8,641 Views)
hi rohrdt,                                   
this is the dll i am using to control the camera that i have atteched below. i am also sending the doc umentation regarding the same.
thanks and regards,
sundar.                                                                                                                                                                       
0 Kudos
Message 8 of 12
(8,625 Views)
If you use Windows, easiest way to access external code is .NET interface. Is there a .NET interface for the Canon camera? If there is, use it.

If there is no .NET interface and you have problems calling the SDK DLL directly, It's quite easy to write a .NET interface (wrapper) for C++ code (if the SDK is written according to C++ standards and works with Visual Studio .NET). Check MSDN to find out how to write managed extension (.NET wrappers) on existing C++ code. There is a simple example of such a wrapper for an existing C++ class. If you have existing C++ methods, just write a class that has similar methods that upon call call these SDK methods.

After having written the wrapper, build it (having the managed extension turned on!) and you can access the class from .NET interface of labview directly. If the data types cause problems, you can try to transform the data types in the wrapper methods.

Something like the following may work:

# include "SDK_includes_here.h"
# include "SDK_includes_here.h"
# include "SDK_includes_here.h"


// You need a class for your method.
// If you have many methods, you can add them to the same class

__gc class CanonClass
{
public:
// constructor
CanonClass() { }
// destructor
~CanonClass() { }
// method
cdCAPI MyMethod( cdSourceInfo* pSourceInfo, cdHSource* pSource )
{

return RCOpenSource ( cdSourceInfo* pSourceInfo, cdHSource* pSource )
;  
}
};

Message Edited by Tomi M on 11-20-2005 01:26 AM

Message Edited by Tomi M on 11-20-2005 01:27 AM

--
Tomi Maila
0 Kudos
Message 9 of 12
(8,603 Views)

Hi Rohrdt,

Did you ever get the SDK for the canon DSLRs interfaced with labview? I see it has been a few years since the last post here.

 

There is no .NET supplied, just a number of dlls and a .lib file

0 Kudos
Message 10 of 12
(6,978 Views)