General information, Transmission protocol – Baumer PCD41 Benutzerhandbuch

Seite 8

Advertising
background image

PCD41

8 www.baumer.com

1. General information

The serial interface can fulfill the same functions as the display and the keyboard of the tachometer. It is
possible to poll data via the interface and to reprogram parameters. In general, the tachometer is operated via
the serial interface on a personal computer. However, it is also possible to use another device with similar
features.

2. Transmission protocol

Transmission is effected character by character in ASCII code. Each character consists of 8 bits. The 8

th

bit is

the parity bit; in case of "no parity", the 8

th

bit will always be transmitted as a zero.

The tachometer responds to every request of the PC via the serial interface – if data have been transmitted
correctly.
The transmission of characters is introduced by the start-of-text character <STX> and closed by the end-of-text
character <ETX>. In addition, the tachometer also sends a <CR> (carriage return) after the character <ETX>.
This allows the input (in high-level languages such as BASIC) of a complete record of data with only one
command.
The character <STX> is followed by an address allotted to the tachometer. This allows a target approach of the
tachometer in a serial network. The address is followed by the indication of the line (position) that is to be read
out or programmed. In case of a programming instruction, the line indication is followed by a "P" (program) and
the data (parameters).

The protocol is split into three groups, as described in the following:

a) Reading of storage locations (READ instruction):

<STX> Address Line <ETX> [<CR>]


b) Programming of storage locations (WRITE instruction):

<STX> Address Line P Data <ETX> [<CR>]


c) Special instructions:

<STX> Address Parameter <ETX> [<CR>]


<STX>

Start of text (02Hex)

Address 00..99 (device address)
Line 01..XX (refer to operating plan)
P Programming instruction
Data Programming data
Parameter Special instructions
<ETX> End of text (03Hex)
<CR> 0DHex (Control character "carriage return")
"CR" needs not be given (optional) will, however, always
be returned by the tachometer.

Example:

General <STX> Address Line <ETX> (Address=35; Line=02)

Ascii <STX>3502<ETX>
Hex 02H,33H,35H,30H,32H,03H



Important !
The blanks between the individual characters in the instructions only serve the purpose of a clear presentation.
The entry on the PC is to be effected without blanks. Control characters (< 20Hex) are set between <pointed>
brackets.
If a wrong protocol is sent by the PC, the tachometer will then return an error message. This presupposes that it
is possible to continue to reach the PCD41. Please read the section on error messages on page 5.

Advertising