Using Lua in Q-SYS Overview

Control scripting uses the Lua.org programming language with extensions that allow it to control Q-SYS hardware and software. Refer to the Lua 5.3 Reference manual for complete information. The Q-SYS specific extensions to Lua are documented in the following sections. The book "Programming in Lua" is highly recommended for learning Lua.

For examples of solutions using scripting refer to the Scripting Solutions topic.

The Q-SYS Extensions to Lua

The following Q-SYS extensions to Lua are covered in individual topics. For Lua code examples, see Code Examples.

Introduction

A Q-SYS control script is written in the Lua language, within Q-SYS designer, for the purpose of automatically accomplishing tasks or creating other control mechanisms by associating the control script with standard controls in the Schematic Elements of a Q-SYS design. The Control Script component allows you to write scripts to perform operations on values, positions, strings, colors and other metadata, and timing of controls in the Schematic Elements. An alternative scripting component is Scriptable Controls, which incorporates the functionality of both the Custom Controls component

Notes

Maximum Execution Error

The Maximum Execution Error is thrown when an individual call of a Lua function exceeds the maximum allowed number of CPU cycles. Infinite loops are the most common cause of this error. “Max execution limits exceeded” is displayed in the debug log when this error occurs.

Arrays

Lua Arrays are 1 based.

QSC.com | Software and Firmware | Resources | QSC Self Help Portal

© 2009 - 2018 QSC, LLC. All rights reserved. QSC and the QSC logo are trademarks of QSC, LLC in the U.S. Patent and Trademark office and other countries. All other trademarks are the property of their respective owners.

http://patents.qsc.com