Streaming Mode

In this mode, it’s possible to transmit data directly to the DMX output buffer, with a bare minimum of protocol overhead.

The first step is to tell the system how many channels will be transmitted. This is called the ‘streaming mask.’ Since it may not be necessary or even desirable to control an entire universe at one time, a selection of channels may be chosen. The command is

X:LLL:SSS[cr]
  • X is a capital X

  • LLL is a three digit lower-bound of the DMX range to control. Leading zeroes should be included.

  • SSS is the size of the mask, in DMX channels.

For example, to control channels 1-10

X:001:10[cr]

... and to control channels 1-300

X:001:300[cr]

To control channels 30-45

X:030:15[cr]

A query command can also be sent:

X?[cr]

The system will return the current channel mask. Default is [1 512] at powerup, and masks are not saved through a power cycle.

Once the range has been set, data can be sent directly to the serial port. Some care is required on the part of the user, however. A set of streaming data begins with the character ‘x’ and then is followed by binary bytes, the number of which corresponds to the channels being controlled.

When ‘x’ is received, the system begins counting subsequently-received bytes and storing them in a temporary buffer. When the appropriate number of bytes have been received, the temporary buffer is copied to the DMX output buffer. DMX channels which fall outside the streaming mask are unaffected.

Any number of streaming packets may be sent, provided that their length is sized appropriately. If more channels are sent than were originally specified, errors will be returned.

Here are a few examples.

For ease of reading on the printed page, $XX is used to denote a single binary byte, and whitespace is included here only for clarity.

Operate on DMX channels [5 13]

X005:8[cr]

 

Send 9 bytes total, which affect DMX channels 5-13

x $01 $02 $03 $04 $05 $06 $07 $08

 

streaming.jpg