Black Box RS-422, SW421A-R2, SW422A-R2 User Manual

Page 1
Order toll-free in the U.S. 24 hours, 7 A.M. Monday to midnight Friday: 877-877-BBOX FREE technical support, 24 hours a day, 7 days a week: Call 724-746-5500 or fax 724-746-0746 Mail order: Black Box Corporation, 1000 Park Drive, Lawrence, PA 15055-1018 Web site: www.blackbox.com • E-mail: info@blackbox.com
CUSTOMER
SUPPORT
INFORMATION
JUNE 2000 SW421A-R2 SW422A-R2
RS-422 Code-Operated Switches
COS/4
TEXT TRANSPARENT GRAPHICS
MODE
RESET
ST
LO
Page 2
RS-422 CODE-OPERATED SWITCHES
2
TRADEMARKS USED IN THIS MANUAL
DEC and VT100 are trademarks of Digital Equipment Corporation.
GW-Basic is a registered trademark of Microsoft Corporation.
HP is a registered trademark of Hewlett-Packard.
Wyse is a registered trademark of Wyse Technology.
Any other trademarks mentioned in this manual are acknowledged to be the property of the trademark owners.
Page 3
RS-422 CODE-OPERATED SWITCHES
3
1. Specifications
Data Rates — 300, 1200, 2400, 4800, 9600, 19,200, 38,400, 76,800 bps
Interface — RS-422/V.11, full duplex, asynchronous
RS-422 Cir
cuits Supported
Pin # Description Pin # Description
12 Control in low 18 Data in high
13 Control in high 19 Data in low
14 Control out high 24 Data out high
15 Control out low 25 Data out low
Connectors — COS/4: (5) Female DB25 (master port and four subordinate ports); COS/8: (9)
Female DB25 (master port and eight subordinate ports); 5 to 8 bit, asynchronous
Indicators — LOCKOUT and SWITCH TIME LED indicators. Segment display for CHANNEL
SELECTED
Controls — External: Vertical switch (mode switch), pushbutton reset; Internal: Baud rate (300
to 76,800 bps) and format selectable; DTE/DCE configuration switch for each port (non-functional); Auto Timeout (2.5 min., 5 min, 10 min., or infinite) switch­selectable; Arming selectable, switch-selectable
Addressing — Two-digit code as follows: First digit is switch-selectable, initiates Switch Time—
factory setting is EOT (Ctrl D), (Hex 04), (Decimal 4). Second digit assigns channel, Hex 30–37 selects port 0–7. Any channel can switch the channel when the unit is in Switch Time (unless disabled by SW6 positions 1–4). The arming and switching code is stripped by the Code-Operated Switch. The arming character can pass as data in Graphics mode.
Enclosure — High-impact plastic
Operating Temperature — 32 to 122°F (0 to 50°C)
Storage Temperature — -4 to +158°F (-20 to +70°C)
Humidity Tolerance — 15 to 95%, noncondensing
Power — 115/230 VAC (switch-selectable), 60/50 Hz, 11 watts
Size — 12.3" x 11.8" x 2.5" (31.2 x 30 x 6.4 cm)
Weight — 8 lb. (3.6 kg)
Page 4
RS-422 CODE-OPERATED SWITCHES
4
2. Introduction
2.1 Description
The Code-Operated Switch 422 (COS) is an asynchronous RS-422 switch. By sending codes to the master port, you can select subordinate ports. The master device (CPU or terminal) selects any of the other ports (printers, modems, or terminals, for example) by transmitting the proper arming and switching codes. The communications link can also be made by any of the subordinate devices by transmitting their own channel address code while the switch is in the Switch Time mode. Once the communications link is established, all other ports are locked out. The ports remain locked out until either the master port or the selected subordinate port sends an arming character. Reception of the arming character causes the COS to break all switched connections (leads 2, TD, and 3, RD, control in and control out—user-selectable) between the master and subordinate port and puts the unit back in Switch Time mode.
Signal ground (pin 7) is tied to chassis ground (pin 1) on each port. All ports have female DB25 connectors. Configuration switches on all ports allow configuration to a DTE or DCE port. The devices also have switches to select the baud rate and word format (parity, character length, and number of stop bits).
Figure 2-1 shows a network involving various peripherals. The computer (or terminal) selects which device it wishes to communicate with by transmitting the proper arming and switching code (0 through 3 for the 4-port model, 0 through 7 for the 8-port model).
NOTE: Models with RS-232 ports are available as part numbers SW853A and SW854A. The COS can also be specially ordered with some RS-422 and some RS-232 ports. These units are configured at the factory at the time the order is placed. When you receive a specially ordered COS, make sure the configuration matches your order.
Figure 2-1. Typical Application.
Industrial Controller
Data Collection Panel
Serial Code-
Operated
Switch (4-Port)
Digital Analog Converter
Lathe
PC
Page 5
RS-422 CODE-OPERATED SWITCHES
5
2.2 Board Layout
*W5 on the COS/4 is the same as W1 on the COS/8.
Figure 2-2. Component Layout.
These switches are for COS-8 RS-232 only
W1 = COS/8*
SW5
115
SW4
SW3
SW2
SW1
W1
SW6
SW9
SW7
SW10
SW8
LOCKSWT
C
B A
W4
40167B
Page 6
RS-422 CODE-OPERATED SWITCHES
6
3. Installation
3.1 General
Installation of the COS is a matter of connecting the modem and terminal connectors to the proper communications equipment using the interface connectors.
When viewing the COS from the rear, the leftmost connector is the Master connector. The channel connectors are numbered from left to right 0, 1, 2, 3 (4, 5, 6, and 7 also for COS/8).
The COS directs data flow between the master port and whichever subordinate port that has been specified in the command sequence.
Determine if any internal switches must be reconfigured to match your particular application. The unit’s internal DIP switches are factory-preset to the following parameters:
Baud Rate: 9600 bps
Word Format: 8 data bits, 1 stop bit, and parity disabled
Auto Timeout: Disabled
Arming Character: 04 Hex (EOT), CTRL D
All Serial Ports: DCE with DSR, DTR Control
3.2 Switch Settings
CAUTION
If any internal DIP-switch settings must be changed, be certain that power is disconnected from the unit before changing settings.
Refer to Figure 2-2 for the location of the switches. In the following switch descriptions, closed is abbreviated as C and open is abbreviated as O.
3.2.1 S
WITCH SW6
Switch Position
1 Open = Disables the slave’s ability to put the unit into switch time.
2 Open = Disables the master’s ability to put the unit into switch time.
3 Open = Disables the master’s ability to switch from switch time to channel.
4 Open = Disables the slave’s ability to switch from switch time to channel.
Close 5 Closed = 2.5-minute auto timeout.
only 6 Closed = 5-minute auto timeout.
one 7 Closed = 10-minute auto timeout.
8 Closed = Timeout is infinite.
{
Page 7
RS-422 CODE-OPERATED SWITCHES
7
Figure 3-1. Port Configuration Switches.
Typical Switch Configuration for DCE Typical Switch Configuration for DTE
Switch A Close 6 and 7 Switch A Close 5 and 8
Switch B Close 1 and 4 Switch B Close 2 and 3
Note that positions 6, 7, and 8 on Switch B may be selected to assert RTS or CTS high or to tie RTS directly to CTS.
Switch 5 may be used to assert CD high.
RS-422 operates independently of port switch settings.
DTE is used if connecting to a terminal.
DCE is used if connecting to a modem.
CONTROL IN
RS-422 PORT
SIGNAL PIN #
CONTROL IN - 12 CONTROL IN + 13
CONTROL OUT
DATA IN
DATA OUT
DATA OUT
DATA IN
CONTROL OUT
CONTROL IN
VCC
SWITCH A
SWITCH B
CONTROL OUT + 14 CONTROL OUT - 15
DATA IN + 18 DATA IN - 19
DATA OUT + 24 DATA OUT - 25
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8
RS-232 PORT
PIN # SIGNAL
2 TXD
3 RXD
6 DSR
20 DTR
8CD 4 RTS 5 CTS
7 SIG GND
1 FRAME GND
Page 8
RS-422 CODE-OPERATED SWITCHES
8
3.2.2 SWITCH SW7
Switch Position
1 Open = Even Parity 1 Closed = Odd Parity
Position 2 Position 3 Word Length Closed Closed 5 bits Open Closed 6 bits Closed Open 7 bits Open Open 8 bits
4 Open = 2 stop bits 4 Closed = 1 stop bit 5 Open = Parity Disable 5 Closed = Parity Enable 6 Always Open
7 See graphics mode description, Section 4.6.3. 8 See graphics mode description, Section 4.6.3.
3.2.3 S
WITCH SW8 ARMING CODE SETTINGS
EOT is the factory-default arming character.
ASCII codes 1 through 6 are the port address codes.
C = Closed (Off)
O = Open (On)
Arming Characters Arming Character Switch Positions
LSB MSB
ASCII CTRL Hex Decimal 1 2 3 4 5 6 7 8
NUL@00 0 CCCCCCCC SOHA 01 1 OCCCCCCC STXB 02 2 COCCCCCC ETXC 03 3 OOCCCCCC EOT D 04 4 C C O C C C C C ENQ E 05 5 O C O C C C C C ACK F 06 6 C O O C C C C C BEL G 07 7 O O O C C C C C BS H08 8 CCCOCCCC HT I 09 9 OCCOCCCC LF J 0A 10 C O C O C C C C VT K 0B 11 O O C O C C C C FF L 0C 12 C C O O C C C C CR M 0D 13 O C O O C C C C SO N 0E 14 C O O O C C C C SI O 0F 15 O O O O C C C C
Page 9
RS-422 CODE-OPERATED SWITCHES
9
Arming Characters Arming Character Switch Positions
LSB MSB
ASCII CTRL Hex Decimal 1 2 3 4 5 6 7 8
DLE P 10 16 C C C C O C C C DC1 Q 11 17 O C C C O C C C DC2 R 12 18 C O C C O C C C DC3 S 13 19 O O C C O C C C DC4 T 14 20 C C O C O C C C NAK U 15 21 O C O C O C C C SYN V 16 22 C O O C O C C C ETB W 17 23 O O O C O C C C CAN X 18 24 C C C O O C C C EM Y 19 25 O C C O O C C C SUB Z 1A 26 C O C O O C C C ESC [ 1B 27 O O C O O C C C FS \ 1C 28 C C O O O C C C GS ] 1D 29 O C O O O C C C RS ^ 1E 30 C O O O O C C C US _ 1F 31 O O O O O C C C SPACE 20 32 C C C C C O C C !2133OCCCCOCC "2234COCCCOCC #2335OOCCCOCC $2436CCOCCOCC %2537OCOCCOCC &2638COOCCOCC '2739OOOCCOCC (2840CCCOCOCC )2941OCCOCOCC .2A42COCOCOCC +2B43OOCOCOCC ,2C44CCOOCOCC
-2D45OCOOCOCC .2E46COOOCOCC /2F47OOOOCOCC 03048CCCCOOCC 13149OCCCOOCC 23250COCCOOCC 33351OOCCOOCC 43452CCOCOOCC 53553OCOCOOCC 63654COOCOOCC 73755OOOCOOCC 83856CCCOOOCC 93957OCCOOOCC :3A58COCOOOCC ;3B59OOCOOOCC
Page 10
RS-422 CODE-OPERATED SWITCHES
10
Arming Characters Arming Character Switch Positions
LSB MSB
ASCII CTRL Hex Decimal 1 2 3 4 5 6 7 8
<3C60CCOOOOCC =3D61OCOOOOCC >3E62COOOOOCC ?3F63OOOOOOCC @4064CCCCCCOC A4165OCCCCCOC B4266COCCCCOC C4367OOCCCCOC D4468CCOCCCOC E4569OCOCCCOC F4670COOCCCOC G4771OOOCCCOC H4872CCCOCCOC I4973OCCOCCOC J4A74COCOCCOC K4B75OOCOCCOC L4C76CCOOCCOC M4D77OCOOCCOC N4E78COOOCCOC O4F79OOOOCCOC P5080CCCCOCOC Q5181OCCCOCOC R5282COCCOCOC S5383OOCCOCOC T5484CCOCOCOC U5585OCOCOCOC V5686COOCOCOC W5787OOOCOCOC X5888CCCOOCOC Y5989OCCOOCOC Z5A90COCOOCOC [5B91OOCOOCOC
5C 92 C C O O O C O C
]5D93OCOOOCOC
5E94 COOOOCOC
¨5F95OOOOOCOC
-6096CCCCCOOC a6197OCCCCOOC b6298COCCCOOC c6399OOCCCOOC d 64 100 C C O C C O O C e 65 101 O C O C C O O C f 66 102 C O O C C O O C g 67 103 O O O C C O O C
Page 11
RS-422 CODE-OPERATED SWITCHES
11
Arming Characters Arming Character Switch Positions
LSB MSB
ASCII CTRL Hex Decimal 1 2 3 4 5 6 7 8
h 68104 CCCOCOOC i 69105 OCCOCOOC j 6A106 COCOCOOC k 6B107 OOCOCOOC l 6C 108 C C O O C O O C m 6D 109 O C O O C O O C n 6E 110 C O O O C O O C o 6F 111 O O O O C O O C p 70 112 C C C C O O O C q 71 113 O C C C O O O C r 72 114 C O C C O O O C s 73 115 O O C C O O O C t 74116 CCOCOOOC u 75117 OCOCOOOC v 76118 COOCOOOC w 77119 OOOCOOOC x 78 120 C C C O O O O C y 79 121 O C C O O O O C z 7A 122 C O C O O O O C
7B 123 O O C O O O O C
7C124 CCOOOOOC
7D125 OCOOOOOC 7E 126 C O O O O O O C
DEL 7F 127 O O O O O O O C
3.2.4 SWITCH SW9
See the graphics mode description (Section 4.6.3) for additional information.
NOTE
Close only one position at a time.
Position Closed
1 = 5-word gap in transmission
2 = 25-word gap in transmission
3 = 50-word gap in transmission
4 = 100-word gap in transmission
Page 12
RS-422 CODE-OPERATED SWITCHES
12
3.2.5 BAUD RATE SWITCH SW10
The baud rate is set by closing the switch position for the rate desired.
NOTE
Close only one position at a time.
Position Closed Baud Rate (bps)
1 300
2 1200
3 2400
4 4800
5 9600
6 19,200
7 38,400
8 76,800
3.3 Straps W1 Through W4, W7
Strap W1, if removed, will disable the COS from passing breaks.
Strap W2 and W3 should always be off.
Strap 4 selects either a power on reset to switch time mode (Strap On) or to port 0 (Strap Off).
When W4 straps A and B are in and strap C is out, switch time mode is selected. This is the factory-default setting.
When W4 straps A and B are out and strap C is in, port 0 is selected.
Strap W7 selects whether the RS-422 Code Operated Switch (COS) will go into switch time or not, when carrier detect is lost on the master port. This will disconnect any port the RS-422 COS may be on if the session is terminated for any reason. The jumper setting for W7 is as follows:
• W7-a strapped: RS-422 COS will NOT go into switch time when Carrier Detect is dropped on the master port.
• W7-b strapped: RS-422 COS WILL go into switch time when Carrier Detect is dropped on the master port. (This is the factory-default setting.)
Page 13
RS-422 CODE-OPERATED SWITCHES
13
4. Operation
4.1 Arming Character
When the COS receives the arming character in the data stream, it will enter an armed state called “switch time.” When the COS is in this armed state, the ST LED on the front panel will be lit. You choose the arming character with DIP-switch setting SW8 (see Section 3.2.3).
4.2 Channel-Select Character
The channel-select character can only be recognized as such by its position in the data stream. The channel-select character is the first character received after the arming character.
The least-significant four bits of the channel-select character contains the binary number of the subordinate port that is being selected (ASCII 0–7; CTRL @, A, B, C, D, E, F, G, etc.)
4.3 Auto Timeout
If auto timeout is selected, the COS will timeout after an idle time of either 2.5, 5, or 10 minutes (switch-selectable by SW6) and return to ST mode. Data in either direction will continually reset the timer.
4.4 Reset Button
The reset button will force the unit into switch-time mode or to port 0 depending on the setting of strap W4.
NOTE
If auto timeout is selected, the unit will revert to switch time after the appropriate timeout.
4.5 Lockout
“LO” (located on the front panel) will light when the unit is placed in lockout. When the COS is in lockout, the subordinate ports cannot access the master port. The master port can place the unit in lockout and take it out of lockout. The COS can be put into lockout during the switch-time mode by sending an ASCII character 38 or higher from the master port. To get out of lockout, send the arming character.
NOTE
When coming out of lockout, both the LO and ST LEDs will be lit until a port is selected.
Page 14
RS-422 CODE-OPERATED SWITCHES
14
4.6 Modes of Operation
The COS can operate in one of three modes. The front-panel toggle switch labeled “MODE” is used to select Text, Transparent, or Graphics modes.
4.6.1 T
EXT MODE (UP SWITCH POSITION)
In this mode, the COS will enter switch time whenever it receives an arming character. It will select the subordinate channel that is specified by the channel-select character. The remaining text will pass through the unit until another arming character is encountered. The arming character and the channel-select character will not pass through the unit in this mode. Care must be taken to choose an arming character that will never appear as part of the text.
4.6.2 T
RANSPARENT MODE (MIDDLE SWITCH POSITION)
In this mode of operation, all data, including the arming character, will pass through the unit to and from the master port and the subordinate port that was selected before entering this mode. This mode totally disables code control, and all characters printable and non-printable are passed.
4.6.3 G
RAPHICS MODE (DOWN SWITCH POSITION)
The third mode is called graphics mode because it is capable of passing graphics data while still maintaining code control. In this mode, an arming character will only be recognized as an arming character if it is preceded by a pause in data transmission of a minimum length of time.
This required pause length can be user-selected (by SW9, positions 1 through 4—see Section 3.2.4). Any arming character not preceded by this pause will be passed as data.
This pause is measured in one of three ways as follows:
1. From the time the last character was sent from the master port to the subordinate port (SW7 Position 7 is Closed, and SW7 Position 8 Open).
2. From the time the last character was sent from the subordinate port to the master port (SW7 Position 7 is Open, and SW7 Position 8 is Closed).
3. From the time the last character was sent in either direction (SW7 Position 7 is Closed, and SW7 Position 8 is Closed).
4.7 Troubleshooting
If the COS appears to switch on its own, it is receiving an arming character in the data. Try disabling the port which is not being used for switching (SW6 Positions 1 through 4) or try running graphics mode.
If occasional bit loss occurs, try running two stop bits on the computer equipment (with the COS unit set to receive one stop bit).
If data does not pass and the COS will not switch, check the cables and the SWA and SWB switches.
Page 15
RS-422 CODE-OPERATED SWITCHES
15
4.8 Basic Test Program for the COS
10 REM************CODE-OPERATED SWITCH TEST*******************
20 OPEN "COM1:9600,N,8,1,CS,DS"AS1 :REM**SET UP COM 1 PC PORT**
30 P=48 :REM**SET PORT # TO 1 (DECIMAL 48)**
40 PRINT #1,CHR$(4); :REM**SEND ARMING CHAR**
50 PRINT #1,CHR$(P); :REM**SEND PORT # OUT COM 1**
60 T=P-48 :REM**CONVERT DEC. TO ACTUAL PORT #**
70 PRINT #1,"THIS IS A TEST OF PORT#"T :REM**SENDS MESSAGE OUT COM 1**
80 FOR I=1 TO 250 :REM**DELAY**
90 NEXT I :REM**LOOP**
100 P=P+1 :REM**INCREMENT PORT #**
110 IF P=52 THEN GOTO 30 ELSE GOTO 40 :REM**LOOP BACK FOR NEXT PORT*
NOTE
REM statements are optional. Semicolons are required at the end of lines 40 and 50 to inhibit CR.
Connect the PC to the master port and run this program using either Basica or GW-Basic®.
Loading...