LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview GUI in C++

Is it possible to use Labview for the GUI of my software if most of the code is written in C++? I would have to be able to send a message to the C++ part of my code(user clicks/input) and receive a message back from it(output to the user). Is it possible to have this sort of interaction? I don't think its really a dll call because i'm not really calling a function once, both would have to be running simutaneously... A quick response would be great!
0 Kudos
Message 1 of 2
(2,506 Views)
> Is it possible to use Labview for the GUI of my software if most of
> the code is written in C++? I would have to be able to send a message
> to the C++ part of my code(user clicks/input) and receive a message
> back from it(output to the user). Is it possible to have this sort of
> interaction? I don't think its really a dll call because i'm not
> really calling a function once, both would have to be running
> simutaneously... A quick response would be great!

Most things are possible given enough debugging time, but what you
describe is potentially complicated.

You can build the GUI in LV, no problem there. You can either detect
value changes and attribute changes via polling, or you can use the
event structure in 6.1. Typically you would build some s
ort of state
machine or event handler to deal with the events. You still need one,
but each of these diagrams need to communicate to the C++ code.

If these are done as DLL functions, they can work as callbacks. This
simplifies the synchronization of things in the DLL. If you want the
DLL to have a thread that is always running, fine, but you will need to
be able to post an event or send a message of some sort to the DLL. The
message delivery could easily be calling a function in the DLL and
having that put something in a queue for the C++ code, or it could ride
on top of the Windows machinery and use Windows messages. Either way,
be sure to have good protection between handling different messages as
they arrive, especially if they are somehow grouped or order dependent.

Greg McKaskle
0 Kudos
Message 2 of 2
(2,506 Views)