Command Set
•
33
Format of NuDAM Commands
(Leading Code)(Addr)(Command)[Data]
[Checksum]
<CR>
When checksum is enable then
[Checksum]
is needed, it is
2-character. Both command and response must append the checksum
characters.
How to calculate checksum value ?
[Checksum] =
(
(Leadi(Addr)+(C[Data]
) MOD
0x100
Example 1: checksum is
disable
User Command: $012<CR>
Response:
!01400600<CR>
$
: LeadingCode
01
: Address
2
: Command (Read Configuration)
<CR>
: Carriage return 0x0D
Example 2: checksum is
enable
User Command: $012
B7
<CR>
Response:
!01400600
AC
<CR>
$
: LeadingCode
01
: Address
2
: Command (Read Configuration)
B7
: Checksum value
<CR>
: Carriage return 0x0D
‘$’ = 0x24
‘0’ = 0x30
‘1’ = 0x31
‘2’ = 0x32
B7 = (
0x24 + 0x30 + 0x31 + 0x32
) MOD 0x100
‘!’ = 0x24
‘0’ = 0x30
‘1’ = 0x31
‘4’ = 0x34
‘6’ = 0x36
AC
=
(
0x24 + 0x30 + 0x31 + 0x34 + 0x30 + 0x30 + 0x36 + 0x30
+ 0x30
)
MOD 0x100
Note
: 1. There is no spacing between the command words and
The checksum characters.
2. Every command follows a <CR> carriage return for
ending.
3. The checksum characters are optional.
Summary of Contents for NuDAM-6017
Page 2: ......