Crestron SIMPL+
Programming Guide – DOC. 5789A
SIMPL+ program. The value of any output is the value of the signal as seen by the
outside SIMPL program at that instant. This is critical considering that SIMPL+ does
not necessarily "propagate" outputs to the SIMPL program each time they are
changed in the program. As a general rule, assume that analog and serial outputs are
propagated at the time they are assigned new values. However, digital signals are not
propagated until a task switch occurs.
This explains reading values of analog and digital outputs, but why is it that string
outputs cannot be read? The reason has to do with the nature of serial signals in
SIMPL. Namely that these signals do not actually store strings in them, but rather
point to locations in memory where a string exists. Since the data stored at a
particular location in memory can change at some later time, there is no guarantee
that the string data is still there. As a result, SIMPL+ does not allow a string output
to be examined.
Examine the following code example.
DIGITAL_OUTPUT d_out;
ANALOG_OUTPUT
STRING_OUTPUT s_out;
PUSH someEvent
{
d_out = 1; // set this digital output to 'on'
a_out = 2000; // set this analog output to 2000
s_out = "hello"; // set this string output to "hello"
if (d_out = 1)
Print ("d_out is on\n");
if (a_out = 2000)
Print ("a_out = 2000");
if (s_out = "hello")
Print ("s_out is hello"); // nature of serial signals
ProcessLogic();
if (d_out = 1)
Print ("d_out is on\n");
}
Function Main()
{
d_out=0;
a_out = 0;
}
a_out;
// this WILL NOT be true until the
// next task-switch
// this WILL be true
// this WILL NOT be true due to the
// force a task-switch
// NOW this is true
// initialization
Software
• 15
SIMPL+
Need help?
Do you have a question about the SIMPL+ and is the answer not in the manual?