B&B Electronics 232SS21600 User Manual

Page of 26
232SS21600 Manual
B&B Electronics Mfg Co Inc – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph 815-433-5100 - Fax 815-433-5104
6
Switch position 8 selects the port configuration, see section titled
"Port Configuration". Refer to Table 1. Always power down the smart
switch when changing switch settings.
Smart Switch Operation
Smart Switch mode is selected when dipswitch “SW1” position 7
is “Off.”  In Smart Switch mode, the 232SS2 is constantly looking for
the three character preamble code by monitoring the data that is
being received on the master port from the host device. The 232SS2
requires a three character preamble code to turn on and off a port.
The first character must be the ASCII escape character (decimal
27). The second character is user programmable by setting
dipswitch “SW2”. “SW2” comes from the factory programmed to the
ASCII character STX (decimal 2). The third character should be the
ASCII upper case letters "A", "B", "C" or "D" (decimal 65, 66, 67, or
68 respectively) to select those ports. To turn off the selected port
the third character should be the ASCII EOT character (decimal 4).
For instance, to turn on port B you would send:
ESC STX B
If you were writing a program in BASIC to control the Smart
Switch you would form a string like this:
SWB$ = CHR$(27) + CHR$(2) + "B"
You could then send SWB$ to select port B. Similar strings
could be used for turning on the other ports. To turn off the ports the
string might look like this:
TOFF$ = CHR$(27) + CHR$(2) + CHR$(4)
When you are done with a port you can either select a new one
directly or turn off the selected port and then turn on the next one.
We recommend that you turn off the selected port before selecting
the next one. The turn off command consists of three characters that
are non-printing (ESC STX EOT). If port A is selected and you send
the command to select port B, all three characters (ESC STX B) will
pass through the A port since it is still selected and the letter B will
show up on your port A device.  For information on preventing
command codes from being received by slave devices, refer to the
Enhance Mode section.
NOTE:   There is no delay through the Smart Switch and the
data is not buffered.