The Control Script component is used to write scripts, using the Lua language, for control and monitoring from within Q-SYS Designer. You can change or monitor the position, value, string, metadata and other attributes of controls. The script you write interacts with components through their control pins.
For a complete listing of available scripting commands and examples specific to Q-SYS, refer to the Using Lua in Q-SYS topic. For a complete Lua Language reference refer to the Lua 5.3 Reference Manual topic.
NOTE: This component uses the Q-SYS Scripting Engine, which is a licensed feature on certain Cores manufactured with Q-SYS 7.0 and later. For more information, see Feature Licensing.
When you double click the Control Script component, the script editing tab displays.
Control |
Function |
---|---|
Script Area |
Text-edit area to write script. You can edit the script in the Design, Emulate, or Run modes, but any errors are only detected in the Run or Emulate modes. TIP: While in the Script area, press F1 for help on the Lua scripting language. |
Information bar at the top of the script |
Click the yellow "Save changes" bar to reload (not run) the script. Syntax errors are indicated in a red bar at top-right, as well as in the Debug Output area. |
Debug Output |
Displays error messages from the Lua engine describing errors in the script, and displays any "print" output. The output is limited to 16 lines. |
If you open a Q-SYS 3.3 or earlier design containing a Control Script component in Q-SYS 4.0 or later, the component with become a Control Script v1 component. The existing v1 script will continue to function as before. However, if the v1 script is pasted into a newly placed Control Script component, it will most likely fail. We have made it simpler to convert a v1 script to v2 by adding a property to the Control Script v1 block by adding a property to use the New Script Engine (Yes/No). This is to avoid having to copy and paste code to a v2 Script component.
Property |
Function |
Choices |
---|---|---|
Input Count |
Sets the number of inputs. |
0 to 512 |
Serial Count |
Sets the number of serial connections. Use with the Core, I/O Frame, and Page Station Serial Port components. |
0 to 512 |
Output Count |
Sets the number of outputs. |
0 to 512 |
New Script Engine |
Available only when a Control Script V1 is contained and selected in Q-SYS Designer 4.0 or later. You can select the New Script Engine or not. The Control Script V1 can be used in Q-SYS 4.0 or later, however it is not available in the 4.0 or later Schematic Library. |
No / Yes |
The available Control Pins depend on settings in Properties.
Pin Name |
Function |
Pins Available |
---|---|---|
Code |
Text input and output. Allows you to enter code. |
Input / Output |
Script Start |
Starts the script running. |
Input / Output |
Script Status |
Current status of the script. |
Output |
Script Stop |
Stops the script. |
Input / Output |
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