Show Control TutorialThis tutorial will lead you through the creation, configuration, compilation and download of a simple show to an Alcorn McBride Show Controller. You will learn how to:
A Little About Our ShowThe show we are going to create will control the basic functions of a video player. We will start it up and shut it down, search, and play, as well as add some front-panel pushbutton and LCD Display capabilities. Note If you dont feel like typing all of this, a copy of the completed script, TUTORIAL.AMW, was installed in your \WinScript\Scripts\Examples\ directory. The idea behind this tutorial is to get you oriented with your Show Controller and WinScript. After youve mastered the basics, check out Advanced WinScript Programming and the Application Notes chapters, later in this book. Then, when youre ready to start scripting your show, refer to the WinScript Users Guide for a screen-by-screen reference of WinScript features. I Have a [fill in the blank] Video Player. Is It Right For This Tutorial?Sure! The player used throughout this tutorial is unimportant. In fact, this tutorial was originally written for a LaserDisc player), but since WinScript transparently supports almost any serial protocol, your sequences will look very similar to these, no matter what player you use. Of course we'd rather you used one of our Digital Video Machines, but that's another story... Whoa Nellie! I Dont Have a Video PlayerThats OK. With slight modifications, the tutorial script may be used for a wide variety of applications. What About My Show Controller?Well be using an Alcorn McBride V16+ Show Controller for this tutorial, but all Alcorn McBride Show Controllers are programmed exactly the same, so youll be able to follow along with your Show Controller. In fact, you dont need a show controller at all to learn WinScript. You can still enter and compile your script, and then skip the downloading step. Note If your Show Controller does not include an LCD Display, you may skip any steps that deal with displaying information on the LCD. Opening WinScript and Creating a Blank ScriptThe first thing you should do when scripting any show is to create a new script and save it to a file. 1. Run WinScript from the Program Manager (or the Start Menu if youre running Windows 95). 2. Close any blank scripts that may have been created when WinScript started. The default script may not contain the same settings that our tutorial will use. Now choose File | New from the main menu. 3. Choose your Show Controller from the list in the File New dialog box and click OK. 4. Choose File | Save As from the main menu and save your newly created blank script as tutorial.amw Customizing the ScriptNow, lets enter some basic information about our script. 5. Choose Configuration | Script from the main menu and enter title, author, and revision information into your script. Then, enter your name in the first Author field. Click OK. 6. If youve got a show controller, connect a COM Port of your PC to the Programmer Port of your Show Controller via a straight-thru RS-232 serial cable (the cable that came with your Show Controller). 7. Choose Tools | Options | Communications from the main menu and only select the COM Port number that you just connected the cable to. If you just want to practice scripting without downloading, deselect all ports. Naming ResourcesOne of the most powerful tools you can utilize in a script is the ability to assign English-like names to your Show Controllers resources (Inputs, Outputs, Serial Ports, Flags, Variables, and Strings). Before we begin creating sequences for TUTORIAL, lets assign some names to the Inputs, Flags, and Serial Ports well be using. While were in the configuration menu, we will also create and name all of our LCD Display messages. InputsOur show will use the first three front panel buttons of your Show Controller to perform various functions. Button 1 (we will call it RunShowButton) will start a two minute video presentation. Button 2 (we will call it DayNightModeButton) will toggle between guess what Thats right, Day Mode and Night Mode! Finally, Button 3 (we will call it CreditsButton) will display your name on the LCD when it is pressed and return the LCD to its previous state when you let it go. 1. Choose Configuration | Inputs from the main menu. 2. When the Inputs of TUTORIAL window appears, double-click on the cell labeled input1 and change its name to RunShowButton. Repeat the process for input2 (naming it DayNightModeButton) and input3 (naming it CreditsButton). You can also enter some descriptive comments if you wish. 3. Close the Inputs of TUTORIAL window. FlagsWe will use one of the 32 available flags to tell when we are in Night Mode so DayNightModeButton can accurately toggle between the two. 4. Choose Configuration | Flags from the main menu. 5. When the Flags of TUTORIAL window appears, double-click on flag1 and change its name to NightModeFlag. 6. Close the Flags of TUTORIAL window. Serial PortNext, well configure one of the Serial Ports of your Show Controller for a Pioneer LDV-8000 player. 7. Choose Configuration | Ports from the main menu. 8. When the Ports of TUTORIAL window appears, double-click on port1 and change its name to ldp1. 9. Right-click on the Protocol field of ldp1 and choose Protocol Wizard. 10. When the Edit Serial Port Configuration window appears, click on the down arrow and choose Pioneer_LD-V8000 from the protocol list (or if you are using a different player, choose it from the list). Click OK. 11. We will create an Error Sequence later that will automatically run if the video player stops sending acknowledgement messages to the Show Controller. Enter the name LDPError in the Error Seq field. 12. Close the Ports of TUTORIAL window. LCD MessagesOur show will make good use of the LCD by displaying the shows name and current mode in the first line of the LCD and progress information in the second line. First, though, we need to create our messages using LCD Wizard. 13. Choose Configuration | LCD Strings from the main menu. 14. Enter the name BootUpMsg in the first String Name field. 15. Right-click on the String Data field of BootUpMsg and choose LCD Wizard. 16. In the first line of the LCD Wizard, put: My First Show: Booting Up . Click OK. 17. Repeat steps 14-16 for the next eight messages: DayModeMsg
NightModeMsg
GoingToNightModeMsg
GoingToDayModeMsg
ClearLine2Msg
CreditMsg (Enter your name after
Programmed by)
PlayingPresentationMsg
LDPErrorMsg
Whew now, your LCD Strings of TUTORIAL window should look like this: 18. Close the LCD Strings of TUTORIAL window. 19. Save your progress by choosing File
| Save from the main menu or by clicking the Inserting and Organizing SequencesWell continue setting up our script by creating sequences that will perform the various show functions that weve designed. Lets see what is required of this script?:
From this list of requirements, lets insert our sequences: 1. Highlight the Sequences of TUTORIAL window, click on the Default sequences name cell and rename it by typing Autostart. We want this sequence to run on powerup and automatically place the system in Night Mode. Well be configuring it to do that in a few moments, but first 2. Insert the other five sequences as shown in the picture below by simply typing the information in each consecutive cell and pressing Enter. Now, lets configure the trigger properties of these sequences: 3. We know that we want Autostart to start on power up, so right-click on Autostart and choose Autostart Disabled. This will toggle the sequence to be Autostart Enabled. 4. DayNightMode should be started every time the operator presses DayNightModeButton, so right-click on DayNightMode and choose Start: 5. Select DayNightModeButton and Active On from the Edit Start Trigger dialog box and click OK. 6. MainShow should be started when the operator presses RunShowButton, so right-click on MainShow and choose Start: 7. Select RunShowButton and Active On from the Edit Start Trigger dialog box and click OK. 8. It would probably be nice if we could restart the presentation after a short delay, so right-click on MainShow and choose Restart Disabled 9. Check the Restart Enabled checkbox and enter 150 into the Restart Lockout box. This will give us a 5-second delay (since our frame rate is 30 fps) before anyone can press RunShowButton to restart the show. Click OK. 10. Now, lets setup our Credits sequences. CreditsOn should be started when the operator presses CreditsButton, so right-click on CreditsOn and choose Start: 11. Select CreditsButton and Active On from the Edit Start Trigger dialog box and click OK. 12. Right-click on CreditsOff and choose Start: 13. Select CreditsButton and Active Off from the Edit Start Trigger dialog box and click OK. Adding EventsLets digress for a moment and talk about how Sequences and Events really work inside a Show Controller. Alcorn McBride Show Controllers scan their Sequences once every frame. Any Sequences that are considered running are checked for events that should be executed. Events are executed when the amount of time that has elapsed since the Sequence was started is equal to or greater than the time entered in the Time field of the Event. When a sequence is started, its timer is set to frame 1, and it immediately executes any events with a time of 00:00.00 or 00:00.01. On each successive frame, all running sequences are checked to see if they have any events scheduled to run. For example, an event with a 00:02.15 execution time will occur two seconds and fifteen frames after its Sequence was started. Now, back to our sequences AutostartAutostart will display our Boot Up message, as well as clear the second line of the. Then, it will turn off NightModeFlag so that our DayNightMode sequence will place the system in Night Mode when it is started. 1. Select Autostart in Sequences of TUTORIAL then press Enter. 2. Select the Event field of the first event and type D. This will bring up the Available Events List and select the first event starting with a D. 3. Choose Display and press Enter. 4. Enter BootUpMsg (without the quotation marks) in the Data1 field. Congratulations, youve just entered your first Event! This event will display the text in BootUpMsg when Autostart runs. 5. Enter the rest of the events as follows:
6. Close the [Autostart] of TUTORIAL window. DayNightModeDayNightMode will check the status of NightModeFlag and then either put the system in Day Mode or Night Mode. Youve probably been wondering just what are Day Mode and Night Mode? It is necessary to place mechanical equipment such as LaserDisc players in a settled state when the show is not going to be run for a while (like at night). We will Spin Down our video player in Night Mode and Spin Up our video player in Day Mode. We will also search the video player to the start of our presentation (frame 1000) so we will have almost instantaneous access to video playback when the operator pushes RunShowButton. 1. Select DayNightMode in Sequences of TUTORIAL then press Enter. 2. Enter the Events as follows: 3. Close the [DayNightMode] of TUTORIAL window. MainShowMainShow will play a two-minute presentation from our video player, starting at frame 1000 and ending at frame 4596 (not 4600, since the video runs at 29.97 frames per second). If this were a real show, we would probably connect an external sync cable between the video player and the Show Controller to provide frame synchronization, but since this show is less than five minutes, clock drift wont cause more than a frame of inaccuracy, so we wont use that feature. Note If you are using a Digital Video Machine instead of a laser disc player, enter the clip number rather than the frame number into the Search commands data field. At the end of our presentation, well search back to the start and wait on the next press of the button. 1. Select MainShow in Sequences of TUTORIAL then press Enter. 2. Enter the Events as follows: 3. Close the [MainShow] of TUTORIAL window. LDPErrorThis simple sequence will display LDPErrorMsg if the video player is not connected to the Show Controller or is not responding to commands. 1. Select LDPError in Sequences of TUTORIAL then press Enter. 2. Enter the following Event: 3. Close the [LDPError] of TUTORIAL window. CreditsOnOur credits sequences will let you show the world who programmed this incredible show! CreditsOn will use the StoreLCD event to save what is currently displayed on the LCD. Then, it will display your name on the bottom line of the LCD. 1. Select CreditsOn in Sequences of TUTORIAL then press Enter. 2. Enter the Events as follows: 3. Close the [CreditsOn] of TUTORIAL window. CreditsOffOur final sequence, CreditsOff will use the RecoverLCD event to remember what was displayed on the LCD when the last StoreLCD Event was executed (remember, we stored the LCD in CreditsOn) and put it back on the display. 1. Select CreditsOff in Sequences of TUTORIAL then press Enter. 2. Enter the following event: 3. Close the [CreditsOff] of TUTORIAL window. Compiling and DownloadingWere done! Now its time to compile and download our script into the Show Controller. Before we start, make sure you have connected the programming cable between your PC and the Show Controller. Also, connect the correct video player cable between Port 1 of your Show Controller and the video players RS-232 control port. Finally, make sure that there is a video in the video player and that the player is powered. 1. Save your progress by choosing File
| Save from the main menu or by clicking the 2. Choose File
| Compile and Download from the main menu or click the 3. When WinScript finishes compiling your show, you may see some errors listed. Double-click on each of the errors and refer back to the earlier steps in this tutorial to verify that you have entered the events correctly. 4. When the script compiles correctly and you are prompted to download the show data to the Show Controller, click OK. Running the ShowThe show runs immediately after download is complete and goes into Night Mode. After the video player has spun down and the system is in Night Mode, try out your new show by pressing the second button (DayNightModeButton) to bring the system into Day Mode. Then, press the first button (RunShowButton) to start your video presentation. Notice that you can restart the show by pressing the first button after five seconds, you cannot start the show when the system is in Night Mode, and you can display your credits screen at any time. Some events take considerable amounts of time. Searches can take as long as two seconds, and Spinup and Spindown events can take up to a full minute. When switching between Day and Night modes, allow the system to reach a settled state before doing anything else. SummaryCongratulations on writing your first script. We hope you enjoy exploring the many possibilities that a multi-tasking show environment can bring. If you feel adventurous, we recommend experimenting with the script you've just created by adding events and changing display messages. You might even try assigning more buttons to play different presentations from the disc. More advanced scripting techniques can be found in the Advanced Scripting and Application Notes sections of this manual. Thanks for taking this tutorial and good luck with your show! |