# How long does a command stay?



## Texas Rattler (Aug 13, 2012)

How long does a command "live" for a train? My smoke unit suddenly stopped despite having smoke fluid (actually overfilled it thinking it was empty). Think I sent a stop smoke command. Tried everything to get back on. Decided to put it away for the night. But it made me wonder how commands are stored.

I assume all commands exist in the main DCC controller. I'm also thinking that it is stored in volatile memory that, if power is removed, the commands go away after a very short period. I never really tried hard resetting my train controller before so I honestly have no idea how long commands stay active.


----------



## MichaelE (Mar 7, 2018)

It depends upon how the command is programmed. For example, some horn or whistle commands are for a preset time that continue to sound after you release the button. It will stop once the programmed time elapses. Other horns or whistles will continue to sound as long as you hold the button down and will stop after releasing the button.

What is the command to turn the smoke on and the command to turn it off? Some times an on/off command is not always on the same button, and sometimes it is a sequence of key presses to turn something on or off. Such as Shift/Hold-Headlight-Function key.

The commands exist in the decoder. The controller only commands the decoder for the function you request. The controller has no idea what you are requesting from the key presses. The decoder interprets the keystrokes and outputs the desired function.

I have seen some decoders maintain certain commands that were left in the on or activated position when power was removed. For example, a boarding whistle is activated with a function command. F3 in the case I'm talking about. In order to use that boarding whistle again at the next stop, the Function key must be pressed again to reset the command so that it may be used again.

I have left this command in the activated state and upon removing power it will still be activated the next time the locomotive startup sound is activated. So the locomotive starts up and the boarding whistle sounds at the same time.

Other commands on some decoders will not do this and some commands won't do it at all no matter what decoder it is I have. An example of this are lights. Headlights, cab lights, task lights, etc will deactivate even if the command is left on in the activated state when power is removed. The next time power is applied or the sound is activated for that locomotive the lights will be dark, even if the lighting command is in the ON position, so two key presses are needed to turn the lights back on. One press to deactivate the command and a second key press to activate the light command.

This may not be true of all decoders, but it is for ESU, Euhlenbrock, Zimo, and Viessman decoders that I have and use.


----------



## Texas Rattler (Aug 13, 2012)

Maybe I'm getting too deep but how is it transmitted? Is it a pulse modulated signal?

F7 is the command to turn smoke on and off. There is also a switch that I need to find to ensure it is still on.


----------



## wvgca (Jan 21, 2013)

wile the commands are sent by the control unit [and this varies by command, brand, model, etc]... the received commands are interpreted by the decoder, with resulting time outs if necessary decided by the decoder


----------



## mesenteria (Oct 29, 2015)

The signal is embedded in a binary code in the AC square wave that runs full time, full voltage, on the rails. The command module sends 'packets' out every few tenths of a second or so. It has to be quick so that braking, whistles, bells, lighting, directions of travel, and so on, can be effected nearly immediately when the operator inputs their commands. Each packet has an address code attached to it so that the addressed decoder understands that it is to change its behaviour(s), or to maintain them. When the decoder gets an assigned packet with a new instruction, it immediately conforms.

Programmed CV inputs are supposed to be immutable, except that those designed to be manipulated by the user can be reprogrammed. So, if you set CV3 (Inertia) at 210/255, your locomotive will always start to move as if it is lifting a heavy consist....accelerating veerrrrrry slowly. But if you press your F2 for Horn/Whistle, some will stay blaring while others wind down as soon as you remove pressure on the F2 button. But, if you ring the bell, F1 on many decoders, not all, same for the horn, the bell will continue to ring until you press the same button anew. Coupler crash, F3, ends after the explosive sound. BLI Paragon steamers F4 is the compressor, and it can be configured for dual pumps, single lung, or single cross compound. If I press F4, the pumps thump and hiss until I press the same button a second time. And so on...you have to get into the manual and play with the decoder to learn what it will do for you, and how to make it do that.


----------



## gregc (Apr 25, 2015)

Texas Rattler said:


> Maybe I'm getting too deep but how is it transmitted? Is it a pulse modulated signal?


bits are transmitted by reversing the polarity of the voltage. the duration (50-100 usec) determines a 1 or 0


----------



## CTValleyRR (Jul 26, 2014)

Short answer is that it depends on the command. Some, like CV settings (and, presumably, the command to turn smoke on or off) are permanent, until you change them again. Others (sounds), are transient, and only last while the controller nuttiness is held (although some commands may initiate a "string" of sounds, the sound command isn't sent repeatedly while the string plays), others, like the ones controlling motor and lights, last until power is removed, then they are cleared.


----------



## mesenteria (Oct 29, 2015)

I forgot to cover PWM, pulse width modulation, earlier in my response. PWM is a function built into the drive control circuitry of the decoder to make the locomotive move and to accelerate smoothly when first getting underway at Speed Step One. Some decoders have this down pat, such as the TCS and ESU one, Paragon not quite as good, but decent. The Sountraxx Tsunami first edition had four or five CV's in the higher registry, up around 200 or so, that could be tweaked to give excellent control, but few bothered and would live with the otherwise quick jerk into motion.


----------



## gregc (Apr 25, 2015)

mesenteria said:


> PWM is a function built into the drive control circuitry of the decoder to make the locomotive move and to accelerate smoothly when first getting underway at Speed Step One.


PWM is used at all speed steps, not just the first few.

PWM uses a digital output to generate an average voltage by setting the output HIGH for a % of the PWM cycle (e.g. 5 ms). the average voltage is that % of the output voltage level. motor averages the pulses. 

the benefit mesenteria may be referring to is that a short PWM pulse simulating a low voltage can overcome stiction for better low-speed performance.

momentarily disabling PWM allows a decode to measure BEMF which indicates motor RPM. decoder that do this will apply whatever PWM signal is necessary to maintain a desired motor speed, the DCC speed.


----------

