I'm trying to understand how to send a CV write packet in Ops mode, and I want to make sure my syntax is correct. For my example, I'm using a decoder with the address 3, and I am attempting to change the master volume (which for this decoder is CV128) to 50. I am referencing the NMRA extended packet doc 9.2.1 line 376, which has the command syntax:
1110CCVV 0 VVVVVVVV 0 DDDDDDDD CC=11 Write byte The actual Configuration Variable desired is selected via the 10-bit address with the 2-bit address (VV) in the first data byte being the most significant bits of the address. The Configuration variable being addressed is the provided 10-bit address plus 1. For example, to address CV#1 the 10 bit address is “00 00000000”.
So the first command byte for me will be: 11101100 which in decimal is: 128+64+32+8+4=236
For the second byte, I am trying to edit CV 128, so I would have 128-1 = 127
Let's pretend my decoder is address 3, and I am trying to set the volume to 50. So my entire packet in decimal would be:
3 236 127 50
Is this correct? Or have I made a mistake?
What decoder are you using and what DCC system are you programming it with? Why not just change CV128 to a value of 50 in OPS mode - i.e. call up CV128 in OPs mode, enter "50", and exit OPs mode.
Seems like you are taking the hypotenuse (convoluted) approach to programming CVs. Some CV settings are indexed and do require changing one or more CVs in order to alter an embedded CV. IIRC, master volume is not one of those.
Tom
https://tstage9.wixsite.com/nyc-modeling
Time...It marches on...without ever turning around to see if anyone is even keeping in step.
Everything gets transmitted in bits, so those 0 bits between the bytes must be included in the data stream.
It looks ok. Note you have to send the CV programming data TWICE for it to be accepted. See line 395.
--Randy
Modeling the Reading Railroad in the 1950's
Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.
That was it - I was not sending the command twice. It's working now. Thank you very much!