Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Locked Train entering multi track terminus
David
What I'm trying to do is simulate a terminus station. I have a track coming into the terminus with an UNKOWN train, stopping in a block before the station(in2). It then examines all the tracks in the station (v1 -> v6) and chooses the first one that is unoccupied to enter. I've established have one .info file per track in the station. This .info file will be chained from the first .info file which brings the train to the block before the station(in2). Thanks to your previous response I now know how to identify the UNKNOWN train entering the block before station. The problem being is I have to transfer/write this identity into the "trainname" field of the .info file that I want to chain to. If I knew to write the locomotive identity into the chained "trainname" field, the rest I know how to do using LogixNG. Would you have any ideas on how to do this ? Hopefully what I'm writing is clear. Richard Trilling Edited on Tuesday, 3 September 2024 at 21:48 (GMT + 2) ¨¤ Paris, France; sent later. |
Richard,
toggle quoted message
Show quoted text
I would use a script to start the train using the train info file. There are options to override some of the defined fields, such as the DCC address or roster entry. Dave Sand ----- Original message -----
From: "Richard Trilling via groups.io" <richard.trilling@...> To: [email protected] Subject: [jmriusers] Train entering multi track terminus Date: Tuesday, September 03, 2024 3:23 PM David What I'm trying to do is simulate a terminus station. I have a track coming into the terminus with an UNKOWN train, stopping in a block before the station(in2). It then examines all the tracks in the station (v1 -> v6) and chooses the first one that is unoccupied to enter. I've established have one .info file per track in the station. This .info file will be chained from the first .info file which brings the train to the block before the station(in2). Thanks to your previous response I now know how to identify the UNKNOWN train entering the block before station. The problem being is I have to transfer/write this identity into the "trainname" field of the .info file that I want to chain to. If I knew to write the locomotive identity into the chained "trainname" field, the rest I know how to do using LogixNG. Would you have any ideas on how to do this ? Hopefully what I'm writing is clear. Richard Trilling Edited on Tuesday, 3 September 2024 at 21:48 (GMT + 2) ¨¤ Paris, France; sent later. Attachments: * LadderTerminus.png |
On Wed, Sep 4, 2024 at 12:39 AM, Dave Sand wrote:
I would use a script to start the train using the train info file. There areDavid, "I would use a script to start the train using the train info file. There are options to override some of the defined fields, such as the DCC address or roster entry. " That's what I hoped you wouldn't say. I've done a fair lot of programming in my life (I'm 84). A bit in Python. So I'll bite the bullet and start off with "Hello world.". What bother me is the lack of documentation, or at least I haven't been able to find it, on the parameters for the object programming. For example both sensors and turnouts are used as objects, one has the parameters sensors.provideSensor and roughly the same for turnouts. Is there a list of libraries some place with their list objects and their object parameters, besides the How to which is only some what helpful? I saw an example of how to read a file. Considering the development work, it would seem to me that there would be in some place routines on how to read and write keyword definitions in a file. How to find them ? Richard Edited on Thursday, 5 September 2024 at 16:21 (GMT + 2) ¨¤ Paris, France; sent later. |
Richard, The details about the JMRI objects are in the Javadocs:?? This list of "shortcuts" in the initial help page are the "managers" for common JMRI objects.? For example, "sensors" referees to SensorManager which provides methods such as getSensor, provideSensor, etc.? Other managers, such as for Dispatcher, don't have shortcuts. Here is an example script.? It combines starting a Dispatcher auto train from a train info file along with providing an example of getting and setting LogixNG local variables.
Dave Sand ----- Original message ----- From: "Richard Trilling via groups.io" <richard.trilling=[email protected]> Subject: Re: [jmriusers] Train entering multi track terminus Date: Thursday, September 05, 2024 9:27 AM On Wed, Sep? 4, 2024 at 12:39 AM, Dave Sand wrote: > I would use a script to start the train using the train info file. There are > options to override some of the defined fields, such as the DCC address or > roster entry. > David, "I would use a script to start the train using the train info file.? There are options to override some of the defined fields, such as the DCC address or roster entry. " That's what I hoped you wouldn't say. I've done a fair lot of programming in my life (I'm 84). A bit in Python. So I'll bite the bullet and start off with "Hello world.". What bother me is the lack of documentation, or at least I haven't been able to find it, on the parameters for the object programming. For example both sensors and turnouts are used as objects, one has the parameters sensors.provideSensor and roughly the same for turnouts. ?? Is there a list of libraries some place with their list objects and their object parameters, besides the How to which is only some what helpful? I saw an example of how to read a file. Considering the development work, it would seem to me that there would be in some place routines on how to read and write keyword definitions in a file. How to find them ?? Richard Edited on Thursday, 5 September 2024 at 16:21 (GMT + 2) ¨¤ Paris, France; ?? sent later. |
Dave,
The details about the JMRI objects are in the Javadocs:Thank you. I took a quick look at the file this evening. That's what I was missing. This list of "shortcuts" in the initial help page are the "managers" for common JMRI objects. For example, "sensors" referees to SensorManager which provides methods such as getSensor, provideSensor, etc. Other managers, such as for Dispatcher, don't have shortcuts.That I had figured out. I'll be taking a much closer look tomorrow or the day after; especially to the format of the parameters used. By parameter I mean that the parameter in the line below is 'filename'. infoFile = symbolTable.getValue('fileName') I had only realized a coupe of weeks ago that the contents of the value column in the block table was the local ID of the locomotive in the Roster, if and only if, a certain column in the info.file was checked. This will make my life a bit less boring for a while. Problem is that I have other interests such as physics and that there is only 24 hours in a day. I'll give "hello world" a start to see how inputs, outputs and error messages behave with out using libraries. I also have a little idea the the Python concept of dictionaries might be of some use in changing keyword values in the info.xml file. We shall see. Thanks for your example and your help Richard Edited on Friday, 6 September 2024 at 00:15 (GMT + 2) ¨¤ Paris, France; sent later. |
to navigate to use esc to dismiss