Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

calllib (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the libraries class.

Syntax

[out2, out3, ...] = calllib(libname, funcname, in1, in2, ...)

[out1, out2, out3, ...] = calllib(libname, funcname, in1, in2, ...)

Description

Calls a function in a shared library. Make sure the shared library uses supported data types.

Details

Examples

Inputs

Name Description
libname Specifies the name of the shared library that contains the function you want to call. If you assigned an alias when you loaded the shared library, use the alias for libname. libname is a string.
funcname Specifies the function you want to call. funcname is a string.
in1, in2, ... Specify inputs for the function you want to call.

Outputs

Name Description
out1 Returns the value of the function. If the function does not return a value, LabVIEW returns out2 as the first output.
out2, out3, ... Return the pointer inputs.

Details

Refer to the MathScript Shared Libraries.lvproj in the labview\examples\MathScript\MathScript Shared Libraries directory for examples of calling shared libraries from MathScript.

Examples

r = [labviewroot '\examples\MathScript\MathScript Shared Libraries']
loadlibrary('myDemo', 'demo', 'includepath', r)
N = 50;
A = peaks(N);
mesh(A)
B = calllib('myDemo', 'DrawStar', A, N, 8);
figure(2)
mesh(B)
unloadlibrary('myDemo')

Related Topics

labviewroot
libfunctionsview
libisloaded
loadlibrary
unloadlibrary


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit