Perplexed about binary code changing in CVs

MarkInLA Jul 20, 2012

  1. MarkInLA

    MarkInLA Permanently dispatched

    1,970
    80
    29
    Hi gang,,Sorry , but I can't understand how one knows the effect of changing bits and bytes in a CV..Manuals certainly explain how to get to them as does NCE throttle screen. How then does one know what value to give to what ,say bite ? Lets just say (randomly) we go to CV 54..which controls such and such in loco or accessory. We menu to its binary code. Then what ? How do we know changing bit 1 to a value of 0, or bit 5 to a value of 8, what this will do to CV 54 ? Question is probably laughable to some ,but, what is it I am not comprehending about this level of command control ? Say we're in a CV which controlls the bell..How would going into its binary code be advantatious or not, manipulating the binary code of the bell's CV to change/alter the bell sound quality..? What's to prevent bell from now sounding like a pig oinking or a cat meowing ? I know you geniuses out there savvy it all. But I don't think John Q Public does...Manual shows how to go into them. But then what ? We change a value..to which/why/when....?
     
    Last edited by a moderator: Jul 20, 2012
  2. Mike Sheridan

    Mike Sheridan TrainBoard Member

    1,763
    0
    33
    The 1s and 0s in the binary of a CV are literally on/off switches. They simply select/deselect things that the decoder manufacturer has built into the device.

    Take horn/whistle sounds - there are quite a few make/models of these with different sounds and which are used by different RR. So (eg) Soundtraxx will install the sound files of several and the user can then use the binary CV switches to select the one appropriate to his prototype, or just one he likes the sound of.

    So you won't be able to make the bell sound like a pig oinking by changing a CV, you can only select an option that the maker has provided. You will have to study the instructions for the specific decoder to find out what is available.
     
  3. jdetray

    jdetray TrainBoard Member

    656
    135
    24
    The action controlled by a CV is in some cases defined by the NMRA DCC standard and in other cases defined by the manufacturer of the decoder. Here is the NMRA CV definitions for mobile (locomotive) decoders:

    http://www.dccwiki.com/Configuration_variable

    For example, the NMRA standard defines CV 1 as containing the short address of the locomotive. All decoder manufacturers use CV 1 for that purpose, and nearly all manufacturers sell their decoders witn a value of "3" in CV 1.

    Along with CV 1, certain other CVs are required by the NMRA standard, and so these CVs control the same functions in all decoders. There are only a few of the required CVs that you might want to change, and the following web page contains a good explanation (scroll about halfway down the page to the section called "Changing the decoder CV’s & Decoder set-up!"):

    http://www.dccconcepts.com/index_files/DCCdecoderfunctionsdesc.htm

    At the other extreme, some CVs are assigned in the NMRA standard as being available for the use of the decoder manufacturer to control special functions. Decoders with sound and special lighting effects may use these CVs, in which case you need the manufacturer's instruction book to know what will be the effect of placing a particular value into the CV. For example, Tsunami decoders use CV 59 to control the flash rate of their Hyperlight effect, and you can place values ranging from 0 (fastest flash rate) to 15 (slowest flash rate) into CV 59. Other decoder manufacturers may use CV 59 for a completely different purpose, or they may not use CV 59 at all. So for some CVs, the manufacturer's instructions are the only way for you to know how to utilize the CV.

    I hope this helps a little.

    - Jeff
     
  4. dstuard

    dstuard TrainBoard Member

    981
    1
    20
    Long answer:

    CVs are memory values comprised of 8 binary bits. Each bit carries a value based on its position, much like units, tens, hundreds, thousands, etc. in decimal. The decimal value of the 8 individual bits are 128/64/32/16/8/4/2/1. Thus the decimal value of binary 01101010 would be 64+32+8+2=106.

    A CV can either use a series of bits to represent a value (for example, 8 bits can reresent values from 00000000=0 to 11111111=255 -this is best exemlified by the CVs used in speed tables), or they can describe the state of 8 individual features such as normal direction of travel, analog operation, whether 2 or 4 digit addressing is to be used, etc. (CV29 is the prime example of this scheme). In some instances, some of the bits will represent a value (bits 1 theu 4 being 0 to 15), while the others may be individual "switches" (I can't think of an example off the top of my head, but you'll know one when you see one).

    Whether it meows or oinks and how loud is a function of the attached electronics that reads the individual bit switch states (if bit 3=1, oink, if 0, screech) or values (if the value of the 8 bits is = 255, be really loud, if 0, shut up).

    Short answer: It's JFM.
     
  5. MarkInLA

    MarkInLA Permanently dispatched

    1,970
    80
    29
    Hey guys , thanks for all the studious responces...I see, changing binary codes is done only to enhance or even turn off a particular feature already assigned to each CV..So, if offered by maker of decoder in a particular loco that, say, the whistle can be made more staccato or legatto (shorter/longer) or, say, louder then this is what invites an alteration of binary values; to achieve this change. Still a tad foggy in that: OK I'm in the CV for bell. I know I can modify the sharpness of the clang or maybe the speed at which bell gongs occur..What tells me what bit(s) or entire byte goes to what value ? Is it merely obtaining this info from decoder maker ?
     
  6. jdetray

    jdetray TrainBoard Member

    656
    135
    24
    Yes. For functions that are specific to one decoder manufacturer, the only way to know how to obtain the desired result is to consult the manufacturer's instructions.

    Here is the instruction sheet for a very basic decoder, the TCS M1. On page 2 of the instructions you will find a table showing all of the CVs in the M1 that you can change if you wish. The table shows the factory default value for each CV, along with a list of permissable values and what effect they will have.

    Note that you don't HAVE to change any of the CVs if you don't want to. Many people never change any CVs except for the address of the locomotive, and their trains work just fine.

    - Jeff
     

Share This Page