Instruction Manual
Interface instruction
NE216 progr. 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 8th
bit is the parity bit, and in case of "no parity" it 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.
Character transmission 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) Read memory space (READ instruction):
<STX> identifier line <ETX> [<CR>]
b) Write memory location (WRITE instruction):
<STX> identifier line P data <ETX> [<CR>]
c) Special commands:
<STX> identifier parameters <ETX> [<CR>]
<STX> Start of Text (02Hex)
Address 00...99 (device identifier)
Line 01...XX (see operating chart)
P Programming command
Data Parameter data
Parameter Special commands
<ETX> End of Text (03Hex)
<CR> 0DHex (control token "carriage return")
"CR" is optional but ever replied by the counter.
Example:
Standard <STX> identifier line <ETX> (identifier=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. PC input must be without blanks. Control characters (less than 20Hex) are in "pointed"
brackets. Any incorrect protocol received from the PC will be replied by an error message, provided NE216 remains still accessible. Please refer to chapter “Error messages” on page 4.
Baumer IVO GmbH & Co. KG 05.13 171.02.185/1
Dauchinger Strasse 58-62 DE-78056 Villingen-Schwenningen Subject to modification
Phone +49 7720 942-0 Fax +49 7720 942-900 in technic and design.
www.baumer.com info.de@baumerivo.com
Reading of memory locations
All memory locations indexed with a line number in the programming scheme enable read out (except the
separating lines that are indexed by dashes).
The protocol: <STX> Address Line <ETX> [<CR>] can be used for each line.
The counter response may vary in protocol length from one line to the other, since it depends on the data
length of the respective memory location.
NE216 allows for read out both in RUN and PGM mode. The only difference lies in the counter response
which will come with an "R" or a "P" in the mode parameter, as described in the following.
Response to a Read instruction (general):
<STX> identifier line mode data <ETX> <CR>
Mode P= NE216 is in programming (PGM) mode
R= NE216 is in RUN mode
VZ Negative sign, only transferred with negative values
Data max. total of digits, with preceding zeroes w/o decimal point
(Exception: line 6 – with decimal point)
Examples for reading memory locations
The following applies to the examples below:
Counter address (Identifier) = 35; Counter mode = R (RUN-mode)
Read main counter PC (line=01, displayed value =1500)
Request: <STX>3501<ETX>
Reply: <STX>3501R001500<ETX><CR>
Read scaling factor SF (line=07, parameter =1.0000)
Request: <STX>3507<ETX>
Reply: <STX>3507R01.0000<ETX><CR>
Read count mode (line =30, parameter = Pos. 3)
Request: <STX>3530<ETX>
Reply: <STX>3530R3<ETX><CR> (3 meaning track A90ºB single evaluation)
Read device address (line=54, device address=35)
Request: <STX>3554<ETX>
Reply: <STX>3554R35<ETX><CR>
2 www.baumer.com
Writing of memory locations
All memory locations indexed with a line number in the programming plan enable writing (programming),
except for the separating lines (indexed by dashes) and lines 1 and 5.
Protocol: <STX> identifier line P [VZ] Data <ETX> [<CR>] can be applied to each line.
Counter response upon parameterization is the same as for a read command for the respective line.
Programming of memory locations is enabled both in RUN and PGM mode.
Programming in RUN mode:
Parameterization in lines 21-23, 30-33, 35, 43, 44 and 51-54 will not become effective until a switching
operation from PGM mode to RUN mode. Please see chapter 5.2 for how to switch to PGM mode. The
parameters in all other lines will be immediately effective after entry.
Any parameterization done in RUN mode will only be retained non-volatile after having accomplished
the switching operation from PGM to RUN mode. If omitted, the previously programmed parameters
will be restored in the event of power failure.
Write-command (general):
<STX> identifier line P [VZ] data <ETX> [<CR>]
Examples for writing of memory locations
Following applies to the examples below:
Counter address (identifier) = 35; counter in mode = R (RUN)
Programming the start count SC (line =04, start count=360)
Command: <STX>3504P00360<ETX>
Response: <STX>3504R00360<ETX><CR>
Programming a negative start count SC (line=04, start count=-360)
Command: <STX>3504P-0360<ETX>
Response: <STX>3504R-0360<ETX><CR>
Programming the scaling factor SF (line =07, parameter =1.0000)
Command: <STX>3507P1.0000<ETX>
Response: <STX>3507R1.0000<ETX><CR>
Programming the count mode (line =30, count mode=1)
Command: <STX>3530P1<ETX>
Response: <STX>3530R1<ETX><CR>
Programming the output time P1 at Latch(line=41)
Command: <STX>3541PL<ETX>
Response: <STX>3541RL<ETX><CR>
Programming the device identifier (line=54, device identifier=27)
Command: <STX>3554P27<ETX>
Response: <STX>3554R27<ETX><CR>
www.baumer.com 3