Professor Chaos asked the following question (essentially) in 2012 and nobody knew the answer -- how about now?
I'm writing code for an Arduino microcontroller to autonomously control my layout, and I'm trying to understand how to control engines and trains when momentum is a factor. Using an SER2 and my Legacy remote, I wrote Arduino code to display the raw data that is being transmitted by my CAB-2 -- and I'm a little surprised.
When you press the Low, Medium, or High momentum buttons on the CAB-2, it sends a command to the engine or train to set momentum to that value. Great! So the engine or train automatically manages momentum, correct? Not so fast...(ha ha good pun)
The CAB-2 *also* sends out commands for as long as needed, about once a second, slowly increasing (or decreasing) speed and also adjusting engine labor. Huh?
HERE IS THE QUESTION: I would have expected it to work one way or the other - no both. So if the CAB-2 has to manage the details of very slowly changing the speed of an engine or train, then what is the point of sending a momentum command to that same engine or train? Apparently the engines do *not* have the ability to manage momentum themselves, so what do they do with the momentum command?
ONE POSSIBLE ANSWER: If you have more than one CAB-2 (or other means of control), is it possible to "hand over" control of a specific engine or train to another cab? If so, is the other cab "aware" of the current settings, such as the engine or train's current momentum setting? Perhaps a CAB-2, in addition to sending control commands, will monitor the data bus looking to see what other controllers are doing, and (assuming it has a particular engine or train in its database) actually updating its own settings to match what is being done by the other controller???????
Why else would a CAB-2 send a momentum command out the data bus, despite managing momentum by itself?
P.S. This is off topic, but my little experiment also revealed that the CAB-2 is acting as a state machine. So if you have two different engines, each with high momentum for example, you can have one speeding up and the other slowing down at the same time. That's not a bit surprising, but it was interesting to see in light of me trying to duplicate some of its functionality -- all of this is being managed by the CAB-2, and not by the engines themselves. Which is kind of a bummer because it means I'm going to have to write my own control code as a state machine.