Working With Strings; Buffer_Input - Crestron SIMPL+ Programming Manual

Crestron simpl+ software: software guide
Hide thumbs Also See for SIMPL+:
Table of Contents

Advertisement

Crestron SIMPL+

Working with Strings

Programming Guide – DOC. 5789A
Pulse(PULSETIME, vproj_on);
}
Wait (1500, sysOnWait2) // 15 second delay
pulse(PULSETIME, vproj_video);
} // end of push event
PUSH system_off
{
CancelWait(sysOnWait1);
CancelWait(sysOnWait2);
Pulse(2000, screen_up);
Pulse(PULSETIME, vproj_off);
Pulse(PULSETIME, vcr_off);
Pulse(PULSETIME, dvd_off);
Wait(500, sysOffWait)
{
Pulse(9500, lift_up);
Pulse(PULSETIME, lights_pre_3);
}
} // end of push event
Notice that in this example, the CancelWait function was used to cancel any pending
waits when the SYSTEM ON or SYSTEM OFF buttons were pressed. This is
analogous to using the reset input on the Delay symbol in SIMPL.
In "Working with Data (Variables)" on page 13 the concept of the BUFFER_INPUT
was discussed. This section provides a more in-depth treatment of working with
incoming serial data.

BUFFER_INPUT

To review what was discussed earlier, serial data entering a SIMPL+ program may
be treated as either a STRING_INPUT or as a BUFFER_INPUT. What is the
difference, and which one should be used?
The difference between a STRING_INPUT and BUFFER_INPUT is quite simple.
The value of a STRING_INPUT is always the last value of the serial signal that
feeds it from the SIMPL program. This means that every time new data is generated
on the serial signal in the SIMPL program, the STRING_INPUT variable in the
SIMPL+ program changes to contain that data; any data that was previously
contained in that variable is lost.
BUFFER_INPUTs on the other hand do not lose any data that was stored there
previously. Instead, any new data that is generated onto the serial signal in the
SIMPL program is appended to the data currently in the BUFFER_INPUT variable.
Software
• 45
SIMPL+

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SIMPL+ and is the answer not in the manual?

Table of Contents

Save PDF