Keyboard Shortcuts
Likes
- Jmriusers
- Messages
Search
Locked
Re: Jython help. Adding set turnout to a script
Roger,
Is there a copy of the file somewhere? In some versions of JMRI there could be extra spaces as part of the name that don't show on the table. I've got lots of scripts and usernames that have spaces. Generally the display looks almost the same with two spaces somewhere (or trailing) as one space. When testing scripts, use the Panels->Script Output, it will get a window to show what is being processed and make finding errors quicker. I also always keep open the Help->System Console, it will have any error pop up and get your attention. -Ken Cameron, Member JMRI Dev Team www.jmri.org www.fingerlakeslivesteamers.org www.cnymod.com www.syracusemodelrr.org |
Locked
Re: Layout Editor Panel with Web Server issues WARN messages
Randall Wood
These warning messages are deliberate so we can track down Web Panel XML that are not providing system names and ensure system names are included in the XML provided to a web browser. I'd expect those to decrease through out the 4.17.x releases. The reason for the concern about not using system names is that user names are not required attributes of objects (they can be null or blank), can be ambiguous (multiple items can have the same user name), and can be non-web safe (meaning different clients may parse that name differently). |
Locked
Re: Layout Editor panel orientation
Thanks for the encouraging comments. I had tried to create a 'duplicate' panels a couple of times but I gave up when I started to get warnings about incompatible connectivity as I added the 'duplicate' block assignments. However, bouyed up by your confirmation that it was possible, I proceeded to ignore the warnings and completely duplicate a simple layout.
Success! I now wished that I had asked earlier as I had been trying to think of ways round the 'problem'! It turns out the answer was as straight forward as ignoring the warnings whilst finishing the panel. Thanks again guys - I can now get on with displaying layouts in the best way for viewers and operators alike. Andy |
Locked
Export Roster Pane to Excel?
Is it possible to export the contents of the roster pane to an Excel spreadsheet? Thanks.
Jim K |
Locked
Layout Editor Panel with Web Server issues WARN messages
Maybe these are only nuisance messages, but I spent half a day chasing symptoms of another problem intermixed with noise. Using either of
with
Starting the simplest Layout Editor Panel found on this computer and opening the web server:
When a browser opens a Tab rendering of the Layout Editor Panel, a message similar to these is issued for each turnout.
When a web rendering of a turnout icon is tapped, further warnings are issued.
These messages were not reproduced with the Panel Editor or the Control Panel Editor Panels on my computer. Certainly this is not a critical problem, but I can reproduce this symptom with each of the Layout Editor Panels available to me. Cliff in Baja SoCal |
Locked
Re: Jython help. Adding set turnout to a script
Ken,
? ? ?Seems that the set sensor command does not like a sensor name with a space in it.? If I just use the ("IS61") format is does set the sensor to active.? However,? ("Rockville East") gives it a problem. ? ? ?And what seems strange is that "Rockville East" is the user name for IS66, but it is IS61 tthat does not get set.? Does not add up. Roger |
Locked
Re: Jython help. Adding set turnout to a script
Roger,
In that case, I don't run the 'set all' scripts. I look at the table after loading and see how many are UNKNOWN. Also keep in mind for internal sensors you can use the option in the table to see all of them to INACTIVE at panel load time. Next trick I do is the order of the startup actions. I'll place things like loading the panel early but execution of scripts, I do that later in the lineup. And for many of my panels, I don't use the Edit->Preference->Startup, I use a route with the initializer. I put script calls into it too. It generally turns into being a Logix and that gives even more options to control how it sequences things. But start with the presumption that everything tries to start at once unless you have found something that says 'this after that' sort of sequence. Also keep in mind that many things may be happening but the update of the display is generally the last thing to happen. Internally it is all going on, but you just won't see it until things get caught up. -Ken Cameron, Member JMRI Dev Team www.jmri.org www.fingerlakeslivesteamers.org www.cnymod.com www.syracusemodelrr.org |
Locked
Re: Jython help. Adding set turnout to a script
Ken,
? ? I was referring to my attempt to set these internal sensors to ACTIVE in the script.? I'm betting they are being set, but cleared by a startup function somewhere down the line before the last JMRI window pops up. Roger |
Locked
Re: Jython help. Adding set turnout to a script
Roger,
Other things could be happening. On Digitrax systems there is a set of command sent to ask for all sensors and turnouts to respond. As those answers come in, things will change. A Route, with the Initializer option set, is another good way to set things up. Also keep in mind the cascade effect of some things. Example a turnout or block detector status comes in. That triggers the signal logic which in turn sends commands to the signals. And then the signals watching those signals see them change and may trigger further changes. -Ken Cameron, Member JMRI Dev Team www.jmri.org www.fingerlakeslivesteamers.org www.cnymod.com www.syracusemodelrr.org |
Locked
Re: Question about Operations scenario with alternate tracks
Gary, The same track can have multiple purposes and definitions as long as the trains utilizing that track do not try to do so at the same time.? The software doesn't know or care if there are two physical tracks or a single track with multiple designations.? For your purpose, I would designate that siding as a Classification/Interchange track where only your A-B-C local is allowed to set out and only your A-B-A turn is allowed to pick up.? Then make sure that your options (I forget the exact terminology) allow for routing via multiple trains.? Also, the A-B-A turn must be able to handle local moves - another option you must set.? Then your local A-B-C can set out cars on the siding for the 7 spurs and the program will handle the logic (via the multiple trains and local moves options) to have A-B-A move the cars from the siding (designated as a Classification/Interchange track) to the spurs in the same town via local moves.? I am not sure that i got all of the details correct but I use this same strategy to sometimes use a siding as a classification/interchange track? to "turn" a local train.? My local 420 turns on a reverse loop (also used as a staging track for my MKT freight)? and terminates on the siding designated as a C/I track.? The the return trains, 421, builds from that same track and heads back the way it came.? On a C/I track, loads are not changed so this allows a local to work facing points in both directions.? You could do this with a single route but I don't believe you can change the train number with a single route.? Doing as I have above allows 420 to turn and become 421 for the return trip. |
Locked
Re: Jython help. Adding set turnout to a script
Ted,
? ? Having trouble with setting a sensor active.? These four sensors I want set to active are Reverse and Forward sensors part of two Sections.? Maybe they are getting set then cleared when the program loads the Sections table. ? ? The script does work for clearing Unknown sensors. Roger |
Locked
Re: Logo on Panel
Buy transfer decal printing paper from Micoscale or thru Ebay (they make both laser printer and inkjet) then print the logo from your 'pooter and decal it where you want it. Ken Moordigian On Friday, August 16, 2019 Brian & Cherry Clark <[email protected]> wrote: Hello Group I would like to place a railroad logo (Great Northern) onto my panel. It is a jpg file. The panel is in Layout Editor. I cannot easily see how this might be done, could someone kindly point me in the right direction to achieve this? JMRI 4.16, Java 1.8.221, Windows 10. Thanks for any help Brian Clark Bedford, UK. |
Locked
Re: Question about Operations scenario with alternate tracks
One more note. If only the way freight and local have access to the interchange, you only need one interchange track, not two as I described.? |
Tim,
On 17 Aug 2019, at 7:05 AM, Tim Lux <timlux33@...> wrote:It's a safe way to go, provided you don't accidentally reset your settings and start using the old roster files... Remember that JMRI isn't designed for simultaneous file access by more than one computer. With Dropbox you are actually using separate copies, so if you try that Dropbox will save both copies, marking one as Conflicted in the filename and leaving you to decide which is the best. This occasionally happens with the roster index file "roster.xml" because JMRI writes a new copy every time you open JMRI, even if there are no changes. If this happens and a new entry seems missing, it's a trivial operation to use Actions->Recreate Roster Index. I started with Fortran 2 in 1970 on an IBM 1620 with paper tape and an IBM golf-ball typewriter for output. Dave in Australia |
Locked
Re: Jython help. Adding set turnout to a script
Hope this code example is helpful.? They both assume that you have called jmri.jmrit.automat.AbstractAutomaton.? Look at the "class" line and see if jmri.jmrit.automat.AbstractAutomaton is contained in the parentheses.? In addition, the line "import jrmi" should be toward the top of the actual code.
Set SW13 to 'Thrown': ??? turnouts.provideTurnout("SW13").setState(THROWN) Set a sensor to active: ??? sensors.provideSensor("sensorNameHere").setState(ACTIVE) |
Dave,
My goodness you must be "burning the midnight oil" given the timing in Canada of some of your replies to me.? I think everything is linked up properly - in Help>Locations (on both computers) only Roster and User files now link to Dropbox, but that's OK because I don't have any other custom preferences or scripts or anything and only use DecoderPro, not PanelPro.? Both computers start up properly with DecoderPro and both show my locomotive roster.? I took your advice from?your very first reply and did a copy/paste (NOT cut/paste) of all the files resident inside the original JMRI folder on the first machine and copied them to the Dropbox/JMRI folder in Windows Explorer.? As you said, some will probably sit there forever without being used, but I'm perfectly fine with that. One last check is for both computers I have to play with settings on a locomotive just so there's a change, and see if that's reflected on the other computer when I start DecoderPro.? Unfortunately I've spent the better part of a day and a half playing with this but now have to step away until probably late next week, so that exercise will be later. Dave, I marvel at your patience with a non-technical computer guy - I vaguely recall my only formal training taking Basic and Fortran 4 on the old IBM mainframe computers with punch cards back in the 1970's, and everything since then has been a learning curve, some of them?steeper than others! Thanks again Dave, I'll contact you if any further issues but hopefully there are none. Regards, Tim |
Locked
Re: Jython help. Adding set turnout to a script
Futurelearn are doing a series of courses on Python which I am taking to help me understand the scripts. These courses might help you?
The courses are free although you will have to pay to get proof that you've completed the course. |
Locked
Re: Issues with Engine Driver
Update:
Marshall added user names to his turnouts to address that issue. He provided his panel as an example of the label rotation issue and the crossover appearance issue. I have created Github issues and to investigate and address those. |
Locked
Jython help. Adding set turnout to a script
all,
? ? Need a little guidance for adding a jython command at end of the script "SetAllTurnoutsToOff.py".? Want to set one turnout to 'Thrown' (SW13). ? ? also would like to set some internal sensors to active. Roger |