¿ªÔÆÌåÓý

Date

Locked New file uploaded to [email protected]

[email protected] Notification
 

Hello,

This email message is a notification to let you know that a file has been uploaded to the Files area of the [email protected] group.

File: Table print w slips.py

Uploaded By: Dave Sand

Description:
Add support for slips and "second" turnouts.

You can access this file at the URL:
/g/jmriusers/files/Script%20examples//Table%20print%20w%20slips.py

Cheers,
The Groups.io Team


Locked Re: PanelPro icon sets question

Nick
 

Greg,

Thanks for the info. I will get to play around with it and other suggestions from our great group.

As things progress, I will post my successes and failures. My interest in making panels has been reignited by all of the help I have received.

Thanks to all that provided the help.

Regards,
Nick Kulp
?
"I'm not a failure. I started at the bottom and I found it easily attainable. Life is too short to set unattainable goals"

- Nick Kulp



Hey Nick,?
? ? ?In the scenario you describe above, you have two options.? The first option would be to not do anything with the last signal at the entrance to the yard.? Since it is in a pair with the previous signal, it should show up and not be a red x.? You can directly control the signal by clicking on it.? Two aspects are all that would be needed.? Stop and something else depending on your desires.?

The second option is a little more complicated and would produce more realistic results.? In this scenario, you would need to create a virtual signal mast that would be the destination mast for the signal at the yard entrance.? Set the virtual mast to stop.? That will allow the signal at the yard entry to display approach.? Then to control the yard signal, set up a sensor and have the signal mast logic include that sensor.? If you turn the sensor on, the signal will go to red.? If the sensor is off the signal will "clear" and show approach allowing a train to enter the yard.?

Greg McCartney


Locked Re: Ops and Roster question

 

Thanks Dan and Mike for your responses. I may not have explained things clearly enough.

I have mostly analogue DC locos at present, and can not see how / whether I should enter these in the roster in order to get Ops schedules together? Maybe I am stuck entering them in Ops, but then when I do add a chip, do I have to delete and re-add?

Is there a way to enter analogue locos anywhere into the roster??

Thanks.


Locked Re: Trying to get on top of jython

 

Thanks.

Wouter, what version of JMRI are you using?

Re this:

3) util.py
Totally useless as is, but that's because it has been pruned of everything that could go while still showing the bug. As uploaded, it works, but only because of the assignment statement that creates a valid 'masts' variable. Comment that out, and things go horribly wrong, which they shouldn't if masts were properly preset. Also, edit a signalmast name into this file that is a valid one in your panelfile, instead of EastNorthOuter. I've also included my panelfile, should that be handier to use instead.
I simply don¡¯t understand this at all. The comment says that the print statement shows in the log, but there¡¯s nothing to invoke it. With the masts assignment commented or not, I get:

masts= jmri.managers.DefaultSignalMastManager@2f7c2f4f

so something else is going on in your installation.

Have you messed with the python.properties file? (Whether or not you have, the right answer is ¡°don¡¯t¡±)

Bob



On Jan 3, 2019, at 12:10 PM, Dave Sand <ds@...> wrote:

Bob,

The directory is up one level.

Dave Sand


On Jan 3, 2019, at 2:06 PM, Bob Jacobsen <rgj1927@...> wrote:

I¡¯m not seeing that directory. Link please?

What may be going on here is the scope of global variables:

Bob

On Jan 3, 2019, at 8:14 AM, whmvd <vandoornw@...> wrote:

I've now created a WoutersPythonbug directory in ProblemsBeingWorkedOn which contains just three tiny scripts, together showing that there is, as far as I can make out, really a bug here.
--
Bob Jacobsen
rgj1927@...







--
Bob Jacobsen
rgj1927@...


Locked Re: Test version 4.15.1 of JMRI/DecoderPro is available for download

 

Downloaded and installed today. Work fine and no problems on the RVR. ? PJ


Locked Re: Trouble with JMRI to JMRI client/server

 

On Thu, Jan 3, 2019 at 09:05 AM, mabooker76 wrote:
Using the Loconet sim on the RPI, and the LocoBuffer (PS) as the command station type on the iMac (client)
Martin, if your "client" machine is using a Locobuffer to connect to the Loconet directly, then you are not using (or needing) the LoconetOverTCP Server connection.?

I'm not sure what your desired configuration is here. Can you describe it further?

--SteveT


Locked Re: Trying to get on top of jython

 

Bob,

The directory is up one level.

Dave Sand

On Jan 3, 2019, at 2:06 PM, Bob Jacobsen <rgj1927@...> wrote:

I¡¯m not seeing that directory. Link please?

What may be going on here is the scope of global variables:

Bob

On Jan 3, 2019, at 8:14 AM, whmvd <vandoornw@...> wrote:

I've now created a WoutersPythonbug directory in ProblemsBeingWorkedOn which contains just three tiny scripts, together showing that there is, as far as I can make out, really a bug here.
--
Bob Jacobsen
rgj1927@...






Locked Re: Trying to get on top of jython

 

I¡¯m not seeing that directory. Link please?

What may be going on here is the scope of global variables:

Bob

On Jan 3, 2019, at 8:14 AM, whmvd <vandoornw@...> wrote:

I've now created a WoutersPythonbug directory in ProblemsBeingWorkedOn which contains just three tiny scripts, together showing that there is, as far as I can make out, really a bug here.
--
Bob Jacobsen
rgj1927@...


Locked Re: Trying to get on top of jython

 

instead of programmers, it should say addressedProgrammers and globalProgrammers, will fix.

Bob

On Jan 3, 2019, at 8:14 AM, whmvd <vandoornw@...> wrote:

1) jmriShortCuts.py
Simply prints all the objects that should be predefined according to the following documentation link:

(it turns out that 'programmers' (or indeed 'programmer') is not present, which is probably a very minor documentation buglet, but masts, the one I focus on, is. So my environment does set it up correctly for me.
--
Bob Jacobsen
rgj1927@...


Locked Re: Ops and Roster question

 

There isn't a way to export locos from operations to Decoder Pro.? You should always enter them into Decorder Pro first.

Dan


Locked Re: Trying to get on top of jython

 

Wouter,

I have uploaded 2 files to your folder.

It appears to me that the issue deals with scope and how import actually works. I don¡¯t think it is a JMRI issue. Most likely something with Jython or maybe how you are structuring your program.

miniTest DS.py uses the AbstractAutomaton class to handle the threading. It does not import util and the method calls to util where changed.

The existing def in util DS.py was changed to act as static method.

To run miniTest, util DS is run first which sets up the util environment with the util methods becoming global, then miniTest DS is run.

This approach works but I am sure there are others.

Dave Sand

On Jan 3, 2019, at 10:14 AM, whmvd <vandoornw@...> wrote:

Indeed, Dave, I have.

I've now created a WoutersPythonbug directory in ProblemsBeingWorkedOn which contains just three tiny scripts, together showing that there is, as far as I can make out, really a bug here.

1) jmriShortCuts.py
Simply prints all the objects that should be predefined according to the following documentation link:

(it turns out that 'programmers' (or indeed 'programmer') is not present, which is probably a very minor documentation buglet, but masts, the one I focus on, is. So my environment does set it up correctly for me.

2) miniTest.py
A main test program that simply runs, in its own thread, my object under test.

3) util.py
Totally useless as is, but that's because it has been pruned of everything that could go while still showing the bug. As uploaded, it works, but only because of the assignment statement that creates a valid 'masts' variable. Comment that out, and things go horribly wrong, which they shouldn't if masts were properly preset. Also, edit a signalmast name into this file that is a valid one in your panelfile, instead of EastNorthOuter. I've also included my panelfile, should that be handier to use instead.

Put the three scripts into the resources directory and run:
1) jmriShortCuts.py
proving that the environment sets up the masts variable
2) miniTest.py
proving that that test shows a validly retrieved signalMast

Comment out the line that should not be in miniTest.py (masts=...)
Restart JMRI to get rid of possibly remaining classes in memory (that bit me at some point)
3) miniTest.py
proving that now it does not work anymore, with all the symptoms listed in the file itself.

I'm using JMRI 4.14 under Linux Mint 18.3

Anything more I can do to help explain why I think this is a bug?

Thanks,
Wouter

On Thu, 3 Jan 2019 at 15:02, Dave Sand <ds@...> wrote:
Wouter,

Do you have "import java" and "import jmri" at the beginning of each python file?

Dave Sand



On Jan 3, 2019, at 5:37 AM, whmvd <vandoornw@...> wrote:

Hello again, Bob,

Thanks for bearing with me on this.

It didn't go quite as planned when I went looking for the global variables 'turnouts', 'masts' and 'sensors'. Weirdly, turnouts and sensors are there, but masts is not. That is now the only little niggle left. Considering where I was only yesterday, that's a nnumber of huge leaps forward. The error reported is "global name 'masts' is not defined". I can bypass the problem easily by including the following line in my code:

masts = jmri.InstanceManager.getDefault(jmri.SignalMastManager)

but that's really cheating, shouldn't be necessary and keeps the back of my mind worried at what else could go wrong when I continue. Any advice on this?masts = jmri.InstanceManager.getDefault(jmri.SignalMastManager)

Wouter

On Wed, 2 Jan 2019 at 20:31, Wouter van Doorn <vandoornw@...> wrote:
Hi Bob,

Re 1) Not only did I think that was the way to do it, I was also (and am still) just building my 'library of tricks' to use in the proper, big script later on. This is one of the stages of learning! I have now removed the join, and made the spawned threads daemons, and that now works a *lot* better! Not only do I now get error messages when I need them (hurray!), the user interface no longer locks up, as you predicted (double hurray!).

Re 2) The line you mention is there. I'll see next what happens when I do not create that 'sensors' variable myself. IF it still goes wrong, at least I have an error message now to tell me where and how I goofed.

It's a lot better already, so thank you very much for the help so far. I'll let you know the result of the test once I get to it, which won't be today, but I hope to find time tomorrow.

Thanks again,
Wouter

On Wed, 2 Jan 2019 at 20:03, Bob Jacobsen <rgj1927@...> wrote:
1) Why make the main thread wait with a join? What does that do for you?

2) I¡¯m not a Bash expert, but that looks like it should work. Somehow, Jython isn¡¯t initializing properly for you. Are you getting a line like this in the log?

2019-01-02 11:58:29,512 script.JmriScriptEngineManager INFO - python 2.7 is provided by jython 2.7.0 [AWT-EventQueue-0]

When I force an error, I get output that starts like:

2019-01-02 11:58:41,099 jython.InputWindow ERROR - Error executing script [AWT-EventQueue-0]
javax.script.ScriptException: NameError: name 'xo' is not defined in <script> at line number 1
at org.python.jsr223.PyScriptEngine.scriptException(PyScriptEngine.java:202)
at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:42)
at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:31)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)

Bob

On Jan 2, 2019, at 8:24 AM, whmvd <vandoornw@...> wrote:

Hi Bob ,

Thanks for the quick reaction.
Re 1: I actually do that in a separate thread - but then the first thread waits while 'join'ing the subthread, so that remains the same problem, really. Do I need to make the subthread a daemon one and let the main thread just go? That would seem to make sense?

Re 2: I use 'Run script...' from the Tables menu. If it helps, this is the script I use to start jmri (which should be good enough):
=============================
#!/bin/bash

cd $HOME/JMRI
nohup ./PanelPro >>$HOME/Desktop/.PanelPro.log 2>&1 &
=============================
Everything I log neatly shows up in the file on the desktop. The install is squeaky-clean; everything I do is in the user files area, nothing in the installation directory. VERY interesting that 'sensors' and 'turnouts' should have been predefined...

Wouter



On Wed, 2 Jan 2019 at 15:52, Bob Jacobsen <rgj1927@...> wrote:
1) There are ways to do this. They start off looking complicated, but you have to remember that asking the program to sleep _actually_ _works_: If you do that in the main program, the main program sleeps so that you can¡¯t click, etc. Instead, you have to hive your turnout activity into a little separate item (called a ¡°thread¡±) which can run and sleep independently.



2) How are you running your scripts? When I run something (i.e. while debugging) from a Script Entry window, the syntax error and runtime error messages show up nicely on JMRI System console window. Perhaps you¡¯re running them a different way or there¡¯s something else wrong?

Another clue that something is wrong is not seeing ¡°turnouts¡± and ¡°sensors¡± predefined. They _definitely_ should be.

Bob

On Jan 2, 2019, at 7:42 AM, whmvd <vandoornw@...> wrote:

Hello scripting-gurus,

For quite a while now, I've been fighting python/jython rather than using it, and frustration is building up. I want to like it, I want to work with it - but it's not making it easy. For now, I'd like to focus on two things that make life very hard:

1) A small test script that looks up a turnout (successfully) checks its status (thrown or closed), logs it and sleeps for 0.2 seconds before checking again until it is what I want it to be does not allow me to operate any of my four panels (3x Panel Editor, 1x Layout Editor). The only things that can be operated are the resize buttons on the window and the positioning. So I can't throw the turnout to let the test program complete (the log line appears every 0.2 seconds, so it sort of seems to work). I would have thought that the time.sleep(200/1000.0) would allow me to do things instead of the whole interface being locked up? (BTW: specifically not looking for different ways to do this; I know I should add a listener and make that react, and I will end up doing that anyway - I am trying to understand why the simple thing I'd like to do cannot work)

2) When I make one of my frequent coding errors, the result is the same as described above - interface locked up except for the sizing/positioning of windows). I get no error logged. Nothing on standard output or standard error, and nothing in the console. Zilch. This leaves me having to guess where I could have gone wrong, instead of being able to look at a stack dump. For instance: I thought in my optimism that the variables 'turnouts' and 'sensors' where predefined when importing jmri, so I was happily using them. That caused the lock-up with no message at all. Finding the cause of that took me several frustrating days. I hope to turn this back into a hobby!

Any help will be greatly appreciated.

Wouter

PS: using JMRI 4.14 on Linux Mint 18.3.
--
Bob Jacobsen
rgj1927@...






--
Bob Jacobsen
rgj1927@...










Locked Re: SoundPro

 

HI Al,

The .spj file can be accessed by audio editor.? I use an opensource editor called Audacity.? You can get it here.??? ? or here??.

When you use it, you will need to choose, [Import Audio] and then choose Raw Audio.? On the next screen select 11k sampling rate and 8 or 16 bit depth depending on your spj. file.

The .spj file is simply a single audio file.? If you open the spj in SoundPro the timings will correspond to the timings in the editor file.? I used this to pull apart some spj. files to create my own .vsd files.? Using Audacity you can select portions of this file, copy, create new file and paste.? Then export the file as .wav.? be sure to set the proper bit depth.? All your files need to be the same bit depth.? ?I will not share any I've made as I'm doing this for my own use and sharing will violate the intellectual property rights of the sound file owners.


Locked Re: JMRI Not Identifying Locomotives Properly

 

Perhaps there is a solution by looking at the User1 and User2 settings for differentiation? That maybe a good compromise solution. I could then go back to the duplicate numbers and give them different values in the user cv's to correct the issue.?


Locked Re: Ops and Roster question

 

I haven¡¯t found a good way either, although I usually get them set up in DecoderPro first and then manually enter them into Locomotives in Ops. There may be a way to do a single entry import into Locomotives but I haven¡¯t found it. Of course the other option is to delete everything in Locomotives and then reimport the whole roster from DecoderPro, but that seems daunting.


Locked SoundPro

 

I would like to use soundpro to access a spj file and copy the associated wav files. How do I access SounPro from JMRI? Is there an Icon that can be added so the program can be accessed? Thanks for any help,
Al Babinsky


Locked Re: Trouble with JMRI to JMRI client/server

 

Thanks Steve and Bob,

The Loconet over IP server generally works from the iMac to the RPI.? The status window on the RPI shows running and the client count 1.

Using the Loconet sim on the RPI, and the LocoBuffer (PS) as the command station type on the iMac (client) I am able to
manipulate the panel (which has to be on both computers) though the sensor states get out of synch, i.e. I am triggering routes
for yard ladders and though the switch positions are correct for the 'activated route' picked on the client the server shows a different active
sensor.? Do not think that it will be a problem as the virtual panel used by the yard master will be the 'system of record'.

I will go down to the club and try it 'for real' to see if there is still an issue.

Much appreciated,
Martin Booker


Locked Re: PanelPro icon sets question

 

Hey Nick,?
? ? ?In the scenario you describe above, you have two options.? The first option would be to not do anything with the last signal at the entrance to the yard.? Since it is in a pair with the previous signal, it should show up and not be a red x.? You can directly control the signal by clicking on it.? Two aspects are all that would be needed.? Stop and something else depending on your desires.?

The second option is a little more complicated and would produce more realistic results.? In this scenario, you would need to create a virtual signal mast that would be the destination mast for the signal at the yard entrance.? Set the virtual mast to stop.? That will allow the signal at the yard entry to display approach.? Then to control the yard signal, set up a sensor and have the signal mast logic include that sensor.? If you turn the sensor on, the signal will go to red.? If the sensor is off the signal will "clear" and show approach allowing a train to enter the yard.?

Greg McCartney


Locked Re: Trying to get on top of jython

 

Indeed, Dave, I have.

I've now created a WoutersPythonbug directory in ProblemsBeingWorkedOn which contains just three tiny scripts, together showing that there is, as far as I can make out, really a bug here.

1) jmriShortCuts.py
Simply prints all the objects that should be predefined according to the following documentation link:
(it turns out that 'programmers' (or indeed 'programmer') is not present, which is probably a very minor documentation buglet, but masts, the one I focus on, is. So my environment does set it up correctly for me.

2) miniTest.py
A main test program that simply runs, in its own thread, my object under test.

3) util.py
Totally useless as is, but that's because it has been pruned of everything that could go while still showing the bug. As uploaded, it works, but only because of the assignment statement that creates a valid 'masts' variable. Comment that out, and things go horribly wrong, which they shouldn't if masts were properly preset. Also, edit a signalmast name into this file that is a valid one in your panelfile, instead of EastNorthOuter. I've also included my panelfile, should that be handier to use instead.

Put the three scripts into the resources directory and run:
1) jmriShortCuts.py
proving that the environment sets up the masts variable
?2) miniTest.py
proving that that test shows a validly retrieved signalMast

Comment out the line that should not be in miniTest.py (masts=...)
Restart JMRI to get rid of possibly remaining classes in memory (that bit me at some point)
3) miniTest.py
proving that now it does not work anymore, with all the symptoms listed in the file itself.

I'm using JMRI 4.14 under Linux Mint 18.3

Anything more I can do to help explain why I think this is a bug?

Thanks,
Wouter

On Thu, 3 Jan 2019 at 15:02, Dave Sand <ds@...> wrote:
Wouter,

Do you have "import java" and "import jmri" at the beginning of each python file?

Dave Sand



> On Jan 3, 2019, at 5:37 AM, whmvd <vandoornw@...> wrote:
>
> Hello again, Bob,
>
> Thanks for bearing with me on this.
>
> It didn't go quite as planned when I went looking for the global variables 'turnouts', 'masts' and 'sensors'. Weirdly, turnouts and sensors are there, but masts is not. That is now the only little niggle left. Considering where I was only yesterday, that's a nnumber of huge leaps forward. The error reported is "global name 'masts' is not defined". I can bypass the problem easily by including the following line in my code:
>
> masts = jmri.InstanceManager.getDefault(jmri.SignalMastManager)
>
> but that's really cheating, shouldn't be necessary and keeps the back of my mind worried at what else could go wrong when I continue. Any advice on this?masts = jmri.InstanceManager.getDefault(jmri.SignalMastManager)
>
> Wouter
>
> On Wed, 2 Jan 2019 at 20:31, Wouter van Doorn <vandoornw@...> wrote:
> Hi Bob,
>
> Re 1) Not only did I think that was the way to do it, I was also (and am still) just building my 'library of tricks' to use in the proper, big script later on. This is one of the stages of learning! I have now removed the join, and made the spawned threads daemons, and that now works a *lot* better! Not only do I now get error messages when I need them (hurray!), the user interface no longer locks up, as you predicted (double hurray!).
>
> Re 2) The line you mention is there. I'll see next what happens when I do not create that 'sensors' variable myself. IF it still goes wrong, at least I have an error message now to tell me where and how I goofed.
>
> It's a lot better already, so thank you very much for the help so far. I'll let you know the result of the test once I get to it, which won't be today, but I hope to find time tomorrow.
>
> Thanks again,
> Wouter
>
> On Wed, 2 Jan 2019 at 20:03, Bob Jacobsen <rgj1927@...> wrote:
> 1) Why make the main thread wait with a join?? What does that do for you?
>
> 2) I¡¯m not a Bash expert, but that looks like it should work.? Somehow, Jython isn¡¯t initializing properly for you.? Are you getting a line like this in the log?
>
> 2019-01-02 11:58:29,512 script.JmriScriptEngineManager? ? ? ? INFO? - python 2.7 is provided by jython 2.7.0 [AWT-EventQueue-0]
>
> When I force an error, I get output that starts like:
>
> 2019-01-02 11:58:41,099 jython.InputWindow? ? ? ? ? ? ? ? ? ? ERROR - Error executing script [AWT-EventQueue-0]
> javax.script.ScriptException: NameError: name 'xo' is not defined in <script> at line number 1
>? ? ? ? ?at org.python.jsr223.PyScriptEngine.scriptException(PyScriptEngine.java:202)
>? ? ? ? ?at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:42)
>? ? ? ? ?at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:31)
>? ? ? ? ?at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
>
> Bob
>
> > On Jan 2, 2019, at 8:24 AM, whmvd <vandoornw@...> wrote:
> >
> > Hi Bob ,
> >
> > Thanks for the quick reaction.
> > Re 1: I actually do that in a separate thread - but then the first thread waits while 'join'ing the subthread, so that remains the same problem, really. Do I need to make the subthread a daemon one and let the main thread just go? That would seem to make sense?
> >
> > Re 2: I use 'Run script...' from the Tables menu. If it helps, this is the script I use to start jmri (which should be good enough):
> > =============================
> > #!/bin/bash
> >
> > cd $HOME/JMRI
> > nohup ./PanelPro >>$HOME/Desktop/.PanelPro.log 2>&1 &
> > =============================
> > Everything I log neatly shows up in the file on the desktop. The install is squeaky-clean; everything I do is in the user files area, nothing in the installation directory. VERY interesting that 'sensors' and 'turnouts' should have been predefined...
> >
> > Wouter
> >
> >
> >
> > On Wed, 2 Jan 2019 at 15:52, Bob Jacobsen <rgj1927@...> wrote:
> > 1) There are ways to do this. They start off looking complicated, but you have to remember that asking the program to sleep _actually_ _works_: If you do that in the main program, the main program sleeps so that you can¡¯t click, etc.? Instead, you have to hive your turnout activity into a little separate item (called a ¡°thread¡±) which can run and sleep independently.
> >
> >
> >
> > 2) How are you running your scripts?? When I run something (i.e. while debugging) from a Script Entry window, the syntax error and runtime error messages show up nicely on JMRI System console window. Perhaps you¡¯re running them a different way or there¡¯s something else wrong?
> >
> > Another clue that something is wrong is not seeing ¡°turnouts¡± and ¡°sensors¡± predefined.? They _definitely_ should be.
> >
> > Bob
> >
> > > On Jan 2, 2019, at 7:42 AM, whmvd <vandoornw@...> wrote:
> > >
> > > Hello scripting-gurus,
> > >
> > > For quite a while now, I've been fighting python/jython rather than using it, and frustration is building up. I want to like it, I want to work with it - but it's not making it easy. For now, I'd like to focus on two things that make life very hard:
> > >
> > > 1) A small test script that looks up a turnout (successfully) checks its status (thrown or closed), logs it and sleeps for 0.2 seconds before checking again until it is what I want it to be does not allow me to operate any of my four panels (3x Panel Editor, 1x Layout Editor). The only things that can be operated are the resize buttons on the window and the positioning. So I can't throw the turnout to let the test program complete (the log line appears every 0.2 seconds, so it sort of seems to work). I would have thought that the time.sleep(200/1000.0) would allow me to do things instead of the whole interface being locked up? (BTW: specifically not looking for different ways to do this; I know I should add a listener and make that react, and I will end up doing that anyway - I am trying to understand why the simple thing I'd like to do cannot work)
> > >
> > > 2) When I make one of my frequent coding errors, the result is the same as described above - interface locked up except for the sizing/positioning of windows). I get no error logged. Nothing on standard output or standard error,? and nothing in the console. Zilch. This leaves me having to guess where I could have gone wrong, instead of being able to look at a stack dump. For instance: I thought in my optimism that the variables 'turnouts' and 'sensors' where predefined when importing jmri, so I was happily using them. That caused the lock-up with no message at all. Finding the cause of that took me several frustrating days. I hope to turn this back into a hobby!
> > >
> > > Any help will be greatly appreciated.
> > >
> > > Wouter
> > >
> > > PS: using JMRI 4.14 on Linux Mint 18.3.
> > >
> >
> > --
> > Bob Jacobsen
> > rgj1927@...
> >
> >
> >
> >
> >
> >
> >
>
> --
> Bob Jacobsen
> rgj1927@...
>
>
>
>
>
>
>





Locked Re: Running JMRI From A MacBook Pro

 

Bob

Thank you for the notes. I have done more research and testing, it would appear that I am missing a driver that will connect the JMRI system to a MERG CBUS system via the Macbook's Mojave operating system.

I believe that previous MacBook os versions had the appropriate driver (Because they work) but sadly Mojave does not. This would appear to be the same with Windows 7 and 10 where windows 10 has a driver and Windows 7 does not.?

Steve?

?


Locked Re: JMRI Not Identifying Locomotives Properly

 

¿ªÔÆÌåÓý

I've tried (unsuccessfully) to sleep on this but have realised that we've ended up in an old area of misunderstanding. We need to go back to basics of the problem and what is or is not possible.

The Problem:
On 3 Jan 2019, at 7:57 AM, dcesharkman via Groups.Io <dcesharkman@...> wrote:

I have many locomotives with proper road numbers that overlap with others. For example, I have a Kato NYC PA unit with the number of 4301, but I also have a Kato SD70ACE in MRL with the same number.? I have many instances of this same situation.? There must be a better way to assign the identity of a locomotive so that these miss-identities do not happen. I have 62 of these occurrences. This is where better indexing could keep this from happening.

From this we have interpreted that ?dcesharkman has multiple locos with the same DCC address and he wants the "Identify" button in JMRI (at the top left of the main DecoderPro window or the Roster window in PanelPro) determine (by reading decoder CVs) which is the correct roster entry for those locos that happen to have identical DCC addresses.

What identifying information we can read from decoder CVs:
- The currently-assigned DCC address. This can be done by reading CV29 and then either CV1 or CVs 17 & 18.

- The NMRA-assigned ManufacturerID. This is stored in CV8.

- A version number from CV7. The usage and interpretation of this is up to the manufacturer. In some cases it indicates a decoder model, in other cases it represents a firmware version (which may be user-updatable by manufacturer-supplied hardware/software). In some cases the manufacturer chooses to not use this CV for identification??but instead store identifying information in other CVs, or not at all.

- In some cases (where the manufacturer implements and documents them) we can read what we call a ProductID from special CVs and some calculations.

When we do a "New Loco"->"Read Type from Decoder" we attempt to read ManufacturerID, VersionID and ProductID (if implemented), a task attempted by our IdentifyDecoder Java class,?and try to match these against known values in our decoder definition index file to find a correct decoder definition (characterised by the unique combination of a "family" name and a "model" name).

- In some cases this may lead to a unique identification.

- In many cases this may lead to multiple possibilities, leaving the user to make a manual choice of decoder model. A given decoder model may cover a range of VersionIDs and possibly more than one ProductID. So we can't store either of these in the roster entry.

- In many cases a user already knows the exact decoder model and doesn't even bother with the "Read Type from Decoder " procedure, but simply manually picks the known family/model. As above, a?given decoder model may cover a range of VersionIDs and possibly more than one ProductID. So we can't store either of these in the roster entry.

See:
<>

The identity-related information we store in a Roster Entry.
- The user-created ID string: This is entirely up to to the user but JMRI ensures there are no duplicates in a user's roster. There is no way we can store this into decoder CVs.

- The currently-assigned DCC loco address, as per what has been read and/or written in the relevant NMRA address CVs.

- The "family" and "model" unique combination as per above. (Note that using this we can retrieve the ManufacturerID from our decoderIndex.xml file.)

- Note that (as briefly explained in the following link) we do not directly store ManufacturerID, VersionID or ProductID. To do so will cause problems as one or more of. these are often not reliably and uniquely determined at roster entry creation time and furthermore are subject to change (even in existing decoders) by external events outside our control (such circumstances have occurred and will continue to occur).
<>

- However we do have complete control over our assigned?"family" and "model" names and we have procedures already in place to manage needed changes in both our decoder definitions and a user's existing roster entries.
<>

Can we solve?dcesharkman's problem?
Not completely.
1) We can read the DCC address from the decoder and try to match against roster entries. But that will not yield a unique match in his (or many other cases).

2) We can supplement (1) by using the IdentifyDecoder class to retrieve current values of ManufacturerID, VersionID and ProductID (if applicable) and attempt to derive the "family" and "model" to narrow our list of roster entries from (1). Unfortunately?ManufacturerID, VersionID and ProductID do not always return a single unique match. We may end up with another list.

E&OE

Dave