LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing and Receiving variables from a c++ Calculation Progr. Controlled by a labview Program.

Hi Labview lovers...
Long time no See. Missed you all!!!
 
I got a program written in Labview 7.1, witch spits  some vareiables into a data buffer.
I must use these variables to calculate something complex. The program that makes the calculation are written in C++. 
If I develop this program in labview, it will take me a lot of time coz it is really big.
What i need is to send the variables From my buffer in labview to the  C++ program. It wil make the calculaions then It writes some result variables
witch i must receive (in the labview Progr,) make some own calculations and the send again to the c++ program.
 
Now I just want to know if it is possible to do this! I've red that The C++ program can be converted to a .dll so the labview can understand it.
Is it then possible to write to and read from variables and arguments from the C++ program  if the C++ files are converted to .dll??
 
Thank U  !!
Zamzam 
 
 
HFZ
0 Kudos
Message 1 of 3
(2,378 Views)
Hi:
 
  You can do this either as a dll or a Code Iinterface Node.   I think you'll have an easier time using the Code Interface Node.   Compile your C++ into a "*.lsb" object. (CIN help files are very helpful about this!).  Then wire your CIN node, and then just load your object code in.  It works like a charm.  (if your C++ is good, that is. 🙂 )
 
ERic
0 Kudos
Message 2 of 3
(2,356 Views)

It depends.

If LV is your major control program, just compile/link C++ as DLL, then call DLL in LV.  CIN is a ittle bit strict-type definition method, don't like it.

 

Or, you could build LV function into a DLL, the in C++, call it.  

 

0 Kudos
Message 3 of 3
(2,353 Views)