Appendix b: rs-232 protocol, Provides information so, The cable can be fabricated on site – Crestron electronic TPS-TPI User Manual

Page 41: Crestron isys™ tps-tpi touchpanel interface

Advertising
background image

Crestron Isys™ TPS-TPI

Touchpanel

Interface

Appendix B: RS-232 Protocol

TPS-TPI touchpanel interface supports 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 TPS-TPI,
however, doing so may prevent Crestron supplied software from operating with the
unit. Low baud rates will cause the unit 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 TPS-TPI 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 unit 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 TPS-TPI 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 unit (i.e., jumping pins 2 and 3 on the RS-232 port)
makes the buttons momentary. Notice that the unit 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 TPS-TPI; 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
example, requires about 576 bytes worth of commands to be sent, and could not be

Operations Guide - DOC. 5855

Touchpanel Interface: Crestron Isys™ TPS-TPI

37

Advertising