LUA Inputs & Outputs
Inputs and Outputs
Lua scripting on MASSO includes a dedicated set of LUA Inputs and LUA Outputs, which are independent from the standard Auxiliary Inputs and Outputs of the controller.

Overview
MASSO provides 16 LUA Inputs and 16 LUA Outputs that can be fully controlled and monitored from within Lua scripts.
These act as virtual I/O channels used for custom automation logic, tool handling, machine monitoring, and process control — all without interfering with standard machine wiring or signals.
LUA Inputs (0–15):
Used to read digital signals or logical conditions.LUA Outputs (0–15):
Used to activate, control, or signal other systems, internally or externally.
Key Features
Each LUA Output can be mapped to any physical output pin on the MASSO controller.
LUA I/O can be used for:
Custom automation or logic control
Safety interlocks and process validation
Tool or fixture management
External device signaling (e.g., lights, pneumatic valves)
Independent of G-code — Lua I/O can operate in the background or in response to triggers.
Mapping LUA Outputs to Physical Outputs
LUA Outputs are virtual, meaning they do not directly control hardware until assigned.
You can map any of the 16 LUA Outputs to a physical output on the MASSO controller, allowing Lua logic to interact with real-world devices.
How to Map LUA Outputs:
Open the F1-Setup screen, then go to the Output Settings page on the MASSO controller.
In the list of outputs, choose the physical output you want to control.
In the “Function” dropdown menu, select “LUA Output X”, where X is the Lua output number (0–15).
Save and restart the controller.
After mapping, when your Lua script sets LUA Output X HIGH or LOW, it will directly control that physical output pin.
Example: If “Output 5” is mapped to “LUA Output 3”, then:
M.io.set_output(3, true)will activate physical Output 5 on the controller.
Tool Changer Inputs and Outputs
When creating scripts for an Automatic Tool Changer (ATC), use the dedicated Tool Changer Inputs and Tool Changer Outputs, not the general LUA I/O.
These are reserved for tool changer control and allow safer, more predictable operation when performing automatic tool changes.
Example: Tool Changer I/O should be used for sensors such as Tool Clamp, Arm Home, or Magazine Ready.
Examples
Example 1: Setting a LUA Output
This example shows how to turn a LUA output ON and then later OFF.
Example 2: Reading a LUA Input
This example reads the state of a LUA input and prints its status to the console.
Example 3: Conditional Control
This example shows how to turn an output ON only when a specific input is active.
Spanish
French
German
Simplified Chinese