Basic Operation

Operation
Previous
 Next

RS485SPY is a utility to monitor communications between a computer and devices on a RS485 network. The program uses a separate communication port connected in parallel on the RS485 2 wire circuit. This way data packets transmitted back and forth can be displayed on screen or logged to disk. It also provides a facility to transmit an arbitrary text string as well.

When you exit the RS485SPY program it will save all current settings so that the next time you start the program all your settings can be restored automatically. If you terminate the program by closing the window, however, current settings are not saved.


Adding devices Manually

Connection
Previous
Next

You can run the RS485SPY program on the same computer as the communition software to be monitored, or it can be run on a separate computer. The diagram below shows a typical arrangement using a single computer with two RS232 COMM ports.

RS485SPY is designed to monitor communications using an independent communication port. RS485 is a half duplex protocol which means communications from the computer to the instrument or from the instrument back to the computer will be transmitted each their turn and on the same two wires. Since RS485SPY is connected in parallel it can listen in on all the data being transmitted. You can use an internal RS485 adapter card or one of the computer's RS232 ports with a suitable RS232/RS485 converter.


setup / communications

COMM Port Setup
Previous
Next

The communication setup parameters are quite common and self explanatory except for "Receive Time-Out". When the RS485Spy program monitors communications and it starts receiving characters it will wait for additional characters so that it can include them in the received packet and display them on the same line. The "Receive Time-Out" parameter controls how long it will wait for additional characters.


Adding devices Manually

Display Format
Previous
Next

The DISPLAY menu offers four display formats, Normal, Hex, Mnemonic, and All Hex. These formats control how the special non-printable characters, (i.e. ASCII characters 00-1F), will be handled. Communication protocols often include the use of these characters so we need a way to view them. The following examples show the same two communication lines formatted in each of the four display formats.

Normal Format
15:37:06.743: 014C449DB
15:37:06.773: 014C4-055292

Hex Format {0x00}
15:37:06.743: {0x02}01{0x11}4C4{0x03}49DB
15:37:06.773: {0x01}014C4-05{0x04}5292

Mne Format {???}
15:37:06.743: {SIX}01{CS1}4C4{EIX}49DB
15:37:06.773: {SOH}014C4-05{EOI}5292

All Hex Format 00ABFF
15:37:06.743: 023031113443340334394442
15:37:06.773: 0130313443342D30350435323932

In normal format the special characters are represented as ' ' since Windows considers these non-printable characters. In hex format each non-printable craracter is replaced by a hexidecimal representation of the character enclose in braces '{}'. In "Mne", menumonic format, each non-printable craracter is replaced by its corresponding menumonic also enclosed in braces '{}'. For "All Hex" format, each one of the data bytes received, regardless of whether they are printable or not, are displayed as a pair of hex digits.

The table below lists the corresponding hex and menumonic representations of all the non printable characters.

0x00 | NUL | 0x10 | SLE
0x01 | SOH | 0x11 | CS1
0x02 | SIX | 0x12 | DC2
0x03 | EIX | 0x13 | DC3
0x04 | EOI | 0x14 | DC4
0x05 | ENQ | 0x15 | NAK
0x06 | ACK | 0x16 | SYN
0x07 | BEL | 0x17 | EIB
0x08 | BS | 0x18 | CAN
0x09 | HI | 0x19 | EM
0x0a | LF | 0x1a | SLB
0x0b | VI | 0x1b | ESC
0x0c | FF | 0x1c | FS
0x0d | CR | 0x1d | GS
0x0e | SO | 0x1e | RS
0x0f | SI | 0x1f | US