Hello!
I'm using a lua scrip that provide two signals: sine wave on DAC and digital output on FIO. the digital output is used to be high on the peaks of the sine wave.
My problem is, when i launch the lua script directly from Kipling, the digital output is very precise (high exactly on sine wave peaks). But when i load the lua script into the Labjack from a python file using the function load_lua_script, their is a phase shift between the sine wave peaks and the peaks of the digital output.
Have you any explication about this problem and if their is solution to this issue?
Thank you,
The issue may be due to processor priority/execution. The setLuaThrottle() function controls how many instructions lua can execute before releasing control to the main device loop. I would recommend you try increasing the throttle to a high value such as 500 or 1000 and see if that changes anything:
https://labjack.com/support/datasheets/t-series/scripting/labjack-librar...