EasyManua.ls Logo

Crestron SIMPL+ - Page 86

Crestron SIMPL+
374 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Software Crestron SIMPL+
®
76 z SIMPL+
®
Language Reference Guide - DOC. 5797G
Example:
STRING_INPUT some_data$[100];
ANALOG_OUTPUT level;
CHANGE some_data$
{
level=48;
}
When the STRING_INPUT changes, the ANALOG_OUTPUT level will have the
value 48 put into it. If the same data comes in on some_data$, the CHANGE block is
executed again.
ANALOG_INPUT ThingsToAdd[20];
ANALOG_OUTPUT Sum;
INTEGER I, Total;
CHANGE ThingsToAdd
{
Total=0;
FOR(I=0 to 20)
if (IsSignalDefined (ThingsToAdd[I]))
Total = Total + ThingsToAdd[I];
Sum = Total;
}
In this example, an array is used to hold elements to add. When any element of the
array changes, the sum is recomputed and issued on an analog output variable.
Version:
SIMPL+ Version 3.00 - local variables are allowed within CHANGE statements.
SIMPL+ Version 2.00 for ANALOG_INPUT, BUFFER_INPUT,
DIGITAL_INPUT, and STRING_INPUT arrays as <variable_name>.
SIMPL+ Version 1.00 for everything else.

Table of Contents

Other manuals for Crestron SIMPL+

Related product manuals