mrrwa/NmraDcc

Programming an accessory decoder from the command track

marko-pi opened this issue · 2 comments

I'll start with a description of the situation as I see it - NmraDCC's documentation is sparse, so I had to "learn" from the examples.

Unlike multifunction decoders, it seems that accessory decoders are not supposed to be programmed via the command track. I found that using the FLAGS_DCC_ACCESSORY_DECODER flag tells NmraDCC not to change the CVs on the command track and to ignore CV1, CV9, CV17 and CV18.

However, there is a loophole: two additional CVs can be defined and given as an argument during initialization, so that an accessory decoder can also be programmed on the command track. However, most likely you want to have the same decoder address on both the programming and command track, which means that the same address is in three places: CV1/CV9, CV17/DV18, and additional CV pair. (You also need to put the address in CV17/DV18 so that the DCC controller can communicate with it as a virtual multifunction decoder).

Is what I have written so far correct?

This is a very clumsy solution. I know that by default the accessory decoder should ignore CV change requests on the command track. But it would be easier to control this directly from CV17/CV18. If those two values are 0x00 (or 0xC0 and 0x00), the decoder should ignore changes to CV, while the NmraDCC library should listen to CV change requests if those two values would specify a viable address.

Best regards

Dear Alex,

thank you for your reply. Now it is much clearer to me.

You have indeed understood my question correctly. I apologise for the wrong terminology, the DCC standard looks like a maze to me.

I use Pi-SPROG Command Station and I have no idea if it supports OPS Mode Programming . But anyway, I have no idea how to do Decoder Pro 4.24 OPS programming either via DCC packages or via command station.

But if I can use OPS Accessory Programming , NmraDCC will be able to respond to it too, right?

If I can not use OPS Accessory Programming , I have to keep the extended address and the supplementary address (OpsModeAddressBaseCV) the same, because Decoder Pro thinks that the virtual multifunction decoder is in the former address. I hope this can be programmed in XML. I have sent the corresponding question to jmriusers@groups.io and have not received a solution yet.

To get your answer, I kind of abused github report issues capabilities, for which I apologise.

Best regards

Marko