14
232XSSD43800 Manual
B&B Electronics -- PO Box 1040 -- Ottawa, IL 61350
PH (815) 433-5100 -- FAX (815) 433-5104
Example 1: To turn on port E of the 232XSSD4 (address zero) with
ASCII STX (2 decimal) character set as the user defined
character.
Send to the Master Port: STX 0 E
(2 48 69 decimal)
Example 2: To turn on port B located at port expander (232PE)
address ten with ASCII STX (2 decimal) character set
as the user defined character.
Send to the Master Port: STX A B
(2 65 66 decimal)
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. It
is recommended that the selected port be turned off before selecting
the next port. For this reason, if port A is currently selected and a
command is sent to select port E, the command characters (STX 0
E) will pass through to the port A device and because characters "0"
and "E" are printable they may appear on that device.
To turn any selected port off, the first and second character of
the command control string must be the user-defined character.
The third character must be the ASCII EOT character (decimal 4).
Example 3: To turn off all ports, with ASCII STX (decimal 2) set as
the user defined character.
Send to the Master Port: STX STX EOT
(2 2 4 decimal)
It is recommended that the user-defined character be a non-
printable character. The turn off command will then consist of three
characters that will not show up on the current port device.
If you were writing a program in GWBASIC to select port E of
the 232XSSD4 (address zero) you would form a string like this:
SW0E$ = CHR$(2) + "0" + "E"
You could then send SW0E$ to select port E. Similar strings could
be used for turning on the other ports. To turn off the ports the
string might look like this:
TOFF$ = CHR$(2) + CHR$(2) + CHR$(4)
NOTE: There is no delay through Smart Switch; data is not buffered.