P61 firmware
© Nedap IDEAS, P.O. Box 103, NL-7140 AC GROENLO
Page 15 of 18
C
DC2/DC4 PROTOCOL
DC2/DC4 protocol is the standard Nedap protocol which supports two-way communications, error checking
and software handshaking.
C.1
DATA FORMAT
Baudrate:
9600(default), 1200, 19200 or 39400. Setup with DIP-switches (see chapter 2).
Databits:
7(default) or 8. Setup with DIP-switches (see chapter 2).
Parity:
even(default) or none. Setup with DIP-switches (see chapter 2).
Stopbits:
1
C.2
PROTOCOL DESCRIPTION
The DC2/DC4 protocol is a serial, asynchronous protocol for ASCII communication.
The communications is started by sending a DC2 character and waiting for a DC4 character response.
The DC4 character is the signal that the receiver is ready to accept a message. When there is no DC4
response within 2 seconds the communication is aborted. If the DC4 character is received the transmitter
will send the data message and waits for an ACK or NAK character response. The ACK character is the
confirmation that the message was correctly received. The NAK character is the signal that the receiver
has detected an error in the data message. When there is no ACK response within 4 seconds the
communication is aborted.
Both reader and host can startup the communication by sending a DC2. When the reader and the host
startup the communication at the same time, the host will have the precedence to transmit it's message. The
reader will (temporarily) withdraw. In other words the reader (and not the host) transmits a DC4 character.
DC2
DC4
data message
ACK
< 2 sec
< 4 sec
Transmit
Receive
Figure 7: Timing diagram DC2/DC4 protocol
When an event message (initiated by Nedap) is not acknowledged the event is NOT be cleared from the
event buffer. Nedap resends the event message later.
When a reply message is not acknowledged the reply is lost. The host has to resent the request in order to
get the reply again.
C.3
SPECIAL CHARACTERS
The DC2/DC4 protocol supports 7 bit
ASCII
data communication. See also appendix B
ASCII
table.
The
ASCII
control characters are reserved for message handling. The remaining characters (in the range
from 20 hex to 7F hex) are valid characters for the data.
The used special characters are:
DC
2
12 hex
Are you ready to receive?
DC
4
14 hex
I'm ready to receive!
STX
02 hex
Here comes the message.
ETX
03 hex
This was the message.
ACK
06 hex
I understood the message.
NAK
15 hex
I didn't understand the message.