beautypg.com

CONTREX CX-1010 User Manual

Page 3

background image


Data Format & Definition:

Each parameter value is transmitted over the network as 6 bytes.

The first 4 bytes (2 words) contain a signed long integer.

The next byte, the 5th byte, is a resolution byte. It represents the number of digits after
the decimal point. Here are some examples:

Real value Signed

integer Resolution byte

1010

1010

0

12.34

1234

2

1.50

150

2

-200

-200

0

The 6th byte is the Definition byte. It is NOT important. Treat it as a placeholder only.
It can be used for obscure purposes in other types of serial communications, but it was
included in the DeviceNet protocol only to create an even number of bytes. PLC's often
assign variable names, and memory addresses, by the word (2 bytes) It is useful to keep
CX1010 parameters in "even byte" groups.


Shortcut tip:

Most users do NOT need to dynamically monitor decimal location. Since you are writing
and reading carefully selected and known parameters, you already know where the
decimal points are. If a setpoint ratio is always near 1.000, then you know the format
will be x.xxx. You would permanently set the resolution byte for writing a setpoint ratio
to the value 3. Then, to send a ratio of 1.123, assign the 1st 4 bytes a value (long integer)
of 1123, and append a resolution byte of 3, and a definition byte of zero, for a total of 6
bytes. If you are reading a setpoint ratio, you can ignore the resolution byte (you already
know it will be 3), and ignore the definition byte (not important). You would receive a
long integer (1st 4 bytes) of 1123, and you would routinely divide it by 1000 to place the
decimal correctly. The rest of your PLC code would then accept this as a real value of
1.123.

Since you will be ignoring incoming resolution and definition bytes, you only need to act
upon the 1st 4 bytes (2 words) of any parameter in the read list.