T-Series Lua Scripts

LabJack USB, Ethernet, WiFi DAQ Device with sensors

Lua Scripts enable LabJacks to operate as stand alone data acquisition and control (DAQ) devices.

They are especially useful for making low latency control systems.

They also happen to be useful for communicating with a variety of digital sensors.

Lua Scripts can be written and loaded onto T-Series LabJack devices using Kipling's Lua Script Debugger tab.

LabJack USB, Ethernet, WiFi DAQ Device with sensors

More information about LabJack Lua Script examples can be found on the LabJack Lua Script Examples (T-Series Devices Only) documentation page and also in 25.0 Lua Scripting [T-Series Datasheet] page.

Example Lua Script implementing a Voltage Follower

Example Lua Script Benchmarking Lua Scripts

The following Lua Script is more optimized than the first script and will therefore likely run faster.

  1. The `MB.writeName` function calls were replaced with locally referenced versions of the `MB.R` and `MB.W` function calls.
  2. The `LJ.setLuaThrottle` function is being called which configures the device to spend more time executing the Lua Script than performing other tasks.

Example T-Series Lua Script

Below is an example Lua Script developed to connect data from an I2C sensor. It is important to know that this script pushes a T4 and T7 to its limits. I believe the T8 is more capable but I have not had a chance to test with one.

More Information?