![Nanomotion XCDX User Manual Download Page 40](http://html.mh-extra.com/html/nanomotion/xcdx/xcdx_user-manual_705065040.webp)
XCDX458000-00 rev A
40
Communication Protocol
Controller reply has similar parts; the number of replies is the same as the
number of commands in the corresponding command block:
4.3.5.1
D
ISCOVERY
PROTOCOL
Discovery protocol is used to find out one or more XCDX boxes connected to
a PC or to network segment.
Unlike other XCDX commands, Discover command is sent with broadcast IP
address; each node in the LAN segment receives the command. The XCDX
responds to Discovery command submitting to the host its IP address.
Once the responses have been received, the host knows IP addresses of all
connected XCDX boxes and is able to communicate with any of them.
• Discover command is sent by Host as a UDP datagram formatted as
follows:
Table 4: Controller Reply
Part
Byte
offset
Size in
bytes
Description
Block prefix
0
2
Constant 0x18FC (byte 0 is 0xFC,
byte 1 is 0x18)
2
2
Length of the whole block in bytes,
including the block prefix
4
2
ID copied from the command
6
2
Error: 0 - no errors, >0 - number of
rejected commands, 0x00F0 -
command format error
Reply 1
prefix
8
1
Source 0 (X), 1 (Y), 2 (Z), or 128
(MCU)
9
1
Length of the reply body in bytes
Reply 1 body
10
1
Command code copied from the
corresponding command
11
1
Result: 1 - command accepted, 2 -
command rejected
12
N
Extension. Reply to most commands
does not require extension (N is
zero).
Reply 2
prefix
Reply 2 body
Reply N
prefix
Reply N
body