LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to access Enum data types from a library in C imported into labview??

Hi, I am trying to connect a coreco camera using Uniq-PCDig framegrabber. We do this without any difficulty in MFC using Uniq-PCDig libraries provided by the vendor (IFC library). In MFC we call camera library functions with a handle to the display window and passing enum types defined in the camera library as arguments. While trying to do the same in labview, I imported all the functions of the camera (to say capture module) by adding its library along with the DLL. Labview created a nice set of *.vi(s) for all those functions. So I accessed the framegrabber and configured the camera connected to it. Now the next step is to call the create live connection function. In MFC I can see that this function is being overloaded in five different forms and we call the appropriate function based on the input arguments we provide. But in Labview created vi, I see only one instance of that function with maximum number of possible arguments shown. Here is an example of that function we use in MFC. we create two image buffer pointers and connect them to camera (capture module) using two functions and then we call the following function to create live connection. IfxCreateImgConnection(camera, displayhandle, LIVE_GRAB, ENUM_DATA_TYPE, scaling); In MFC the above function is easy to call, but in labview how can I do this, what should I give as an input for displayhandle, LIVE_GRAB and the other argument which has a ENUM_DATATYPE already defined in camera libraries (which I cant see any of these datatypes in Labview). Any help is greatly appreciated. thnaks

Message Edited by pavanbabut on 10-04-2007 11:17 AM

0 Kudos
Message 1 of 2
(2,674 Views)

The enum is for the programmer allowing numbers to be maped to names.  You can easily make an enum in labview with the same list as the c program (this doesnt happen automatically).  Make it a typdef so you can reuse it and maintain it if the c code changes its enum defs.  When passing the data to c the enum is just an int type (U16 by default but check and use the same type as the c code).

 

Paul 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 2
(2,654 Views)