Difference between revisions of "Diesel Version 5:WOWDiesel Indexed CV's"

From Train Control Systems Documentation
Jump to navigation Jump to search
m
m
Line 17: Line 17:
 
''Specific Indexed CV numbers omitted from these tables can be assumed to be unused. To view details about the indexed CV, click on the indexed CV number to the left of the description.''
 
''Specific Indexed CV numbers omitted from these tables can be assumed to be unused. To view details about the indexed CV, click on the indexed CV number to the left of the description.''
  
{{{{NAMESPACE}}:CV_16.0.258}}
 
 
{| class="wikitable mw-collapsible"
 
{| class="wikitable mw-collapsible"
 
|+NMRA Index 16.0
 
|+NMRA Index 16.0
Line 206: Line 205:
 
|}
 
|}
 
...Note.... As of 2-22-21, indexed CV's stop at 16.13.504 - Lighting Preset 16 - Step 9 - End Brightness
 
...Note.... As of 2-22-21, indexed CV's stop at 16.13.504 - Lighting Preset 16 - Step 9 - End Brightness
 +
 +
 +
{{{{NAMESPACE}}:CV_16.0.258}}
  
 
==See Also==
 
==See Also==
  
 
*[[Diesel Version 5:WOWDiesel Standard CV's|List of Standard CV's]]
 
*[[Diesel Version 5:WOWDiesel Standard CV's|List of Standard CV's]]

Revision as of 00:21, 24 August 2022

Overview

Indexed CV's use a Paging System to allow for the ability to program thousands of CV's. There are two index CV's used to select an indexed page, CV31 and CV32, which are described in detail below. CV31 controls the high byte of the index/page and CV32 controls the low byte. Once the index/page has been selected, you can read or write the CV's within the indexed page just like any other CV. The indexed CV range is from CV256 to CV512 in all cases. This is possible through the paging system, wherein changing the values of CV31 and CV32 load new definitions for those indexed CV's, allowing them to be used for different applications based on the page.

This may be complicated to understand, so here is an analogy to help visualize what is happening. An analogy for indexed CV's is to think of a filing cabinet, where CV31 selects the "drawer" and CV32 selects the "folder" within the drawer. CV's 257 to 512 are then the "files" within those folders whose data you can read and write. All of the "files" within each folder and drawer are all numbered 257 to 512, but they all represent different things because they are in different folders and drawers.

All indexed CV's can be 16-bit representations of data, be it bitwise, decimal-equivalent, or otherwise. This means that each "individual" indexed CV is made of tow 8-bit chunks, both of which should be read out to ensure accuracy. This can also be confusing if you are used to "normal" CV's where each read or write operation is only a singe step; whereas with indexed CV's, each read requires two operations, and each write could require up to two operations.

In every case for TCS' decoders which support NMRA indexed CV's, the ODD numbered indexed CV's (257, 259, etc.) correspond to the LOW BYTE of the data, and the EVEN numbered indexed CV's (258, 260, etc.) are the HIGH BYTE of the data. A value of [1] in a High Byte indexed CV is equal to a value of 255+1 in a Low Byte indexed CV. This means that the maximum value of any 16-bit indexed CV is 65,535. TCS does not divide indexed CV's into 8-bits, so in the documentation below, the numbers listed for an indexed CV number use the High Byte. The low byte of the same CV is (n-1).

NMRA CV#31
Indexed CV High Byte
Range of Values16-255
Default Value16

NMRA CV 31 - Indexed CV High Byte

The Indexed Address is the address of the indexed CV page when the decoder is set up for indexed CV operation. CV#31 contains the most significant bits of the two byte address and may have any value between 16 and 255 inclusive. Values of 0 thru 15 are reserved by the NMRA for future use. CV32 contains the least significant bits of the index address and may contain any value.

This gives a total 61,440 indexed pages each with 256 CV's in each page for a total of 15,728,640 indexed CV's!
(High byte 240 * Low Byte 256 * bytes per page 256) = total number of available CV's

See Indexed CV's for more info on using this CV

NMRA CV#32
Indexed CV Low Byte
Range of Values0-255
Default Value0

NMRA CV 32 - Indexed CV Low Byte

The Indexed Address is the address of the indexed CV page when the decoder is set up for indexed CV operation. CV31 contains the most significant bits of the two byte address and may have any value between 16 and 255 inclusive. Values of 0 thru 15 are reserved by the NMRA for future use. CV32 contains the least significant bits of the index address and may contain any value.

This gives a total 61,440 indexed pages each with 256 CV's in each page for a total of 15,728,640 indexed CV's!
(High byte 240 * Low Byte 256 * bytes per page 256) = total number of available CV's

See Indexed CV's for more info on using this CV

Example

You want to change the speed of the locomotive at speed step 1 to be faster. To do this, you can program the Motor Speed Target for Speed Step 1 in the 128-Point Speed Table in the indexed CV's (Note: this table is more detailed than the 28-point "User Loadable Speed Table" defined in the standard CV range since it gives access to the speed at every speed step from 0-128 with no interpolation). The 128-point speed table is found in index 16.2, so set CV31 = 16, then set CV32 = 2. Next, you can read CV258 and CV257 to do the current value. If the High Byte (CV260) has a value that is greater than 0, multiply that value by 256, then add the value of the Low Byte (CV259) to get the total for the current value. You could then repeat this process for reading the value of Speed Step 2 (Index 262) so that you do not exceed it. Finally, select a value between the original value for Speed Step 1 and the current value of Speed Step 2, and write the value into the CV(s) for Speed Step 1.

Naturally, this process is tedious, and not for the feint of heart. Manual modification of indexed CV's does often require a lot of math. TCS is working to develop tools to make this process more user-friendly. Stay tuned!

List of Indexed CV's in Use

Specific Indexed CV numbers omitted from these tables can be assumed to be unused. To view details about the indexed CV, click on the indexed CV number to the left of the description.

NMRA Index 16.0 DC Mode Motor Control Settings (And Misc.)
Indexed CV Description
16.0.258 Startup Delay Timer
16.0.260 DC Mode Bell Cutout Voltage - Regulated Supply Mode
16.0.262 DC Mode Quill Delta - Regulated Supply Mode
16.0.264 DC Mode Start Voltage - Regulated Supply Mode
16.0.266 DC Mode Motor Hysteresis - Regulated Supply Mode
16.0.268 DC Mode Max ADC Value - Regulated Supply Mode
16.0.274 DC Mode Bell Cutout Voltage - Unregulated Supply Mode
16.0.276 DC Mode Quill Delta - Unregulated Supply Mode
16.0.278 DC Mode Start Voltage - Unregulated Supply Mode
16.0.280 DC Mode Motor Hysteresis - Unregulated Supply Mode
16.0.282 DC Mode Max ADC Value - Unregulated Supply Mode
16.1.257 Bootloader Hash Part 1 (LSB)
16.1.258 Bootloader Hash Part 2
16.1.259 Bootloader Hash Part 3
16.1.260 Bootloader Hash Part 4 (MSB)
16.1.261 Bootloader Month
16.1.262 Bootloader Day
16.1.263 Bootloader Year
16.1.264 Bootloader Version
16.1.265 Bootloader Hardware
16.1.266 Bootloader Processor
16.1.267 Bootloader WOWPOW Protocol Version
16.1.268 Decoder Serial Number Part 1
16.1.269 Decoder Serial Number Part 2
16.1.270 Decoder Serial Number Part 3
16.1.271 Decoder Serial Number Part 4
16.1.272 Decoder Serial Number Part 5
16.1.273 Decoder Serial Number Part 6
NMRA Index 16.2 Motor Speed Targets (128-Point Speed Curve)
Indexed CV Description
16.2.258 BEMF Target - Speed Step 0/128
16.2.260 BEMF Target - Speed Step 1/128
... ...
16.2.512 BEMF Target - Speed Step 127/128
NMRA Index 16.4 Sound Function Remapping
Indexed CV Description
16.4.258 Sound Mapping - Button 0
... ...
16.4.314 Sound Mapping - Button 28
16.4.316 Sound Mapping - Random Sound #1
16.4.318 Sound Mapping - Random Sound #2
16.4.320 Sound Mapping - Random Sound #3
16.4.322 Sound Mapping - Random Sound #4
16.4.324 Sound Mapping - Auxiliary Input
16.4.326 Sound Mapping - Reserved
NMRA Index 16.6 Lighting Modules (Part 1)
Indexed CV Description
16.6.258 Lighting Module 0 - Step 0 - Fade Rade
16.6.260 Lighting Module 0 - Step 0 - Start Brightness
16.6.262 Lighting Module 0 - Step 0 - End Brightness
... ...
16.6.316 Lighting Module 0 - Step 9 - End Brightness
16.6.318 Lighting Module 1 - Step 0 - Fade Rade
16.6.320 Lighting Module 1 - Step 0 - Start Brightness
16.6.322 Lighting Module 1 - Step 0 - End Brightness
... ...
16.6.376 Lighting Module 1 - Step 9 - End Brightness
16.6.378 Lighting Module 2 - Step 0 - Fade Rate
.. ...
16.6.512 Lighting Module 4 - Step 2 - Start Brightness

...Note.... As of 2-22-21, indexed CV's stop at 16.13.504 - Lighting Preset 16 - Step 9 - End Brightness


WOWDiesel Indexed CV's
Startup Delay Timer
Range of Values0-65535
Accepted ValuesAny
Default Value1000

CV 16.0.258 - Startup Delay Timer

Two byte CV (257:258) - This indexed CV defines the maximum delay time (in milliseconds) the decoder will wait and look for a non zero DCC speed packet when powering up. During this delay no sound will be played.
If the decoder sees a non zero speed packet during this time it will skip the startup sound and go right to playing the engine sound

This is useful in cases where the engine was moving along and hits dirty track and resets.
If the delay time is large and the startup sound still plays consider adjusting the command stations stack so that speed refresh packets are sent more often.

See Indexed CV's for more info on using this CV

See Also