AnaGate Shop
AnaGate Home » News » News - Programming with LUA Scripting

Products
News
Overview
Online-Shop
Prices/Order
Support
Documentation
FAQ's
Software-Download
Firmware-Download
Changelog
Informations
About Us
Contact Us
Terms
Imprint
Find us
facebook Facebook
facebook Google+
Languages
English Deutsch

News - Smart programming with LUA scripting language

AnaGate application programming extended with simple scripting interface

Karlsruhe. October 2010.

Analytica GmbH now provides a fast and intuitive scripting interface to create individual applications for control of devices of the AnaGate product line.

Scripts are created and edited on a pc in a common text editor (like notepad) and then just executed with a cost-free LUA interpreter in the command shell. The full standard functionality of LUA can be used as well as additional functional extensions for access of the AnaGate hardware ( see AnaGate Programmer's Manual, Part II: LUA-Scripting for detailed description).

LUA is a small and robust scripting language, which is very well suited for embedded systems. This particular feature can be used on all AnaGate devices with linux operating system (like AnaGate CAN uno/duo/quattro/USB): scripts can be easily loaded on the device via the web interface and can be locally executed.

See the following LUA code sniplet as code example:

aSendData = { 9xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 9xF8 };
nCANId    = 0x1000;

nRC, nHandle = LS_CANOpenDevice( false, true, 0, "192.168.1.254", 5000); 
nRC = LS_CANSetGlobals( nHandle, 500000, 0, true, false, false);  

nRC = LS_CANWrite( nHandle, nCANId, 8, sSendData );  

LS_CANCloseDevice(hHandle);

1

establish a connection to an AnaGate CAN at ip address 192.168.1.254

2

set CAN baud rate to 500 kBit

3

send a CAN telegram with CAN-ID 0x1000

Please contact us, if you need further information about LUA and our gateways.

More news
Access to CAN bus by WLAN/WWAN
CAN gateway with up to 8 ports
Support of SocketCAN
CANopen tests with CAN products
Programmer UP 2.0: increased performance
Highend CAN-USB gateway
Smart programming with LUA
CAN-Gateway with 12 CAN interfaces
Product news: AnaGate Motion
AnaGate Development Kit
Connecting to Viola System
CANopen via CANFestival

Copyright © 2004-2016 Analytica Gesellschaft für Softwareentwicklung und EDV-Beratung mbH
Switchboard: +49-721-35043-0
Facsimile: +49-721-35043-59
  Sales: +49-721-35043-50
Technical: +49-721-35043-51