The text of a manual · part 3 of 8
Owner's Manual: A Series, AC11 Series, ES Series, F Series, and G Series Multiport Controllers, pages 21 to 30
Pages 21 to 30 of 77
The original document is the PDF (195 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the BayTech 529 and BayTech 524
Page 21
5
OPERATION
BayTech's A, AC11, ES, F, and G Series are user-programmable, multi-function devices that allow serial port expansion/software activated switching (A Series), message multiplexing (AC11 Series), time division multiplexing (ES Series), star networking (F Series), and message broadcasting (G Series). The A, AC11, ES, F, and G Series are ideal for adapting small computers like the IBM PC to industrial process control and data gathering applications.
5.1
OPERATING PROCEDURE
5.1.1
A SERIES
BayTech's A-series multiport controllers are designed for those computer system applications requiring serial port expansion. These are code-activated, switching devices that increase input/output capabilities by interfacing EIA-232C peripheral devices to a single port on a computer device. An A-model has one host or common controlling port and either 4, 8 or 17 peripheral ports. The host port is usually connected to a computer, and the peripheral ports are usually connected to devices such as printers, modems, terminals, cash registers, digital instruments, bar code readers, digital scales, numerical machines, etc.
5.1.1.1
PERIPHERAL PORT SELECTION
To connect to a particular peripheral device, the host device sends to the multiport the current control character (factory default is Control-T) followed by the peripheral port number to which the desired peripheral device is connected. This is a one-digit number for the 524A(P) and 528A(P) and a two-digit number for the 5218AP. After receiving the control character and the port number, the multiport will provide full duplex communication between the host device and the selected peripheral device. NOTE: The control character and the port number are trapped and not transmitted to the peripheral device. If you wish to send the control character to the peripheral device, it must be sent twice. The first control character is trapped and the second is passed through the multiport. Another method of passing the control character to the selected peripheral device is to enter the binary mode of operation (see Section 5.1.1.2). The host device and the selected peripheral device will remain connected until another port is selected. This is accomplished by sending from the PC the control character followed by the new port number. When switching ports, there may be some question as to which is the last character received from the current port and which is the first character received from the new port. 15
Page 22
A way to avoid this confusion when selecting a new port is to wait two character times between the control character and the port number. When the multiport receives control character, it stops the transmitting of data to the host UART from the current peripheral port. However, since the UART has some buffer, up to two characters may still be sent to the host device. The multiport does not start loading data from the new peripheral port into the host UART until the new port number is received. A method of accomplishing this delay is to send a string of ASCII zeros (30 Hex) between the control character and the new peripheral port number. For example, suppose you are transmitting and receiving data from Port 1 of a 524A-P, and you wish to switch to Port 2. 1.
Send from the host device the control character.
2.
Wait two character times.
3.
Read host device input buffer.
4.
If there are no characters in the host device's input buffer, send ASCII "2". This will switch the host device to Port 2. If there are characters in the host device's input buffer (which come from Port 1), you may send ASCII "1" to continue communicating with Port 1 or "2" to switch to Port 2. Any characters received after sending the new port number will be from the new port.
NOTE: When looking for a control character, the multiport masks the 8th or parity bit. Therefore, either Control-T with parity bit off (14 Hex) or ^T with parity bit on (94 Hex) will appear the same (assuming the factory default control character is used).
5.1.1.2
BINARY MODE
NOTE: Only the 528AP and 528NBP models support binary mode. The binary mode allows all data entered through the host port, including the control character, to be transparent to the multiport and passed through to the peripheral device. Note that in both the normal and binary modes, data is transparent in the opposite direction - from a peripheral device to the host device. To access the binary mode, send through the host port Control-T (or the current control character) followed by ASCII capital B. Note that while in the binary mode, the configuration mode cannot be accessed nor can the user select a new port. The host device will remain connected to the last peripheral port selected while in the binary mode of operation. 16
Page 23
To get back to the normal mode of operation, a Break condition must be detected by the host port of the multiport.
5.1.1.3
CASCADING - THE MODEL 5218C
The Model 5218C is a cascading unit allowing a single user to access up to 96 peripheral ports. Ports 1 through 16 operate the same as a basic Model 5218AP. Port 17 is the cascading port and is hooked to Port 18 of the next cascaded unit. Port 18, the host port, of the first unit is connected to the host device. To select any port up to 96, the user sends the control character (Control-T) followed by the desired port number (01 to 96). The host port will examine the port number. If is 16 or less, that port will be selected. If it is greater than 16, the cascaded multiport will subtract 16 and transmit Control-T and the remainder of the port number onto the next cascaded unit. For example, if the host port receives a Control-T followed by a "34", the first multiport subtracts 16 and transmits Control-T followed by an "18" to the second multiport. The second multiport subtracts 16 and transmits Control-T followed by "2" to the third multiport. The third multiport connects to Port 2. After a port has been selected and the user wishes to be connected to another port, he sends Control-T to the host port of the first cascaded unit. If that unit is connected to Port 17, it will pass the Control-T through with no further action until it reaches a unit that is not connected to Port 17. That unit will disconnect its host UART from the input port. The user must now wait until all data has been transmitted to the host device prior to sending the new port number. This allows the cascading multiports to clear all data from their buffers and UARTs. Once all buffers are clear, the user may send the new port number. NOTE: If any characters are in the transmit buffers when the Control-T is sent, the Control-T is stacked behind these characters and will not disconnect until all data has been transmitted through.
5.1.2
AC11 SERIES
The AC11 models allow communication by interfacing a single port on a computer to 4, 8 or 17 EIA-232C serial peripheral devices. They provide multiplexing to the host port of messages from all peripheral ports. These units also allow the host port to select and send data to individual peripheral ports The host or common port is usually connected to a computer, and the peripheral ports are usually connected to devices such as cash registers, digital instruments, bar code readers, digital scales, numerical machines, printers, modems, terminals, etc. 17
Page 24
To transmit data from the host device to a peripheral device, send the control character followed by the desired port number (single-digit number for the 524AC11(P) and 528AC11(P); two-digit number for the 5218AC11). The host device remains connected to that peripheral device for communication until another device is selected. The control character and the port number are trapped and, therefore, not transmitted to the peripheral device. If you wish to send the control character to the peripheral device, you must send it twice. The first control character is trapped; the second is passed through the multiport. The 8th or parity bit is masked from the control character before it is examined, allowing you to send the control character with odd or even parity. Therefore, in a binary mode, when 8 data bits are being sent, a 94 Hex will appear as a control character and must be sent twice to pass through the multiport (assuming the factory default value is used). Data received from the peripheral devices is treated as a message. A message begins when a peripheral port receives a character and is completed when a terminating character (factory set to Carriage Return) is received or when the buffer is full. Either condition will cause data to be transferred to the host device a message at a time, with the multiport inserting the port number as the first character of the message for port identification. Messages will be sent to the host device in a round-robin fashion (i.e., if the multiport is sending a message from Port 1, Port 2 will be examined next for a complete message, then Port 3, etc.).
5.1.3
ES SERIES
The ES Series provides time-division multiplexing. The internal processor continuously scans all peripheral ports checking for characters in the receive buffers. If a receive buffer contains characters, the data is transmitted through the host port preceded by a port identification code (the current control character followed by the port number). Transmission continues until the buffer is empty or until a user-defined maximum data block length has been transmitted. After transmission is completed, the multiport will continue its scanning sequence. If the current control character is received by the multiport from a peripheral device, a second control character is added automatically. This technique allows you to detect the control character as a data character when it is sent through the multiport. NOTE: Transmitting and receiving of data is totally independent. Therefore, the multiport may be receiving data on any port regardless of which port is transmitting. To transmit data from the host device to a peripheral device, send the control character followed by the desired port number (single-digit number for the 524ESP and 528ES; 18
Page 25
two-digit number for the 5218ES). The host device remains connected to that peripheral device with communication until another device is selected. NOTE: The control character and the port number are trapped and not transmitted to the selected peripheral device. If you wish to send the control character to the peripheral device, you must send it twice. The first control character is trapped; the second is passed through the multiport. When looking for a control character, the multiport masks the 8th or parity bit. Therefore, either Control-T with parity bit off (14 Hex) or Control-T with parity bit on (94 Hex) will appear the same (assuming the factory default control character is used). The 94 Hex must still be sent twice by the host device to enable one 94 Hex to be sent out to the connected peripheral port.
5.1.4
F SERIES
Any of the ports on the F-Series multiport may have full duplex communication with any one of the other ports. With the 524F(P) and the 525FP, as many as two pairs of ports may be communicating simultaneously. With the 528FP, as many as four pairs of ports may be communicating simultaneously. The 5218FP will allow up to nine pairs of ports to communicate simultaneously. A connection between two ports may be initiated by either device that wishes to communicate. Either device must send the sign-on character (factory default is ControlT) followed by the desired port number. An On Line message is sent back to the device requesting connection. The connection will remain until a sign-off request is received by the multiport by either device. If a device requests a connection and the desired port is busy, a Busy message is sent back to the requesting device. Disconnection may be accomplished by either of the two connected devices. The device requesting disconnection sends to the multiport the sign-off character (factory default is Control-T) followed by Carriage Return. An Off line message is sent back to the device requesting disconnection. A Disconnect Time Guard option (Option 7) is available to prevent erroneous disconnections in case the sign-off character is transmitted as data. The disconnect time guard requires a delay of two seconds before the sign-off character and Carriage Return are sent. In addition, the 525FP and the 528FP feature host port control in which the host device (the device connected to the host port - Port 5 on the 525FP, Port 9 on the 528FP) may also connect or disconnect between other ports at any time. To make a connection between two ports, the host device sends to the multiport through the host port the current sign-on character followed by ASCII capital T and the two port 19
Page 26
numbers. For example, if the host device wishes to connect Ports 2 and 5, it would send the current sign-on character followed by T25. To force two ports to disconnect, the host device sends to the multiport through the host port the current sign-off character followed by ASCII capital D and the two port numbers. NOTE: When the host device has initiated a connection, the connected devices make also break the connection themselves by following the standard disconnect procedure. If any non-connected device wishes to review the connection status of all ports, it may send the current sign-on character followed by ASCII capital S. The multiport will respond with a graphic similar to the following depicting port connection. Note that "N" equals no connection. Port Connect
5.1.5
1 2 3 4 5 2 1 N 5 4
G SERIES
The G Series units power-up in the broadcast mode. Any data received by the host port is transmitted to all of the peripheral port buffers simultaneously. In the other direction, only one peripheral port can send data to the host port. To operate properly in the broadcast mode, it is recommended that all ports have the same baud rate, word size, stop bits and parity. If the baud rates on the peripheral ports need to be different, have the host device select the peripheral port with the slowest baud rate so no transmitted characters will be lost. Or, limit the number of characters you transmit at one time to 240, then delay before sending more characters. The host device may select which port it will receive data from (power-up default is Port 1). The selected port is indicated by the red LED that is lit under the corresponding port number. For the host device to select a peripheral port, it must send Control-T (or current control character) followed by the desired port number (single digit for the 524G, 525GP, 528G, and 529GP, and a double digit number for the 5218GP). Any data received by this port will be transmitted to the host device. The host device may instruct the G Series multiport to enter into a non-broadcast mode. In this mode, the unit operates identically to an A Series unit (see Section 5.1.1). To enter the non-broadcast mode, send a Control-T (or current control character) followed by the capital letter M. To exit the non-broadcast mode and return to the broadcast mode, send a Control-T (or current control character) followed by the capital letter O. 20
Page 27
5.2
USER-PROGRAMMABLE OPERATIONS
5.2.1
ALL 524 AND NON-PROGRAMMABLE 528 MODELS
The multiport will translate for devices using different configurations, allowing you to mix-and-match devices of different configurations. You may set the baud rate, word size, stop bits, and parity for each individual port. Factory default configuration on all ports is 9600 baud rate, 8 bit word size, 1 stop bit and no parity. NOTE: The serial port parameters for the host port is configured via DIP-switches (baud rate, word size, stop bits, and parity; please see Section 6.1.1). The peripheral ports are software programmable from the host port (see Sections 6.1.2 and 6.2.2). The baud rate for the peripheral ports of non-programmable 528 models may be set via DIP switch.
5.2.2
ALL 525, 528, 529, AND 5218 MODELS (EXCEPT 525FP AND 528FP)
5.2.2.1
THE SERIAL PORT CONFIGURATION
The multiport will translate for devices using different configurations, allowing you to mix-and-match devices of different configurations. You may set the baud rate, word size, stop bits, parity, and XON/XOFF handshaking for each individual port. NOTE: The 5218FP and 5218GP do not support XON/XOFF handshaking as a standard feature. You may purchase Option 6 for the 5218FP or 5218GP to enable XON/XOFF handshaking. Factory default configuration on all ports is 9600 baud rate, 8 bit word size, 1 stop bit, parity, and XON/XOFF handshaking disabled.
5.2.2.2
THE CONTROL CHARACTER
To select a peripheral port, the host device sends the control character to the multiport followed by the peripheral port number. The control character is also used to access the configuration mode. The control character may consist of any single character from 00 Hex to 7F Hex. NOTE: The control character is not a programmable feature for the 5218FP. The Factory default is Control-T (14 Hex).
21
Page 28
5.2.2.3
528AC11P AND 5218AC11P - THE MESSAGE TERMINATING CHARACTER
This is a single character that indicates a completed message to the multiport for the AC11 Series. Data is held in the buffer of the multiport until either this message terminating character is received from the peripheral device or the buffer fills, causing the data to be transmitted out of the host port of the multiport preceded by a port identification number. The single message terminating character is in the form of any two-digit hexadecimal character from 00 Hex to 7F Hex. Factory default is Carriage Return (0D Hex).
5.2.2.4
528ESP AND 5218ESP - SET DATA BLOCK LENGTH
The data block length is the maximum number of characters per message transmitted out of the host port of the ES Series. You may select a data block length of 1 to 250 characters. The factory default data block length is 32 characters.
5.2.3
525FP AND 528FP
5.2.3.1
THE SERIAL PORT CONFIGURATION
The multiport will translate for devices using different configurations, allowing you to mix-and-match devices of different configurations. You may set the baud rate, word size, stop bits, parity, and XON/XOFF handshaking for each individual port. Factory default configuration on all ports is 9600 baud rate, 8 bit word size, 1 stop bit, parity, and XON/XOFF handshaking disabled.
5.2.3.2
THE SIGN ON/SIGN OFF CHARACTER
To select a peripheral port, the host device sends the sign-on/sign-off character to the multiport followed by the peripheral port number. The sign-on/sign-off character is also used to access the configuration mode. The sign-on/sign-off character may consist of any single character from 00 Hex to 7F Hex. The Factory default is Control-T (14 Hex).
22
Page 29
5.2.3.3
OUTPUT MESSAGE STRINGS
The output message strings are messages sent from the multiport to a device requesting connection or disconnection. They include the On line message, which is sent when a connection takes place; the Off line message, which is sent when a disconnection takes place; and the Busy message, which is sent when the requested port is busy. The multiport may also be programmed to send no message. These message strings may consist of up to 32 characters maximum, entered in hex notation or ASCII string. Factory default on the output message strings are: sign-on message - ^M^JOn line^G^M^J; sign-off message - ^ M^JOff line^M^J; busy message - ^ M^JBusy^M^J. NOTE: The ^ symbol represents a control character. ^M gives a carriage return, ^J gives a line feed, and ^G gives a warning bell.
5.3
DATA FLOW CONTROL
NOTE: When XON/XOFF is enabled, the multiport will continue to support hardware handshaking lines. If this is not desired, you may disconnect the handshaking lines entirely.
5.3.1
All 524, 528, 5218 MODELS
Host-to-multiport-to-peripheral communication When the host device transmits data to a peripheral device through the multiport's host port, the data is received and stored in a 256- character transmit buffer which in turn retransmits it to a peripheral device through a peripheral port. During transmission, after the buffer receives 236 characters, the multiport will make the host port's CTS (Clear-To-Send) line low (negative voltage), signaling the host device that it cannot accept more data (however, in reality it can accept another 20 characters before overflowing the buffer). If XON/XOFF handshaking is enabled and the host device does not respond, 8 characters later the multiport will send an XOFF character, signaling the computer that it cannot accept more data (however, in reality it can accept another 12 characters before overflowing the buffer). When the multiport's buffer empties, the multiport will make the CTS line high (positive voltage) and send an XON character (if XON/XOFF is enabled), signaling the host device that it can accept more data.
23
Page 30
When the multiport retransmits the data to the peripheral device through a peripheral port, and the peripheral device cannot receive any more data, the multiport will expect to see a low on the DTR (Data Terminal Ready) line or receive an XOFF character (if XON/XOFF is enabled). When the peripheral device can receive more data, the multiport will expect to see a high on the DTR line or receive an XOFF character (if XON/XOFF is enabled). Peripheral-to-multiport-to-host communication When a peripheral device transmits data to host device through the multiport's peripheral port, the data is received and stored in a 256-character receive buffer which in turn retransmits it to the computer through the host port. After the buffer receives 236-characters, the multiport will make the peripheral port CTS (Clear-To-Send) line low (negative voltage), signaling the peripheral device that it cannot accept more data (however, in reality it can accept another 20 characters before overflowing the buffer). If XON/XOFF is enabled and the peripheral device does not respond, 8 characters later the multiport will send an XOFF character, signaling the peripheral device that it cannot accept more data. (However, in reality it can accept another 12 characters before overflowing the buffer.) When the buffer empties, the multiport will make the CTS line high (positive voltage) and send an XON character, signaling the peripheral device that it can accept more data. When the multiport is sending data to the host device through the host port and the host device cannot receive any more data, the multiport will expect to see a low on the DTR line or receive an XOFF character (if XON/XOFF is enabled). NOTE: The Model 525FP and 528FP pass certain handshake lines through the unit. In particular, the RTS line of a connected port is passed through to the DSR line of the other connected port and vice-versa.
5.3.2
524NB(P) AND 528NB(P) NON-BUFFERED UNITS
The 524NB(P) and 528NB(P) units do not have any buffer and pass data flow control lines through the unit. Host-to-multiport-to-peripheral communication: When the multiport is transmitting data from the host device to a peripheral device and the peripheral port detects a low (negative voltage) on the DTR line, the multiport will stop transmitting data to the peripheral device In addition, the multiport will make the host port's CTS line low and send an XOFF character (if XON/XOFF is enabled). When the peripheral port detects a high (positive voltage) on the DTR line, the multiport will resume transmitting data to the peripheral device. In addition, the multiport will 24