03-09-05 49
Both commands and replies sent over RS-422 are binary. The command set is
basically a subset of the RS-232 ASCII command set, but there is also a special
command for requesting a batch of distance values with single laser intensity and
probe temperature values added at the end of the batch. This command has no
counterpart in the RS-232 command set and is included for backward
compatibility with a specific software version.
Command and Reply Structure
The RS-422 commands and replies are not structured in any special way. It is in
the nature of binary communication that any byte value may occur as data, and
therefore it is not possible to set aside certain values for exclusive use as
prompters, command indicators etc. Instead, it is of vital importance that both the
master and the SLS sensor keeps a correct byte count in order to interpret
commands and replies correctly.
The SLS sensor will not output anything over the RS-422 lines on power up.
Batch Commands
If more two or more commands are concatenated, the identifier bytes are ORed
together in the reply to allow the master to check that the SLS sensor understood
the command correctly.
Distance Value
Command:
0xE1 0xXXXX
Reply:
0xE1 0xXXXX 0xYYYY 0xYYYY ... (repeated 0xXXXX times)
This command will report measurement values in LSBs, and without any
calibration offset applied. The command works even if a measurement unit other
than LSBs has been entered in the setup. The first binary word after the command
identifier 0xE1 is the number of data items to be transmitted in the batch. The
maximum is 0xFFFF (65535 values) and the minimum is 0x0001 (1 value). If the
parameter is 0x0000, data will be transmitted continuously until the next batch
command is received.
NOTE: If the measurement is invalid, the sensor will report a distance value of
0x0000.
Measurement Validity (%)
Command:
0xE2 0xXXXX
Reply: 0xE2 0xXXXX 0xYY 0xYY ... (repeated 0xXXXX times)
The parameter 0xXXXX works the same as for the ”Distance Value” command.
Laser Intensity (percent of maximum)
Command:
0xE4 0xXXXX
Reply: 0xE4 0xXXXX 0xYY 0xYY ... (repeated 0xXXXX times)
The parameter 0xXXXX works the same as for the ”Distance Value” command.
Sensor Temperature (°C)
Command:
0xE8 0xXXXX
Reply: 0xE8 0xXXXX 0xYY 0xYY ... (repeated 0xXXXX times)
The parameter 0xXXXX works the same as for the ”Distance Value” command.
Special Batch
Command:
0xF0 0xXXXX
Reply: 0xF1 0xYYYY .. (repeated 0xXXXX times) 0xZZ 0xTT
This command requests a batch of 0xXXXX distance values followed by one laser