Crestron (Loading) Code Guide

This guide contains information about the steps and tools necessary to open, modify, compile, and upload files to the Crestron control systems currently in use by the ClassTech division. It will be useful to field technicians of ClassTech, and anyone else wishing to know more about how the control system works. It does not cover any programming techniques for Crestron.

Getting Started

Acquiring the Crestron software tools

Use “Customer Number” to create a Cestron login. Once you have completed your login, click “Products” then “Software and Firmware.” Click through the license agreement, and download the “Crestron Master Installer.”

Figure 1: Customer Number
Figure 1: Customer Number

Next, install and run the Crestron Master Installer. For the systems in use by ClassTech, you will need to install the following applications (note: your screen will look different from this):

  1. Crestron Database
  2. DEAL for Windows
  3. Device Database
  4. SIMPL+ Cross Compiler
  5. Toolbox
  6. SIMPL Windows
  7. VisionTools Pro-e
Figure 2:  Files to Install
Figure 2:  Files to Install

Download and install these files. You do not need to keep the downloaded files after they are installed.

What does this software do?

Crestron Database, Device Database, and SIMPL+ Cross Compiler are support files for SIMPL Windows.SIMPL Windows is the software used to create the backend programs for the Crestron hardware. VisionTools Pro-e (VTProE) is the program used to create the graphical interface only for the Crestron touchpanels (NOT the control processors). Toolbox is a utility software that can be used to set device settings on both touchpanels and control processors, upload program files, configure the webservers, reload firmware, and various other tasks that may need to be done in order to monitor and troubleshoot Crestron devices.

Compiling an application

For NC State, the typical Crestron system program consists of two parts: the control processor code, and the touchpanel code. The two devices each have a unique embedded OS and hardware platform, and essentially run independently of each other. They communicate with each other using nothing but “join numbers,” as opposed to analog/digital line/pixel information of your typical VGA/DVI monitor. The configuration is different from how the typical desktop PC and monitor are connected, with the monitor merely being a display device for the PC. With the Crestron system, the control processor could be unresponsive, while the touchpanel continues providing basic feedback (button press sounds, page flips, etc.).

Figure 3:  Join Number Pathway
Figure 3:  Join Number Pathway

What this means for compiling code is that the two devices need to have their code compiled and uploaded separately.

Compiling the Touch Panel code

Figure 4:  Compiling the Program
Figure 4:  Compiling the Program

Figure 4 shows where the “Compile” option is in the file menu. You can choose this or press the “F12” key on your keyboard. Figure 4 also points out how the join numbers appear in the VisionTools (VTProE) interface. These join numbers are hardcoded in both the touchpanel code and the control processor code, which means that you can’t change the join numbers in one file, and not the other, without resulting in unpredictable behavior. This also means that touchpanels with code for a particular program can be hooked up to another program, and appear to work properly (button presses, etc.), but have completely unpredictable behavior.

With the exception of fonts, VTProE files are completely portable. The graphics used in the touchpanel are embedded into the file, and they generally compile without issue, as long as the software is installed correctly. Sometimes a message will appear warning about firmware compatibility issues. For the current variant of the programs used at NC State, this will only affect loading to a TPS-2000 touchpanel. If you are loading to a TPS-2000, you will need to download the firmware update from Crestron’s website for this touchpanel.

Once compiled, you need to transfer the file. You will see a window similar to this automatically pop up:

Figure 5:  Connecting to a Touch Panel
Figure 5:  Connecting to a Touch Panel

For most of the systems on campus, you must use an “Indirect” connection. To create the connection, you first click “Add Entry” (Step 1), give the connection a name (Step 2), choose “Indirect” (Step 3), then set the “Through” connection (Step 4). The way an indirect works is that the software connects to the control processor, which then redirects the connection to the touchpanel through the proprietary Cresnet connection. You must already have a proper connection to a control processor configured and set up to connect to the touchpanel indirectly, and this connection must be set in the “Through” menu (step 4 on figure 5). Once this is done, click “OK” to choose the file transfer options.

Figure 6:  Communications Pathway to Crestron Touch Panel
Figure 6:  Communications Pathway to Crestron Touch Panel

The Cresnet connection is a basic serial connection, and is only capable of transferring files at a maximum speed of about 6 Kilobytes per second, so large files will take some time.

Figure 7:  File Transfer Window
Figure 7:  File Transfer Window

If you are simply modifying an existing program, you can choose the “Send Modified Files Only” option. Make sure the touchpanel type is the correct kind for the file you’re loading, and that you’re loading the correct program, then click “Send.” One way to make sure you’re loading the correct program is to check the file path in the “Loaded Project Information” frame to see if the file you opened has the same file name.

If this completes successfully, you are done! If the file transfer fails, the most likely issue is going to be a connection problem between your computer and the control processor, or the control processor and the touchpanel. There could also be a hardware failure in either the control processor or the touchpanel. Figure 6 shows the various items where a communications breakdown can happen for a file transfer. Ensure all of the devices and connections are working if you encounter an error in the file transfer.

Compiling the Control Processor Code

Compiling the control processor code is practically identical to compiling the touchpanel code. As shown infigure 8, there are three ways to compile a project: Choose “Convert/Compile” from the project menu, press the “F12” button on your keyboard, or click the Compile button on the toolbar. Assuming the program is set up correctly, the file will begin to compile. Sometimes Windows will report SimplWindows as being non-responsive during the compile process, but this is generally not the case. If this happens, just wait about two minutes and the compile progress will resume.

Figure 8:  Compiling SimplWindows Code
Figure 8:  Compiling SimplWindows Code