Reputation: 356
Recently I have been tasked with reworking a LabView program and was wondering if there is a way to write code in another language, and convert it to LabView syntax. I know it is possible to write DLL files and use those in LabView; however, once I leave the lab assistants want to be able to add to the program, so that approach would not be viable.
Upvotes: 1
Views: 2045
Reputation: 55
Yes you can write your code in a different language and have it called in LabVIEW through a DLL. You would be using a Call Library Function Node. Just be sure you set all your parameter correctly and it can work together.
If your writing from scratch.. I would recommend just doing it in LabVIEW since you can debug it much easier than running through a DLL.
Upvotes: 0
Reputation: 75
You can automate some programming tasks using LabVIEW scripting, but you have to write the LabVIEW code that translates from your chosen language. For instance, I have written LabVIEW code to create LabVIEW clusters from complicated C TypeDefs. But I have done this only because I am bringing flattened data into LabVIEW from C, and the C header files already exist.
Upvotes: 0
Reputation: 3168
To the best of my knowledge, no tools for that exist from National Instruments or from any third party. There are tools to convert LabVIEW code to C code, but going the other direction is a really hard problem to automate (the sequential nature of C code and it's use of pointers [or references in C++/C#] make it a bad fit for dataflow, so automated conversion would tend toward very poor performance and really hard to understand code). I did not find any tools, but I might have overlooked something. Generally, the two best places to check for tools are a) the LabVIEW Tools Network and b) the code repository on the LAVA website.
Upvotes: 3