5
Structure of the Codes
Serial communication between the host and DN-500R uses ASCII Code from 0x20 to 0x7F.
All control command codes, status request command codes, and status information codes require
three components that form a “packet.” In order, the components are the
start character
+
ID
, the
command
, and the
end character
(0x0D):
1.
Start Cha ID:
@
(0x40)
+
0
(0x30)
2.
Command: some letters and/or numbers that stand for a controllable feature of DN-500R
3.
End Character:
\r
(0x0D)
The required start character/ID and end character are the same in all codes, whereas the command
portion varies with each code.
For example, the full control command code that the host can use to power on DN-500R is
@023PW\r
:
@0 23PW \r
Rules on Transmitting Command Codes
•
When DN-500R receives a control command or status request command from the host, DN-500R
should respond within 300 ms.
•
When DN-500R successfully executes a command that it receives from the host, DN-500R sends
an ACK signal (0x06) to the host (as well as the status information code in the case of a status
request command).
•
If DN-500R receives an unknown command from the host or if a received command fails for some
other reason, DN-500R will send a NACK signal (0x15) to the host.
•
When sending consecutive commands from the host, do not send the second command until DN-
500R has answered the first with the ACK (0x06) or NACK (0x15) signal. If the second command is
sent before the ACK (0x06) or NACK (0x15) signal is received, DN-500R will send the “Busy” status
information code (
@0BDERBUSY
) to the host.
•
If DN-500R does not receive a command that the host sent within 300 ms, the host will
automatically send the same command up to two additional times. If DN-500R still does not receive
the command after the second automatic attempt, the process will timeout, and the host will send
the end character to DN-500R.
•
Do not send a second status request command from the host until DN-500R has responded to the
first.
•
When sending a command to DN-500R from the host, make sure that no longer than 5 ms passes
between entering each character in the command code.
•
All characters used in codes transmitted between the host and DN-500R must fall within the
bounds of the acceptable character table in the
.
•
Wait at least one second after sending the Power On command before sending the next command.
•
When status information is automatically sent to the host after a change to DN-500R is made from
the device itself, the host will send an ACK (0x06) signal to DN-500R. If DN-500R does not receive
the ACK signal within 300 ms, it will automatically send the status information to the host again. If
DN-500R then fails to receive the ACK (0x06) signal again, the process will timeout.
Start Character
+ ID
Command
End Character