724-746-5500 | blackbox.com
Page 20 NBS008A
724-746-5500 | blackbox.com
Chapter 5: Operation
Table 5-2 (Continued). Commands.
Command Response Switch Action
set port 8 A Port 8 set to A COMMON Port 8 will be conn ected to A Port 8, all other COMMON p ort connections will remain as is.
set port 8 B Port 8 set to B COMMON Por t 8 will be connec ted to B Port 8, all other COMMON por t connections will remain as is.
get version 1 Rack 1 Version NBS008s R ev. A No switching action taken.
help See Table 5-1. No switching action taken.
exit Goodbye Exits terminal mode.
Programming Tips for Using the RS-232 Terminal Commands
This section applies to switches WITHOUT an Ethernet Module installed (NBS004A, NBS006A, NBS008A, NBSALL 8, or NBS016
models only), and is intended for programmers who want to control the switch in an automated environment using a computer.
BACKGROU ND:
When first energized, the switch provides a special rack-to-rack interface at the GANG IN connector, which operates at 2400, N,
8, 1. When the switch receives a 1200 baud SPACE character, it detects a framing error with null data. This causes it to enter
“Terminal” mode and to automatically change its data rate to 1200 bps. The switch indicates that is has entered terminal mode
by displaying a prompt character (“>”, ASCII HEX 0x3E). It then stays in terminal mode, until it receives the “exit” command, or
detects 2400 baud characters.
While in terminal mode, the switch echoes the received characters and collec ts them into a buffer until it receives a carriage
return character. The carriage return is echoed and then the switch begins to process the received command. Any characters
received while it is processing the command are ignored. When the command is processed, the switch responds, followed by a
prompt character, indicating that it is ready to receive another command. If the switch gets a command that is intended for
another switch, it passes that command out the GANG OUT port, and waits up to three seconds for a response. If it does not get
a response, it responds “No Response,” followed by a prompt.
PROGRAMMING:
First, your program must set its RS-232 COM port to 1200, N, 8, 1.
Since the switch may be in rack-to-rack interface mode, your program should force the switch into terminal mode. This can be
done by sending a SPACE character, followed by a carriage return character. If the switch is in rack-to-rack interface mode, the
SPACE character will cause it to go into Terminal mode, and will then respond with a prompt character. The carriage return will
then cause it to respond with “Invalid Command,” followed by another prompt character. If the switch was already in terminal
mode, then it will simply respond “Invalid Command,” followed by a prompt character.
Now that the switch is in terminal mode, your program can issue other commands, but must wait for the switch to issue the
prompt character (“>”, ASCII HEX 0x3E) before sending each new command.
If the switch loses power, it will reset itself when power is restored and come back up in the rack-to-rack interface mode. You
may want to include an error recovery routine in your program that tries to force terminal mode if your program does not receive
a response from the switch. In applications where your program will issue commands very infrequently, you may find it useful to
force terminal mode before every command in case the switch has lost power since your last command.