Four Character Command String - B&B Electronics 8 PORT SMART SWITCH CE 232D4SS8 User Manual

8 port smart switch
Table of Contents

Advertisement

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 2: To turn off all ports, with ASCII STX (decimal 2) set as
the user defined character.
Send to the Master Port: STX STX EOT
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 232D4SS8 (address zero) you would form a string like this:
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 the Smart Switch
and the data is not buffered.

Four Character Command String

The four-character command adds additional security to port
selection. The only difference between the four-character command
and the three-character command is the addition of the ASCII
ESCape character in front of the three-character command.
The first character is the ASCII ESC character (decimal 27).
The second character is user-defined character. The third character
is the desired port address (0). The fourth character is the ASCII
upper case letter of the desired port. Refer to the "Three Character
Command String" section for more information regarding the last
three characters.
Example 1: To turn on port E of the 232D4SS8 (address zero) with
ASCII STX set as the user defined character.
Send to Master port: ESC STX 0 E
14
SW0E$ = CHR$(2) + "0" + "E"
Documentation Number 232D4SS84502 Manual
(2 2 4 decimal)
(27 2 48 69 decimal)

Advertisement

Table of Contents
loading

Table of Contents