Crestron SIMPL+ Reference Manual page 86

Language reference guide
Hide thumbs Also See for SIMPL+:
Table of Contents

Advertisement

Software
®
76
SIMPL+
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.
Crestron SIMPL+
Language Reference Guide - DOC. 5797G
®

Advertisement

Table of Contents
loading

Table of Contents