Operating instructions, General, Transmission protocol – Baumer NE214 Benutzerhandbuch

Seite 9

Advertising
background image

NE214

www.baumer.com

9

Operating Instructions

Interface description
NE214 Prog. 01

1. General

The serial interface can accomplish the same functions as the display and the keyboard of the counter. It is
possible to call up data and to change the programming of parameters. In general, the counter is controlled via a
PC. However, it is also possible to use another device with similar features.

2. Transmission protocol

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

th

bit

is the parity bit, and in case of "no parity", the 8

th

bit will always be sent as zero.

The counter responds to every request of the PC via the serial interface if the data has been correctly
transmitted.
The transmission of characters is introduced with the start-of-text character <STX> and closed by the end-of-text
character <ETX>. In addition, the counter sends a <CR> (carriage return) after <ETX>. This allows the input of
a complete data block by means of one command (in high-level languages such as BASIC).
After <STX> there will follow an address allotted to the counter, making it possible to specifically address the
counter within a serial network. After the address, please indicate the position that you wish to read out or to
program. In case of a programming command, you will need to enter a "P" (for programming) and the data
(parameters).

The protocol is classified into three groups as indicated below:

a) Reading of the 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 commands:

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

<STX>

Start of text (02Hex)

Address 00..99 (device address)
Line 01..XX (please refer to operating plan)
P

Programming command

Data Programming data
Parameter Special commands
<ETX> End of text (03Hex)
<CR> 0DHex (control character "carriage return")
"CR" need not be indicated(optional), will however always be
returned by counter.

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 particular characters of the commands only serve the purpose of better
legibility. The input at the PC must be effected without blanks. Control characters (less than 20Hex) are set in
"pointed" brackets.
If a fase protocol has been sent by the PC, the counter will return an error message. This implies that it must still
be possible to reach the NE214. Please read the paragraph regarding error messages.

Advertising