Making It Work - Crestron SIMPL+ Programming Manual

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

Advertisement

Software
4 • SIMPL+
Function Main
{
Print( "I am born!"\n );
}
This causes the text "I am born" to be sent out the computer port only upon startup.
To save the file, from the menu, select File | Save. Assign the name, My first
SIMPL+. To compile the file, select Build | Save and Compile. This command
saves the code module, compiles it, and tells SIMPL Windows how to present it to
the SIMPL programmer. SIMPL+ version 2.0 requires that all SIMPL+ modules
reside in the User SIMPL+ directory (this can be checked in SIMPL Windows by
selecting Edit | Preferences and clicking on the Directories tab). In SIMPL+ 3.0
and later, SIMPL+ modules can also reside in the corresponding SIMPL Windows
Project Directory, where the SIMPL Windows program also resides.
Each time the program is saved, an "update log" appears at the bottom of the screen.
This log shows the results of the save, compile, and update process that just
occurred. Review and become familiar with it. The window should display
something similar to this code:
Compiling c:\Crestron\simpl\usrsplus\my first simpl+.usp
Total Error(s): 0
Total Warning(s): 0
SIMPL+ file saved successfully
No errors found: SIMPL Windows Symbol Definition updated
This first SIMPL+ program is complete. The next section explains how to
incorporate this program into the required SIMPL Windows wrapper, and how to run
and test it.

Making it Work

This section describes how to make the simple SIMPL+ program written in the last
section work inside a Crestron control processor. As was mentioned earlier, SIMPL+
programs cannot run all by themselves. They must be enclosed inside a SIMPL
wrapper. This section discusses how to set up this program in SIMPL Windows.
Create a new SIMPL Windows program and add a control processor from the
Configuration Manager. Notice that only CNX-series or 2-Series control processors
are compatible with SIMPL+. For this example, use the Test Manager to trigger the
digital input. As a result, there is no need to define a touchpanel or other user-
interface device, although it is even better if one is available for testing.
After system is configured, switch to the Program Manager and make sure that the
symbol library pane is visible on the left-hand side of the screen. Find the User
SIMPL+ folder and open it. An icon representing the SIMPL+ program written in the
previous section appears. Drag this icon into the Logic folder in the Program View
pane. The SIMPL+ program now becomes just another symbol in the program.
Double click on the logic symbol to bring it into the Detail window. It should have a
single input, labeled "speak." This of course corresponds directly to the declarations
section of our SIMPL+ code, where only a single input and no outputs were defined.
Define a signal for this input. The signal name here is not important, but for this
example, call it "test_me." Also note that if a user interface was defined in an earlier
step, assign this same signal to a button press.
That's it! The first program is complete. All that is left is to compile the whole thing,
transfer it to the control processor, and test it. As in SIMPL Windows, compile the
Crestron SIMPL+
Programming Guide – DOC. 5789A

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents