HMS 'Play/Record' Protocol Expanded Explanation

 

8 bit Data Byte Explanation:

A basic computer data byte (hence forth referred to as 'byte'), is 8 bits wide and holds a maximum number of 255 decimal.  The 8 bits are numbered bit0 to bit7.  Each bit is a logic '1' or a logic 'zero'.  If the bit is set to logic '1', then that 'bit 'number' is added to get the total value of the byte in decimal.  As you can see by the 'Bit-Binary-Decimal' Table below if all bits are set and you add all the bits together the maximum number is 255.  Note: Logic 1 is the same as 'on' and Logic 0 is the same as off.

Here is a table of 'bits' and equivalent decimal values.

Just add the decimal numbers together to get the bits set 'On' that you want.  Setting all bits on is 255d (decimal).  Setting bits 0 and 7 on is 128+1 or 129 decimal.  To set multiple colors, set the 'color#_bits' to the combination of bits. 

Note: In order to 'Set Up' a Scene to record you will need an editor that will allow you to edit in 'decimal', or hex if you are fluent in hexadecimal numbers.  It is also highly recommended that you purchase the RS232-TTL board so that you can use your computer to test various protocols.

Note: There are no 'commas' in the 'scene file'.  The 'commas' in this explanation are for separation of bytes for viewing.

Play and Record Protocol:

These protocols follow the 'HMS Command Protocol' structure with the addition of three timeout bytes.  The 3 'timeout bytes' (minutes, seconds,10milliseconds) have to follow each command.  These 'timeout bytes' allow for completion of one command, delay, and then start of the next command.  If no delay is required you have two options.  1. All 3 bytes = 0 for no delay. 2. The byte following the command is 170 (decimal).  170 is the 'no pause byte'.

Here are a few examples:

Set Colors (RGBW Board) Cmd4:  The following sets red to be on at 50% (128 decimal), fade rate of 10 (decimal), delay for 5 seconds, Turn on Green at 100%, fade value of 5, delay for 8 seconds, turn on Blue at 40% (102 decimal), fade of 0 (instant on), end command (no delay)

[4, color# bits, value, fade]:  4,1,128,10,00,05,00 (this completes the red sequence),  4, 242, 255, 5, 0, 08, 00 (this completes the green sequence),   4,244,102,0,255.

IF this 'scene' was recorded as 'scene 1' then you would issue command bytes: 32,1,#Repeats,254 to play this scene.  This scene sequence file would look like this with a decimal editor.


004 001 128 010 000 005 000    ;command 4, red color=128,fade=10, 00 minutes, 5 seconds, 0 10milliseconds

004 242 255 005 000 008 000    ;keep red, turn on green 100%=255, fade=5, 0 minutes, 8 seconds, 0 10milliseconds

004 244 102 000 255                  ;keep red, green, turn on blue at 102 brightness, fade=0, end of scene (255)

Note: The first value for 'Color bits' for red is 1 because we want green and blue to be off (known condition).  The green 'Color Bits' value is 242 because we want to keep any existing colors on and want to turn on green as a new color (240+2).  The Blue 'Color Bits' value is 244 (240 +4 is keep Red/Green/Blue/White on if on, and now turn on blue (4).

Note: See the HMS Command Protocol for 'Color Bits' explanation.

 

Command1 (set ports), Command18 (set one DMX 'fade' channel value and fade value), Command 18 (for channel 2)
Set Port1 bit 4 on, Set Port2 Off, No delay (C-16 board and no HCA Board {no port3}), Set DMX channel 1 to 50% brightness and fade=7, and no delay), Set DMX channel 2 off 'fast' (value=1)

Note: Command 1 is for C16 board (2 output ports)

001  016  000  170    ;Command 1, set port 1=16, set port2=0, no pause (minutes byte=170)

018  001  128  007  000  000 000  ;Command 18, DMX Channel 1=128, fade=7, no pause (all 3 pause bytes=0)

018  002  000  001 255    ;Command 18, DMX Channel 2=0 (turn off channel2), fade=1 (turn off fast), end of scene (minutes byte=255)

Note: 255 for 'minutes' is 'End of Scene'.  If you want a 1 minute 3.1 second delay for the last command, then the 'Scene Bytes' for the last command would be:

018  002  000  001  001  003 010  255    ;1,3,10 for the pause bytes is 1 minute, 3 seconds, 10 10milliseconds or .1 seconds

Note: Contact HMS Technical if you want 'custom scenes' programmed for you prior to shipping.


Concatenate Scenes: If 'Scenes' need to exceed the maximum scene length (512 bytes or 256 bytes depending on board)

To Concatenate one scene to the next, Each Scene prior to the last scene has to have all bytes filled (all 512/256 bytes).  Use Zeroes '0' to pad the Scene so that the Scene ends with all zeroes if necessary.  The Zero is used as a 'NOP' or 'Skip Byte'  (not processed as a command).  If the Scene called has all bytes used (no 255 at the end of the scene), then the next scene will be played as though it was part of the Scene that was Commanded to play.
I.E. you want Scene 1 to be 4 Scenes Long (2048 bytes or less).  Then Scene 1, 2, and 3 has to have all 512/256 bytes set (no 255 at the end of the scene),  then scene4 will terminate the 'Play Command' with the 'End of Scene' 255 value.  Record each scene individually.  I.E. Record Scene 1, Record Scene2, Record Scene3 and Record Scene 4.  Then to play the 2048 byte scene just 'Command Play' Scene1 and all 4 Scene's will run contiguously.  

Setting the TTL Port in BrightAuthor:

1. Select 'Edit', then 'Preferences' on the main menu.
2. Select 'Interactive', Port=1, Baud 38400, Data bits=8, Parity='none', Stop Bits=1

 

updated: 03/22/2012