Essentials of Crestron Programming
Essentials of Crestron Programming 2
Essentials of Crestron Programming Introduction The intent of this workbook is to review the design and programming of the Virtual Presentation Room project discussed in the Essentials of Crestron Programming class. The class introduces programmers to important SIMPL Windows and VTPro‐e programming techniques, and how they apply to Crestron control systems. This includes an understanding of how control systems use touchpanels and keypads as user interfaces.
Essentials of Crestron Programming Crestron VisionTools Pro‐e Example VTPro‐e Project Open the classroom touchpanel project, “Essentials Class Master TP.vtp”. This project is designed for a TPS‐15G‐QM and provides buttons for source selection and volume, screen and drape control, and lighting control. It also provides subpages that contain the transport controls for each source type.
Essentials of Crestron Programming To make a subpage visible or hidden, right‐click the subpage reference and select or clear the check mark next to Visible. The detail view in the center of the screen is is where you design the layout of each page and draw objects. The property grid on the right side of the screen is a tree that consists of all the properties that can be assigned to the selected object, page or subpage.
Essentials of Crestron Programming The new project will be visible in the ProjectView tab. If the classroom project is also open, then both projects will be listed in the tab. To create a new page button. (The down arrow next to the button allows you Click the Create New Page to select a theme, if one is available for the given panel type.) Type a name for the page. For the example project, type “Main” and click OK.
Essentials of Crestron Programming Every project in VTPro‐e must have a home page; if you don’t mark a page as first, then you will be prompted to do so when saving the project. Page Properties Selecting the Main page will display the page properties. Display grid = Select Yes or No to display or hide the alignment grid. (You can also specify the grid size in pixels.) Displaying the grid provides a visual guide when aligning objects. Hiding the grid allows you to see the page design.
Essentials of Crestron Programming Create the Power button tool and drag out a small button on the upper left corner of the Click the Button page, as seen in the classroom project. This button will toggle the system power on and off. Select the button to display the properties in the property grid tree. An alternative method to assign properties is to double‐click the object to open the Properties dialog. However, Crestron recommends using the property grid to set properties.
Essentials of Crestron Programming The Active State and Inactive State entries in the tree allow you to specify the button’s appearance in the active (pressed) and inactive (released) states. Synchronize States VTPro-e allows you to synchronize selected state properties between the active and inactive states. This means that if synchronization is turned on, state properties such as frame thickness will be applied automatically to both the active and inactive states.
Essentials of Crestron Programming Active text color = red. The red active text color signifies that when the button is pressed and the button is in the active state, the text label will turn red. When the button is released, the text color will be blue again. State Style = Shaded Contrast and Depth = minimum (25%). This gives the button a flat appearance. Frame = Medium Thickness with 2D style.
Essentials of Crestron Programming Style and Shape Aliased = Yes Style = None Shape = Radius – 3. The radius setting rounds the corners of the button. When anti‐aliasing is selected, this smooths out rough edges and corners that may be visible with objects of a certain size or color. Otherwise, the Aliased setting is the same as “unaffected”. Digital Press Join Select the “Digital Press Join” property and assign digital press join 7 to the Power button.
Essentials of Crestron Programming handles turn to small padlocks). To unlock, select No. (In the example project, all Lock properties are set to Yes.) Simulation Mode These feedback options only have an effect if Simulation Mode is enabled (by selecting the Simulation Mode check box on the Compile tab of the Project Properties). Simulation mode enables VTPro‐e to generate a .SIM project suitable for client demonstrations.
Essentials of Crestron Programming inactive. Toggle: The buttonʹs feedback will toggle between the active and inactive state with each mouse click. To copy an object Click the object to select it. Press Ctrl+C to copy the object to the clipboard, and Ctrl+V to paste. ‐or‐ Use the Copy and Paste commands on the Edit menu. Drag the newly copied object to the desired position on the page. and drag the cursor across all the To select multiple objects click the Select tool objects to be copied.
Essentials of Crestron Programming Click the Border tool and drag out a box long enough to fit the two Up and Down screen buttons. Position the border under the Power button, as shown in the example project. Set the following Border properties: Text = “Screen” Align the text on the top center of the border. To do this, click the Alignment property and select Upper Center. Appearance To make the border face transparent click the Face Color Flag property and select Transparent.
Essentials of Crestron Programming Create two button objects inside the border and label them as shown in the classroom project. One button will be labeled Up, and the other, Down. Assign the Up button digital press join number 21, and assign the Down button digital press join 22.. The Up and Down digital press joins will be mapped to the corresponding digital outputs ( and ) and digital inputs ( and ) of the touchpanel symbol in SIMPL Windows.
Essentials of Crestron Programming Create the Lights Button Create a button labeled “Lights” with digital press join number 31. Position it at the bottom left corner of the page. The Lights digital press join will be mapped to the corresponding digital output () and digital input () of the touchpanel symbol. The signals will control the display of the Light Presets subpage, described next, and enable the user to select a lighting preset.
Essentials of Crestron Programming Subpages and Subpage References Subpages are designed to appear on top of a standard page when needed, and then to disappear when no longer necessary. Subpages are not typically the same size as a page. Instead, a subpage often defines a smaller area that may contain buttons for controlling transport functions, for example, or a message about lamp life.
Essentials of Crestron Programming The Lighting Presets subpage contains four lighting buttons arranged horizontally. The subpage is designed to appear on the bottom center portion of the Main page when the “Lights” button is pressed. To create a subpage Click the Create New Subpage button. Type a name for the subpage. For the example project, type Lighting Presets and click OK. This will create a subpage the size of a standard page.
Essentials of Crestron Programming Type the dimensions in the Width and Height fields. This will resize the subpage to the indicated dimensions. Draw four buttons on the subpage arranged horizontally. Label and assign digital press joins to the buttons as follows: “High” (join 32), “Medium” (join 33), “Low” (join 34) and “Off” (join 35). button to close the subpage window, and click Yes when prompted Click the Close to save the changes.
Essentials of Crestron Programming Select the subpage to display the subpage reference properties. Assign a digital feedback join of 31. The digital feedback join is mapped to the corresponding digital input () on the touchpanel symbol in SIMPL Windows. When the input goes high, the subpage appears on the page, and when it goes low, this hides the subpage.
Essentials of Crestron Programming Create source buttons and indirect text field tool and drag out a border that will fit the source selection buttons. Click the Border The border should have a Transparent face color and no text label. Add four buttons inside the border, arranged horizontally. Label the buttons: “DVD”, “Apple 1”, Apple 2” and “DSS”. Click Assign The Click Assign tool allows you to quickly assign join numbers and other properties to multiple objects.
Essentials of Crestron Programming Click Start at the Selected Join. This will enable the Starting Join list. Select 51 as the starting join. This signifies that the numbering of the digital press joins will start at digital press join 51. Click OK. The cursor will now turn into a hand icon. Click the DVD button. This will automatically assign digital press join 51, which will be indicated on the status bar. Click the Apple 1, Apple 2, and DSS buttons. This will assign digital press joins 52, 53 and 54.
Essentials of Crestron Programming The Click Assign toolbar allows you to click assign such additional properties as: Style: Select the Click Assign Style tool and select the desired style properties. For the example project, the Style is set to Aliased – None. The State Style is set to Shaded, with the minimum setting for Contrast and Depth. Frame Style: Select the Click Assign Frame Style tool and select the 2D option. Frame Thickness: Select the Click Assign Frame Thickness Medium option.
Essentials of Crestron Programming Another way to assign properties to multiple objects An alternative method to Click Assign is to multi‐select the objects, and then set the common properties in the property grid, as follows: 1. Press the Shift key and click each source button. This will select all four buttons. The property grid will indicate that 4 buttons are selected. 2. Set the desired properties. This will set all the selected buttons to the same properties.
Essentials of Crestron Programming This button will have no button press functionality, but rather will be used display text indicating which source is currently selected. As the selected source changes, the displayed text will also change. In the property grid set the Synchronize States property to Yes, and leave the Digital Press Join field blank since pressing the button will have no effect. Go to the Inactive State or Active State and expand the Indirect Text property.
Essentials of Crestron Programming To program reserved joins Create a transparent border and label it “Panel”. (Align the text on the top right corner of the border.) Create two buttons, labeled Up and Down. Assign the the same appearance properties as the other buttons on the page. On the Up button, select the Digital Press Join property, and click the down button. This will display the list of all reserved joins. arrow Select the function “LCD Brt Up” from the Reserved Join list.
Essentials of Crestron Programming Select the gauge and click the Analog Feedback Join property. Select the “LCD Brt” reserved join from the list. This signifies that the gauge will display the brightness level.
Essentials of Crestron Programming Add Clock and Date tool and draw a clock on the upper right corner of the Main page. Click the Clock The Clock object will display the time of day according to the format shown in the property grid. Click the Button tool and draw a button under the Clock object. This button will display the date, as parsed from the internal control system clock. In the button property grid, expand the Indirect Text property. Enable indirect text and assign serial join 1.
Essentials of Crestron Programming Create Volume Controls Create a transparent border labeled “Volume”, to be positioned on the center right portion of the Main page. Create three Volume control buttons labeled Up, Down and Mute, and three volume preset buttons labeled 25%, 50% and 75%.
Essentials of Crestron Programming 50% (Digital press join 15) 75% (Digital press join 16) The Volume buttons will be used to adjust the volume level up and down, mute the volume, and recall volume preset levels specified in the SIMPL Windows program. tool and draw a transparent slider. Assign Analog Touch/Feedback Click the Slider join 1. The slider object allows the user to adjust the volume by setting the level with their finger.
Essentials of Crestron Programming The Analog Feedback joins are mapped to the corresponding analog inputs ( through ) on the touchpanel symbol in SIMPL Windows. Video Windows The classroom project includes a button labeled “Video” on the Main page. This button displays a small preview of the currently selected video source. When the user presses the Video button, the project flips to a full‐page video window.
Essentials of Crestron Programming Page Flips The properties of a button object allow you to assign a “page flip”, which signifies that when the button is pressed the page will flip to a specified target page. This allows the user to navigate between pages of the project without need to program the page flips in SIMPL Windows. tool and draw out a button the size of While still on the Video page, click the Button the entire page. This means the button will completely cover the Video window.
Essentials of Crestron Programming When objects are stacked on top of each other, you can use the Depth commands (on the Layout menu) to bring an object to the front or back, or to move it up or down one level. Close the Video page and re‐open the Main page. Now it will be necessary to create a small video object and button that will allow the user to preview the video and flip to the full‐size Video page.
Essentials of Crestron Programming Click the Button tool and create a button that covers the video object. In the Properties of the button, remove the text label and assign Transparent face color. Set the frame thickness to None. Click the Page Flip property and select “Video” as the target page. This signifies that when the user presses the button, the page will flip to the full‐size Video page.
Essentials of Crestron Programming To create the DSS subpage Click the Create New Subpage tool. Type a name for the subpage. For the example project, type DSS Controls and click OK. This will create a subpage the size of a standard page. Click and drag the sides of the subpage window until the window appears to be the appropriate size. Then position the cursor on the lower left corner of the resized window and take note of the dimensions (width, height) that appear in the status bar.
Essentials of Crestron Programming This will resize the subpage to the indicated dimensions. Create Keypad buttons Click the Button tool and draw out a button for the numeric keypad. Use the Copy and Paste method to create twelve keypad buttons in all. Arrange the buttons in a keypad configuration. Click Assign Button Text Click the Click Edit Text tool. This will turn the cursor into a hand icon. Click the top left button to enable the button’s text field. Type “1” in the text field.
Essentials of Crestron Programming If text doesn’t fit, you can adjust the size of the font in the property grid (Font property). Press the Esc key to turn off Click Assign. Use Click Assign to assign the following digital press joins: button 1 (join 101) through button 9 (join 109), Enter button (join 99), button 0 (join 100) and Cancel button (118). The digital press joins map to the corresponding digital inputs and outputs of the touchpanel symbol in SIMPL Windows.
Essentials of Crestron Programming Create the navigation buttons Use the Button tool to draw a button that will be programmed as the Up navigation button. In the property grid expand the Font property. Select Crestron Transport or Crestron Transport Outline from the Font list. The Crestron Transport font consists of symbols that represent transport functions such as Pause, Play or Rewind.
Essentials of Crestron Programming Type K (corresponding to the Up navigation function) in the text field. Under Style and Shape, select Aliased and Elliptical. Draw three additional buttons, to be programmed as Left, Right and Down navigation buttons. Multi‐select all the navigation buttosn and use the property grid to set them all to the Elliptical shape. Use Click Assign to assign the following properties: tool. Then select Crestron Transport as the font.
Essentials of Crestron Programming Graphics The DSS Controls subpage in the example project includes channel preset buttons with graphics: To import an image into the project Click the ResourceView tab. Right‐click the top‐level project folder and click Import Image. Locate the graphic file and click Import. This will create a new folder called Image Files, which will contain the graphic.
Essentials of Crestron Programming To import an image from another VTPro‐e project With both projects open and the ResourceView tab selected, drag the image from the Image Files folder of the original project and drop it on the Image Files folder of the target project. To import an image directly into an object Expand the Graphic property in the property grid. Select the Graphic Resource property and click the down arrow. Select Import. Locate the directory where the image file is located.
Essentials of Crestron Programming The Graphic Size property provides a number of sizing options, such as stretching the image to cover the entire button. For the example project select “Original Size/Shrink to Fit/0 pixel offset”. Create the remaining channel selection buttons using Click Assign. Click Assign Graphics 1. Select the Click Assign Graphic tool. 2. Select Project Graphic Resources as the property to modify. 3. Select cbs.bmp.
Essentials of Crestron Programming 4. Click the button that will be used to select the CBS channel preset. 5. Adjust the “Size” property as described before. 6. Repeat steps 1 through 4 for each of the preset buttons: ABC, CBS, ESPN, FOX, HBO and NBC. Use Click Assign to assign digital press join numbers: ABC = 119, NBC = 120, CBS = 121, FOX = 122, HBO = 123, ESPN = 124. The digital press join number map to the corresponding outputs and inputs of the touchpanel symbol in SIMPL Windows.
Essentials of Crestron Programming Create the remaining subpages The classroom project includes two additional subpages that contain the transport controls for the DVD player and Apple TVs.
Essentials of Crestron Programming The procedure for creating the additional subpages is the same as for the DSS and Lighting Presets pages. The only new element in these subpages is the inclusion of two separate fonts on the same button. For example, three of the Apple TV subpage buttons contain both text and transport symbols: This is accomplished by creating a Text object on top of a Button object, as follows: Create a button and label it “Track –“. Position the text on the upper center of the button.
Essentials of Crestron Programming Simulation File Simulation mode enables VTPro‐e to generate a .SIM project suitable for client demonstrations. The simulation project is an XPanel executable that demonstrates the touchpanel project on the customerʹs PC without need to connect to any equipment. After the project is compiled in simulation mode, VT Pro‐e creates a .SIM project folder in the designated projects directory. The .
Essentials of Crestron Programming Interlock: If this option is selected, the buttonʹs feedback will be interlocked with another button or group of buttons. (The other button(s) must also be assigned interlocked feedback.) When the button is clicked it will display in the active state until another button with interlocked feedback is clicked. In this way only one button in the interlock group will show active feedback at one time.
Essentials of Crestron Programming Crestron SIMPL Windows We have seen how you can use VisionTools Pro‐e to create powerful touchpanel control interfaces that include pop‐up subpages for specific device transport controls, dynamic text, multi‐mode buttons, high‐resolution graphics, video windows, and more. We also saw how VTPro‐e uses join numbers to identify button presses, feedback, and other digital, analog and serial signals.
Essentials of Crestron Programming Virtual Presentation Room The SIMPL Windows program that controls the Virtual Presentation Room is based on a PRO2 control system. The equipment rack also includes a CNX‐PAD8A switcher and CNAMPX‐2x60 audio amplifier. Non‐Crestron equipment includes the audio/video source devices.
Essentials of Crestron Programming The PRO2 provides slots for control via RS‐232, IR, relays, Cresnet and Ethernet. (The Ethernet connection to the touchpanel is for uploading files.) To create a new SIMPL Windows program 1. Start SIMPL Windows and click the New SIMPL Program button. You can open several instances of SIMPL Windows at one time. For example, you can open the classroom program titled “Essentials Master Program Ver1.
Essentials of Crestron Programming 3. Add the control processor by dragging it from the Control Systems folder of the Device Library to a Systems Views window. Or double‐click the text in the lower System Views window and select the control system. (For example, select the PRO2 to re‐create the classroom program.) About Configuration View The Configuration View allows you to do the following: • Select the control system.
Essentials of Crestron Programming • Select additional Crestron hardware required for the installation. This can include plug‐in control cards, network control modules, touchpanels, and wireless remotes. • Select user devices made by third‐party manufacturers. These are usually the devices being controlled and can include CD players, DVD players, TVs and any other equipment the end user interfaces with using the control system.
Essentials of Crestron Programming If you add a Cresnet device to the top‐level C2NET‐Device slot, SIMPL Windows will auto‐assign the Network ID, first by the default factory ID and then sequentially. To quickly add multiple devices, right‐click the device in the Device Library and select Add multiple copies from the submenu. Then enter the number of devices and click OK.
Essentials of Crestron Programming 2. Double‐click the C2Z Card Slot and select the desired Ethernet card.
Essentials of Crestron Programming User Devices User devices include any third‐party AV devices the end user interfaces with through the Crestron control system. The User Devices folders in the Device Library include hundreds of driver files that control devices in a number of formats, the most common being IR. In fact, the User DB and Project DB folders contain only IR devices. To add an IR device, the control system must have an IR card installed.
Essentials of Crestron Programming The submenu also includes the option to display the device functions, which can help you verify that the device provides the expected commands. Click Show IR Functions to view the commands. Relays Many devices employ internal electronics that allow functions to be triggered through a simple electrical contact. In the world of control systems, this is accomplished using relays. Devices such as screens, drapes and projector lifts tend to use this type of interface.
Essentials of Crestron Programming Virtual Presentation Room Equipment List Use the methods described in this section to add the following Cresnet, Ethernet and user devices: Cresnet Interfaces (add to Slot 09) TPS‐15G‐QM C2N‐FTB CNX‐BF12 CNX‐B2 Ethernet Interface (add to previously added Ethernet card on Slot 08) XPanel Switchers (Cresnet, add to Slot 09) CNAMPX‐2x60 CNX‐PAD8A Lighting Module (Cresnet, add to Slot 09) CLX‐1DIM8 User Devices (IR, add to Slot 05) Toshiba HDA2 (DVD Player, Port A) Apple TV (D
Essentials of Crestron Programming Device Settings Once you have added a device, you can double‐click the device to bring up the Device Settings dialog. This dialog provides a number of configuration options, which may differ depending on the device type. Device Name: Use this tab to change the default name of the device and enter a device location. The new name will appear in the System Views and Program View, as well as in the title bar of the deviceʹs symbol.
Essentials of Crestron Programming Ethernet/Serial Upload Address (touchpanels only): Use these tabs to configure an alternate upload address (if any) that will be used to upload files to the touchpanel. For example, in the Virtual Presentation Room program, the TPS‐15G‐QM is connected to the control system via Cresnet, but uses an Ethernet address for upload. UI Project (touchpanels only): Use this tab to import the associated VTPro‐e touchpanel project into the SIMPL Windows program.
Essentials of Crestron Programming IP Net Address (Ethernet devices only): Use this tab to configure the IP information of the Ethernet device. To change the IP ID, select the ID from the list. To specify a static IP Address, click Use IP Address and type the address in the text field. (For an XPanel interface, the default address should be set to localhost: 127.0.0.1) If the device is configured for DHCP or has been assigned a host name, click Use Host Name and type the fully‐qualified domain name.
Essentials of Crestron Programming Rename Port 2 to “Screen Down”. Rename Port 3 to “Drapes”. Program View Click the Program button to open the Program View. Program View allows you to do the following: • Add each logic symbol the program will require. • Assign signals to each symbol. • Connect each signal to other symbols or devices as required by the program logic. The Program View consists of three windows: Symbol Library, Program View and Detail View.
Essentials of Crestron Programming Symbol Library The Symbol Library consists of three directories: Logic Symbols: Logic Symbols perform operations that manipulate the states of output signals in the program. Programmers will typically use many logic symbols when programming in SIMPL Windows. Logic symbols allow programmers independent flexibility by offering many different ways to solve a control problem.
Essentials of Crestron Programming The Program View window consists of three directories: Central Control Modules: A tree of the control system’s programmable slots, plug‐in control cards, and hardware devices connected at the assigned network IDs. In SIMPL Windows, all symbol definitions must be ʺcompleteʺ for the program to compile. A symbol that is incomplete will have a *!* identifier in front of it.
Essentials of Crestron Programming Subsystems can be nested, meaning that one subsystem folder can contain other subsystem folders. The Virtual Presentation Room program contains the following subsystems, which allow outside programmers to immediately locate and understand the logic flow: Logic symbols You can bring logic symbols into the program by selecting them in the Symbol Library and dragging them into Program View.
Essentials of Crestron Programming Detail View The Detail View window shows the symbol detail of device symbols and logic symbols in the program. The Detail View is customizable; you can adjust the active layout in Detail View by cascading symbol details or tiling the details vertically or horizontally. For further information on customizing the work space, view the options described in the online help file. Programming Interfaces User interfaces are usually the most convenient place to begin programming.
Essentials of Crestron Programming Feedback Button feedback describes the buttonʹs active appearance. For keypads, feedback is usually indicated with a LED located inside the button housing. For touchpanels, feedback can vary, and often includes changing the frame and text color, along with a simulated 3D appearance. In the TPS‐15‐G‐QM project, the Power button’s text label changes color, and the 3D appearance inverts. Visual Button Feedback Feedback is vitally important to a good user interface design.
Essentials of Crestron Programming Certain buttons may call for more complex feedback. In the Virtual Presentation Room program, for example, the Power button will alternatately turn the system power on and off. To indicate this with feedback, the button should display in the feedback state when the Power is on, and turn off when the Power turns off. Clearly, momentary feedback will not do the trick here, so we must use logic symbols to generate the desired behavior.
Essentials of Crestron Programming Each rising edge of the input will cause the outputs to toggle their state. 4. Define the signals that will be toggled with each rising edge of the Clock input: the signal will be named “Power_On”, because this signal will trigger a series of power events when the system power turns on.
Essentials of Crestron Programming The Interlock symbol will latch an output high on the rising edge of its corresponding input. In addition, any other output signal that was previously high will be latched off. Thus this symbol will have at most one output high at any given time. This property is called break before make. In essence, this symbol will remember which input was last driven high, making it very handy when the user has to select from a number of choices.
Essentials of Crestron Programming The One Shot symbol responds to a rising edge on the input by driving the output signal (connected to ) high for the duration specified by the double‐precision
Essentials of Crestron Programming input. When reset, will go low and (the complement of ) will go high. In this example the signal for Drapes Close is connected to the input, and the signal for Drapes Open is connected to the input. The output of the Latch is connected to the relay itself. When the Latch is set, the signal connected to will be high, thus closing the relay and closing the drapes.
Essentials of Crestron Programming The OR symbol detects when a relevant button has been pressed, and each press will cause the Retriggerable One Shot symbol to be retriggered, thus starting the countdown over again. When 5 seconds have passed with no buttons being pressed, “Light_Presets_FB” will go low. The “Light_Presets_FB” output is routed into the corresponding input of the touchpanel symbol, which will open or close the subpage accordingly.
Essentials of Crestron Programming parameter. The parameter specifies how long it takes from the moment the digital input goes high to the moment that the analog outputs achieve their desired values. During that time the analog outputs will fade linearly. Due to the nature of analog signals in general, the analog output will maintain this value until this symbol or another symbol explicitly changes its value.
Essentials of Crestron Programming 74
Essentials of Crestron Programming The overview of the Lighting logic is given in the following diagram: 75
Essentials of Crestron Programming Source Selection Feedback The programming for source selection feedback utilizes an Interlock‐Toggle symbol, which incorporates Interlock and Toggle functions in one symbol. This is necessary because each source select button will toggle the corresponding transport control subpage open and closed. At the same time, the buttons need to be interlocked so that only one subpage can be active at one time.
Essentials of Crestron Programming routed to the serial input on the touchpanel symbol at , corresponding to indirect text join 2, which was assigned in VTPro‐e. A subsequent rising edge of an input will clear and transmit the new string, so that the current device text will always be displayed on the touchpanel.
Essentials of Crestron Programming More on Serial Strings By default, serial signals are transient, meaning that the data on a serial signal is only valid for the logic wave (defined below) in which it was created. A logic wave is a processor unit of measurement defined as the elapsed time between the moment a signalʹs state changes and the moment that all symbols connected to that signal have been evaluated. This is analogous to the term ʺpropagation delayʺ used when describing digital hardware.
Essentials of Crestron Programming The TOD string is routed to the input of a Serialize Date symbol, which formats the string as specified by the parameter. The value of 4d will format the string as: month/day/year. The resulting formatted string is routed to a Make String Permanent symbol with a Permanent String Size parameter of 50d (50 characters).
Essentials of Crestron Programming The button feedback for the Up and Down buttons is simply momentary feedback. The button will display in the active state for as long as the button is being pressed. When the button is released, the button feedback will revert to the inactive state. The only programming this feedback type requires is to tie the same signal name to both the input and output of the touchpanel symbol.
Essentials of Crestron Programming The Analog Rate Limiter provides one analog input and one analog output. The parameter specifies the time it takes to ramp the output from 0% to 100% (or vice‐versa). As a new target value is seen on the input, the output will smoothly transition from its current level to the target level. In this example the volume preset buttons activate the Analog Initialize symbol, stepping the analog output to the preset levels.
Essentials of Crestron Programming Volume Presets Feedback The Volume Preset buttons must show active feedback when the current volume level is at the preset level. The volume level is also reported by the Percent object on the touchpanel, as well as the Slider object. The output of the Analog Rate Limiter is a raw analog value from 0d to 65535d, whereas the presets are percentages from 0% to 100%. To facilitate the feedback programming, the raw analog value needs to be scaled to 0d to 100d.
Essentials of Crestron Programming The overview of the Volume logic is given in the following diagram: 83
Essentials of Crestron Programming Apple TVs The Virtual Presentation Room features 2 Apple TV servers. This section will discuss how to use Buffer symbols for devices that use a shared set of buttons. The touchpanel project provides one subpage that contains the transport controls for an Apple TV device. This subpage can be called up by either of the two Apple TV sources in the SIMPL program. The Buffer symbol allows the program to determine which Apple TV source the transport buttons will control.
Essentials of Crestron Programming routes the source select buttons through an Interlock‐Toggle , which ensures that only one source can be selected at one time. The overview of the Apple TV logic is given in the following diagram: DSS Presets The DSS touchpanel subpage includes several channel presets. When the user presses a channel preset button, the SIMPL program should trigger the associated numeric keypad entries on the IR driver to set the channel to the selected preset.
Essentials of Crestron Programming Preset 1 corresponds to the HBO preset button on the touchpanel. When the user presses this button the program should set the channel to 119. In the above example the button press is connected to the input of the Stepper. A rising edge of starts the Stepper; the state of has no further effect on the Stepper operation until the entire sequence is complete.
Essentials of Crestron Programming Symbol completeness and commenting out In the above example, the digital input to the module is marked with the special signal name “//”. This section will discuss the concept of symbol completeness and commenting out signals. In SIMPL Windows, all symbol definitions must be ʺcompleteʺ for the program to compile. A symbol that is incomplete will have *!* marker in front of it.
Essentials of Crestron Programming You can collapse a symbol to shorten the signal/parameter list. Otherwise the visible fields must be defined to complete the symbol. Other symbols use different completeness, e.g., a Buffer symbol, which must have an output defined for every defined input. (These symbols expand the inputs, outputs and parameters together if they are related.
Essentials of Crestron Programming -or• Right-click the signal and select Insert special "//" signal. • Select the signal and press Alt+F5. -or- You can temporarily disable symbols in a program by commenting them out. In SIMPL Windows, an excluded symbol will have a comment marker (two forward slashes "//") as a prefix. The compiler ignores any line of code that appears after the comment marker.
Essentials of Crestron Programming User Modules Crestron processors control serial devices using physical standards such as RS‐232, RS‐ 422, and RS‐485. Unlike IR, RS‐232 control does not use ready‐to‐go driver files. Instead, the protocol that the device is expecting will be provided by the manufacturer in the unitʹs documentation.
Essentials of Crestron Programming The internal logic is not visible to users of the module. Thus the Argument Definition can be thought of as a black box; the user does not need to know the inner workings of the symbol to use it in a program. The signal and parameter names used in the Argument Definition become the signal cues that will be appear in the symbol detail.
Essentials of Crestron Programming When you compile a program containing a user module, the Argument Definition symbol disappears and all of the logic defined in the module is physically placed in the program. As described before, the Virtual Presentation Room program implements a very simple module that turns the projector on and off and selects sources. The module consists of one Serial I/O symbol symbol that routes the command strings to the COM port during run time. To create the projector module 1.
Essentials of Crestron Programming • Name the single output cue “To_Device$”. 4. Add a Serial I/O symbol to the Logic folder. 5. Connect the input and output cues of the Argument Definition (except for [~Unused~]) to the inputs and output of the Serial I/O symbol. 6. Use the parameters of each input to specify the command string that will be sent to the projector on the rising edge of the corresponding input.
Essentials of Crestron Programming typically expressed in hex format. 7. Save the Module in the designated user module directory. The module can now be used in a SIMPL Program. SystemBuilder/D3 Pro If the module is intended for use in SystemBuilder or D3 Pro, the module must include a Virtual Serial Driver symbol, which instructs the application how to connect the module to a COM port in the program.
Essentials of Crestron Programming Keypad logic The Virtual Presentation Room program includes a C2N‐FTB flip top box, which has a limited set of buttons. In this example we will see another example of Buffer symbols being used so that a single button press can control the Up and Down functions of multiple devices. The feedback to the keypad is accomplished first using an Interlock symbol.
Essentials of Crestron Programming The outputs of the Interlock are routed to the Enable inputs of Buffer symbols that correspond to the particular device being controlled. Power button logic We will now return to the Power button to complete the programming of the Power events that will be triggered with each press of the Power button.
Essentials of Crestron Programming The outputs of the Stepper can be routed to the associated inputs of the different devices. Clear sources One of the actions triggered by the Power Off event is the Clear Sources output. This output is routed to the Clear input of the source Interlock‐Toggle symbol. A rising edge of the clear input immediately forces all outputs low. In this case the outputs are the subpage feedback signals being routed to the touchpanel.
Essentials of Crestron Programming The Clear sources output is also routed to the Serial I/O symbol used to display the source text on the touchpanel page. A rising edge of the input transmits an empty string to the text field.
Essentials of Crestron Programming Doc.
Crestron Electronics, Inc. 15 Volvo Drive Rockleigh, NJ 07647 Tel: 888.CRESTRON Fax: 201.767.7576 www.crestron.com Programming Guide – DOC. 6798A 03.09 Specifications subject to change without notice.