LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can a C++ sub-program invoked as a cin node call a LabView sub-vi as a "function"

The subject says it all, we have a mostly LabView system that controls a numerical
simulation program. We would like to add a new numerical analysis package written
in C. To be used as written this C package must call one of our LabView sub-vi's
as a function numerous times. Can this be done?

-thanks
0 Kudos
Message 1 of 3
(2,757 Views)
With LabVIEW 6 and the application builder, you have the option of creating a DLL. You should be able to call this from your C program.
0 Kudos
Message 2 of 3
(2,757 Views)
> The subject says it all, we have a mostly LabView system that controls a numerical
> simulation program. We would like to add a new numerical analysis package written
> in C. To be used as written this C package must call one of our LabView sub-vi's
> as a function numerous times. Can this be done?
>

CINs are one way of doing this, but they are C code written specifically
for LV.
A better solution is to use the Call Library Function node, or the DLL node.
Your C code may already be built into a DLL. If not, it is easier and more
familiar to the people doing it.

Another option is to use a built EXE and the System Exec node. Note
that a
DLL has multiple entrypoints that can be called at different times to provide
lots of flexibility. An EXE has few, typically o
ne, entrypoint and is sort
of difficult to control once it is up.

Another option, if the C code is written this way already is to use an
automation interface -- an ActiveX interface. This is really about the
same as a DLL, but it follows certain standards so that ActiveX client
programs can access things in a standard way.

Be sure to look at the Code Interface or external code manual. It should
be a pdf manual in the help directory.

Greg McKaskle
0 Kudos
Message 3 of 3
(2,757 Views)