Creating Custom Video Screens
To download a Microsoft Word version of this article, click here.
Operation OverviewHere's a summary of how the custom screens will work once they're set up:
Example ScreenThis article develops a simple screen to the display the time and date and a short menu, as shown below:
This screen is included in the example schedule shipped with HomeVision. The object numbers (macros, periodic events, etc.) are different than those used here, but their names and the concepts are the same. You can view it from main menu page 4 by pressing button #2.
Creating The ScheduleStep 1 - Create VariableCreate one variable:
Step 2 - Create Periodic EventCreate one periodic event:
NOTE: If you want to create more than one custom screen, use a separate periodic event for each. Enter these actions for the periodic event: Video: Set cursor row to 1 Video: Set cursor column to 2 Video: Display text 'Example Custom Screen' ; Video: Set cursor row to 4 Video: Set cursor column to 3 Video: Display current time Video: Display text ', ' {note that there's a space after the comma} Video: Display current date ; Video: Set cursor row to 8 Video: Set cursor column to 1 Video: Display text '1 - To Main Menu Page 4' ; Video: Set cursor row to 9 Video: Set cursor column to 1 Video: Display text '2 - Exit Video System' NOTE: After you enter these and leave the actions entry screen, the event will be enabled automatically. Be sure to disable it.
Step 3 - Create MacrosCreate these macros:
Enter these actions for the macros: MACRO #1: Start Custom TV Screen ;In this example, we'll display the screen on a blank background (not on incoming video): Video: Start internal video mode ; ;Display built-in screen #0, which is a blank screen to write your own information on: Video: Display video screen #0 ; ;Next, we disable all the periodic events that are used to draw custom screens: Disable periodic event #1 (Custom TV Screen #1) ; ;Finally, we determine which custom screen to display and enable its periodic event. ;The desired screen # must be in variable #1(Custom TV Screen #) before this macro runs. If Var #1(Custom TV Screen #) = 1 Then Enable periodic event #1 (Custom TV Screen #1) End If NOTE: In this example, there's only 1 custom screen. Therefore, there's only one command to disable it, and one If-Then statement to enable it. In this case, it seems odd to disable the event, then re-enable it. However, this concept makes much more sense when you have multiple custom screens, and we wanted the example to show this. Here's how this macro would look if you had three custom screens: ;In this example, we'll display the screen on a blank background (not on incoming video): Video: Start internal video mode ; ;Display built-in screen #0, which is a blank screen to write your own information on: Video: Display video screen #0 ; ;Next, we disable all the periodic events that are used to draw custom screens: Disable periodic event #1 (Custom TV Screen #1) Disable periodic event #2 (Custom TV Screen #2) Disable periodic event #3 (Custom TV Screen #3) ; ;Finally, we determine which custom screen to display and enable its periodic event. ;The desired screen # must be in variable #1(Custom TV Screen #) before this macro runs. If Var #1(Custom TV Screen #) = 1 Then Enable periodic event #1 (Custom TV Screen #1) End If If Var #1(Custom TV Screen #) = 2 Then Enable periodic event #2 (Custom TV Screen #2) End If If Var #1(Custom TV Screen #) = 3 Then Enable periodic event #3 (Custom TV Screen #3) End If MACRO #2: Stop Custom TV Screen ;First, we disable all the periodic events that are used to draw custom screens: Disable periodic event #1 (Custom TV Screen #1) ; Then, set variable a to 0 to indicate that no custom screens are being displayed: Var #1(Custom TV Screen #) = 0 NOTE: As noted with the first macro, you would disable the other periodic events here also if you have more than one custom screen.
Step 4 - Create Infrared SignalsIn this example, we're only using two infrared buttons (1 and 2). However, we recommend you set up all 16 of the signals that are used to control the video system. This will make it easier to later assign actions to them for other purposes. To set up these signals, you must know the device code and key code for each button on your remote. If you're not sure what this means, refer to the owners manual chapter 14 (under "IR Signal Reception Details" and "Configuring the Controller to Control the Video Screen System"). Once you schedule has been set up to control the video system, you can view the actual device codes and key codes on the "Video Remote Control" screen located under the "Configure" menu in the PC software. The default HomeVision device and key codes are shown in the following table (these are for a Hitachi TV, One-for-All remote code 145). These are the same as used in the example schedule. If you've remapped any of the keys (such as the "enter" or "cancel" keys), or selected a different remote device, use their actual codes, not the ones shown here. NOTE: All of these signals have these same settings:
Enter these actions for these two IR signals: INFRARED SIGNAL #1: Remote Input 1 If Var #1(Custom TV Screen #) = 1 Then ;Do whatever you want to happen when displaying custom screen #1 and button 1 is pressed. ;In this example, we want to go to main menu page 4, which is built-in screen #55. ;But first, we must stop the custom screen from being displayed: Do macro #2 (Stop Custom TV Screen) once Video: Display video screen #55 End If INFRARED SIGNAL #2: Remote Input 2 If Var #1(Custom TV Screen #) = 1 Then ;Do whatever you want to happen when displaying custom screen #1 and button 2 is pressed. ;In this example, we want to shut the video system off entirely. ;But first, we must stop the custom screen from being displayed: Do macro #2 (Stop Custom TV Screen) once Video: Stop video mode End If
It's important to understand when the controller will execute these actions. If these buttons were not the same ones used to control the video menu system, then they would execute every time the buttons were pressed. However, buttons set up to control the video menu system behave differently:
HomeVision is set up this way so the buttons can control the built-in video system when you are using it, AND do other things (like control your own screens or perform macros) when you're not using it. In this example, when the custom screen is being displayed, these infrared signal actions will be performed. We use the If-Then statement to determine which custom screen is being displayed, then perform whatever actions we want. Of course, in this example there's only one custom screen. But if you had more, you would have one If-Then statement for each screen, like this: If Var #1(Custom TV Screen #) = 1 Then ;Do whatever you want to happen when displaying custom screen #1 and button 2 is pressed. End If ; If Var #1(Custom TV Screen #) = 2 Then ;Do whatever you want to happen when displaying custom screen #2 and button 2 is pressed. End If ; If Var #1(Custom TV Screen #) = 3 Then ;Do whatever you want to happen when displaying custom screen #3 and button 2 is pressed. End If With this setup, the buttons will behave differently depending on which screen you're currently watching. This give you tremendous power when creating your own screens.
Step 5 - Power Failure Recovery EventEnter the following command in the power failure recovery event: Do macro #2 (Stop Custom TV Screen) once This is done in case power goes out while you're displaying a custom screen. When the controller restarts, the periodic event for the screen will still be enabled, and it will write to the screen. When you then start the video menu system, the periodic event will overwrite it, causing flickering (or alternating between the two screens). Running this macro prevents this by disabling all the periodic events.
Controlling Your ScreenWe're now ready to use this screen in a schedule. Here's how to start and stop displaying it. Starting a custom screenAnywhere in your schedule you want to start this screen, enter these commands: Var #1(Custom TV Screen #) = 1 Do macro #1 (Start Custom TV Screen) once That's all there is to it. First, you set the variable to the screen number you want to display, then you run the macro to start it. You could also start the screen using main menu page 4 of the built-in video menu system. For details on using main menu page 4, refer to the file "Screens" provided on the HomeVision installation disks. Basically, it displays options on the screen and allows you to perform a macro when the corresponding button is pressed. To display a custom screen from there, create a macro (perhaps called "Start Custom TV Screen #1"), and include in it the two commands shown above. Then, use the "Custom TV Menu" screen, located under the "Advanced" menu in the PC software, to assign this macro to the desired entry on menu page 4. When the user presses the corresponding button, the macro will be performed and the custom screen appears. This is the method used in the example schedule provided with HomeVision to start the custom screens.
Stopping a custom screenWhenever you want to stop any custom screen, enter this command: Do macro #2 (Stop Custom TV Screen) once In this example, we did this in the two infrared signal events. After stopping the custom screens, you might also want to:
Custom Screen Notes
ConclusionYou can use these methods to create virtually any screen you want. With some
work and creativity, you can create screens to:
Good luck and have fun! |