I came across an interesting solution that uses CANopen. The devices are mounted on a DIN rail, and the master is connected to several slaves via TBUS connectors. In this case, they should be arranged as follows: |M| - |S1| - |S2| - ... - |Sn|.
At the same time, somehow, the head unit is able to determine the exact order of physical connection of slave devices to the bus and display them in the user interface. Each device is automatically assigned a logical ID (not the same as the Node ID), depending on the physical order, which is then used when communicating with the server. This achieves a virtually "plug&play" effect, when a device can be replaced or added without the need for additional manual configuration.
I understand how you can automatically assign Node ID using LSS. But I wonder how you can determine the physical order of connecting devices to the bus. Maybe someone has encountered something similar and can tell me how this can be implemented?
But I wonder how you can determine the physical order of connecting devices to the bus
You can't with CAN bus alone.
I've designed systems like this and in my case I solved it by extra signals outside the CAN bus. Basically a "daisy-chained" signal across all nodes, with one transistors in series per node. Each node wouldn't report in to the master over CAN before it received an OK on the external signal from the previous node, causing them to boot in sequence and allowing the master to always know the physical order.