RS 422/RS 232 interface
Leuze electronic GmbH + Co. KG
AMS 300
i
53
TNT
35/7-2
4V
9.4.4
Communication protocol (binary protocol)
Request for AMS 300
i
data
Transfer of the measured distances or the velocity is requested and actuation of the laser
diode (ON/OFF) controlled via a 3
-
byte
-
long protocol.
Note!
The protocol is valid for both interfaces (RS 422 and RS 232).
Request to the AMS 300
i
Byte 0:
Reserve control byte.
Bit 7 and bit 6 must be set to logical 1.
Byte 1:
CMD
Command = Data request to the AMS 300
i
.
In the parameter menu under RS 422 and RS 232, the output cycle for cyclically requested
data can be configured in the range of (1 … 20) x 1.7ms.
Byte 2:
XOR link of byte 0 and byte 1
An even number of binary 1 (calculated column by column from top to
bottom) sets the XOR bit to 1.
Example
The XOR checksum is entered by the sender (control) in the request protocol and checked
by the receiver (AMS 300
i
). A protocol is correctly transferred if the XOR checksum of the
transmitter and the XOR checksum of the receiver are the same. If the XOR comparison is
negative (different checksums), the protocol is not accepted by the AMS 300
i
. The AMS 300
i
does not send acknowledgment for an unequal checksum.
Byte
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
0
1
1
0
0
0
0
0
0
1
CMD
CMD
CMD
CMD
CMD
CMD
CMD
CMD
2
XOR
XOR
XOR
XOR
XOR
XOR
XOR
XOR
Binary coding
Hex coding
Function
1111 0001
F1
Request of a single distance value
1111 0010
F2
Cyclical request for the distance values
1)
1) The output cycle is set to 1 x 1.7ms by default.
1111 0011
F3
Stop cyclical transfer
1111 0100
F4
Laser diode ON
1111 0101
F5
Laser diode OFF
1111 0110
F6
Request of a single velocity value
1111 0111
F7
Cyclical request for the velocity values *
1111 1000
F8
Single request for position and velocity value
Byte
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
0
1
0
1
1
1
1
0
0
1
1
1
1
1
0
1
1
0
XOR
0
1
0
0
1
0
1
0