This 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:
SHOW CONTROL TUTORIAL
- Create, Save, Open, and Configure a Script.
- Rename Show Controller I/O, Flags, Ports, etc.
- Insert and organize sequences.
- Edit sequences.
- Use branching instructions.
- Use the LCD Display.
- Configure sequence triggers.
- Play video.
- Create Day and Night Modes for prolonging equipment life.
- Compile and Download your script.
- Run your show!
A Little About Our Show
The 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 don’t 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 you’ve mastered the basics, check out Advanced WinScript Programming and the Application Notes chapters, later in this book. Then, when you’re ready to start scripting your show, refer to the WinScript User’s 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 Don’t Have a Video Player…
That’s OK. With slight modifications, the tutorial script may be used for a wide variety of applications.
What About My Show Controller?
We’ll be using an Alcorn McBride V16+ Show Controller for this tutorial, but all Alcorn McBride Show Controllers are programmed exactly the same, so you’ll be able to follow along with your Show Controller. In fact, you don’t 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 Script
The first thing you should do when scripting any show is to create a new script and save it to a file.
- Run WinScript from the Program Manager (or the Start Menu if you’re running Windows 95).
- 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.
- Choose your Show Controller from the list in the File New dialog box and click OK.
- Choose File | Save As… from the main menu and save your newly created blank script as tutorial.amw
Customizing the Script
Now, let’s enter some basic information about our script.
- 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.
- If you’ve 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).
- 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.
One of the most powerful tools you can utilize in a script is the ability to assign English-like names to your Show Controller’s resources (Inputs, Outputs, Serial Ports, Flags, Variables, and Strings). Before we begin creating sequences for TUTORIAL, let’s assign some names to the Inputs, Flags, and Serial Ports we’ll be using. While we’re in the configuration menu, we will also create and name all of our LCD Display messages.
Our 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…That’s 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.
- Choose Configuration | Inputs… from the main menu.
- 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.
- Close the Inputs of TUTORIAL window.
We will use one of the 32 available flags to tell when we are in Night Mode so DayNightModeButton can accurately toggle between the two.
- Choose Configuration | Flags… from the main menu.
- When the Flags of TUTORIAL window appears, double-click on flag1 and change its name to NightModeFlag.
- Close the Flags of TUTORIAL window.
Next, we’ll configure one of the Serial Ports of your Show Controller for a Pioneer LDV-8000 player.
- Choose Configuration | Ports… from the main menu.
- When the Ports of TUTORIAL window appears, double-click on port1 and change its name to ldp1.
- Right-click on the “Protocol” field of ldp1 and choose Protocol Wizard.
- 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.
- 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.
- Close the Ports of TUTORIAL window.
Our show will make good use of the LCD by displaying the show’s 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.
- Choose Configuration | LCD Strings… from the main menu.
- Enter the name BootUpMsg in the first String Name field.
- Right-click on the String Data field of BootUpMsg and choose LCD Wizard.
- In the first line of the LCD Wizard, put: My First Show: Booting Up…. Click OK.
- Repeat steps 14-16 for the next eight messages:
CreditMsg (Enter your name after “Programmed by”)
Whew…now, your LCD Strings of TUTORIAL window should look like this:
- Close the LCD Strings of TUTORIAL window.
- Save your progress by choosing File | Save from the main menu or by clicking the toolbar button.
Inserting and Organizing Sequences
We’ll continue setting up our script by creating sequences that will perform the various show functions that we’ve designed. Let’s see…what is required of this script?:
- One sequence that starts on power up and places the system in Night Mode.
- One sequence that toggles Day or Night Mode when DayNightModeButton is pressed.
- One sequence that plays the video presentation when RunShowButton is pressed.
- One sequence that displays your name when CreditsButton is pressed.
- One sequence that recovers the LCD when CreditsButton is let go.
From this list of requirements, let’s insert our sequences:
- Highlight the Sequences of TUTORIAL window, click on the Default sequence’s name cell and rename it by typing Autostart. We want this sequence to run on powerup and automatically place the system in Night Mode. We’ll be configuring it to do that in a few moments, but first…
- Insert the other five sequences as shown in the picture below by simply typing the information in each consecutive cell and pressing Enter.
Now, let’s configure the trigger properties of these sequences:
- 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.
- DayNightMode should be started every time the operator presses DayNightModeButton, so right-click on DayNightMode and choose Start:
- Select DayNightModeButton and Active On from the Edit Start Trigger dialog box and click OK.
- MainShow should be started when the operator presses RunShowButton, so right-click on MainShow and choose Start:
- Select RunShowButton and Active On from the Edit Start Trigger dialog box and click OK.
- It would probably be nice if we could restart the presentation after a short delay, so right-click on MainShow and choose Restart Disabled…
- 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.
- Now, let’s setup our Credits sequences. CreditsOn should be started when the operator presses CreditsButton, so right-click on CreditsOn and choose Start:
- Select CreditsButton and Active On from the Edit Start Trigger dialog box and click OK.
- Right-click on CreditsOff and choose Start:
- Select CreditsButton and Active Off from the Edit Start Trigger dialog box and click OK.
Let’s 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…
Autostart 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.
- Select Autostart in Sequences of TUTORIAL then press Enter.
- 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.
- Choose Display and press Enter.
- Enter “BootUpMsg” (without the quotation marks) in the Data1 field.
Congratulations, you’ve just entered your first Event! This event will display the text in BootUpMsg when Autostart runs.
- Enter the rest of the events as follows:
- Close the [Autostart] of TUTORIAL window.
DayNightMode will check the status of NightModeFlag and then either put the system in Day Mode or Night Mode. You’ve 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.
- Select DayNightMode in Sequences of TUTORIAL then press Enter.
- Enter the Events as follows:
- Close the [DayNightMode] of TUTORIAL window.
MainShow 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 won’t cause more than a frame of inaccuracy, so we won’t 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 command’s data field.
At the end of our presentation, we’ll search back to the start and wait on the next press of the button.
- Select MainShow in Sequences of TUTORIAL then press Enter.
- Enter the Events as follows:
- Close the [MainShow] of TUTORIAL window.
This simple sequence will display LDPErrorMsg if the video player is not connected to the Show Controller or is not responding to commands.
- Select LDPError in Sequences of TUTORIAL then press Enter.
- Enter the following Event:
- Close the [LDPError] of TUTORIAL window.
Our 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.
- Select CreditsOn in Sequences of TUTORIAL then press Enter.
- Enter the Events as follows:
- Close the [CreditsOn] of TUTORIAL window.
Our 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.
- Select CreditsOff in Sequences of TUTORIAL then press Enter.
- Enter the following event:
- Close the [CreditsOff] of TUTORIAL window.
Compiling and Downloading
We’re 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 player’s RS-232 control port. Finally, make sure that there is a video in the video player and that the player is powered.
- Save your progress by choosing File | Save from the main menu or by clicking the toolbar button.
- Choose File | Compile and Download from the main menu or click the toolbar button.
- 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.
- When the script compiles correctly and you are prompted to download the show data to the Show Controller, click OK.
Running the Show
The 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.
Congratulations 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!