Keyboard Shortcuts
ctrl + shift + ? :
Показати всі комбінації клавіш
ctrl + g :
Не доступний для безкоштовних груп.
ctrl + shift + f :
Знайти
ctrl + / :
Сповіщення
esc to dismiss
Лайки
Пошук
Help with Sensors and Signals
I have two things I would like to accomplish in JMRI and so far I have been having a rough time with the programming. I know there is a ton of documentation but I find it a bit difficult to read. If someone could please give me a jumping off point I am sure I can take it from there.
Item 1 - Staging Track Indication
I have a five track double ended staging yard and would like to have an indication of which track the route is set to.
Setting a route involves pushing a virtual button (set up as a sensor if I recall properly) which then triggers a route
Turnouts are controlled by tortoise switch machines with sensor feedback via Digitrax BDL168's
I would like JMRI to read the sensors to verify a certain route is selected and then light a light (signal?) on the JMRI panel to show which route is selected.
In my mind it would go something like this:
If sensor 123 is high
and sensor 234 is low
and sensor 456 is high
then light this light (signal)
What I am not sure of is how to do it.
Item 2 - Automatically align loop track.
I have a loop track in staging and a couple of turnouts need to be thrown when the train is part way through the loop. The loop track is block occupancy detected in two separate sections, again via BDL168's. So what I would like to see something like this:
If the virtual button (sensor?) is pressed that selects the loop track
then wait until the block occupancy sensor on the second part of the loop track goes high
then throw turnout #1 to closed
throw turnout #2 to open
Etc.
I would really appreciate some pretty strong guidance in how to accomplish both of these items.
Thanks in advance! |
Bill, Logix or LogixNG would be used to implement your two items. For item 1, the logic would watch the turnout feedback sensors and set "internal" sensors for each track. The internal sensors would have icons on the panel. Item 2 is more complicated since you have a "sequence" of events. You mention two turnouts. Most loops have one turnout that is set one way for entry and another for exit. If the turnouts are independent then you don't need any logic. Dave Sand ----- Original message ----- From: "Bill Rutherford via groups.io" <trainman05906=gmail.com@groups.io> Subject: [jmriusers] Help with Sensors and Signals Date: Saturday, December 28, 2024 8:15 AM I have two things I would like to accomplish in JMRI and so far I have been having a rough time with the programming. I know there is a ton of documentation but I find it a bit difficult to read. If someone could please give me a jumping off point I am sure I can take it from there. Item 1 - Staging Track Indication I have a five track double ended staging yard and would like to have an indication of which track the route is set to. Setting a route involves pushing a virtual button (set up as a sensor if I recall properly) which then triggers a route Turnouts are controlled by tortoise switch machines with sensor feedback via Digitrax BDL168's I would like JMRI to read the sensors to verify a certain route is selected and then light a light (signal?) on the JMRI panel to show which route is selected. In my mind it would go something like this: If sensor 123 is high and sensor 234 is low and sensor 456 is high then light this light (signal) What I am not sure of is how to do it. Item 2 - Automatically align loop track. I have a loop track in staging and a couple of turnouts need to be thrown when the train is part way through the loop. The loop track is block occupancy detected in two separate sections, again via BDL168's. So what I would like to see something like this: If the virtual button (sensor?) is pressed that selects the loop track then wait until the block occupancy sensor on the second part of the loop track goes high then throw turnout #1 to closed throw turnout #2 to open Etc. I would really appreciate some pretty strong guidance in how to accomplish both of these items. Thanks in advance! |
On Sun, Dec 29, 2024 at 01:15 AM, Bill Rutherford wrote:
If I understood correctly, using logixNG
One conditional to set the entry turnout for the route triggered by the 'take loop' trigger sensor.
Another conditional triggered by the second block going active (to be sure I would also check that the take loop sensor was active). It would throw the two turnouts, I would also add an action to reset the 'take loop' sensor.
Also if you wanted to ensure the entry turnout was clear for a long train, add a check of its occupancy state.
--
H.O. Australia (Layout in Progress) Digikeijs DR5000 LocoNet JMRI v5.8 DecoderPro/Warrants/CPE/SML/LogixNG Windows 10 |
Both of these answers make sense and is where I was thinking I would need to head.
I could reduce the second turnout activation down to one turnout if I set all of the other turnouts when the route was initially activated.
Not being a programmer I very quickly get lost in logixNG and as amazing as JMRI is the support documentation for this leaves me with more questions then answers. Is there maybe a logixNG for dummies or a couple of exercise based tutorials?
Thanks!
Screen Shot of staging. Typically we come into the yard straight ahead and proceed around the loop counter-clockwise.
|
I just had a look at the JMRI LogixNG tutorial and I was able to make some sense of If>Then>Else but I need If.... and If.... and If.... and I couldn't find any reference to adding more then one If statement - other then it is possible, nothing about how. It appears as though not all of the tutorial pages have been written as some just have a heading and then aaaaa underneath. Then to further complicate things I find Logix information and LogixNG information. If I understand correctly LogixNG is the new and improved version but does the Logix information still apply and work in LogixNG? I googled "JMRI LogixNG If and" - from looking at the pages google offered I couldn't even figure out what page to look at, much less understand what the page was trying to convey.
I feel like I am in way over my head here. Would someone be willing the write the script with an explanation I can learn from or point me to another spot where I can find simple, easy to read information?
I even googled pay someone to program in JMRI for me and didn't turn up any leads.
Help - Please and Thank You!!!! |
Bill, What is the URL for the LogixNG tutorial? Dave Sand ----- Original message ----- From: "Bill Rutherford via groups.io" <trainman05906=gmail.com@groups.io> Subject: Re: [jmriusers] Help with Sensors and Signals Date: Saturday, December 28, 2024 3:50 PM I just had a look at the JMRI LogixNG tutorial and I was able to make some sense of If>Then>Else but I need If.... and If.... and If.... and I couldn't find any reference to adding more then one If statement - other then it is possible, nothing about how. It appears as though not all of the tutorial pages have been written as some just have a heading and then aaaaa underneath. Then to further complicate things I find Logix information and LogixNG information. If I understand correctly LogixNG is the new and improved version but does the Logix information still apply and work in LogixNG? I googled "JMRI LogixNG If and" - from looking at the pages google offered I couldn't even figure out what page to look at, much less understand what the page was trying to convey. I feel like I am in way over my head here. Would someone be willing the write the script with an explanation I can learn from or point me to another spot where I can find simple, easy to read information? I even googled pay someone to program in JMRI for me and didn't turn up any leads. Help - Please and Thank You!!!! |
On Sun, Dec 29, 2024 at 08:50 AM, Bill Rutherford wrote:
I just had a look at the JMRI LogixNG tutorial and I was able to make some sense of If>Then>Else but I need If.... and If.... and If.... and I couldn't find any reference to adding more then one If statement - other then it is possible, nothing about how. It appears as though not all of the tutorial pages have been written as some just have a heading and then aaaaa underneath. Then to further complicate things I find Logix information and LogixNG information. If I understand correctly LogixNG is the new and improved version but does the Logix information still apply and work in LogixNG? I googled "JMRI LogixNG If and" - from looking at the pages google offered I couldn't even figure out what page to look at, much less understand what the page was trying to convey. Hi Bill,
As a relative newie to JMRI I also had trouble sorting out Logix/LogixNG. Regardless, I would definitely go with LNG.
One thing I wish I picked up on early is the 'Many' item.
--
H.O. Australia (Layout in Progress) Digikeijs DR5000 LocoNet JMRI v5.8 DecoderPro/Warrants/CPE/SML/LogixNG Windows 10 |
On Sun, Dec 29, 2024 at 09:49 AM, Bill Rutherford wrote:
I couldn't find an index so I just changed Chapter numbers in the url to get to the other chapters Try this, has all the chapters
--
H.O. Australia (Layout in Progress) Digikeijs DR5000 LocoNet JMRI v5.8 DecoderPro/Warrants/CPE/SML/LogixNG Windows 10 |
Bill, You found the original technical documentation. The real documentation is at https://www.jmri.org/help/en/html/tools/logixng/LogixNG.shtml Dave Sand ----- Original message ----- From: "Bill Rutherford via groups.io" <trainman05906=gmail.com@groups.io> Subject: Re: [jmriusers] Help with Sensors and Signals Date: Saturday, December 28, 2024 4:49 PM Dave, I couldn't find an index so I just changed Chapter numbers in the url to get to the other chapters |
Thank you Dave - that was a big help as well. So glad to be making progress on at least the first of my two questions and to finally feel as though I am learning.
I have the basis (See below)
I have the this particular logixNG set to always execute (thinking that means it will continually monitor) Will this also double check the states on startup or do I need to do something else to accomplish that?
I currently have it set for green for the selected route and dark for a route that isn't selected.
|
Bill, LogixNG is event driven based on the expressions that have been added to the "IF" statement. For you first track you probably have three feedback sensor checks using the AND operator. When any of those sensors changes, the ConditionalNG will wake up and see if the IF is true. AND is only true when all of the expressions are true. If it is true, the THEN action will be run. Otherwise, the ELSE action will be run. Both "Aways Execute" and "On Change" respond to a sensor change and calculate the IF state. The difference is that "On Change" will only do the THEN/ELSE selection is the IF has changed between true and false. "Always Execute" will do the selection and run the actions even if the IF has not changed. For example, 241, 243, and 224 are closed, which means the first track sensor is not active. 241 becomes thrown. With "Always Execute", the sensor for track 1 will be set inactive every time 241 or 243 changes even though it is already inactive. In the ConditionNG list, there is column for "Startup". If the checkbox is active, the ConditionalNG will be executed once after the xml data file has been loaded and then waits for subsequent IF changes. Otherwise the ConditionalNG starts waiting for IF changes. There are lots of ways to organize LogixNG. You can create a LogixNG with one ConditionalNG for each set of logic. You can create a LogixNG with one Conditional that contains a whole bunch of logic using either a series of MANY actions or IF_THEN_ELSE_IF. For your layout I would create a LogixNG for "East Staging Track Selected" with six ConditionalNGs, one for each track. Dave Sand ----- Original message ----- From: "Bill Rutherford via groups.io" <trainman05906=gmail.com@groups.io> Subject: Re: [jmriusers] Help with Sensors and Signals Date: Saturday, December 28, 2024 6:49 PM Thank you Dave - that was a big help as well. So glad to be making progress on at least the first of my two questions and to finally feel as though I am learning. I have the basis (See below) I have the this particular logixNG set to always execute (thinking that means it will continually monitor) Will this also double check the states on startup or do I need to do something else to accomplish that? I currently have it set for green for the selected route and dark for a route that isn't selected. |
Dave & Nags,
I can't thank both of you enough for jumping in a helping me to learn!!
Dave,
So you are suggesting I do something like this, correct?
I have the signals set so they don't respond from keyboard input when clicked. Is there any other way you can think of that I should safeguard against a signal reporting the wrong information in this case?
Thank you again!!
|
Bill, Looks good. I would use On Change, but Always Execute is fine. Dave Sand ----- Original message ----- From: "Bill Rutherford via groups.io" <trainman05906=gmail.com@groups.io> Subject: Re: [jmriusers] Help with Sensors and Signals Date: Sunday, December 29, 2024 12:11 PM Dave & Nags, I can't thank both of you enough for jumping in a helping me to learn!! Dave, So you are suggesting I do something like this, correct? I have the signals set so they don't respond from keyboard input when clicked. Is there any other way you can think of that I should safeguard against a signal reporting the wrong information in this case? Thank you again!! |
Повідомлення
Більше
Додаткові параметри
Більше
to navigate to use esc to dismiss