Appendix: rs-232 protocol – Crestron electronic 3200 User Manual

Page 25

Advertising
background image

CRESTRON

Appendix: RS-232 Protocol

Series 3200 touchpanels support panel operation via a host computer through the
RS-232 port. Crestron recommends that the following serial data format is set.

Suggested Serial Data Format

Baud Rate: 38400

Data Bits: 8

Parity: None

Stop Bits: 1

These settings may be altered via the RS-232 Menu when configuring the
touchpanel, however, doing so may prevent Crestron supplied software from
operating with the touchpanel. Low baud rates will cause the panel to appear
unresponsive. For example, at 300 baud, a single button press (and release) generates
12 characters and requires more than 0.333 of a second to send. Delays as short as
0.1 of a second are generally considered perceptible and somewhat annoying.

Command Format - Command format for all items sent to or from the touchpanel is
very simple. All items are ASCII strings terminated by a <cr>. Line feed characters
are ignored, thus <cr><lf> or <lf><cr> are also acceptable line terminators. When
the touchpanel sends a line, it is always terminated with <cr><lf>.

For all strings, the first character determines command type. Numeric arguments, if
present, are in decimal and separated by commas. No control characters are
embedded in the strings to ease processing the strings with high level languages. Be
careful when using commas in BASIC, because BASIC uses commas for field
separators when reading strings from a file using the INPUT # statement. Since we
are dealing with complete lines, use the LINE INPUT # statement to cure this
problem.

P<#> and R<#> Commands - When in RUN mode, pressing a button (assuming
that it has been joined) generates a six-character code in the format P###<cr><lf>,
where ### is a three-character decimal number in the range of 1 through 999,
providing for up to 999 functions. When the button is released, a similar code is
generated, with an 'R' in place of the 'P'. Given that only one button may be pressed
at a time, an 'R' code always follows a 'P' code. A fixed three-digit format is used to
simplify software on the host.

Codes may be sent to the touchpanel in the same form as they are received. The 'P'
form turns on a function and the 'R' form turns off a function; sending back
information received from the touchpanel (i.e., jumping pins 2 and 3) makes the
buttons momentary. Notice that the touchpanel responds to P and R commands even
when configured for other interface modes. Selecting an RS-232 interface mode
merely enables P and R commands to be issued. In addition, the fixed format is not
required for commands sent to the touchpanel; P1, P01, and P001 are all perfectly
valid commands.

Compared to running on Cresnet, an RS-232 interface to a personal computer is
slower, provides less features (such as tracking, among others), is less noise immune
(Cresnet uses balanced transmission for high common mode rejection, RS-232 does
not), and requires the user to supply the control logic program in the PC.

V<chan>,<level> Command - Levels in gauge and slider objects may be set
through the RS-232 port. The command contains both the object channel number (1-
255) and level (0-65535) in decimal separated by a comma. For example, V6,32768
would set channel 6 to level 128, or half way up.

One quick note on baud rate and smooth ramping. Ramping is accomplished by
sending successive levels to the object. To do this in 64 levels over three seconds, for

Operations Guide - DOC. 5725

Series 3200 Touchpanels

21

Advertising