Difference between revisions of "Use Scripts in xAP Floorplan"

From XAP Automation
Jump to: navigation, search
 
Line 1: Line 1:
[[xAP Floorplan]] is an extremely powerful application that allows a number of scripting types to be created. The easiest to use are the [[Auto Scripts]]which can perform a number of actions on well known devices and for many people these are sufficient.
+
[[xAP Floorplan]] is an extremely powerful application that allows a number of scripting types to be created. The easiest to use are the [[Auto Scripts]] which can perform a number of actions on well known devices and for many people these are sufficient. However, for those with some basic VBScript skills 'Raw Scripts' can be created which allow more control and access to more devices, especially those that are 'Raw' including xPL bridged ones.
 +
As an example, here is a simple application which is triggered by a push switch connected to a Netiom which initially turns on a light, in this case a DMX connected one using the [[xAP DMX512]] interface but it could be C-BUS, X10, Dynalite, etc., and with each subsequent press increases the level. After 10 seconds of no activity then another press will turn off the light.
 +
It shows a number of the basic functions in use:
 +
<P>LogDebug - for status logging/debugging</P>
 +
<P>Global Variables - used to maintain the state of the light</P>
 +
<P>Get BSC State - to check the Netiom input</P>
 +
<P>Send BSC - to send the on/off and level to the DMX controller/light</P>
 +
 
 +
There are two scripts, one linked to the Netiom BSC in the 'Script to run on change' field in 'Basic Devices'.
 +
[[Image:Tutorial1-1.JPG]]
 +
The other is executed when the timer expires to reset the global variable.
 +
 
 +
Script 1 - Kitchen1toggle
 +
 
 +
Script 2 - Kitchen1toggleoff
 +
 
 +
You could extend these to go down after reaching a maximum.

Revision as of 09:27, 30 August 2006

xAP Floorplan is an extremely powerful application that allows a number of scripting types to be created. The easiest to use are the Auto Scripts which can perform a number of actions on well known devices and for many people these are sufficient. However, for those with some basic VBScript skills 'Raw Scripts' can be created which allow more control and access to more devices, especially those that are 'Raw' including xPL bridged ones. As an example, here is a simple application which is triggered by a push switch connected to a Netiom which initially turns on a light, in this case a DMX connected one using the xAP DMX512 interface but it could be C-BUS, X10, Dynalite, etc., and with each subsequent press increases the level. After 10 seconds of no activity then another press will turn off the light. It shows a number of the basic functions in use:

LogDebug - for status logging/debugging

Global Variables - used to maintain the state of the light

Get BSC State - to check the Netiom input

Send BSC - to send the on/off and level to the DMX controller/light

There are two scripts, one linked to the Netiom BSC in the 'Script to run on change' field in 'Basic Devices'. Tutorial1-1.JPG The other is executed when the timer expires to reset the global variable.

Script 1 - Kitchen1toggle

Script 2 - Kitchen1toggleoff

You could extend these to go down after reaching a maximum.