开云体育

Date

Locked Re: Why Listen to Turnout in LogixNG Doesn't Trigger #logixng

 

Here is the importance of considering all automation scenarios, Dave.
There is one instance where an automated train will not clear the detection section before reversing on the next transit.
Having not cleared the section, the direction indicator will not reset.
Since sequencing is only important to automation, I'm adding a check of the forward SML sensors as a conditional on the direction indicator sensors.
--
Ken
NYNH&H, Old Colony Division, Cape Cod Branch (1949-1959)
Loconet * JMRI 5.7.7 * OSX,Win10,Ubuntu
Blog: ?


Locked Re: LOGIXNG

 

开云体育

Dear Dave

I think I understand what your doing but have questions
I assume we erase all the logix statements
Your create all the mapping from loconet sensor to virtual sensor via one LogixNG. Therefore we are still using the virtual sensors for the blocks on the layout panel and we still use the delays placed on the virtual sensors of 500ms.

In creating the LogixNG for a transit going from b2 to b33 we have delay issues.
When the switches are closed and we go from b2-b3 or b39-b33 we need the 500ms delay in the blocks on both sides of the sw2 or sw6/sw12 (sw6 and sw12 are in same block so it’s like single switch situation when switches are closed) so we get the proper activation in both directions.

Now when we use the thrown positions for sw2 we cannot active b3a immediately because the virtual sensor controlling b2 on the panel has a 500 Ms delay (needed for the closed position) so it needs a 700 ms delay, then the sw-b13a block needs a 900ms delay , the b33a needs a 1100ms delay and b33 needs a 1300ms delay.
Now in other direction the delays are opposite.?

Don’t we have to get rid of the virtual sensors and use loconet sensors with no delays on the sensors but just put the needed delays in the LogixNG statements.

What am I thinking wrongly

Tony


On May 26, 2024, at 12:21 PM, Dave Sand <ds@...> wrote:

?
Tony,

There is a tool to migrate Logixs to LogixNG. ?It does not convert the Logix to native LogixNG. ?I don't recommend it.

To delay an action use "Add => Common => Execute delay". ?The delay can be applied to anything, including a group of actions.

Here are some LogixNGs for your layout.

Real to Virtual Mapping

The mapping Logixes are replaced by a single LogixNG.
<Screenshot 2024-05-26 at 10.15.04?AM.png>
The "Listen on beans" contains a list of real sensors.
<Screenshot 2024-05-26 at 10.21.16?AM.png>
When a sensor changes, a formula prepends "V" to the real sensor name to create the virtual sensor name. It then set the virtual sensor state to the state of the real sensor.

Simple virtual turnout block

Setting a single virtual turnout sensor is fairly simple.
<Screenshot 2024-05-26 at 11.12.25?AM.png>
The first IF checks to see if the turnout is closed. ?If it is thrown, a different set of real sensors is involved.


Multiple turnout blocks

Multiple turnout blocks, such as crossovers and slip ladders are complicated and need to take into consideration traffic direction.

This one handles traffic between B2 and B13. ?The direction is based on SML based sections.
<Screenshot 2024-05-26 at 10.14.35?AM.png>
SW2 has five potential routes. ?The simple example covered the route to B3. ?

The other routes have multiple virtual turnout blocks. ?

Since there need to be 4 LogixNG conditionals for the complex routes, the first IF statement is used to determine if the route is active. ?If not, do nothing. ?Notice the "No Listen". ? These expressions do not trigger the execution of the conditional. ?The "section" checks also do not listen for changes.

The second IF knows that the turnouts are aligned. ?If both sensors are not active, then it sets the virtual turnout sensors inactive.

The final IF statement is a IF-THEN-ELSE IF-THEN ELSE format. ?This makes it possible to create a series of checks. ?If none of them are true, the final ELSE is used.

If the real sensors are both active, the final IF statement first checks to see if Dispatcher has routed a train from left to right. ?If so, it sets the virtual turnout sensors in the proper sequence. ?If not, it then checks for a right to left train. ?If so, it sets the virtual turnout sensors in the reverse sequence. ?If there is no train, it sets the virtual turnout sensors inactive.

Note: ?You might need to upgrade to 5.6 to support the displayed LogixNG conditionals.

Dave Sand



----- Original message -----
Subject: Re: [jmriusers] LOGIXNG
Date: Sunday, May 26, 2024 9:37 AM

Ps: ?if I have a logix conditional is there some button I press that converts it to a logixNG logic conditional

Tony



On May 26, 2024, at 10:34 AM, AD <BKLYNS_BASEBALL_CLUB@...> wrote:
?I create an if then else statement using logixNG?
the conditional if and asks if 2 sensors are active and a switch is thrown then set a third sensor active.
I want to add a delay of 200 ms to the activation of the third sensor in that conditional.

how do I do that

tony


Locked Re: LOGIXNG

 

开云体育

You ask if section sw2-sw3-cc1 is not free to determine direction but that section will not be free in both directions because b2 and b13 are active with the train sitting in both those blocks in both directions

Tony


On May 26, 2024, at 12:21 PM, Dave Sand <ds@...> wrote:

?
Tony,

There is a tool to migrate Logixs to LogixNG. ?It does not convert the Logix to native LogixNG. ?I don't recommend it.

To delay an action use "Add => Common => Execute delay". ?The delay can be applied to anything, including a group of actions.

Here are some LogixNGs for your layout.

Real to Virtual Mapping

The mapping Logixes are replaced by a single LogixNG.
<Screenshot 2024-05-26 at 10.15.04?AM.png>
The "Listen on beans" contains a list of real sensors.
<Screenshot 2024-05-26 at 10.21.16?AM.png>
When a sensor changes, a formula prepends "V" to the real sensor name to create the virtual sensor name. It then set the virtual sensor state to the state of the real sensor.

Simple virtual turnout block

Setting a single virtual turnout sensor is fairly simple.
<Screenshot 2024-05-26 at 11.12.25?AM.png>
The first IF checks to see if the turnout is closed. ?If it is thrown, a different set of real sensors is involved.


Multiple turnout blocks

Multiple turnout blocks, such as crossovers and slip ladders are complicated and need to take into consideration traffic direction.

This one handles traffic between B2 and B13. ?The direction is based on SML based sections.
<Screenshot 2024-05-26 at 10.14.35?AM.png>
SW2 has five potential routes. ?The simple example covered the route to B3. ?

The other routes have multiple virtual turnout blocks. ?

Since there need to be 4 LogixNG conditionals for the complex routes, the first IF statement is used to determine if the route is active. ?If not, do nothing. ?Notice the "No Listen". ? These expressions do not trigger the execution of the conditional. ?The "section" checks also do not listen for changes.

The second IF knows that the turnouts are aligned. ?If both sensors are not active, then it sets the virtual turnout sensors inactive.

The final IF statement is a IF-THEN-ELSE IF-THEN ELSE format. ?This makes it possible to create a series of checks. ?If none of them are true, the final ELSE is used.

If the real sensors are both active, the final IF statement first checks to see if Dispatcher has routed a train from left to right. ?If so, it sets the virtual turnout sensors in the proper sequence. ?If not, it then checks for a right to left train. ?If so, it sets the virtual turnout sensors in the reverse sequence. ?If there is no train, it sets the virtual turnout sensors inactive.

Note: ?You might need to upgrade to 5.6 to support the displayed LogixNG conditionals.

Dave Sand



----- Original message -----
Subject: Re: [jmriusers] LOGIXNG
Date: Sunday, May 26, 2024 9:37 AM

Ps: ?if I have a logix conditional is there some button I press that converts it to a logixNG logic conditional

Tony



On May 26, 2024, at 10:34 AM, AD <BKLYNS_BASEBALL_CLUB@...> wrote:
?I create an if then else statement using logixNG?
the conditional if and asks if 2 sensors are active and a switch is thrown then set a third sensor active.
I want to add a delay of 200 ms to the activation of the third sensor in that conditional.

how do I do that

tony


Locked Re: LOGIXNG

 

开云体育

In the bottom of the many switches shouldnt b33 be b13?




On May 26, 2024, at 12:21 PM, Dave Sand <ds@...> wrote:

?
Tony,

There is a tool to migrate Logixs to LogixNG. ?It does not convert the Logix to native LogixNG. ?I don't recommend it.

To delay an action use "Add => Common => Execute delay". ?The delay can be applied to anything, including a group of actions.

Here are some LogixNGs for your layout.

Real to Virtual Mapping

The mapping Logixes are replaced by a single LogixNG.
<Screenshot 2024-05-26 at 10.15.04?AM.png>
The "Listen on beans" contains a list of real sensors.
<Screenshot 2024-05-26 at 10.21.16?AM.png>
When a sensor changes, a formula prepends "V" to the real sensor name to create the virtual sensor name. It then set the virtual sensor state to the state of the real sensor.

Simple virtual turnout block

Setting a single virtual turnout sensor is fairly simple.
<Screenshot 2024-05-26 at 11.12.25?AM.png>
The first IF checks to see if the turnout is closed. ?If it is thrown, a different set of real sensors is involved.


Multiple turnout blocks

Multiple turnout blocks, such as crossovers and slip ladders are complicated and need to take into consideration traffic direction.

This one handles traffic between B2 and B13. ?The direction is based on SML based sections.
<Screenshot 2024-05-26 at 10.14.35?AM.png>
SW2 has five potential routes. ?The simple example covered the route to B3. ?

The other routes have multiple virtual turnout blocks. ?

Since there need to be 4 LogixNG conditionals for the complex routes, the first IF statement is used to determine if the route is active. ?If not, do nothing. ?Notice the "No Listen". ? These expressions do not trigger the execution of the conditional. ?The "section" checks also do not listen for changes.

The second IF knows that the turnouts are aligned. ?If both sensors are not active, then it sets the virtual turnout sensors inactive.

The final IF statement is a IF-THEN-ELSE IF-THEN ELSE format. ?This makes it possible to create a series of checks. ?If none of them are true, the final ELSE is used.

If the real sensors are both active, the final IF statement first checks to see if Dispatcher has routed a train from left to right. ?If so, it sets the virtual turnout sensors in the proper sequence. ?If not, it then checks for a right to left train. ?If so, it sets the virtual turnout sensors in the reverse sequence. ?If there is no train, it sets the virtual turnout sensors inactive.

Note: ?You might need to upgrade to 5.6 to support the displayed LogixNG conditionals.

Dave Sand



----- Original message -----
Subject: Re: [jmriusers] LOGIXNG
Date: Sunday, May 26, 2024 9:37 AM

Ps: ?if I have a logix conditional is there some button I press that converts it to a logixNG logic conditional

Tony



On May 26, 2024, at 10:34 AM, AD <BKLYNS_BASEBALL_CLUB@...> wrote:
?I create an if then else statement using logixNG?
the conditional if and asks if 2 sensors are active and a switch is thrown then set a third sensor active.
I want to add a delay of 200 ms to the activation of the third sensor in that conditional.

how do I do that

tony


Locked Re: no track power in operation mode when power is turned on #sprog

 

Hi everyone. I just wanted to put my topic back on the top of the pile.
Any idea, Bill, others?
Thanks
R.


Locked Re: LogixNG edit exceptions #logixng

 

Funny, I just ran into that yesterday. I had to force quit PanelPro. Nice to know I'm not the only one. Nice to know it's fixed.
--
Ken
NYNH&H, Old Colony Division, Cape Cod Branch (1949-1959)
Loconet * JMRI 5.7.7 * OSX,Win10,Ubuntu
Blog: ?


Locked Re: Managing OperationsPro from multiple computers #operationspro

 

Aha, I think you nailed the last piece of the puzzle Rodney.? There was indeed a mismatch between the CATS/station and JMRI/location names (e.g., Kern Junction vs. Kern JCT).? So this must have also been happening on the MacBook and I just didn't notice it.? Good eye!? (And yes, all the other train data was being communicated correctly.? I just omitted it for clarity.)

So the work flow is to develop the session in Operations, port a snapshot of the layout config to the Mini and set up the networking as per the above.? I still have a bit of tuning to do in Operations, but this all seems workable.? Thanks to all.


Locked Re: Adding Buttons to Throttle Panel to Call Logixng Module to simulate a Sound

 

Hi;

I guess you could build some for that, they allow you to add visual elements to a throttle UI that will trigger some Jython code. See in jython/Jynstruments/ThrottleFrame for some sample, these ones only use the current throttle object, but you can retrieve the RosterID easily from there (see RosterImage for instance (self.getContext().getAddressPanel().getRosterEntry())) and then LogixNX stuff should be triggerable from Jython quite easily.

Note that when you save a throttle UI, the instanciated Jynstruments in it will be saved as well, so they'll come back when you load it, it should match your needs.

Regards,


Locked Re: LogixNG edit exceptions #logixng

 

开云体育

Thank you Daniel.? I will test POM tomorrow and report back.

Robin

May 27, 2024 4:44:10 PM danielb987 <jmri@...>:

Hi Robin,

Thanks for finding that. The editor disabled the menu item when the paste wasn't valid, but the keystroke still worked which caused the exception.

This is fixed by PR #13132.
https://github.com/JMRI/JMRI/pull/13132

If you find any other keystrokes that fails for whatever reason, feel free to report that too.

Note that PR #13125 which improves the ProgramOnMain action is merged. It would be very good if you could try it with real hardware and report back since I have only been able to test it with the LocoNet simulator.

---
Daniel Bergqvist
JMRI developer

2024-05-27 22:58 skrev Robin Becker:
Hi Daniel and Dave S.?? When editing a LogixNG, any time I copy an
Action and then accidentally paste it to the wrong socket I get an
Exception something similar to the one below.? At this point editing
no longer works and I have to restart JMRI to recover.? I realize
it’s my mistake but it would sure be nice if this type of exception
was handled.? Thanks.
Robin Becker
San Diego CA
13:53:05,318 ptionhandler.UncaughtExceptionHandler ERROR - Uncaught
Exception caught by
jmri.util.exceptionhandler.UncaughtExceptionHandler [JMRI
LogixNGThread]
java.lang.IllegalArgumentException: Socket
jmri.jmrit.logixng.tools.debugger.DebuggerMaleDigitalExpressionSocket
is not compatible with
jmri.jmrit.logixng.implementation.DefaultFemaleDigitalActionSocket
??????????????? at
jmri.jmrit.logixng.implementation.AbstractFemaleSocket.connect(AbstractFemaleSocket.java:90)
~[jmri.jar:?]
??????????????? at
jmri.jmrit.logixng.tools.swing.TreeEditor.lambda$pasteItem$42(TreeEditor.java:1435)
~[jmri.jar:?]
??????????????? at
jmri.jmrit.logixng.util.LogixNG_Thread.lambda$new$0(LogixNG_Thread.java:148)
~[jmri.jar:?]
??????????????? at java.lang.Thread.run(Thread.java:829) [?:?]

Links:
------
[1] /g/jmriusers/message/230969
[2] /mt/106337635/5164497
[3] /g/jmriusers/post
[4] /g/jmriusers/editsub/5164497
[5] /g/jmriusers/leave/9097802/5164497/1706973714/xyzzy




Locked Adding Buttons to Throttle Panel to Call Logixng Module to simulate a Sound

 

I have 4 locos in my roster, two with Soundtrax and two with Loksound decoders.? I have written logixng modules that allow me to simulate sounds on the loksounds that are found on the Soundtrax,? Grade Crossing Signal, Forward Whistle, Reverse Whistle, and Stop Whistle.? When the trains are running, logixng events uses the block values to make the appropriate calls either to the actual Soundtrax function or the simulated sound on the Loksound.
(Logixng uses the roster ID to determine whether if a real DCC function or simulated)

What I would like to do (and if I'm way off base please tell me) is add buttons to the Loksound Loco Panels that would allow me to invoke the logixng module to simulate the sound passing it the roster id.? Then I could control the sound as an operator from the throttle.

There appears no way to extend the throttle layout.?? Possibly I could add a new frame to the throttle with buttons using some scripting.
Any advice or suggestions would be appreciated.? (I have no way or skill to reprogram the Loksound decoders themselves to add the sounds).

Thanks
Seth Olitzky
Panel Pro 5.7.7
Windows 11


Locked Re: Display held rolling stock on manifest #operationspro

 

On Mon, May 27, 2024 at 04:19 PM, Dan Boudreau wrote:
You can show held cars using a switch list.? You need to select the option to show them.



Select "By Track Summary" for switch lists.
That was it.? Thank you.??
?
--
Tom


Locked Re: How to activate the same output of turnout

 

Gopal,

Try this:

Create two internal sensors as turnout feedback sensors. ?Initialize them to Inactive.

Define the turnout with TWOSENSOR feedback and assign the sensors. ?This will put the turnout into the "Inconsistent" state.

Now you can have Logix or LogixNG send Closed or Thrown turnout commands. ?Since the turnout from a JMRI point is always inconsistent, you can send the same command repeatedly.

Dave Sand


----- Original message -----
From: Gopal Patnaik <gopalpatnaik@...>
Subject: Re: [jmriusers] How to activate the same output of turnout
Date: Monday, May 27, 2024 5:48 PM

David,
The turnout decoder is a Lenz LS110 and the command station is an Intellibox. The intellibox is connected to a Raspberry Pi via a loconet to USB adapter. JMRI 5.7.3 runs on the Raspberry Pi.


Locked Re: Managing OperationsPro from multiple computers #operationspro

 

Gary,

It looks like you found the enable trace flag in CATS to display the message traffic between CATS and Operations.? Good for you as that should be helpful.? From the console output, I can see that CATS and Operations are communicating, which says that you have the networking set up.? I can see that CATS is requesting from Operations the information on 9 trains.? I can also see that Operations is supplying CATS with train length for 9 trains, so I assume it is also reporting the number of cars and weight.? All of that looks good because in addition to the modules talking, it means that they agree on train names (the names are defined consistently in both CATS and Operations).? The warnings that you highlighted are from Operations telling CATS that it could not move train BNSF Q_RICALT, which just confirms what you already know.? So, the question becomes, "why can't Operations move BNSF Q_RICALT"?? Because of the message exchange, we know that CATS and Operations agree that there is a train named BNSF Q_RICALT; thus, I think the focus is on the location/station name.

Are all movements failing?? I ask this because the first WARNING (moving BNSF Q_RICALT to Bakersfield) is expected because Operations thinks that it is already in Bakersfield.? The second failure is because the station name in CATS is "Kern Junction" and it is "Kern Jct" in Operations.? The names have to be character for character identical.

This should have failed when CATS and Operations were running on the MacBook, so it looks like either the Operations files did not get transferred correctly or it doesn't work on the MacBook either.

One other question, are you running the same version of JMRI on both computers?

Rodney Black


Locked Re: LogixNG edit exceptions #logixng

 

Hi Robin,

Thanks for finding that. The editor disabled the menu item when the paste wasn't valid, but the keystroke still worked which caused the exception.

This is fixed by PR #13132.


If you find any other keystrokes that fails for whatever reason, feel free to report that too.

Note that PR #13125 which improves the ProgramOnMain action is merged. It would be very good if you could try it with real hardware and report back since I have only been able to test it with the LocoNet simulator.

---
Daniel Bergqvist
JMRI developer

2024-05-27 22:58 skrev Robin Becker:

Hi Daniel and Dave S. When editing a LogixNG, any time I copy an
Action and then accidentally paste it to the wrong socket I get an
Exception something similar to the one below. At this point editing
no longer works and I have to restart JMRI to recover. I realize
it’s my mistake but it would sure be nice if this type of exception
was handled. Thanks.
Robin Becker
San Diego CA
13:53:05,318 ptionhandler.UncaughtExceptionHandler ERROR - Uncaught
Exception caught by
jmri.util.exceptionhandler.UncaughtExceptionHandler [JMRI
LogixNGThread]
java.lang.IllegalArgumentException: Socket
jmri.jmrit.logixng.tools.debugger.DebuggerMaleDigitalExpressionSocket
is not compatible with
jmri.jmrit.logixng.implementation.DefaultFemaleDigitalActionSocket
at
jmri.jmrit.logixng.implementation.AbstractFemaleSocket.connect(AbstractFemaleSocket.java:90)
~[jmri.jar:?]
at
jmri.jmrit.logixng.tools.swing.TreeEditor.lambda$pasteItem$42(TreeEditor.java:1435)
~[jmri.jar:?]
at
jmri.jmrit.logixng.util.LogixNG_Thread.lambda$new$0(LogixNG_Thread.java:148)
~[jmri.jar:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
Links:
------
[1] /g/jmriusers/message/230969
[2] /mt/106337635/5164497
[3] /g/jmriusers/post
[4] /g/jmriusers/editsub/5164497
[5] /g/jmriusers/leave/9097802/5164497/1706973714/xyzzy


Locked Re: Display held rolling stock on manifest #operationspro

 

On Mon, May 27, 2024 at 05:51 PM, Tom Myrick wrote:
I seem to remember seeing some sort of list/report that shows cars that are being held at each location, but I can't figure out where it is.
You can show held cars using a switch list.? You need to select the option to show them.



Select "By Track Summary" for switch lists.


Locked Re: How to activate the same output of turnout

 

David,
The turnout decoder is a Lenz LS110 and the command station is an Intellibox. The intellibox is connected to a Raspberry Pi via a loconet to USB adapter. JMRI 5.7.3 runs on the Raspberry Pi.


Locked Re: JMRI, Windows 11, web server, firewall: REVISTED

 

If I remember correctly, the Public/Private settings are unique to each WiFi network, so as long as you don't designate the wifi connection at the coffee shop as private, you are in good shape.
--
-splasher in somd
-NCE PowerCab with Raspberry Pi 3b+ and JMRI
-DCC-EX with Arduino Mega?w/motor shield, Raspberry Pi 3b+ and JMRI
-Using??Engine Driver with both
-Generally running the latest dev version of JMRI & Engine Driver


Locked Re: How to activate the same output of turnout

 

Cliff,

I am not familiar with Logix to follow the code snippet you have given. Let me read up and I will try it out.


Locked Display held rolling stock on manifest #operationspro

 

Hello,

Currently in Operations Pro, on the manifest,? what is displayed for each location are cars that are picked up, set out, and moved.? I would also like the option to display cars for each location that are being held; ie that are not moving.? When setting out cars to a classification yard, it is important to know which locations cars that are already at the yard and are not being moved are being blocked, so that I know where the blocks are and where to place the incoming cars.? Currently I have to look at the cars list to figure this out, but thought it would be easier if I could print this right on the manifest.? Is there an option to do this?? I seem to remember seeing some sort of list/report that shows cars that are being held at each location, but I can't figure out where it is.

Perhaps there is a better method of dealing with this than using the manifest.??

Thank you for your help.?
--
Tom


Locked Re: LogixNG - Module called multiple times #logixng

 

Good to know each module execution is independent.
I'm looking to rationalize some LNGs using common modules which could result in simultaneous calls.
--
H.O. Australia (Layout in Progress)
Digikeijs DR5000 LocoNet
JMRI v5.6 DecoderPro/Warrants/CPE/SML/LogixNG
Windows 10