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 defines the structure of a
setup record:
Table B-3 Setup Record Construction
IP address of the unit (x.x.x.x)
Bit 7: Reserved (0)
Bit 6: Set 1 for AUI, 0 for 10BASE-T (CoBox-Micro only)
Number of host bits for subnetting; if 0, matching standard netmask for Class A, B, C
is used.
Telnet configuration password (0 if not used)
Gateway IP address (0,0,0,0 if not used)
48-byte Channel 1 parameters; parameter setup Channel 1 (see Table E-4: Channel
Parameters)
48-byte Channel 2 parameters; parameter setup Channel 2 (see Table E-4: Channel
Parameters))