CRESTRON
14
••
Series 3000 Touchpanels
Operations Guide - DOC. 8094B
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 II, 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 accomplished at any rate less than 2400 baud. Obviously, ramping several objects
at once requires a baud rate several times as high.
Indirect Text
- Series 3000 Touchpanels support a feature that permits the text
field in any user-defined button to be altered on the fly in RUN mode. This is
accomplished by substituting a text pointer for the text in the button. The text
pointer informs the panel to use the contents of a variable that may be dynamically
redefined as the text field for the button. This presents a considerable advantage
over other methods in that changing screens does not destroy information and that
information may be placed in buttons not currently displayed.