LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview from C/C++

Hi

My question is about how to call Labview VI/Global variables from C/C++.

We have a cRIO-9012 that runs under the VxWorks operative system.

Up to now, we were calling C functions from Labview, but we also need to
do the opposite.

- Can I call a VI from C/C++?
- Can I access Labview global variables from C/C++?
- Or is there a passive diagram, mapped to a C function, to be placed in
a VI that is triggered by the C function?

Alain




--
_________________________________________________
Alain Migeon
Please reverse alain and migeon for replying.
0 Kudos
Message 1 of 4
(2,489 Views)
Alain,

there are several ways to solve this. So i better start by telling you, what you shouldnt do (because its impossible or not recommended):
- LV does not have the possibility to directly create a shared memory. All ways how you might do this are not recommended.
- You cannot call a VI directly from C/C++. Nevertheless, you can use VI-Server to do this (kind of ActiveX-programming). But this is not the way i would recommend you to do it....

So what can you do:
- Convert your VIs to a DLL and call it from C/C++ (maybe not good for you because of architectural settings)
- Use datasharing with mechanics accessable by all programming languages: TCP/IP, UDP, files, ...

The last thing i mentioned is the one i recommend you, but dont forget to evaluate speed and data-security...

hope this helps,
Norbert B.
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 4
(2,480 Views)
On Oct 15, 9:20 am, Alain Migeon <migeon.al...@tdcspace.dk> wrote:
> Hi
>
> My question is about how to call Labview VI/Global variables from C/C++.
>
> We have a cRIO-9012 that runs under the VxWorks operative system.
>
> Up to now, we were calling C functions from Labview, but we also need to
> do the opposite.
>
> - Can I call a VI from C/C++?
> - Can I access Labview global variables from C/C++?
> - Or is there a passive diagram, mapped to a C function, to be placed in
> a VI that is triggered by the C function?
>
> Alain
>
> --
> _________________________________________________
> Alain Migeon
> Please reverse alain and migeon for replying.

The two main methods for accessing the functionality of a Labview VI
from external C/C++ code are ActiveX and Application Builder. ActiveX
is available only on the Windows Platform. Application Builder comes
with the Professional Development version of Labview and can be
purchased as an upgrade for the base and full development versions of
Labview for US $1000.00. A third possibility is to use LabWindows
CVI.

Howard

0 Kudos
Message 3 of 4
(2,467 Views)
In article <1192462758.143102.214510@q3g2000prf.googlegroups.com>,
hrhan@att.net says...
> On Oct 15, 9:20 am, Alain Migeon <migeon.al...@tdcspace.dk> wrote:
> > Hi
> >
> > My question is about how to call Labview VI/Global variables from C/C++.
> >
> > We have a cRIO-9012 that runs under the VxWorks operative system.
> >
> > Up to now, we were calling C functions from Labview, but we also need to
> > do the opposite.
> >
> > - Can I call a VI from C/C++?
> > - Can I access Labview global variables from C/C++?
> > - Or is there a passive diagram, mapped to a C function, to be placed in
> > a VI that is triggered by the C function?
> >
> > Alain
> >
> > --
> > _________________________________________________
> > Alain Migeon
> > Please reverse alain and migeon for replying.
>
> The two main methods for accessing the functionality of a Labview VI
> from external C/C++ code are ActiveX and Application Builder. ActiveX
> is available only on the Windows Platform. Application Builder comes
> with the Professional Development version of Labview and can be
> purchased as an upgrade for the base and full development versions of
> Labview for US $1000.00. A third possibility is to use LabWindows
> CVI.
>
> Howard

Many thanks for the answer.

Alain

--
_________________________________________________
Alain Migeon
Please reverse alain and migeon for replying.
0 Kudos
Message 4 of 4
(2,427 Views)