Static scanner OCD6000-F62-...
Serial communication
D
at
e of
ed
iti
on:
20
03
/0
7/
30
12
Subject to reasonable modifications due to technical advances.
Copyright Fuchs, Printed in Germany
Fuchs Group • Tel.: G49 621 776-0 • USA +1 330 4253555 • Sin65 67799091 • Internet http://www.pepperl-fuchs.com
5
Serial communication
5.1
Transmission frame
The sensor is equipped with a half-duplex-capable RS-485 interface. It is therefore
bus-capable, but works essentially as a slave, i.e. it must be "accessed" by a higher-
level control system that is working in master mode to be able to send results. The
following protocol has been implemented:
• 8-bit data + 1-bit address sel 1 start/stop bit; at 62,500 baud.
• If the ninth bit (address selection) was set, the slave recognizes that this byte is in
fact an address (ID). It compares this address with its own and if the two are iden-
tical, responds immediately after the frame end of the master is detected.. The ninth
bit is always reset when data is transferred.
The structure of the transfer frame is as follows:
General:
Request (from the master):
Response (from the OCD6000-F62-...):
where:
• xxx_Id = address or sender (1 byte)
• Length = number of characters sent, including frame (1 byte)
• Command = control command (1 byte)
• Parameter = 0 ... n, depending on the command (0 ... n Byte), n
max
= 48
• Checksum = test sums by "Exclusive OR" of all characters set (1 byte)
Alternative mode:19200 Baud/8/N/1-PC-compatible (not bus-capable)
In the case of a transmission error (incorrect check sum or missing slave response)
the same command should be repeated.
The master request (= command) and the slave response are each transferred in the
frame described above. Values that are expected back from the slave are included in
the respective parameters that are sent back -->
The
slave
(OCD6000-F62-...) always returns the currently measured distance as the
last parameter byte (coding as in the command <C>, i. e. value * 2.5 cm). It generally
recognizes the following possibilities for the
response
:
1st byte
2nd byte
3rd byte
......
.....
last byte
Slave ID
Master_Id
Length
Command
Parameter(s)
Checksum
(request from
master)
Master_Id
Own_Id
Length
Command
Parameter(s)
Checksum
(answer from
slave)