Multi DS18B20 industrial cable

Hi,

I have a project with DS18B20 sensors.
The project consists of 6 cables each on has 10 DS18B20 sensors. the cables is shielded and sensors are in it.

Each cable has 2 wires only (Parasite in On)

I have used the sketch below exactly

https://github.com/milesburton/Arduino-Temperature-Control-Library/blob/master/examples/Tester/Tester.pde

My problem is the serial monitor show the address and temperature from the sensor as attached. But how did the library arranged the indexes of the sensors ? I need it to be arranged from the beginning of the cable to the end but when i tested it with a heat gun I found the the first sensor in the cable is taking index 6 and second one is 8!

This arrangement is very important to me because this cable will in a tank and I need to now the temperature every 2 meters (cable length is 20m)

I tried to measure the time response for each sensor (as the nearest one will respond faster) however the result is aligned with the index!!

any ideas?

Had similar issue, ended up putting colored heat shrink on each probe, then referencing them by an appropriately named variable.

uint8_t ProbeBlue[8] = { 0x28, 0x6E, 0x5B, 0x94, 0x97, 0x14, 0x03, 0xA3 };
uint8_t ProbeYellow[8] = { 0x28, 0x3E, 0x0A, 0x79, 0x97, 0x21, 0x03, 0xD3 };

As I understand it, the indexes are read in order, which implies that Arduino has to go through all of them and sort them out in order on each trip around the loop. I have never anyone who can explain how on earth 'by index" can be a good idea. It seems that you still have to read the address and know where each one is, so you might as well write down the code while you are at it. Heatshrink takes pen nicely.

https://www.hacktronics.com/Tutorials/arduino-1-wire-address-finder.html
http://www.hacktronics.com/Tutorials/arduino-1-wire-tutorial.html

Enough people have grief with parasite power to suggest that your "industrial cable", whatever that is, is at least one conductor short. You will find plenty of discussion on long cable runs with DS18B20.

The cable is long and we have multiple cables for many tanks, so going to each one will be a very long process.
I need to know if the cable manufacturer should gave me the addresses and order of each sensor or not.

Also, Do you have any idea if "Response time" would work? I mean If I requested any data from each sensor is this will take longer time from the last sensor installed on cable or no?

The longer the cable, the less of a good idea it is to use parasite power. Fix that now or deal with the grief for the remainder of your project's lifetime.

The address is assigned by the DS18B20 chip's manufacturer. There's nothing you can do about that.

For fastest results, query the sensors by their individual address, not their index.

If I was the cable manufacturer, I would do no such thing. I would want you to clearly and permanently identify each sensor and tell me exactly where it goes.

The sensors take time to do their job and the time depends on the resolution, but they do it independently of Arduino. If your entire installation is polled once a second, that should cover everything.