Using Lua ADK with the CAN NT Devices
3
Using Lua ADK with the CAN NT Devices
The use of the ADK is only possible in Bridge operational modes.
The Lua ADK supports two operational modes:
•
running the Lua script on the target device in autonomous mode (target mode)
•
running the Lua script on the host PC for debugging purposes, communicating with the
target device via USB (remote mode)
Functionally there is no difference between running the Lua script on the device or on the host
PC. The operational mode can be set in the CAN-Gateway Configurator (see
Use of the Lua ADK?, p.
Running scripts on the target device provides only limited debugging possibilities via print
statements. Running scripts on the host PC allows debugging with breakpoints and watch
windows. Running Lua on the host PC provides the possibility to run huge Lua files with low
computation time due to performance of PC, but the USB communication introduces extra
delays for each interaction (e.g CAN-Lua-CAN) of about one millisecond.
3.1
How to Enable the Use of the Lua ADK?
To be able to use the Lua ADK with the CAN NT device, the device must be updated with the Lua
framework and Lua must be enabled in the CAN-Gateway Configurator.
►
Connect the device to the host computer and to power supply (for more information see
User Manual of the device in use).
►
Make sure that the latest CAN-Gateway Configurator is installed (check within the product
support pages on www.ixxat.com/support-bridges-gateways).
►
Start the CAN-Gateway Configurator and connect the device in use (for more information
see User Manual CAN-Gateway Configurator).
►
In the toolbar open menu Lua ADK and select Update Lua ADK.
►
In C:\Program Files\HMS\Ixxat CAN-Gateway Configurator V6 open the file lua_
framework_vx and update the Lua ADK.
→
Lua ADK is loaded to the connected device.
►
In the configuration tree select General and enable the ADK in the drop-down list Use of
Lua as ADK.
–
enabled in target mode: running the script on the target device (see
Target Mode?, p.
–
enabled in remote mode: running the script on the host PC, communicating with the
device via USB (see
►
In CAN-Ethernet-CAN bridges note that the Lua ADK must be enabled for the Master and
each Slave individually.
►
In the toolbar open menu Target and select Write configuration to target to write the
device configuration to the connected CAN NT device.
CAN@net NT/CANbridge NT User Manual
7).
8)
How to Use Lua in Remote Mode?, p.
How to Enable the
How to Use Lua in
9)
4.02.0332.20002 1.2 en-US
7 (22)
Need help?
Do you have a question about the IXXAT CAN@net NT and is the answer not in the manual?
Questions and answers