Embedding a C/C++ Interpreter Ch into LabVIEW for Scripting

Application Examples

Embed Ch into LabVIEW for Script Blocks.

Virtual Instruments (VIs) are popularly used for testing, measurement, simulation, and control of instruments and mechatronic systems. A virtual instrument is typically programmed using graphical icons, called a G language. Although using graphical icons is simple and easy, it is quite inefficient for development of applications with special requirements and operations which have not been implemented in advance in a VI. It would be desirable to combine the ease of use of the G language with traditional programming for development of complicated applications in VI.

The design, implementation and application of embedding a C/C++ interpreter into a VI for scripting blocks in C/C++ are presented. With a C/C++ interpreter enabled VI, complicated algorithms and operations can be achieved using a script code associated with a graphical icon called the C script block. The ideas are illustrated by embedding a C/C++ interpreter into a LabVIEW platform through both techniques of code interface node (CIN) and dynamic link library (DLL) available for interfacing external programs in LabVIEW. Embedding a C/C++ interpreter into VIs has a great potential for enhancing the VIs with easy programmability for handling complicated applications.

Download and Installation Demos

To test presented examples presented, you need to install Ch and Embedded Ch. The source code for examples described can be downloaded from here.

Note: the progarm has been tested to compile using .NET 2003. It has not been tested to compile in .NET 2005.

Any questions or comments can be directed to chlabview(@)iel.ucdavis.edu