LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Importing Visual C++ DLLs for use in Labview VI

Hi all,

I try to write a little VI for the initialization of a camera. The manufacturer sent a DLL that work in Visual C++ but I'd like to use this in a Labview VI.I tried the Call Function in the advanced menu from Labview Diagram Windows, checked every parameters and it doesn't seems to work...

I found several discussion on this forum about importing DLLs from Labview to Visual C++, but nothing to answer my question?

Can anybody help?

Thanks

Francois
0 Kudos
Message 1 of 6
(3,641 Views)
Hi,

Have you tried looking at the example in the LabVIEW examples. under Help | Find Examples and Look under Communicating with External Applications | Using External Codes | Intergrating DLL's .

Also, look in the Resource Library and under LabVIEW, follow link, http://zone.ni.com/devzone/devzone.nsf/webcategories/E2A99E7E10D5725D862567AC004F0A53?opendocument&node=DZ52048_US .

Also, try the pdf help launch the labVIEW bookself and select Using External Code in LabVIEW.

Hope this provides some help to get you started.
Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 6
(3,641 Views)

Hallo Francoisuk, I have a general question. Have you managed to initialize your camera using Labview at the end? I have the same problems currently and was thinking maybe you you may share some experience how to do this

 

 

Best regards 


0 Kudos
Message 3 of 6
(3,401 Views)

Please be more spesific. Poste some exampels or screen shot. Need to know what kind of input the dll expect and output structure



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 4 of 6
(3,392 Views)

I am trying to initialize my camera. pl_pvcam_init -to initialize pvcam library-works. I have problems with the pl_cam_get_name and pl_cam_open. First returns the name of the camera (string) that is used futher by the second to initialize the camera hardware.

 

In the header file first function is defined as rs_bool pl_cam_get_name(int16 cam_num, char_ptr cam_name).

 

The  Function propotype in the Call Library function(CLF) looks as  int32_t pl_cam_get_name(int16_t cam_num, CStr cam_name);

 

I tried to create a buffer for a string as was mentioned in the Manual. Did not work.  I tried to use instead of C string array of 8-bit integers-does not work. The strange thing is also that CLF for  return type puts always void -but I found that this is normal. For function type Bool it seems to be equivalent to int32.

 

I hope it's a bit more clear. I hope you may suggest me smth

 

Best regards 

0 Kudos
Message 5 of 6
(3,386 Views)
Some years since I worked with C now. But i remember that Cstr always is terminated with a zero byte(value==0). You could try insert this in your camera name string


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 6 of 6
(3,368 Views)