2
1.1
PURPOSE OF EQUIPMENT
The EM405-8 was designed for measurement, automation and control applications. The EM405
easily interfaces a VITA 12-1996 standard M-Module to a typical Ethernet network. The carrier
allows the numerous functions available in the M-Module mezzanine format to be remotely
located near the unit-under-test, easing many system integration issues. Over 100 M-Modules
are available from numerous manufacturers.
The scripting utilities were added to the EM405-8 to allow users to fully utilize the embedded
processor of the EM405-8 and to allow for easy customization of the integrated unit.
1.2
THE LUA SCRIPTING LANGUAGE
Lua (pronounced LOO-ah) is a powerful, fast, lightweight embeddable scripting language. It is
important to note that the name Lua is not an acronym. Lua was written in ANSI-C and is
designed to easily integrate with other software written in C and other conventional
programming languages. Thus, one of Lua’s primary strengths is its extensibility. Lua’s
extensibility is two-fold. Lua can be used to extend an application by embedding Lua scripting
into the application. Also, Lua itself is extendible allowing Lua scripts to utilize libraries and
components written in other programming languages.
Lua is an interpreted language in that Lua programs are stored as text that is interpreted at run-
time. In reality, Lua code is compiled at runtime into an intermediate form; however, the fact
that compilation is performed at runtime allows scripts to be run directly from text and allows
Lua to retain the designation of an interpreted language.
Lua is free software distributed under the terms of the MIT license. The MIT license is short and
very liberal, allowing the user unrestricted use the software.
Further details, including documentation and references can be found at
1.3
KEY FEATURES OF EM405-8 SCRIPTING
The EM405-8 implementation of scripting includes the basics of Lua including all standard
libraries, as well as EM405-8 specific extensions and EM405-8 specific script development
tools. Key features include:
Lua 5.1 programming language interpreter
Lua 5.1 standard libraries (math, table, string, i/o, operating system, etc.)
EM405-8 extensions to control M-modules and EM405-8 utilities
Call high-level M-module drivers and other libraries
TCP/IP based interactive interpreter for development
Develop scripts using any text editor. No compilation required
Store and retrieve data to/from mass storage device (mass storage is an EM405-8 option)
Receive commands and pass data over the Ethernet interface
Network based commands to use and manage scripts (store, retrieve, run, halt, etc.)
Create custom web pages to control the instrument