At 6:44 PM +0000 8/11/02, original_black_bart wrote:
Bob,
The highest address that can be programmed on the AD4 is 510. This
yields switch addresses of 2037 through 2040. Using the turnout
control of JMRI Demo, the AD4 successfully operated turnouts
configured for these switch addresses.
I did notice something a little odd though. As part of the test I
launched the LocoNet Monitor from the Tools menu and monitored the
data being sent. With each turnout operation, the LocoNet Monitor
reported operation of a switch, but reported the switch address one
number lower than that being operated. Specifically, when switch 2037
was operated, the LocoNet Monitor reported switch number 2036 was
operated. This finding seems to holds true over the entire switch
address range as requesting operation of switch number one causes the
LocoNet Monitor to report operation of switch address zero!
Although weird, this is intentional.
The turnout numbers on LocoNet throttles are 1 through N, with N large. But the actual bits that are sent over the LocoNet start with "all zeros" and move up from there. The LocoNet does this to follow the format of the DCC packets on the rails, which start with zero. LocoNet throttles, and apparently most other manufacturers throttles, handle the addition/subtraction of a 1 when converting back and forth.
Because the trace is trying to show what's actually happening, I decided to show the numerical value that's actually on the LocoNet. Hence the difference of 1 with the number on the throttle, channel number on the AD4, etc.
IMHO, this is just another example of how the DCC standards were formulated with too much optimism about the cost of complexity. There's a lot of unnecessary complexity in them for small gain. Any individual piece is probably OK, but the sum of them is something that's very difficult to get right.
In the specific case of turnouts, there are now proposed a total of 4 (!!) different ways to address them on the rails. There would be two modes that can be selected via CV541 (e.g. CV29 equivalent), along with two different packet formats with different addressing structures. The motivation is to make certain operations "clearer", but the net effect is just nuts.
If you want everything to talk to everything, it's better to just specify one straight-forward way, and tell the EEs to deal with it.
Bob
--
--------------
Bob Jacobsen (Bob_Jacobsen@..., 510-486-7355, fax 510-495-2957)