EN

Instruction Manual
Interface instruction
NE216 progr. 01
1.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
th
The transmission is effected character by character in ASCII code. Each character consists of 8 bits. The 8
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>
Address
Line
P
Data
Parameter
<ETX>
<CR>
Start of Text (02Hex)
00...99 (device identifier)
01...XX (see operating chart)
Programming command
Parameter data
Special commands
End of Text
(03Hex)
0DHex (control token "carriage return")
"CR" is optional but ever replied by the counter.
Example:
Standard
Ascii
Hex
<STX> identifier line <ETX>
<STX>3502<ETX>
02H,33H,35H,30H,32H,03H
(identifier=35; line=02)
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
Dauchinger Strasse 58-62 DE-78056 Villingen-Schwenningen
Phone +49 7720 942-0 Fax +49 7720 942-900
www.baumer.com [email protected]
05.13 171.02.185/1
Subject to modification
in technic and design.
NE216
2. 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
VZ
Data
P= NE216 is in programming (PGM) mode
R= NE216 is in RUN mode
Negative sign, only transferred with negative values
max. total of digits, with preceding zeroes w/o decimal point
(Exception: line 6 – with decimal point)
2.1. 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
NE216
3. 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>]
3.1. 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
NE216
4. Special commands
In the case of special commands, we are talking about instructions that do not refer to any line number
(memory location on operator plan), with the exception of command "Clear current count".
4.1. Clear current count
The following special command will clear the current count PC (line 1). This line is disabled for parameterization. The remaining lines of the programming chart (except separating lines) are cleared by entering parameter 0 (as previously described in chapter 4).
The instruction to clear corresponds to a reset via C key. The counter response upon clearing is the same as
with reading of the corresponding line.
General: <STX> address line <DEL> <ETX>
Example:
Clear current count PC
Identifier =35, Line=01, Status=RUN mode
Command:
<STX>3501<DEL><ETX>
Response:
<STX>3501R00000<ETX><CR>
<DEL> = 7FHex
4.2. Switching the counter to PGM or RUN mode
This command allows you to switch the counter to and fro between PGM and RUN mode upon every data
call. Both identifier and status are replied.
General: <STX> identifier <DC1> <ETX>
Example:
Identifier=35, Status=RUN mode, current line = 1, displayed value =15
Command:
<STX>35<DC1><ETX>
<DC1> = 11Hex
Response:
<STX>35P<ETX><CR>
Repeating the command will switch the counter back to RUN mode
Command:
<STX>35<DC1><ETX>
Response:
<STX>35R<ETX><CR>
4.3. Reading out the counter identification
Identification data are read only and will be followed by two parameters: Command parameter "I" (for identification) or selection parameter "T" (type and software number) or "D" (date and hardware version) for the
several identification data.
Read out device type and software number:
Address=35, Type =NE216, software number =01
Command:
<STX>35IT<ETX>
Response:
<STX>35NE216 01<ETX><CR>
Read out date and version number:
Address=35, Datum=02.10.96, version number=01
Command:
<STX>35ID<ETX>
Response:
<STX>35021096 1<ETX><CR>
4
www.baumer.com
NE216
5. Error messages during data transfer
If receiving an invalid data protocol from the PC (for example line not existing or letters where there should
be numbers) the counter – provided it is still accessible - will return a corresponding error message. To be
able to do so, at least control character <STX> and identifier must be correct. If not, NE216 is no longer accessible and therefore not in a position to reply any error message to the PC.
In case no reply neither error message is replied on the PC request, it is a fatal error which means control
character <STX> and identifier are missing. Furthermore, PC and NE216 interface parameters are not congruent. However these being correct, the failure is due to hardware or a defect in the data transmission line.
Standard structure in error messages:
<STX> Identifier line status <CAN> error number <ETX> <CR>
Example:
Identifier =35, Line =09 (invalid line), error number =2
<STX>3509R<CAN>2<ETX><CR>
The error message replied will come without „line“ and „status“ information.
Detailed error description:
Error 1: Format error (incorrect <ETX> position. This signal is given in case
the data format was not kept during programming (for example during
parameterization of a limit only 4 digits instead of 5 have been
transferred).)
Error 2: Line (position) not existing or separating line
Error 3: Parameter error (invalid protocol data). Example: Scaling factor not
only comprising numbers but also of other characters not permitted, or
parameter beyond the permitted range.
6. Chart of the control characters applied
Control character
<STX>
<ETX>
<ACK>
<LF>
<CR>
<DC1>
<CAN>
<DEL>
Hex
02
03
06
0A
0D
11
18
7F
Decimal
02
03
06
10
13
17
24
127
www.baumer.com
5
NE216
7. Operating Plan
Line
6
Default
01
02
03
04
05
07
0
1 0 0
1 0 0 0
0
0
1.0 0 0 0
10
- - - - -
11
12
13
14
15
17
S
S
S
S
S
S
20
- - - - -
21
22
23
24
30
31
32
33
34
35
36
38
40
41
2
2
2
2
3
3
3
3
3
3
3
3
4
4
42
4
43
44
50
4
4
5
t
0.2
2
t
0.2
3
4
0 C o
51
52
53
54
5
5
5
5
1
2
3
4
55
- - - - -
t
t
t
t
t
t
1
2
3
4
0
1
2
3
4
5
6
8
0
1
a
a
a
a
a
a
t
t
t
t
t
t
0
0
0
2
2
2
Customer parameterization
Description
PC
P1
P2
SC
tot
SF
-
current value displayed
preset 1
preset 2
start count
totalizer
scaling factor
Separating line
S
S
S
S
S
S
t
t
t
t
t
t
a
a
a
a
a
a
t
t
t
t
t
t
PC
P1
P2
SC
tot
SF
-
current value displayed
preset 1
preset 2
start count
totalizer
scaling factor
Separating line
0
0
0
0
0
0
0
0
0
0
3
0
0
1
5
2
5
0
0
d
0
2
2
2
2
3
3
3
3
3
3
3
3
4
4
0
0
0
0
1
2
3
4
0
1
2
3
4
5
6
8
0
1
Operating mode
Preset mode
Reset
Decimal point in P1, P2, SC, tot
Count mode
Frequency track A
Frequency track B
Input logic
Function control input 1 (terminal 9)
Reaction time control input 1
Function control input 2 (terminal 10)
Adoption of presets P1,P2 and SC
Output logic of digital output
Output time preset P1
4 2
Output time preset P2
4 3
4 4
5 0
Time range of hour counter
Rapid preset recognition
Code
5
5
5
5
Baud rate
Parity
Stop bits
Identifier
1
2
3
4
Separating line
www.baumer.com
NE216
9. Programming plan
Line 11-17
0
1
2
Line 21
0
1
2
Status lines 1-7
Parameter enabled for programming
Delete resp. Input lock
Skip parameter
Operating mode
Adding (reset to SC)
Subtracting (reset to P2)
Subtracting; but output contact at SC, automatic reset at 0
Line 22
0
1
Preset mode
Step preset
P1-trailing preset
Line 23
0
1
Reset
With automatic reset
w/o automatic reset
Line 24
0
1
2
3
Decimal point in PC, P1, P2, tot, SC
None
0000.0
000.00
00.000
Line 30
0
1
2
3
4
5
6
7
Count mode
Track A UP/DOWN signal at B where required
Subtracting (A-B)
Adding (A+B)
Track A 90° B Single evaluation
Track A 90° B Double evaluation
Track A 90° B Quadruple evaluation
Hour counter with preset
Same as 6 but with start and stop
Line 31
0
1
2
Frequency track A
10 kHz
25 Hz
3 Hz
Line 32
0
1
2
Frequency track B
10 kHz
25 Hz
3 Hz
Line 33
0
1
2
3
Input logic
PNP Trigger
NPN Trigger
PNP Trigger
NPN Trigger
Line 34
0
1
2
3
4
5
6
7
8
9
Line 35
0
1
threshold
threshold
threshold
threshold
Line 36
0
1
2
3
4
5
6
7
8
Functionality control input 2 (terminal 10)
Reset static
Reset edge-triggered
Reset totalizer edge-active
Stop
Hold
Programming lock
Key lock
Print
Outputs OUT (P1,P2)
Line 38
0
1
Line 40
0
1
2
3
Adoption of presets P1,P2,SC
Immediately effective
Upon reset
Output logic of digital outputs
Both outputs normally closed
P1 normally open, P2 normally closed
P1 normally closed, P2 normally open
Both outputs normally open
Line 41
0.25
0.01
99.99
Output time P1
Default
Min.
Max.
Line 42
0.25
0.01
99.99
Output time P2
Default
Min.
Max.
Line 43
0
1
2
3
Time range hour counter
999s 99/100s
99min 59s 9/10s
999min 59s
999h 59min
Line 44
0
1
6
6
3
3
V
V
V
V
Functionality control input 1 (terminal 9)
Reset static
Reset edge-triggered
Reset totalizer edge-triggered
Stop
Hold
Programming lock
Key lock
Print
Outputs IN (P1,P2)
Outputs IN (P1,P2) and reset fl.
Reaction time of control input 1
30 ms
100 µs
www.baumer.com
Rapid preset recognition
Standard
Rapid
Line 50
0000
:
9999
Code
Code not active
Line 51
0
1
2
3
Baud
4800
2400
1200
600
Line 52
0
1
2
Parity
Even Parity
Odd Parity
No Parity
Line 53
0
1
Stop bits
1 Stop bit
2 Stop bits
Line 54
00
00
99
Identifier
Default
Min.
Max.
rate
Baud
Baud
Baud
Baud
7