开云体育


Re: Closing or Teminating Scripts #scripting

 

Darrin,

Did you download and look at the Demo.py script that I uploaded?

There are two kinds of persistence in Jython scripts.

"AbstractAutomaton" scripts create separate threads which are visible using the "Thread Monitor". ?It provides the ability to "stop" a thread.

Scripts using "PropertyChangeListener" attach a listener to JMRI objects, such as turnouts, sensors, etc. ?The listeners are created by a script but a listener is independent after the script has finished. ? The Demo.py script shows how to "remove" a listener from a JMRI object.

If you look at the actual execution of a Jython script, they run quickly. ?The Demo.py script runs in 12ms. ?However, it leaves behind an?AbstractAutomaton class definition and a sensor listener, along with any changes to global Jython variables.

Dave Sand



----- Original message -----
From: "Canadian Locomotive Logistics via groups.io" <CanadianLocomotiveLogistics=[email protected]>
Subject: [jmriusers] Closing or Teminating Scripts
Date: Wednesday, March 26, 2025 11:10 AM

In my quest of developing scripts, I often test, re-write, save (under a new name), re-run and continue.
?
After hearing an old script still running.... and I checked the theads; nothing is runing, or so I thought.
?
So without rebooting JMRI, hoe wo a check, and close active scrpts running in the back ground?
?
Be patient with me, this old bird is learning fast.
?
Darrin Calcutt
Canadian Locomotive Logistics
?


Re: Problem loading Bachrus Speedometer #bachrus

 

Bob;

When I press OK on the message, it then goes back to the "Finish and Connect" screen.? When I press Finish again the message appears again, so it's looping.

When?I press Cancel, it goes back to the initial startup screen and Gettin Started in RED.

I then restarted JMRI and selected my Power Cab.? The program opened, with no sign of the Bachrus connection in Preferences.? I then added Bachrus, saved the page and restarted JMRI.? Now i get the screen of Error Initializing Decoder Pro. saying it cannot create a connection to Speedo (A).? Serial Port COM6 not found.??
Checking my Device Manager it shows the Bachrus Speedo Interface (COM6).

So I'm not sure where or what in JMRI isn't making the connection.

Jim Little, MMR?

On Tue, Mar 25, 2025 at 6:05?PM Bob Jacobsen via <rgj1927=[email protected]> wrote:
Sorry for the problem.? Looks like it might be an issue with the startup wizard

What happens if you press OK on that message, then press “Finish” on the underlying window?

If you then close and restart JMRI, what happens?

Bob

> On Mar 25, 2025, at 3:38?PM, James Little via <jlittletrains=[email protected]> wrote:
>
> Hello;
>
> I recently tried installing my Bachrus Speedometer on a(newer) laptop with JMRI on it.
> It has Win 10; JMRI 5.11.4, NCE Power Cab (latest chip v1.65b) all installed.? Power Cab runs fine on system.
>
> I had trouble loading the supplied driver (from 2006),? but after discussing it with a good friend who is a Windows Certified Technician, he walked me through a procedure to instal a "legacy" driver.? Windows now sees the unit? ( in Device Manager).? I walked through the JMRI setup for Bachrus speedometer,? all the way through to the (almost) End.? ?This message appeared, which to me says there's something in JMRI that need updating...?
>
> <JMRI Bachrus? Prob.png>
>
> As what JMRI need is WAAAAAY beyond my paygrade, is there someone out there (preferably a develope)? who I could work with to resolve this?
>
> Jim Little MMR
>


Bob Jacobsen
rgj1927@...










Closing or Teminating Scripts #scripting

 

In my quest of developing scripts, I often test, re-write, save (under a new name), re-run and continue.
?
After hearing an old script still running.... and I checked the theads; nothing is runing, or so I thought.
?
So without rebooting JMRI, hoe wo a check, and close active scrpts running in the back ground?
?
Be patient with me, this old bird is learning fast.
?
Darrin Calcutt
Canadian Locomotive Logistics
?


Re: WiThrottle function master list #functionlabels

 

Steve,
?
Decoders are a mixed bag but 90% are ESU, the others are mostly TSU.
?
I don’t mind editing XML if I am pointed in the right direction.?

Regardless of the decoder, all my functions are standardized.?

F1 bell
F2 horn
etc
F5 ditch lights?
F6 railgrind
F7 full throttle
F8 sound
F9 coast
f12 ground lights
--
Modeling Conrail’s Boston Line in HO


Re: truncated text labels #labels

 

I just added two spaces after the text.
?
chuck


Re: truncated text labels #labels

 

On 3/26/2025 5:32 AM, John Barone via groups.io wrote:

is there a fix to this? problem?
Yep. I believe it is a Windows and/or Java problem that occurs when the Windows computer is configured for a display "scaling" factor that is other than 100%.

The problem and what I have done as a "workaround" has been discussed in the last couple of weeks. I do not have a convenient link, but I do know that it had the subject/topic "Text labels appears only partially", and I had responded on 11Mar2025.

So, please look to that separate thread for the details.


truncated text labels #labels

 

Good morning all,
windows 11,
jmri 5.11.4
Java 17
my panels are Layout Editor panels.
I'm noticing that almost all of my text labels are getting cut short.?
example, "Track2" looks like this "Trac..." on the? panel. I try to fix each instance of this occance, store all tables and panels after the fix, but when I restart panel pro, the issue returns.?
is there a fix to this? problem?
John?



--
Sent from my gosh darn droid!
Please excuse the fat finger mistakes...
John


Re: Script help please #scripting

 

Thanks
All sorted and working


Re: Chaining transits with a different locomotive #dispatcher

 

Thanks Steve,

I'll try that.

JeanLouisDelestre@...


De: "Steve_G via groups.io" <RailRodder22@...>
?: [email protected]
贰苍惫辞测é: Mardi 25 Mars 2025 21:27:21
Objet: Re: [jmriusers] Chaining transits with a different locomotive #dispatcher

Jean , trainsit actions
What is specified in your traininfo file that you are loading, Roster, User... etc
In the Load Traininfo are you specifying Default/Current/Roster/Address??
?
I have found a problem that generates an error specifying that there is no DCC address, but canot reproduce the problem as reported. PS the trainname may be the same, but the DCC address should be different.
?
Steve G.
?


--
---------------------------------------------
Jean-Louis Paris-France
---------------------------------------------
JRMI 5.9.5 on Windows
DCC EX? on Arduino Mega
Java version 17.1.12
?


Re: Chaining transits with a different locomotive #dispatcher

 

Many thanks Ken.?

I'll try that today.

JeanLouisDelestre@...


De: "Ken Heywood via groups.io" <kheywood@...>
?: [email protected]
贰苍惫辞测é: Mardi 25 Mars 2025 20:45:04
Objet: Re: [jmriusers] Chaining transits with a different locomotive #dispatcher

In the last step of your transit, there are actions.
One action is the "load traininfo", another of significance is "terminate".
Here's what I do on a reverse move.
?
When I want train A to stop and reverse, In the last transit step (where the train stops), add action "load traininfo file".
The new traininfo file references the opposite direction and a unique transit to run in that direction.
(I've never had success to my satisfaction using a reverse move in a single transit)
After the "load traininfo", do a "terminate" action with a 1.5second delay.
That gives Transit A a chance to initiate the new transit and avoids the "block already occupied" error.
?
Now, that's the reverse move.
Simply add another "load traininfo" for Locomotive B either before of after the first "load traininfo" action.
That will kickoff both Train A in reverse and Train B.
?
Just remember to do all that loading and terminating in transit actions, not in the traininfo file (no reverse, no terminate, no load).
--
Ken
NYNH&H, Old Colony Division, Cape Cod Branch (1949-1959)
Loconet * JMRI 5.11.4 * OSX,Win10,Ubuntu
Blog: ?
Youtube:


--
---------------------------------------------
Jean-Louis Paris-France
---------------------------------------------
JRMI 5.9.5 on Windows
DCC EX? on Arduino Mega
Java version 17.1.12
?


Re: Problem loading Bachrus Speedometer #bachrus

 

Sorry for the problem. Looks like it might be an issue with the startup wizard

What happens if you press OK on that message, then press “Finish” on the underlying window?

If you then close and restart JMRI, what happens?

Bob

On Mar 25, 2025, at 3:38?PM, James Little via groups.io <jlittletrains@...> wrote:

Hello;

I recently tried installing my Bachrus Speedometer on a(newer) laptop with JMRI on it.
It has Win 10; JMRI 5.11.4, NCE Power Cab (latest chip v1.65b) all installed. Power Cab runs fine on system.

I had trouble loading the supplied driver (from 2006), but after discussing it with a good friend who is a Windows Certified Technician, he walked me through a procedure to instal a "legacy" driver. Windows now sees the unit ( in Device Manager). I walked through the JMRI setup for Bachrus speedometer, all the way through to the (almost) End. This message appeared, which to me says there's something in JMRI that need updating...?

<JMRI Bachrus Prob.png>

As what JMRI need is WAAAAAY beyond my paygrade, is there someone out there (preferably a develope) who I could work with to resolve this?

Jim Little MMR

Bob Jacobsen
rgj1927@...


Problem loading Bachrus Speedometer #bachrus

 

Hello;

I recently tried installing my Bachrus Speedometer on a(newer) laptop with JMRI on it.
It has Win 10; JMRI 5.11.4, NCE Power Cab (latest chip v1.65b) all installed.? Power Cab runs fine on system.

I had trouble loading the supplied driver (from 2006),? but after discussing it with a good friend?who is a Windows Certified Technician, he walked me through a procedure?to instal a "legacy" driver.? Windows now sees the unit? ( in Device Manager).? I walked through the JMRI setup for Bachrus speedometer,? all the way through to the (almost) End.? ?This message appeared, which to me says there's something in JMRI that need updating...?

JMRI Bachrus  Prob.png

As what JMRI need is WAAAAAY beyond my paygrade, is there someone out there (preferably a develope)? who I could work with to resolve this?

Jim Little MMR


Re: Chaining transits with a different locomotive #dispatcher

 

Jean , trainsit actions
What is specified in your traininfo file that you are loading, Roster, User... etc
In the Load Traininfo are you specifying Default/Current/Roster/Address??
?
I have found a problem that generates an error specifying that there is no DCC address, but canot reproduce the problem as reported. PS the trainname may be the same, but the DCC address should be different.
?
Steve G.
?


Re: DecoderPro Opens every time as a new install

 

Thanks Dave, I will try to get over there on Friday morning to get the information.

George ronn

On Tue, Mar 25, 2025 at 2:29?PM Dave Sand via <ds=[email protected]> wrote:
George,

Before starting DecoderPro, use the file manager and go to C:\Users\<username>\JMRI.? Replace <username> with the name of the Windows user used for logon.

You should see a similar list of files as shown here.
You probably will not have the PanelProConfig2.properties file or the jython directory unless you also use PanelPro.

In the log directory there will be session.log and messages.log files.? Upload the messages.log file to the group's ProblemsBeingWorkedOn file folder.

Dave Sand


----- Original message -----
From: "Glikestrains via " <Glikestrains=[email protected]>
Subject: [jmriusers] Decoder Pro Opens every time as a new install
Date: Tuesday, March 25, 2025 2:14 PM

Team,
?
I really need some help on this issue.? I posted on it a couple weeks back and got zero replies.
?
At the museum we have a Dell PC running Windows 10 and Java 11.? Currently JMRI version 5.10 is running on the machine.? Every time JMRI opens it is a new install running the set-up wizard where we have to choose the Sprogg unit, the com port, etc.? It also does not remember that there should be a roster of locomotives.? ?I uninstalled the JMRI software by selecting uninstall in the apps window.? I confirmed that all directories are removed from the system.? I re-installed JMRI.? There is no change in the behavior.? Save locos to the Roster, it recognizes them until the next time decoder pro is started and then it opens as a new install with the wizard wanting you to choose Sprogg, com port, etc.? Once you do that it comes up with no roster.
?
I'm at my wits end on this one.? Can someone offer suggestions or ideas to try.
?
George Ronn


Re: Chaining transits with a different locomotive #dispatcher

 

In the last step of your transit, there are actions.
One action is the "load traininfo", another of significance is "terminate".
Here's what I do on a reverse move.
?
When I want train A to stop and reverse, In the last transit step (where the train stops), add action "load traininfo file".
The new traininfo file references the opposite direction and a unique transit to run in that direction.
(I've never had success to my satisfaction using a reverse move in a single transit)
After the "load traininfo", do a "terminate" action with a 1.5second delay.
That gives Transit A a chance to initiate the new transit and avoids the "block already occupied" error.
?
Now, that's the reverse move.
Simply add another "load traininfo" for Locomotive B either before of after the first "load traininfo" action.
That will kickoff both Train A in reverse and Train B.
?
Just remember to do all that loading and terminating in transit actions, not in the traininfo file (no reverse, no terminate, no load).
--
Ken
NYNH&H, Old Colony Division, Cape Cod Branch (1949-1959)
Loconet * JMRI 5.11.4 * OSX,Win10,Ubuntu
Blog: ?
Youtube:


Re: DecoderPro Opens every time as a new install

 

George,

Before starting DecoderPro, use the file manager and go to C:\Users\<username>\JMRI. ?Replace <username> with the name of the Windows user used for logon.

You should see a similar list of files as shown here.
You probably will not have the PanelProConfig2.properties file or the jython directory unless you also use PanelPro.

In the log directory there will be session.log and messages.log files. ?Upload the messages.log file to the group's ProblemsBeingWorkedOn file folder.

Dave Sand


----- Original message -----
From: "Glikestrains via groups.io" <Glikestrains=[email protected]>
Subject: [jmriusers] Decoder Pro Opens every time as a new install
Date: Tuesday, March 25, 2025 2:14 PM

Team,
?
I really need some help on this issue.? I posted on it a couple weeks back and got zero replies.
?
At the museum we have a Dell PC running Windows 10 and Java 11.? Currently JMRI version 5.10 is running on the machine.? Every time JMRI opens it is a new install running the set-up wizard where we have to choose the Sprogg unit, the com port, etc.? It also does not remember that there should be a roster of locomotives.? ?I uninstalled the JMRI software by selecting uninstall in the apps window.? I confirmed that all directories are removed from the system.? I re-installed JMRI.? There is no change in the behavior.? Save locos to the Roster, it recognizes them until the next time decoder pro is started and then it opens as a new install with the wizard wanting you to choose Sprogg, com port, etc.? Once you do that it comes up with no roster.
?
I'm at my wits end on this one.? Can someone offer suggestions or ideas to try.
?
George Ronn


DecoderPro Opens every time as a new install

 

Team,
?
I really need some help on this issue.? I posted on it a couple weeks back and got zero replies.
?
At the museum we have a Dell PC running Windows 10 and Java 11.? Currently JMRI version 5.10 is running on the machine.? Every time JMRI opens it is a new install running the set-up wizard where we have to choose the Sprogg unit, the com port, etc.? It also does not remember that there should be a roster of locomotives.? ?I uninstalled the JMRI software by selecting uninstall in the apps window.? I confirmed that all directories are removed from the system.? I re-installed JMRI.? There is no change in the behavior.? Save locos to the Roster, it recognizes them until the next time decoder pro is started and then it opens as a new install with the wizard wanting you to choose Sprogg, com port, etc.? Once you do that it comes up with no roster.
?
I'm at my wits end on this one.? Can someone offer suggestions or ideas to try.
?
George Ronn


Re: Automatic Dispatching

 

Tony, I forgot to address some of your questions.
?
Most of my blocks are train length.? Some are not; a couple of? turnouts and the yard ladders, for example. Blocks where a train might stop are programmed with their length in inches.
?
Blocks are physically isolated, with BDL168 occupancy detection.
?
I have? not created a simple loop panel with no turnouts.? I was workking on SML? and placing masts when I ran into the software setting up masts on the frog end of a turnout, but not offering a mast on the points end.? This is, however the same turnout I couldn't get a Transit to cross from Block Apex Gate to Ramp 1.
?
I stopped at this ooint, fearing I was chasing down the wrong path to getting my trains to stage properly/
?
I saw a YouTube video of a Brit having his trains stop before a train alredy in staging track and moe forwatd automatically when the train ahead departs.? Trouble is, he showed the rains stopping aand moving, but no display of the JMRI setup.
?
Bill


Re: Automatic Dispatching

 

Thanks you both for the replies.? I'm very thankful for the effort to solve my questions.? I'll work on them later today if I can.
?
Tony, I have my panel set up with Blocks and Sections, and was working on Transits.? A couple of the Turnouts are in Blocks by themselves, but most of them are part of the Block on the points side of the turnout.? I can't wire them separately at this point.? I've never heard of Ghost Blocks.? I also use only the stable versions of JMRI.? I will look into your suggestions.? I will look this up when I get chance.
?
Dave, I will also get the layout uploaded later today.? I should have thought of uploading it, you and others helped me once before by doing that.? Per your question, I ran into the continuing route problem on the Layout Panel, trying to get the Transit to exit Block Apex Gate via LT501 into Block Ramp 1.? It only offered diverging route Ramp 2.? I also noted that trying to go the reverse direction, a Transit exiting Block Ramp1 and intending to continue into Block Apex Gate.? The Apex Gate Block was not available.? Astoundingly, though, exiting turnout LT501 via Ramp 2, the diverging route, was available.? quite a tight turn!


Re: Chaining transits with a different locomotive #dispatcher

 

Ken,

How do you do that? Threre is nothing to terminate in the transit definition, only on the "create new train" screen.


JeanLouisDelestre@...


De: "Ken Heywood via groups.io" <kheywood@...>
?: [email protected]
贰苍惫辞测é: Mardi 25 Mars 2025 16:55:18
Objet: Re: [jmriusers] Chaining transits with a different locomotive #dispatcher

You need to terminate Transit A in the last step of the transit.
--
Ken
NYNH&H, Old Colony Division, Cape Cod Branch (1949-1959)
Loconet * JMRI 5.11.4 * OSX,Win10,Ubuntu
Blog: ?
Youtube:


--
---------------------------------------------
Jean-Louis Paris-France
---------------------------------------------
JRMI 5.9.5 on Windows
DCC EX? on Arduino Mega
Java version 17.1.12
?