Section 5 Sensor Communication
26
FT742-SM (RS422 & RS485) Sensors
– User Manual
6.4.2
Data Transmission
Data is transmitted and received via an asynchronous serial communication interface using ASCII characters.
The interface operates with the following parameters:
Parameter
Setting
Baud Rate
1200, 2400, 4800, 9600 (factory default), 19200, 38400
Data Bits
8
Start Bits
1
Stop Bits
1
Parity
None
Figure 16: Data Transmission Parameters
To set the sensor baud rate use the BR command (Section 7.4.1)
The sensor does not use handshaking (either hardware or software) to control the flow of data to and from the
host computer. It is important, therefore, that the serial interface of the host computer is set with
handshaking/flow control disabled.
6.4.3
Message Format
Data communication between the sensor and the host computer is performed by the transmission of ASCII
messages. Figure 17 shows the composition of the message. The same message format is used for both
received and transmitted messages.
$aa,< data fields >*hh<cr><lf>
Message terminator, 0D 0A HEX
2 chararcter checksum
Checksum delimiter, 2A HEX
See text for details of valid commands and output data strings
Field delimiter, 2C HEX (optional for host commands)
2 character identifier field
Start of message character, 24 HEX
Figure 17: Message Format
All messages start with the ‘$’ start of message character, followed by the 2 character talker/listener identifier
(Section 6.4.4) field.
Following the first delimiter is the main body of the message which comprises a variable number of data fields
(dependent on the message being transmitted), each separated by the field delimiter cha
racter (‘,’). Data fields
may contain alpha, numeric, or alphanumeric data depending on the information content of the field.
Messages sent to the sensor will contain a command in <data fields> and messages transmitted from the
sensor will contain output data in <data fields>.
The data field section of the message is terminated by the checksum delimiter character ‘*’. Following the
checksum delimiter is the two-character checksum field. See Section 6.4.5 for information on how to compute
the checksum and Section 6.4.6 if checksum message validation is not required.
All messages are terminated with a carriage return <cr> and line feed <lf>.