LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Help needed for C++ code

Hii everyone
I have developed a c code for serial communication in RS232 interface to communicate with my microcontroller  using Borland C++/Turbo C++.
I want to know wheather i can use Labview  and use serial communication of labview and include my code in labview for rest of the processing.
I have done serial communication in Labview 7.1 before.....
Please advice what all i need to work more and take benefits of labview GUI.
Thanks
rohit
0 Kudos
Message 1 of 3
(3,092 Views)

The easiest approach is build a DLL module with your C++ codes, then utilize it through the Call Library feature of LabVIEW.  This feature allows you to call almost any DLLs outside. 
http://zone.ni.com/reference/en-XX/help/lv/71/glang/Call_Library_Function/

Although LabVIEW has another feature - CIN, which allows to embed C code into LabVIEW VI, I believe C++ is not supported.
http://zone.ni.com/reference/en-XX/help/lv/71/glang/Code_Interface_Node/

I recommend DLL approach.

Alternatively, if your RS232 communication is so simple as if communicating with a T&M instrument without any special trick, NI-VISA and/or NI-Serial VI functions can also be used instead of your own Borland/Turbo C++ based I/O routines.

0 Kudos
Message 2 of 3
(3,076 Views)
Sir,
actually my RS232 communications are very simple but the processing of data which Im doing for closed loop control of my DC motors is very complex and needs to be done veryfast so I 'm right now working in TurboC and making my routine in C language.
I have done serial communication using VISA protocol before but new to , how LabView or LabWindows can be used to there maximum benefit.
As you said I'll start working on DLL approach  ..
0 Kudos
Message 3 of 3
(3,062 Views)