From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Anyone know how to incorporate QImaging's SDK camera functions into LabVIEW?

I would like to use functions that are included in the SDK with the rest of my LabVIEW program.
How do I do this?
 
Thanks for all your help.
 
- Josh
0 Kudos
Message 1 of 4
(3,029 Views)
Josh,
I'm not familiar with this SDK but I'm guessing that you're probably going to need to create the dersired functionality from the SDK, and then build it into a dll which you can then call from LabVIEW through a call library function node. For help on using external code with LabVIEW see Calling Code Written in Text-Based Programming Languages link.
 
Chris C
0 Kudos
Message 2 of 4
(3,021 Views)
The SDK has a .dll file with the functions, but I'm not sure on how to configure the parameters for the call library function node, especially the *pSettings. In a SDK pdf file, it shows:
extern QCAM_Err QCAMAPI QCam_AutoExpose
(
QCam_Settings  *pSettings
unsigned long      xOrig,
unsigned long      yOrig
unsigned long      width,
unsigned long      height
);
 
Parameter Description:
pSettings: a pointer to a camera settings structure
 
the other four variables will be zeros.
 
Thanks for your help.
- Josh
0 Kudos
Message 3 of 4
(3,016 Views)
Josh,
I think that the help page I linked to you is a great resouce to answer this question. The section named "Configuring the Call Library Function Node" speaks to your question. I've included an excerpt which says:
 

Configuring Parameters

This section discusses the return value and how to add parameters to the Call Library Function Node.

Initially, the Call Library Function Node has no parameters and has a return type of Void. The return type for the Call Library Function Node returns to the right terminal of the top pair of terminals. If the return type is Void, the top pair of terminals is unused. Each additional pair of terminals corresponds to a parameter in the Parameter list of the Call Library Function Node. To pass a value to the Call Library Function Node, wire to the left terminal of a terminal pair. To read the value of a parameter after the Call Library Function Node call, wire from the right terminal of a terminal pair. The following figure shows a Call Library Function Node that has a return type of Void, a string parameter, and a numeric parameter.

Configuring Return Type

For return type, you can set Type to Void, Numeric, or String. Void is only available for return type and is not available for parameters. Use Void for the return type if your function does not return any values.

Even if the function you call returns a value, you can use Void for the return type. When the function returns a value and you select Void as the return type, the value returned by the function is ignored.

Note  If the function you are calling returns a data type not listed, choose a return data type the same data size as the one returned by the function. For example, if the function returns a char data type, use an 8-bit unsigned integer. A call to a function in a DLL cannot return a pointer because there are no pointer types in LabVIEW. However, you can specify the return type as an integer that is the same size as the pointer. LabVIEW then treats the address as a simple integer, and you can pass it to future DLL calls.
0 Kudos
Message 4 of 4
(2,994 Views)