COMPAX-M/S - RS485 Option
8
4.4 Binary data transmission via RS485
As far as time-critical applications are concerned it is possible to transmit certain commands in the internal COMPAX binary
format. By leaving out the format conversion from ASCII to the binary format, time can be saved; nevertheless, transmission in
the normal ASCII-format is still possible (mixed operation)
At binary data transmission the frame format changes when transmitting from PC to COMPAX:
necessary data
characters that can be added
optionally.
device address
(ASCII-format)
binary command code
block-check-character BCC
!
Please note that the device address will still be
transmitted in ASCII-format!
!
The end-sign may not be sent!
!
The binary format has always to be transmitted
in its whole length!
4.4.1 Meaning of the binary command code
command
binary format (hexadecimal)
number formats
POSA value
88 41 xx xx xx xx xx xx
LSB
MSB
number formats of "xx xx xx xx xx xx"
*
2
3 byte of places behind/ 3 byte of places in front
of the decimal point.
POSR value
88 52 xx xx xx xx xx xx
LSB
MSB
valence:
2
-24
2
-23
... 2
-2
2
-1
, 2
0
2
1
2
2
... 2
22
2
23
SPEED value
88 53 xx xx xx xx xx xx
LSB
MSB
transmission order.e.g.: "88 41 LSB....MSB"
ACCEL value
84 4C yy yy
MSB
LSB
number formats of "yy yy"
ACCEL- value
84 44 yy yy
MSB
LSB
2 byte of places in front of the decimal point.
no places behind the decimal point.
OUTPUT Ayy=0
85 4F yy yy 30
MSB
LSB
valence: *
1
2
15
2
14
... 2
2
2
1
2
0
.
OUTPUT Ayy=1
85 4F yy yy 31
MSB
LSB
transmission order e.g..: "84 4C MSB LSB".
POSR value OUTPUT Ayy=0
8C 52 xx xx xx xx xx xx 4F yy yy 30
LSB
MSB
MSB LSB
POSR value OUTPUT Ayy=1
8C 52 xx xx xx xx xx xx 4F yy yy 31
LSB
MSB
MSB LSB
POSR value1 SPEED value2
8F 52 xx xx xx xx xx xx 53 xx xx xx xx xx
xx
LSB
MSB
LSB
MSB
*
1
Negative numbers
!
Negative numbers are shown in a two's complement. -
Formation of a two's complement:
!
the bit combination of the positive numerical value has to
be determined.
!
the binary value must be negated.
!
there has to be added "1".
*
2
Format transformation
Out of any optional number disposing of places behind the
decimal point, you can generate this format as follows:
example:
number = 450,5
1. Number to be multiplied by 2
24
450,5* 2
24
=7558135808.
2. 8388608 to be changed into a hexadecimal number (possibly
change into integer before) => .0x00 01 C2 80 00 00
≡
places in
front of the decimal point,
places behind the decimal point
≡
MSB,.... LSB, MSB,.... LSB.
3. These bytes have now to be filled into the command in the indicated
order. The order of bytes is reversed. The order of bits is not allowed
to be reverserd.
This conversion is also valid for negative numbers.
Example for the number format of xx xx xx xx xx xx"
number
MSB
LSB
10
00
00
0A
00
00
00
256
00
01
00
00
00
00
400,5
00
01
C2
80
00
00
-1
FF
FF
FF
00
00
00
places in front of
the decimal point
places behind the
decimal point
For
POSA 256,0
you get the following string:
"88 41 00 00 00 00 01 00"
Please note, that all places have to be transmitted
Содержание Hauser COMPAX 25 S F1 Series
Страница 12: ...COMPAX M S RS485 12 ...