LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview and Visual C++

Hello,

how do i let LabView (5.1) and Visual C++ successfully cooperate?
Any ideas? All help is welcome, because i don't have a clue...

I'm a newbie at both languages, so it's really difficult.

Thx,

Bull's Eye
0 Kudos
Message 1 of 13
(3,988 Views)
Hi,
we very often use both LV and Visual C++ or Delphi. The best solution as I think is to write DLLs in text based languages and then call the functions from LV. This is very convinient and easy.
Another way is to use CINs (Code interface Nodes). This is a type of C code which could be used in LV. You can read about it in your manual or help file.


Good luck.

Oleg Chutko.
0 Kudos
Message 2 of 13
(3,988 Views)
Thx for the info, but what do you mean by 'text based languages'?

Still looking for hints to start the work. As a matter of fact, we're
writing a visual c++ program that can change some of the parameters in
the labview part, and then lets labview run the vi. The vi should
control hardware devices...

TIA,
Bull's

Oleg wrote:
>
> Hi,
> we very often use both LV and Visual C++ or Delphi. The best solution
> as I think is to write DLLs in text based languages and then call the
> functions from LV. This is very convinient and easy.
> Another way is to use CINs (Code interface Nodes). This is a type of C
> code which could be used in LV. You can read about it in your manual
> or help file.
>
> Good luck.
>
> Oleg Chutko.
0 Kudos
Message 3 of 13
(3,988 Views)
My english is not very good... By 'text based languages'I mean such languages as C, Basic, Delphi and others where you have to type the text and where the code actually is the text. In LV the code is the diagram.
As I mentioned above the best solution is to write the function in Visual C. Save it inside the DLL and then call from LabVIEW.

Good luck.

Oleg Chutko.
0 Kudos
Message 5 of 13
(3,989 Views)
Hello,

thx for the info. I tried some stuff about the CIN's, but those doesn't
seem to me as a good method, because in a CIN, you put things from the
Labview program (if i understood well). The job i have to do is writing
a visual C++ program that can change some of the parameters in the VI,
and can then start the VI...
Better do it with the dll's than maybe. If you got some info about that,
it's always welcome...

Greetz,
Bull's

Oleg wrote:
>
> Hi,
> we very often use both LV and Visual C++ or Delphi. The best solution
> as I think is to write DLLs in text based languages and then call the
> functions from LV. This is very convinient and easy.
> Another way is to use CINs (Code interface Nodes). This is a type of C
> code which could be used in L
V. You can read about it in your manual
> or help file.
>
> Good luck.
>
> Oleg Chutko.
0 Kudos
Message 4 of 13
(3,989 Views)
If you want to control LabVIEW from a Visual C++ program, you can do it by making a .dll from the VI. The application builder is required for this. There are examples of external programs calling a LabVIEW .dll at http://zone.ni.com/devzone/devzone.nsf/webcategories/E2A99E7E10D5725D862567AC004F0A53?opendocument&node=DZ52048_US. Another way to control LabVIEW is through ActiveX. You can go to http://zone.ni.com/devzone/devzone.nsf/webcategories/46E7994B7483D781862567C300662667?opendocument&node=DZ52051_US for an example. Good luck.
0 Kudos
Message 6 of 13
(3,989 Views)
On the first link I see something like 'Calling a dll made by LabView 6i'.
The problem is that i'm working with LabView 5.1, so can't really use that
one. Little question i got: can't LV 5.1 generate dll's at all??

The second link doesn't help me either. There's one .cpp file, but I don't
know what to do with it. What kind of project to put it in etc...

Anyway, thx for the info...
Bull's

"Dennis Knutson" schreef in bericht
news:506500000005000000135D0000-1011517314000@exchange.ni.com...
> If you want to control LabVIEW from a Visual C++ program, you can do
> it by making a .dll from the VI. The application builder is required
> for this. There are examples of external programs calling a LabVIEW
> dll at
>
http://zone
.ni.com/devzone/devzone.nsf/webcategories/E2A99E7E10D5725D862567A
C004F0A53?opendocument&node=DZ52048_US.
> Another way to control LabVIEW is through ActiveX. You can go to
>
http://zone.ni.com/devzone/devzone.nsf/webcategories/46E7994B7483D781862567C
300662667?opendocument&node=DZ52051_US
> for an example. Good luck.
0 Kudos
Message 10 of 13
(3,989 Views)
LabVIEW 6 is the only version that can create a .dll. The .cpp file is an example C++ file that shows how to use LabVIEW's ActiveX interface in Visual C. Load the file and build it. It looks very simple and you would have to modify it quite a bit to get what you need. If you can't upgrade to LabVIEW 6, find ActiveX a little intimidating, and can't do to the whole thing in either C++ or LabVIEW, you could always use the old trick of writing to files. Have the Visual C program write out a file that a LabVIEW VI reads. If you need info from the VI, have that write to a file that the Visual C program reads.
0 Kudos
Message 11 of 13
(3,691 Views)
Hello,

thx for the info. I tried some stuff about the CIN's, but those doesn't
seem to me as a good method, because in a CIN, you put things from the
Labview program (if i understood well). The job i have to do is writing
a visual C++ program that can change some of the parameters in the VI,
and can then start the VI...
Better do it with the dll's than maybe. If you got some info about that,
it's always welcome...

Greetz,
Bull's

Oleg wrote:
>
> Hi,
> we very often use both LV and Visual C++ or Delphi. The best solution
> as I think is to write DLLs in text based languages and then call the
> functions from LV. This is very convinient and easy.
> Another way is to use CINs (Code interface Nodes). This is a type of C
> code which could be used in LV. Yo
u can read about it in your manual
> or help file.
>
> Good luck.
>
> Oleg Chutko.
0 Kudos
Message 12 of 13
(3,691 Views)
Hello,

thx for the info. I tried some stuff about the CIN's, but those doesn't
seem to me as a good method, because in a CIN, you put things from the
Labview program (if i understood well). The job i have to do is writing
a visual C++ program that can change some of the parameters in the VI,
and can then start the VI...
Better do it with the dll's than maybe. If you got some info about that,
it's always welcome...

Greetz,
Bull's

Oleg wrote:
>
> Hi,
> we very often use both LV and Visual C++ or Delphi. The best solution
> as I think is to write DLLs in text based languages and then call the
> functions from LV. This is very convinient and easy.
> Another way is to use CINs (Code interface Nodes). This is a type of C
> code which could be used in LV. Yo
u can read about it in your manual
> or help file.
>
> Good luck.
>
> Oleg Chutko.
0 Kudos
Message 13 of 13
(3,691 Views)