Automation Support - Universal Sercom Driver

A flexible way to trigger house ids is to use the ADC Universal Sercom Driver (USD) driver. By writing macros in USD, secondary events can be translated into strings the Brando Player can parse. USD supports both IP and serial. For this document, we'll concentrate on serial but all applies equally to IP.

Since XPression doesn't natively support a 422 port, a converter is required to convert to the XPression system's 232 port. Generally, any and all converters should be fine. For example, here's an example of one that has been reliably tested:

MODEL 4WSD9TB - UNIVERSAL CONVERTER

In order to test the serial port for commands coming to the XPression system's com port, it's useful to capture the com port with one of the many serial port tools. A common one is putty which is available here:

http://www.putty.org/

To test the serial port, use putty to provide a capture. This is a good first step before using Brando Player to read the port. Brando Player will also provide logs for the com port in its standard logs available under the Help menu. But keep in mind that only one app gets the com port at a time. So, putty and brando player both can't have the com port open simultaneously. Start with putty for confidence and move over to Brando Player.

  1. Launch Putty
  2. Define your com port
  3. Open

After opening the port, we get the following screen. It will show all activity on the port. Hopefully the USD commands will start showing up in this window.

For a self test (testing with only one port available or testing without a cable), short out PIN 2 and 3 and you should be able to type into the com port window and see something. If you don't see something in the COM window, there may be issues with the COM drivers. 

Time for USD Macros

Follow the USD docs to define macros for secondary events. Here's a snapshot of Air Client showing a SNIPE command.

You'll notice that the SNIPE command has the parameter 323620. The parameter represents the house id. Basically, this event is telling automation to play a SNIPE with house id 323620. In USD, we need to define a macro for the SNIPE event. Since Brando doesn't need setup because everything plays out immediately, all we need to do is define a Play command. The simplest command is to just format the house id as is with no prefix or suffix. In USD lingo, the first parameter is represented by the string [1]. That means when the event SNIPE: 323620 is fired, the macro converts it to the string 323620 for Brando Player.

Some snipes play out for the scene's timeline but Brando also supports scenes that hold the scene until a USD end is triggered. An End command can be defined with a similar format but with something that tells Brando Player that it's an end and not a play. So, we can use a character or string to indicate this snipe as an end. For example, in our simplified language, it can simply be /[1]. When the SNIPE end macro is fired, USD will format it as /323620.

Now we need to define our play and end in Brando Player. This is done in the Brando Trigger dialog on launch. For our simplified snipe example, we'd define the Play/End commands as following::

Note that in Brando Player, we use the term On for play and Off for end. We also denote the house id as #. So when Brando Player gets the command 323620, it'll check if a named snipe is defined and if so, plays it.

It's possible to take this a lot further. Instead of just dealing with typical SNIPE house id commands, we can move this beyond to support keyer actions, showing next boards, bumpers and bugs. Basically, anything on the trigger dialog is open game:

Note that this dialog allows defining com ports, ip ports and gpi. And what makes things more flexible is that all triggers can come from all 3 sources. In other words, a bumper trigger can come from a gpi or a USD command originated from com or ip. Brando Player is always listening for all triggers from all sources. As long as Brando Player can parse the command, life is good.