The text of a manual · part 6 of 32
MS-880 Industrial Long Range Scanner User's Manual, pages 51 to 60
Pages 51 to 60 of 312
The original document is the PDF (6.2 MB). 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 Microscan MS-880
Page 51
Chapter
Protocol
3 Chapter Contents
Protocols are the rules by which devices pass data back and forth. This section includes the basic options available for data communication, including multidrop and user-defined options and output data formats. Note: The characters NULL <> and , can only be entered through embedded menus, not through ESP or serial commands.
MS-880 Industrial Long Range Scanner User’s Manual
3-1
3–Protocol
Protocol....................................................................................................3-4 LRC..........................................................................................................3-9 Response Timeout.................................................................................3-10 Intercharacter Delay ..............................................................................3-11 Output Data Format ...............................................................................3-12 Auxiliary/Configuration System Data .....................................................3-14 Network Client .......................................................................................3-15
Page 52
Protocol by ESP
Click this button to bring up the Protocol menu.
3–Protocol
To change a setting, double-click the setting and use your curser to scroll through the options.
Protocol by Serial Command Command Title Host Protocol Preamble Postamble Response Timeout Intercharacter Delay LRC Aux/Config. Port Data Communications Status Request
3-2 old cmds Kf Kd Ke KA KB Kc new cmds K140, K141, K142, K143, K144, K145, K146,
KT?
K199? <K199?>
Format <K140,protocol> <K141,status,preamble> <K142,status,postamble> <K143,timeout> <K144,time interval> <K145,status> <K146,aux status,config status>
MS-880 Industrial Long Range Scanner User’s Manual
Page 53
Chapter 3
Protocol
Protocol by Embedded Menu For information on accessing the embedded menus, see “Embedded Menus” on page A-23. From the Main menu, scroll down through the options and select the following screen:
3–Protocol
MS-880 Industrial Long Range Scanner User’s Manual
3-3
Page 54
Protocol
Protocol Protocols define the sequence and format in which information is transferred between the scanner and the host, or in the case of Multidrop, between scanners and a concentrator.
Usage:
In general, the point-to-point protocols will work well in most applications. They require no address and must use RS-232 or RS-422 communications standards.
Serial Cmd:
<K140,protocol>
Default:
Point-to-Point
Options:
0 = Point-to-Point 1 = Point-to-Point with RTS/CTS 2 = Point-to-Point with XON/XOFF 3 = Point-to-Point with RTS/CTS & XON/XOFF 4 = Polling Mode D 5 = Multidrop 6 = User Defined 7 = User Defined Multidrop If selecting one of the options from 0 to 4 (Point-to-Point, Point-toPoint with RTS/CTS, Point-to-Point with XON/XOFF, Point-toPoint with RTS/CTS and XON/XOFF, or Polling Mode D), use the <K140,protocol> format. Option 5 through 7 are special cases and discussed later in this section.
3–Protocol
Definition:
Point-to-Point (standard) Definition:
Standard Point-to-Point requires no address and sends data to the host whenever it is available, without any request or handshake from the host.
Usage:
Used only with RS-232 or RS-422.
Serial Cmd:
<K140,0>
3-4
MS-880 Industrial Long Range Scanner User’s Manual
Page 55
Chapter 3
Protocol
Point-to-Point with XON/XOFF (Transmitter On/Off) Definition:
This option enables the host to send the XON and XOFF command as a single byte transmission command of start (^Q) or stop (^S).
Usage:
If an XOFF has been received from the host, data will not be sent to the host until the host sends an XON. During the XOFF phase, the host is free to carry on other chores and accept data from other devices. Used only with RS-232.
Serial Cmd:
<K140,1>
Point-to-Point with RTS/CTS Point-to-Point with RTS/CTS (request-to-send/clear-to-send) is a simple hardware handshaking protocol that allows a scanner to initiate data transfers to the host.
Usage:
A scanner initiates a data transfer with an RTS (request-to-send) transmission. The host, when ready, responds with a CTS (clear-to-send) and the data is transmitted. CTS and RTS signals are transmitted over two dedicated wires as defined in the RS-232 standard. Used only with RS-232.
Serial Cmd:
<K140,2>
Point-to-Point with RTS/CTS & XON/XOFF Definition:
This option is a combination of Point-to-Point with RTS/CTS and Point-to-Point with XON/XOFF.
Usage:
Used only with RS-232.
Serial Cmd:
<K140,3>
Polling Mode D Definition:
Like Point-to-Point, Polling Mode D requires a dedicated connection to the host; but unlike Point-to-Point, it requires an address and must wait for a poll from the host before sending data.
Usage:
When in Polling Mode D, an address of 1 is automatically displayed on the configuration screen. However, during transmission, a 1C hex poll address (FS) and a 1D hex select address (GS) are substituted for the 1.
Serial Cmd:
<K140,4>
MS-880 Industrial Long Range Scanner User’s Manual
3-5
3–Protocol
Definition:
Page 56
Protocol
Multidrop Note: See also “Multidrop Communications” on page A-38. Definition:
Multidrop allows up to 50 devices to be connected to a single RS-485 host, with the scanner assigned an unique address (from 01 to 50).
Usage:
The MS-5000 can be used as a concentrator to a single host port connection. When Multidrop is selected, the protocol characters for RES, REQ, etc. are assigned automatically.
Multidrop Addresses:
Each address has its own separate poll and select address (from 1C to 7F hex).
Options:
01 through 50
Serial Cmd:
If selecting Multidrop (K140,5) an address must be defined and appended to the command string. Format: <K140,5,address>
3–Protocol
Note: Scanners linking up to a Microscan MS-5000 multidrop concentrator must be configured in standard multidrop protocol.
User Defined Point-to-Point Definition:
User Defined Point-to-Point allows the user to customize the pointto-point protocol.
Usage:
Useful for developing custom protocols in polled or unpolled mode.
Serial Cmd:
<K140,6,RES,address,REQ,EOT,STX,ETX,ACK,NAK,from host>
User Defined Address Definition:
User Defined is considered to be in a polled mode only if an address has been assigned.
Serial Cmd:
<K140,6,RES,address,REQ,EOT,STX,ETX,ACK,NAK,from host>
Default:
No address
Options:
Any ASCII character except a null.
3-6
MS-880 Industrial Long Range Scanner User’s Manual
Page 57
Chapter 3
Protocol
User Defined Example Definition:
Example: ACK/NAK protocol can be configured using User Defined. The scanner will transmit data to the host, when an ACK is received, it will carry on with its business. If a NAK or response timeout occurs, the scanner will re-send the data to the host up to 3 more times before aborting. Tip: To use User Defined Point-to-Point, first select Point-to-Point <K140,0> and then User Defined <K140,6>. Example: To select an unpolled ACK/NAK User Defined protocol with LRC disabled, send <K140,0><K140,6,,,,,,,^F,^U><K145,0>. ACK and NAK will be displayed in the menu.
Serial Cmd:
<K140,6,RES,address,REQ,EOT,STX,ETX,ACK,NAK,from host>
Default:
No assignment
Options:
Any ASCII character except a null. Control characters can be used to define RES through NAK in serial commands.
From Host This option allows the handshaking protocol to be initiated from the host, if not configured in an unpolled mode. Messages sent to the host will include the scanner’s defined protocol. The status of From Host determines if messages sent from the host to the scanner must include the defined protocol. If From Host is disabled, the defined protocol is not included. If From Host is enabled, the defined protocol must be included.
Serial Cmd:
<K140,6,RES,address,REQ,EOT,STX,ETX,ACK,NAK,from host>
Default:
Disabled
Options:
0 = Disabled
1 = Enabled
MS-880 Industrial Long Range Scanner User’s Manual
3-7
3–Protocol
Definition:
Page 58
Protocol
User Defined Multidrop Definition:
User Defined Multidrop allows the user to customize the polling protocol.
Usage:
This option is used when connecting to a concentrator or other device that does not match standard multidrop protocol. If selecting User Defined Multidrop (7), complete the format by either choosing new parameters or place commas where unchanged data fields occur.
Serial Cmd:
<K140,7,RES,address,REQ,EOT,STX,ETX,ACK,NAK> For User Defined Multidrop, first select Multidrop <K140,5>, then User Defined Multidrop <K140,7...>.
3–Protocol
Address:
Any single character (02 hex to 7E hex) in the ASCII table can be assigned as the address character. The character chosen is used as the poll character and the subsequent ASCII character becomes the select character. For example, if a ^B (02 hex) is selected as the address, ^C (03 hex) becomes the select address that the host will use in sending host select commands.
Note: Any ASCII character except a null (00) and a ^A (01) can be assigned as an address. Control characters can be used to define RES through NAK in serial commands. (See “Communication Protocol Commands” on page A-22.) Note: Definitions of commands in User Defined and User Defined Multidrop must be duplicated in host applications to enable poll and select sequences to execute correctly during transmission. Note: Typically, parameters in User Defined Multidrop are defined by first enabling Multidrop, then enabling User Defined Multidrop. This pre-loads multidrop characters into the parameters. Then changes are made to individual characters to match the host or other requirements.
3-8
MS-880 Industrial Long Range Scanner User’s Manual
Page 59
Chapter 3
Protocol
LRC (Longitudinal Redundancy Check) Definition:
An error-checking routine that verifies the accuracy of transmissions. It is the exclusive OR of all characters following the STX (start of text) up to and including the ETX (end of text). What this means is that the binary representation of all the characters in a transmissions are cumulatively added in a column and each resulting odd integer is assigned a 1 and each even integer a 0 (two 1s = 0, two 0s = 0, a 1 and a 0 = 1). The extra LRC character is then appended to the transmission and the receiver (usually the host) performs the same addition and compares the results.
Usage:
Used when extra data integrity is required.
Serial Cmd:
<K145,status>
Default:
Disabled
Options:
0 = Disabled
1 = Enabled
3–Protocol
MS-880 Industrial Long Range Scanner User’s Manual
3-9
Page 60
Response Timeout
Response Timeout Time the scanner will wait before timing out if ACK, NAK, and ETX are enabled, and a host response is expected.
Usage:
Only used when a response is required from the host. While in Multidrop, if the scanner does not receive an ACK or NAK from the host after sending polled data, it will act on a fault. The scanner can be set to wait indefinitely by setting Response Timeout to zero.
Serial Cmd:
<K143,response timeout>
Default:
2 (in ten mS increments)
Options:
0 to 255 (A zero (0) setting causes an indefinite wait.)
3–Protocol
Definition:
3-10
MS-880 Industrial Long Range Scanner User’s Manual