
B: Network Configuration Using UDP
XPress™ DR Industrial Device Server User Guide
76
The two’s complement of E2 is 1E. See Calculating the Two’s Complement below.
Calculating the Two’s Complement
The two’s complement of a number is the value that must be added to the number to reach a
Hexadecimal value of 100 (256 in decimal). In the example above, E2 + 1E = 100.
You can also calculate the two’s complement by subtracting the sum from 100. Using the
example above again, 100 - E2 = 1E. It may help to use a scientific calculator.
Setup Records
A setup record consists of 120 bytes. They are transmitted at once from and to the node. Unused
bytes should be initialized as 00.
Table B-3 Setup Record Construction
setup record:
Table B-3 Setup Record Construction
Byte(s)
Function
00-03
IP address of the unit (x.x.x.x)
04
Reserved (0)
05
Flag BYTE
Bit 7: Reserved (0)
Bit 6: Set 1 for AUI, 0 for 10BASE-T (CoBox-Micro only)
Bits 5-0: Reserved (0)
06
Number of host bits for subnetting; if 0, matching standard netmask for Class A, B, C
is used.
07
Reserved (0)
08-11
Telnet configuration password (0 if not used)
12-15
Gateway IP address (0,0,0,0 if not used)
16-63
48-byte Channel 1 parameters; parameter setup Channel 1 (see Table E-4: Channel
Parameters)
64-111
48-byte Channel 2 parameters; parameter setup Channel 2 (see Table E-4: Channel
Parameters))
112-119 Reserved (0)