Difference in range of values between LMS111 and LMS511 sensors for millimeter measurements

131 Views Asked by At

I have been working with the LMS111 and LMS511 sensors, both of which emit data in millimeters. However, I have noticed a discrepancy in the range of values obtained from these sensors.

The Data i received from the sensor LMS511:

sRA LMDscandata 0 1 119FBED 0 0 2B85 329F 4324EDC8 43254982 0 0 3F 0 0 1388 168 0 5 DIST1 40000000 00000000 AAE60 1388 3D 288 280 27F 282 27E 275 27B 279 277 278 277 271 270 273 270 269 26A 26B 26A 267 267 269 263 264 261 264 263 261 260 260 261 260 259 25F 25B 25E 25B 25C 259 25A 258 256 25C 25B 258 259 25C 25B 25E 25A 25B 25E 25F 25B 25F 260 262 261 25F 262 263 DIST2 40000000 00000000 AAE60 1388 3D 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DIST3 40000000 00000000 AAE60 1388 3D 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DIST4 40000000 00000000 AAE60 1388 3D 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DIST5 40000000 00000000 AAE60 1388 3D 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 3 SL1 0 1 7E7 6 1C 10 15 30 33C20 0

note: this is the single scan data. i have take only the dist1 points only.

DIST1 data:

DIST1 40000000 00000000 AAE60 1388 3D 288 280 27F 282 27E 275 27B 279 277 278 277 271 270 273 270 269 26A 26B 26A 267 267 269 263 264 261 264 263 261 260 260 261 260 259 25F 25B 25E 25B 25C 259 25A 258 256 25C 25B 258 259 25C 25B 25E 25A 25B 25E 25F 25B 25F 260 262 261 25F 262 263.

from this data i have taken only the actual reading data.

288 280 27F 282 27E 275 27B 279 277 278 277 271 270 273 270 269 26A 26B 26A 267 267 269 263 264 261 264 263 261 260 260 261 260 259 25F 25B 25E 25B 25C 259 25A 258 256 25C 25B 258 259 25C 25B 25E 25A 25B 25E 25F 25B 25F 260 262 261 25F 262 263.

from this data i convert into decimal numbers using this "decimal_value = int(hex_value, 16)" in python. so what i get from the LMS511:

[648, 640, 639, 642, 638, 629, 635, 633, 623, 632, 623, 625, 624, 627, 624, 617, 618, 618, 615, 615, 617, 611, 612, 609, 612, 611, 609, 608, 608, 609, 608, 601, 607, 603, 606, 603, 604, 601, 602, 600, 598, 604, 603, 600, 601, 604, 603, 606, 602, 603, 606, 607, 603, 607, 608, 610, 609, 607, 610, 611].

For the LMS111 sensor,

The Data i received from the sensor LMS111.

sRA LMDscandata 1 1 1195F7E 0 0 2604 2607 4326CE91 43272C27 0 0 F5 7 0 1388 168 0 1 DIST1 3F800000 00000000 B71B0 1388 47 4EE 4E6 4F3 4E6 4DC 4E0 4DD 4E9 4EA 4E6 4D6 4D0 4E0 4CB 4DD 4C4 4CE 4C9 4CE 4C7 4D6 4E2 4D0 4D9 4C9 4D4 4C8 4C5 4CC 4C9 4E0 4D4 4C8 4CB 4C9 4C3 4D9 4C2 4CA 4C4 4C1 4DF 4C5 4CE 4C6 4C1 4D4 4DC 4D2 4CE 4D8 4E6 4D5 4D5 4D6 4DE 4E9 4FB 4E4 4E9 4F7 4E7 4F4 4FB 4FD 4F5 4FB 519 512 50F 511 0 0 1 3 SL2 0 1 7E7 6 1C 10 15 30 D4A58 0

note: this is the single scan data.

from this data i have taken only the actual reading data.

4EE 4E6 4F3 4E6 4DC 4E0 4DD 4E9 4EA 4E6 4D6 4D0 4E0 4CB 4DD 4C4 4CE 4C9 4CE 4C7 4D6 4E2 4D0 4D9 4C9 4D4 4C8 4C5 4CC 4C9 4E0 4D4 4C8 4CB 4C9 4C3 4D9 4C2 4CA 4C4 4C1 4DF 4C5 4CE 4C6 4C1 4D4 4DC 4D2 4CE 4D8 4E6 4D5 4D5 4D6 4DE 4E9 4FB 4E4 4E9 4F7 4E7 4F4 4FB 4FD 4F5 4FB 519 512 50F 511

from this data i convert into decimal numbers using this "decimal_value = int(hex_value, 16)" in python. so what i get from the LMS111

[1262, 1254, 1267, 1254, 1244, 1248, 1245, 1257, 1258, 1254, 1238, 1232, 1248, 1227, 1245, 1220, 1230, 1225, 1230, 1223, 1238, 1234, 1232, 1241, 1225, 1236, 1224, 1221, 1236, 1225, 1227, 1223, 1237, 1226, 1234, 1228, 1229, 1217, 1247, 1229, 1230, 1222, 1236, 1244, 1234, 1222, 1236, 1231, 1233, 1234, 1230, 1246, 1257, 1275, 1252, 1257, 1271, 1255, 1268, 1275, 1277, 1269, 1275, 1305, 1298, 1295, 1297].

The received data spans a range of 1200 numbers, which I have confirmed corresponds to a physical distance of 1200 mm. (Actually i placed the sensor on the top in 1200 mm distance from the ground). On the other hand, the LMS511 sensor provides data within a range of only 600 numbers for the same physical distance of 1200 mm.

My understanding is that both sensors emit measurements in millimeters, so I would expect their data ranges to be consistent. However, I am puzzled by this variation.

Am I correct in assuming that both sensors provide measurements in millimeters? If so, what could explain the difference in the number of data points between the two sensors for the same physical distance range? Could there be any scaling factors or other factors at play that I may be overlooking?

I would greatly appreciate any insights or explanations regarding this issue. Additionally, if there are any specific specifications or documentation for these sensors that I should consult, please let me know. Thank you!

For reference, this is my code:

def hex_to_decimal(hex_value):
    decimal_value = int(hex_value, 16)
    return decimal_value
1

There are 1 best solutions below

1
On BEST ANSWER

What you've observed is the expected behaviour.

As I've explained in my previous answer, the measured distances are represented as 16bit unsigned integers, hence the maximum value that can be represented is 2^16 - 1, which evaluates to 65535.


LMS 1xx

For the LMS1xx series sensors this is not a problem, since they mostly have a maximum range of 20 meters, with few variants going up to 40 or 50 meters. (Operating Instructions for LMS1xx, page 93) -- the second column is minimum, fourth maximum distance.

LMS 1xx max distances

Given that 50 meters is 50000 millimeters, and 50000 <= 65535, the sensor can report the measurements at 1mm resolution.


LMS 5xx

In case of the LMS5xx series it gets a bit more complicated, since majority of those have maximum range 80 meters, and few (relatively uncommon) "Extended Range" variants can go up to 130 meters.

In millimeters this is 80000 and 130000, and neither of those fit into a 16bit unsigned integer. To resolve this issue, SICK implemented a scaling factor, which is transmitted as part of the measurement telegram. This is hinted at in section 3.7.1.1 of Operating Instructions on page 31:

NOTE: A scaling factor is used for some scan configurations. The distance values received via data output must be multiplied by this factor.

The only supported scaling factors are 1 and 2. Which particular scaling factor is used depends on the sensor model and its configuration. This is elaborated on in the Operating Instructions for LMS5xx on pages 32-33:

LMS 5xx Lite

LMS 5xx Lite

LMS 5xx PRO/Heavy Duty

LMS 5xx PRO/Heavy Duty

LMS 5xx Extended Range

LMS 5xx Extended Range


Inspecting your telegrams

LMS511

Based on the whole telegram, you're running the sensor at 50 Hz, and 0.5 degree step size. Based on the documentation, we would expect the scaling factor to be 2 in this case.

Your example LMS511 measurement block:

DIST1 40000000 00000000 AAE60 1388 3D 288
      \------/                        \-/
   scaling factor              first measurement

And so it is, (40000000 means 2), and the first measured distance is 1296 mm.

LMS111

Here we'd expect the scaling factor to always be 1, and so it is (just for posterity, this is also 50 Hz, 0.5 degree step).

Your example LMS111 measurement block:

DIST1 3F800000 00000000 B71B0 1388 47 4EE 
      \------/                        \-/
   scaling factor              first measurement

And so it is again, (3F800000 means 1), and the first measured distance is 1262 mm.