开云体育

Re: LogixNG vs Jython performance #jython #logixng


 

Jim,

The signal systems used by signal mast logic (SML) are usually based on prototype rule books. ?The quality of the implementation does vary. ?SML implements ABS. ?APB and CTC are then implemented with other logic such as LogixNG.

Dave Sand

----- Original message -----
From: "Jim Moomaw - PDX via groups.io" <JMOOMAW_COM=[email protected]>
Subject: Re: [jmriusers] LogixNG vs Jython performance #jython #logixng
Date: Saturday, March 22, 2025 5:01 AM

Regarding George's question about efficiency and the observations that followed, I'll add some of my own perhaps practical observations.? I'm addressing the larger aspects of developing a signal system.?
?
I'm finally close to having a finished switchable ABS/CTC LogixNG layout control application, that has five controlled sidings, a dozen intermediate signals, and at least a hundred occupancy sensors.? It is controlled by a JMRI-graphics CTC lever panel that properly emulates a Western Pacific office machine, including all the panel lamps and levers and working US&S 506 Time-Code code lamps and recorded relay audio, with proper time delays doing field I/O.? This covers half our club layout, and I'll finish the other half in the next year or so.? I'm using CMRI hardware on a 56Kbaud serial bus to several cpNode controllers in the "field" (layout room) for I/O.? The turnout controllers are custom, and can emulate both Dual Control and Electric Locked switches;? each have 6 I/O pins for control and position/lock feedback.? There are several hundred items in the JMRI sensor and turnout tables, and many in the Heads, Masts and audio tables.? All the signal logic is done in LogixNG (vs. SML, SSL, CTC, etc).? In other words, I did everything with LogixNG.? There are two large graphics panels (the CTC office panel and a "field" monitor panel) and a couple minor ones.
?
So, how big is the software?? The XML file is 12MB, which has 250K lines of code in the file (all generated with PanelPro).? I don't know how this compares to other large layouts.? I'm guessing the final build-out will be 50% larger.? I'm using the latest production release of PanelPro and JAVA 17.? I'm developing this on my newer Windows laptop (in SIM mode), and running the layout-connected app on a newer modest Windows desktop machine, both on Win11.?
?
How does it run?? It starts on both platforms very rapidly (a few seconds), and runs below 10% of the CPU.? I'm not seeing any real-time lags in doing anything.? I haven't seen any odd behavior in the aspects of the ~50 signal masts over several hours of use during ops, nor seen any lockups or odd System Console errors being thrown.? Not sure why I'd want or need to make it more efficient.? I'm not seeing anything that's a problem, and those I've issues I've reported get fixed pretty quick (other than my request for a feature to clear the clipboard... bump).
?
How about ability to maintain this monster app??? That's perhaps the big challenge, even for the developer (me).? While I'm actively working on it and have the full context in my brain, it's easy to do.? On the other hand, if months go by I do forget a lot of how things are being done and where.? To mitigate that I've maintained WORD, EXCEL, and VISIO docs as I've gone along that covers tables, contents, functions, strategies and flows that get me back up to speed.? It also has notes on how LogixNG does things (not always intuitive or well documented online).? As always, a straight-forward elegant design is always going to be easier to learn/maintain than a chaotic undocumented design.? I've tried to be clear and consistent doing things vs. clever and inconsistent.? I think I've used almost all the LogixNG features except for Modules, Sensor Groups and Servers.? Regarding others doing the maintaining?? That's going to be a big lift.?
?
Even if a club has programing members, few are going to be experienced in LogixNG.? I've talked to a lot of guys, some railroad signalmen, that learned and are using the original Logix and consider the jump to LogixNG would be difficult, and that the older Logix is closer to the railroad relay logic they know well.? Knowing both (relay logic and programming languages), I'm not so sure the latter is true, but LogixNG does have more "stuff" it can do and has more to learn to get that power.? It has taken months to figure out how to use the "new" features I needed, so they have a point.? BUT, no way would I want to try to do everything I'm doing with Logix.? In the end, learning the features paid off but it was a lift.? Makes a lot of us wish there were classes on this stuff, but in their absence we have this GIO group.? *Lots* of times the regulars on this forum got me unstuck, and I'm not sure what the alternative is.
?
Long term viability?? The older versions of JMRI and JAVA stick around, so I don't see big risk in letting a production machine run for years without updating.? This is more like a machine controller application that will work fine for a long time once solid and left alone, vs. something that's dynamically being pushed along over time.? Now, if the layout changes, then that's a functionally driven change.? Our layout computer is strictly offline (standalone) so that I don't have to worry about Microsoft updating and breaking something, which is a real thing.? We also have strict change control since operations is a key part of the club.?
?
Nor do I think the JMRI team is at risk of going away any time soon.? The team is strong from what I can see, and use good procedures.
?
Alternative JMRI approaches?? I don't know anything about the "packaged" signal solutions to comment.? I do know I'm approaching the signal control points and signal aspects the way the railroad signal department does, regarding input factors and control outputs.? I also have a prototype in mind and want to emulate that operation precisely, both in the field (layout) and in the DS office (CTC control panel).? I'm doing route signaling so don't have a huge set of aspects.? My goal was to have the flexibility to do what I wanted vs. take what the "package" provides (and assuming it has tradeoffs I don't want).? No doubt these "packaged" solutions will get better and perhaps at some point overtake the complex if-then-else digital formulas approach I'm doing.? Lots (most?) layout owners probably don't feel a need for precise control and are happy for all the help they can get with signals... they *are* hard.? From what I've seen, the JMRI team knows railroad signaling, so I'm assuming the "packaged" solutions are going to be pretty good, albeit generic else slanted to certain prototypes.?
?
Like everything about a hobby, there are tradeoffs... what makes you happy, and how much time/money you have for a task.? Signals are a big task no matter how you do them and not quick.? JMRI LogixNG is a safe and effective choice small or large, and I suspect the "packaged" signaling solutions will also work fine.
?
--
Jim Moomaw
Portland, OR
- Willamette Model Railroad Club (WMRC)
- NMRA, Pacific NW

Join [email protected] to automatically receive all group messages.