Lenz sensor addressing formula

Post Reply
Erik Juul-Pedersen

Lenz sensor addressing formula

Post by Erik Juul-Pedersen » 10.03.2012, 16:13

I have found, that the formula for calculation of sensor addressing in the Lenz command station description does not match by sensors.
RocRail description is on page http://wiki.rocrail.net/doku.php?id=xpressnet-en.
formula:
Rocrail address = (xpressnet address - 1) *8 + port
ranges: XpressNet address [1..128], port [1..8]

I have found that port is calculated as 0..7 plus I think that the offset should be specified in the formula.

So the result should be:
Rocrail address = (xpressnet address - 1) *8 + port - 1 + offset
ranges: XpressNet address [1..128], port [1..8]

Which one is correct?
:)

kbriffa
Posts: 22
Joined: 21.02.2011, 20:43
Location: Malta

Post by kbriffa » 11.03.2012, 23:29

Yes.

Rocrail address = (xpressnet address - 1) *8 + port - 1

This is the correct formula. What do you mean by offset?

Kenneth

Erik Juul-Pedersen

Lenz sensor addressing

Post by Erik Juul-Pedersen » 12.03.2012, 09:28

Fine that my formula is correct.

The offset is defined in RocRail properties/Controller. Select Xpressnet/Lenz controller and properties herefore.
In the right corner the sensor offset is defined and is default 0.

The documentation is on the same page as the formula a little above sensor addressing

Thank you for your answer :D

kbriffa
Posts: 22
Joined: 21.02.2011, 20:43
Location: Malta

Post by kbriffa » 12.03.2012, 21:46

You're welcome.

I see what you mean by offset. I would leave it at 0. Works for me.

I will edit the wiki.

Kenneth

Erik Juul-Pedersen

Post by Erik Juul-Pedersen » 13.03.2012, 08:49

Thank you for your quick change of the wiki.

The problem is now solved. :D

Post Reply

Return to “Documentation”