¿ªÔÆÌåÓý

JMRI script; Digitrax DCS52 resetting speed to 0 while JMRI script running


 

Hi,

?

I have only recently started using JMRI, a steep learning curve, and scripting using modified JMRI example scripts.

I am running JMRI version 4.26, Jarva 1.8.0_40 on a Win 11 PC. The layout is controlled using Loconet: DCS52 and CAN via MERG.

?

I hope that this list is the appropriate place for my query.

?

Using the BackandForth.py (modified) I have managed to get a loco to go back & forth several times. The problem I have is that the loco randomly stops.

?

Using the Loconet Monitor I found that the DCS52 sends ¡°Set speed of loco in slot 9 to 0¡± at intervals, which causes the loco to stop mid script.

Is there some way to stop these DSC52 commands? Or am I not taking proper control in the script.

?

I have attached a copy of the script.

?

Any help or suggestions would be appreciated.

?

Regards,

?

Tim

?

?


 

On 4/21/2025 1:25 PM, bluebuffalo2004 via groups.io wrote:
Any help or suggestions would be appreciated.
You are probably dealing with the typical "two LocoNet throttles controlling the same LocoNet slot" problem.

Each throttle is supposed to send its speed to its slot number at at least once per (n) seconds. One (or more!) of them is requesting the slot to be at a speed of zero. Your script has presumably requested some other speed, And the script loses control - until its throttle determines that it should re-send its (non-zero) speed! And, when the other throttle re-sends its "speed equals zero", it just stops. Etcetera...

Your script probably _needed_ to deal with the LocoNet "Steal" mechanism. But you ignored it or just said "ok, just steal it". But that DID NOT tell the other thorttle to "stop using the slot", so the other throttle WILL continue to send its "set speed to zero" message.

So, you probably _need_ to deal with the _other throttle_. That means "Releasing" that loco from _any_ throttle where it exists. (And possibly dispatching from tetherless throttles, _AND_, in my opinion, turning off the throttle power and/or pulling the batteries from the throttle if possible.

And, the loco needs to be released from any JMRI or other software throttle. And be aware that "debugging" a JMRI script-based throttle can, potentially, be left "alive" in some circumstances. I would recommend that you might need to occasionally "quit" JMRI and re-start JMRI, to ensure that you do not have "old", "crashed" script code still running...


 

On Mon, Apr 21, 2025 at 12:46 PM, <bluebuffalo2004@...> wrote:

?

I am running JMRI version 4.26, Jarva 1.8.0_40 on a Win 11 PC. The layout is controlled using Loconet: DCS52 and CAN via MERG.

?

?
Just curious, but why are you using a version of JMRI that's 3.5 years old? There have been half a dozen newer production versions since then...
?
Steve
"Breezlys"


 

and from experience, lots of script changes happened between those releases.
So starting with an old JMRI version can cause LOTS of issues later.
Keeping up with the current release may seem hassle, until you find a feature you need is not in the old version and you have to do a big bang update.
?
just saying... (Experience!)
--

---
Thomas
DeSoto, TX


 

And since you are already in a Digitraxx profile, open the slot monitor to see which slots have which addresses set, and clear out any leftovers.
--

---
Thomas
DeSoto, TX


 

On 4/21/2025 4:35 PM, thomasmclae via groups.io wrote:
And since you are already in a Digitraxx profile, open the slot monitor to see which slots have which addresses set, and clear out any leftovers.
But DO NOT think "clearing the slots" will solve the problem!!!!

"Clearing the slots" is something that affects the command station, But it almost _never_ does anything to address the problem: the throttle can still attempt to "control" the slot!

The problem is in the throttle! In general, there is _no reliable way_ to tell a LocoNet throttle "not to use" a given slot. (Exception: some newer LocoNet throttles running with newer command stations in certain modes can be "forced" to stop using a slot.)

As I have said previously, the _best way_ to stop using a throttle that is running a loco on a LocoNet-based command station includes these following operations, in sequence:
- "Release" the loco(s) from the throttle.
- Disconnect it from LocoNet (if possible!).
- Turn the throttle "off" (if possible!).
- Remove the batteries and any other source of power (if possible!).

(And, other systems have similar "problems" when multiple throttles "cause problems". Exactly what the problems are, and what the "solutions" are, vary by the type of system. While I am familiar with a couple of non-Digitrax systems, I am NOT a good source for pretty much any system other than Digitrax...)