05-18-2018 05:01 AM - edited 05-18-2018 05:03 AM
Hello Folks,
I have .lua Script files which can be executed using 3rd party software, Now i want to add this .lua script execution in my LabVIEW Application.
Found lua for LabVIEW in LabVIEW Tools Options. (Is there any way to call .lua script using LabVIEW?)
Planning to get dll for 3rd party software to invoke the execution property using labVIEW, Meanwhile if something can be done only using LabVIEW it will be great
Please share your experience!
05-20-2018 04:49 AM - edited 05-20-2018 04:51 AM
I'm not sure what you imagine about doing with Lua scripts only using LabVIEW. Are you proposing to write a Lua interpreter engine entirely in LabVIEW? That is not going to work very well. Aside from the development effort it is going to be pretty slow too.
What remains is to use real Lua as an external resource to execute the Lua scripts and interface it to LabVIEW. One of the possibilities is Lua for LabVIEW, which you seem to already have found.
Another one is to simply call lua.exe through the System Exec as a command line tool and somehow interface with it through for instance files written to specific locations or some TCP/IP inter-application communication.
05-20-2018 05:05 PM
Lua is designed to be embedded in applications.
If you want to use it in LabVIEW without using Lua, guess you have to make your own Lua interpreter. Technically, you'd still be using Lua of course.
You can probably invoke a Lua script from the command line, without any toolkit. But invoking Lua like that will not allow any interaction with LabVIEW.
As Lua is designed to be embedded, it's well documented how to do this, for instance in C\C++. LabVIEW is a bit different (that's why we love it), so it won't be that easy.
We've (successfully) used Lua for LabVIEW toolkit. You'd save yourself a lot of trouble by using it.
02-08-2019 01:17 PM
Our T-series DAQ devices can run Lua scripts in hardware and we also have customers who use Lua as their host software to talk to our devices, so we have a good bit of experience with Lua. Tell us more about what your Lua code does and we might have some ideas. What information do you want to exchange between LabVIEW and Lua?
For example, if it is a simple script, you could run it on a T4 or T7 and use user-ram registers to easily exchange (via USB/Ethernet/WiFi)values with a LabVIEW program running on a host PC. Strange use of a T4/T7 but could make sense for some reason:
https://labjack.com/support/datasheets/t-series/lua-scripting
08-01-2023 10:34 AM
How about this LabVIEW<->LUA wrapper...