23.02.2014 Views

Rack Palette - Operators Manual - Strand Lighting

Rack Palette - Operators Manual - Strand Lighting

Rack Palette - Operators Manual - Strand Lighting

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Macros and Show Control<br />

f:close()<br />

If you had four sensors, one in the Entrance, one at the Exit, one in the Theater and<br />

one in the Great Hall, the log file may look like this:<br />

Entrance was tripped at 11:11:37 on 05/15/06<br />

Exit was tripped at 11:11:51 on 05/15/06<br />

Theater A was tripped at 11:12:40 on 05/15/06<br />

Great Hall was tripped at 11:15:52 on 05/15/06<br />

Theater A was tripped at 11:21:22 on 05/15/06<br />

Exit was tripped at 12:01:46 on 05/15/06<br />

Entrance was tripped at 12:22:17 on 05/15/06<br />

Example - Temperature Indicator using Serial Port<br />

Communication<br />

In this example an external temperature sensor is hooked to <strong>Palette</strong> using one of<br />

the serial ports. At specific intervals, the current temperature is read and different<br />

cues are run to indicate to the public, using color or movement, the temperature. A<br />

Time Event with an hourly repeat executes this code:<br />

-- open Com1: with proper parameters<br />

HC.SerialOpen(1,'9600,N,8,1')<br />

-- request temperature from gauge (hex code)<br />

HC.SerialWrite(1,'0x4b')<br />

A very short while later, (enough time for the gauge to respond) this code is called:<br />

-- sucks in temperature as a string<br />

temp = HC.SerialRead(1)<br />

-- close serial port<br />

HC.SerialClose(1)<br />

-- converts the string 'temp' to a number (adding 20)<br />

temp = temp + 20<br />

-- limit the bottom (-20F will be the coldest)<br />

temp = math.max(temp,0)<br />

-- limit the top (110F will be the hottest)<br />

temp = math.min(temp, 130)<br />

-- normalize between 1 and 12 rounding down<br />

cue = 1 + math.floor(temp * 11 / 130)<br />

-- run the cue sequence<br />

HC.CueListGotoAndExecuteFollows('Temperature', cue)<br />

See Also<br />

www.lua.org<br />

Macro Editor and Commands<br />

User Interface Macros<br />

Macro Buttons<br />

Time Events<br />

Triggers<br />

Cue Properties<br />

Blue Box<br />

PowerPoint Automation<br />

<strong>Palette</strong> OS Operations <strong>Manual</strong> 286

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!