LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call DLL library function

I'm trying to develop my aplication using the library of a usb camera. I can open and close the driver, but I can not read the camera. For example, the C code says:
TFrameParams Params;
HANDLE H = CxOpenDevice( 0 ); // open camera #0
// now do something useful
CxGetScreenParams(H, &Params);
CxCloseDevice(H);

I tried to program the same thing using the DLL and the call library function but it doesn't work. Also I tried the same, but with an easier functions such as "CxGetExposure" using their commands lines.

CxGetExposure
Reads the current exposure value from the camera
Parameters:
DeviceHandle 32-bit integer value previously returned by CxOpenDevice function
pExposureValue pointer to the 32-bit integer that receives the exposure value
Return Value:
Nonzero if successful

And It did not work. Any idea where could be the problem?
0 Kudos
Message 1 of 2
(2,326 Views)
Hey Danielito,
First, I would like to say that National Instruments doesn't officially support the camera's driver that you are trying to use in your application. Even though we don't support your camera's driver or DLL, I can try to help you out as much as I can.
First thing I would do is I would contact the camera company and see if they have any advise as to what might be going wrong. Next, I would try to call other functions in the DLL and see if you can get any of them to work. Also, I would check with the camera company and see if they provide any example programs that are written in C. I would also check to see if the camera is working properly and you are getting data from the camera. It looks like you are calling the functions correctly, but again I am not too familiar with your camera and/or its functions.
When it comes to National Instruments supporting USB Cameras, you can check out the following Knowledgebase Acquiring Images in LabVIEW Using a USB Camera, which I know talks about acquiring images in LabVIEW, but you might be able to get a good idea of how to do what you are trying to do in C. There are some good links to some other good documents in the Knowledgebase.
Sorry I could not help you more than this, but hopefully I helped point you in the right direction. Let me know if you have any further questions. Thanks and good luck with your application.

Regards,
DJ
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,305 Views)