Home > HMS NETWORKS > HMS NETWORKS CANbridge NT Lua ADK Bridge Router User Guide
HMS NETWORKS CANbridge NT Lua ADK Bridge Router User Guide
CAN@net NT/CANbridge NT Lua ADK
How to Use Lua in Remote Mode?
3. Create a Lua script.
or
Test the HelloWorld example, that is provided in C:\Users\Public\Documents\HMS\Ixxat CAN-Gateway
Confguraor\Examples\Lua.
4. Download the Lua script to the device with the CAN-Gateway Conguraor or with the command line tool
CANGWle.exe.
With CAN-Gateway Confguraor
a. In the toolbar open menu Lua ADK and select Write Lua script to target.
b. It is possible to capture the print outputs of Lua with the terminal window.
• Lua script is wrien to the CAN NT device.
• Lua script is auomacally started when the device is started.
With command line tool CANGWfle.exe
a. Make sure the CAN@net or CANbridge NT device is connected.
b. To download and start the script in terminal mode use the following command:
CanGWfile.exe USB any w LUA myscript.lua -init -terminal
The command executes the following:
• downloads the script myscript.lua to the connected CAN NT device
• restarts the device and acvaes the script
• ushes old text strings from the output FIFO on the target
• opens the terminal mode for text outputs
c. To terminate the tool press any key on the keyboard.
• Lua script is auomacally started when the device is started.
NOTE
For descripons of the command line parameters see User Manual CAN-Gateway Conguraor.
3.3. How to Use Lua in Remote Mode?
Running the Lua script on the host PC and using it in remote mode can be used for example for debugging. The
recommend IDE is ZeroBrane Studio.
The Ixxat Lua ADK includes the command line tool LuaADK.exe. This is a Lua interpreter v5.3 including a USB
driver for the communicaon with the CAN@net/CANbridge NT device. This tool has to be used instead of the
Lua interpreter of the IDE.
To use the LuaADK.exe from ZeroBrane:
1. To open the user setngs le, open menu Edit — Preferences — Setngs: user.
2. Add the path to the LuaADK.exe (e.g. path.lua53 = 'C:\\Program Files\\HMS\\IXXAT
CAN-Gateway Configurator\\LuaADK.exe').
3. Open Project — Lua Interpreter and select Lua 5.3.
4. Restart ZeroBrane.
To communicate with the Target Device in Remote Mode
1. Make sure the CAN@net or CANbridge NT device is connected via USB.
2. Enable the use of the Lua ADK in remote mode (see How to Enable the Use of the Lua ADK?, p. 5).
3. In the CAN-Gateway Conguraor, open menu Target and select Write confguraon to target to write the
device conguraon to the connected CAN NT device.
4. Create a Lua script.
Page 6 of 20
4.02.0332.20002 Version 1.5
| General | Details |
|---|---|
| Name | HMS NETWORKS CANbridge NT Lua ADK Bridge Router User Guide |
| Make | HMS NETWORKS |
| Language | English |
| Filetype | PDF (Download) |
| File size | MB |
If you have any questions regarding HMS NETWORKS CANbridge NT Lua ADK Bridge Router User Guide, please ask here and describe the problem in detail.













