¿ªÔÆÌåÓý

Date

Locked Re: Copy panel

 

Yes.

For offline work, almost all connections support an option for "simulator".
Setup a profile using those for your connections. Then it will work. Many
setup two profiles on the same computer to let them work on panels without
the layout powered up by using the simulator connection.

-Ken Cameron, Member JMRI Dev Team
www.jmri.org
www.fingerlakeslivesteamers.org
www.cnymod.com
www.syracusemodelrr.org


Locked Copy panel

 

Hi, is it possible to copy a panel and transfer to another PC and work on it offline??


Locked Re: Adding new "info" field to the Cars and Loco tab in OpsPro

 

Paul,

If I expanded the "Value" field to allow the entry of lines, would that work for you?

Dan


Locked Re: %20Re%3A%20%5Bjmriusers%5D%20JMRI%2CMERG%2C%20Raspberry%20Pi%203%2C%20Engine%20Driver.

 

I Having dinner with this on my mind, I got an idea to have a look at the port connection although it is showing in black telling me it is connected, so I went into preferences and changed the port setting and bingo it is all working. So I don't know what the JMRI and Raspberry Pi thinking telling me that it is connected but is not.
?? Ones again thank you all for helping me with this problem.


Locked Re: JMRI hangs or locks out waiting for a sensor

 

Many thanks for the advice Bob, I will get my thinking cap on and do a bit more studying.
Just amazing how much there is in JMRI.

Thanks
Pete


Locked Re: BD20 block detection

 

See below:

On 7 Nov 2018, at 12:35 AM, Ken Cameron <kcameron@...> wrote:

1. Install the new chip. Confirm things still work ok. You should see the
7.3.0 in the console log. Keep JMRI running.
2. Change the connection preference to say you have the 7.3.* and the baud
rate change for 19,200. Save and exit JMRI.
3. Install the jumpers (all) on the USB. Cycle power.
4. Confirm this is now working. Should id as 7.3.7, and no AA command
timeouts.
You may get other command timeouts (and a stuck Cab Bus LED). if the address already stored in the NCE USB Cab ID Is invalid.

If so, unplug/replug the Cab Bus cable and give the command below before the LED gets stuck on again.

(Both the AA Return Version and B1 Set Cab ID commands are processed in the USB and not sent to the command station.)

5. Use the USB Cab Id command to set it to 10. This gets it out of the range
useable for throttles.
6. Restart JMRI, confirm still working, Show Cabs should work and show USB
as 10.
Dave


Locked Re: BD20 block detection

 

Richard,

Given what Dave has said, I think the steps you should consider would be:

1. Install the new chip. Confirm things still work ok. You should see the
7.3.0 in the console log. Keep JMRI running.
2. Change the connection preference to say you have the 7.3.* and the baud
rate change for 19,200. Save and exit JMRI.
3. Install the jumpers (all) on the USB. Cycle power.
4. Confirm this is now working. Should id as 7.3.7, and no AA command
timeouts.
5. Use the USB Cab Id command to set it to 10. This gets it out of the range
useable for throttles.
6. Restart JMRI, confirm still working, Show Cabs should work and show USB
as 10.
7. Set the new AIU to 9 on its jumpers.
8. Set the old AIU to 8 on its jumpers.
9. Exit JMRI and cycle power.
10. Use the Show Cabs to see the new addresses on the AIU cards.
11. Add the sensors, 8:1, range 14, for the old AIU.
12. Add the sensors, 9:1, range 14, for the new AIU.
13. Move any user names from the old 4:1 range of sensors to the 8:1 range
of sensors.
14. Save results and restart.
15. Delete the old 4:1 sensors.

Now you can leave the old AIU where it was, but that is currently using a
cab id that a throttle could use. The whole above exercise is to get the
most out of the address range you now have.

-Ken Cameron, Member JMRI Dev Team
www.jmri.org
www.fingerlakeslivesteamers.org
www.cnymod.com
www.syracusemodelrr.org


Locked Re: BD20 block detection

 

¿ªÔÆÌåÓý

Ken,
No effect on the available address range.

USB jumpers don't affect available address range. That's an unchangeable* property of the firmware.

The NCE USB jumpers all off forces the NCE USB (only) to always use address 3, precluding you from changing the NCE USB's own address to any other available address.

* Excluding the dreaded V1.65 which managed to unchangeably disable its own extended address range.?

--?
Dave in Australia

The New England Convention 2018

On 6 Nov 2018, at 11:51 PM, Ken Cameron <kcameron@...> wrote:

Richard,

Are you currently running with all jumpers off or all jumpers on, for the
USB?

Dave,

If Richard is running with all off, will he be able to use the extended
address range?


Locked Re: BD20 block detection

 

Richard,

Are you currently running with all jumpers off or all jumpers on, for the
USB?

Dave,

If Richard is running with all off, will he be able to use the extended
address range?

-Ken Cameron, Member JMRI Dev Team
www.jmri.org
www.fingerlakeslivesteamers.org
www.cnymod.com
www.syracusemodelrr.org


Locked Re: BD20 block detection

 

¿ªÔÆÌåÓý

Richard,
The principle is correct, but I'd first:
- Fit your V1.65B upgrade chip.
- change the new AIU to an address in the range 8,9,10
- Then use 9:1 (or whatever address you picked) to start the new range.

Once you have that done, I'd strongly recommend removing the existing 4:1 range (NS48-61) of sensors and moving the AIU currently at 4 up to the 8-10 range as well.

Better to do a bit of rework now before you do too much more to your Layout rather than ?wishing you had done it earlier when you've done a lot more work and want to add a couple more cabs.

--?
Dave in Australia

The New England Convention 2018

On 6 Nov 2018, at 9:37 PM, Richard_vanRaay via Groups.Io <richard_vanraay@...> wrote:

Hi Ken, the second AIU and the update chip arrived today.?To add 14 more sensors do I change the address on the AIU from the factory preset of 4 to 5 and add sensors 5:1 consecutively to read NS64-NS77?


Locked Re: BD20 block detection

 

Hi Ken, the second AIU and the update chip arrived today.?To add 14 more sensors do I change the address on the AIU from the factory preset of 4 to 5 and add sensors 5:1 consecutively to read NS64-NS77?


Locked Re: turnout table

 

I also gave wrong advice, for which I apologise.? My excuse being that I was putting in signal heads at the time where you have to type the "IH" in or it won't accept it!? That's what confuses us newbies - a degree of inconsistency.? I expect it is necessary but it don' 'arf confuse the biginner.


Locked Re: Off track storage location - Staging vs Classification/Interchange

 

Tom,?
From my reading of what Matt did, he is using the off site storage for whole trains. Don't know if he is doing same for cars not assigned to a train.
As the OP, I finally settled on a mix of tracks (yards and spurs) for my off site storage and each track is set up for a certain car type or types. I use the spur track when I want the car load to change and the yard track when no load is involved such as a caboose.?
Paul D


Locked Re: Adding new "info" field to the Cars and Loco tab in OpsPro

 

Dan,
I am looking for more than a single value. I have used the "comment" field but it is just an long single stream of info. Not sure how long it is. If possible, I would prefer an info block when I can enter multiple lines using a return to add more lines of text. I would like to be able to add multi line text like below.

Coupler: MT
Wheel set: 36" metal
Mfg: Atlas
Decoder: Digitrax (yes...some of my cars have a decoder)
Car logo: Santa Fe All The Way
etc
etc

Paul D


Locked Re: Off track storage location - Staging vs Classification/Interchange

 

I assume you designate each ¡°track¡± to only accept a certain car type or type

Tom in texas


Locked Re: Custom Panel Graphics

 

Hi

Not sure if you've seen my IECC panels in the photos section. ??/g/jmriusers/album?id=50571

The only reason that I haven't uploaded my icons for everyones use was that they don't conform to the naming and sizing recommendations. ? ?I've ended up creating transparent icons to use as click areas so that I can authentically apply ISO and REM reminders and have full IECC functionality. ?I've had to use a bit of poetic licence on the clicking because at the time I was unable to use a right click mouse event for cancelling the route or swinging points reverse. ? Therefore to cancel a signal route I use a long click and to set the route I use a short click. ?(You can have a timer in logix that allows you to do that with a bit of work). ? ? I think I now know how to do right click events using script so may change my logic one day. ?Mine was all done long hand using logix and panel editor rather than layout editor so I didn't get the advantage of using the built in NX features.

Always happy to answer questions or help out with prototypical UK signalling, but don't visit these pages too often so it's best to email me. ? kd.marsh@...

Regards

Kev


Locked Re: turnout table

 

On Nov 5, 2018, at 2:24 PM, Ken Cameron <kcameron@...> wrote:

The drop down at the top of the 'Add' screen gives you the first part of the
system name. In your example, "LT" would be applied to what you enter in the
system name box (1), so it would create LT1. Think of the drop down picking
the first part of the name and what you enter is the parameter within the
system for that entry.
Please don¡¯t give this kind of advice. We¡¯re trying really hard to get away from people having to spent time working out the details of system names. The field ask for a ¡°Hardware Address¡±, and that¡¯s what the discussion should be about. All they should need to know is what kinds of hardware they have, and what address number it has. The excess of focus on system name leads to just the kind of confusion we¡¯re seeing here.

Bob
--
Bob Jacobsen
rgj1927@...


Locked Re: JMRI hangs or locks out waiting for a sensor

 

What you¡¯re trying to do is possible, but complicated.

It would be _much_ simpler if instead of using the Thread class (which is built into Python, and doesn¡¯t really know much about JMRI) you used the JMRI AbstractAutomat class for handling parallel threads of execution. That imposes a some structure, which in turn makes things like waiting for sensors easier and more reliable.





Bob


On Nov 4, 2018, at 3:20 PM, PETER LAMBERT via Groups.Io <peter_lambert@...> wrote:

First I should point out I am quite new to P(J)ython and to some extent JMRI but I now have my layout set up, logix, signalling etc all working and now want to get into some scripting to partially automate.
I am working on a script where I can pass (or should it be parse) a set of sensors in sequence to a function so I can monitor and control a loco over a small group of blocks.
Then move on to the next group and on around the layout.
I need to know the conditions of the first set of blocks have been met before starting the second, third etc.

My first script simply called the class that monitors sensors and passed the names of the sensors in a list, problem is that the script kicked of the first thread and then went directly into the second and so and the result on the script output window were quite haphazard, if a block was occupied it would simply carry on with the next set of blocks and then wait at the end until the first sensor or block became unoccupied.
I used def handle(self) in the above script as I have read that it is necessary for the waitMs() function.

I have tried using loops and several "wait" controls such as "sleep(x) ans waitMs(x) but whilst they appear to work the thread just appears to hang.
It does not actually hang, it continues round in an endless loop, I have added a "break" in the "while" loop to get out if the thread appeared to hang.
If I try to change the sensor through the sensor table nothing happens but once the conditions of the "break" are met the script output correctly lists the output and only then does the sensor entry in the table appear to change.
The listing in the script output window shows everything working as expected but not the change in state of the sensor, the sensor flips to the required state after the thread is ended by the break.

I have used threading.event() to control the process and ensure it runs in the correct order (which it does) but I am at a loss to why I cannot change the sensor in the sensor table whilst the script is running.
A summary of the code is below and an extract from the Script Output window, any help or advice would be appreciated, I suspect I am doing something daft but not sure what!
Thanks
Pete
Script:
import jarray
import jmri
import time
from threading import Event, Thread

class run_trains(jmri.jmrit.automat.AbstractAutomaton) :
class check_route(jmri.jmrit.automat.AbstractAutomaton) :
def __init__(self, ready=None) :
self.ready = ready
def set_route(self, sensorlst, reservelst):
self.sensorList = sensorlst
self.resvList = reservelst
# set up length of sensor list (for counter increment and reset
self.numberOfSensors = len(self.sensorList)
self.max_times_thru = 0
self.loopcnt = self.numberOfSensors
self.cnt = 0
while self.cnt < self.loopcnt :

print str(self.cnt) #Just to track progress for diagnostic
self.thissensor = self.sensorList[self.cnt]
self.blocksen = sensors.provideSensor(self.thissensor)
self.now = self.blocksen.getKnownState()
print "Sensor "+self.thissensor+" is "+stateName(self.now)
if (stateName(self.now)) <> "INACTIVE" :
self.max_times_thru += 1
if self.max_times_thru > 5 :
break
self.route_clear = False #Used elsewhere
print "Sensor "+self.thissensor+" is "+stateName(self.now)+" wating for 2 secs"
sleep(2)
# self.waitMsec(2000)
self.cnt = 0
continue #back to start to check all sensors again as one may change during the wait
self.cnt += 1 #Next sensor if current is UNOCCUPIED
self.ready.set()

#Main code calling the class
ready = Event()
# configure & start thread
a2toa10 = check_route(ready)
senslst = ['A1sen', 'A6sen', 'A10sen']
resvlst = ['A1resv', 'A6resv', 'A10resv'] #Will also use reserve but not in this example
thread = Thread(target=a2toa10.set_route(senslst, resvlst))
thread.start()
ready.wait()

a3toa9 = check_route(ready)
senslst2 = ['A3sen', 'A8sen']
resvlst2 = ['A3resv', 'A8resv']
thread = Thread(target=a3toa9.set_route(senslst2, resvlst))
thread.start()
ready.wait()
print ("done")

Script output (after 5 x 2 seconds) when A6sen is made ACTIVE (the count on each line is simply a diagnostic check of the sensor index)
Tried to change A6sen in the sensor table 2-3 seconds after this was started, no effect but it had been noticed but not shown in the table or detected by the script, the entry in the sensor table changed after the script had completed.
Doing Init
Doing set_route
0
Sensor A1sen is INACTIVE
1
Sensor A6sen is ACTIVE
Sensor A6sen is ACTIVE wating for 2 secs
0
Sensor A1sen is INACTIVE
1
Sensor A6sen is ACTIVE
Sensor A6sen is ACTIVE wating for 2 secs
0
Sensor A1sen is INACTIVE
1
Sensor A6sen is ACTIVE
Sensor A6sen is ACTIVE wating for 2 secs
0
Sensor A1sen is INACTIVE
1
Sensor A6sen is ACTIVE
Sensor A6sen is ACTIVE wating for 2 secs
0
Sensor A1sen is INACTIVE
1
Sensor A6sen is ACTIVE
Sensor A6sen is ACTIVE wating for 2 secs
0
Sensor A1sen is INACTIVE
1
Sensor A6sen is ACTIVE
It breaks after this

Doing Init
Doing set_route
0
Sensor A3sen is INACTIVE
1
Sensor A8sen is INACTIVE

done
--
Bob Jacobsen
rgj1927@...


Locked Re: turnout table

 

Phillip,

The drop down at the top of the 'Add' screen gives you the first part of the
system name. In your example, "LT" would be applied to what you enter in the
system name box (1), so it would create LT1. Think of the drop down picking
the first part of the name and what you enter is the parameter within the
system for that entry.

-Ken Cameron, Member JMRI Dev Team
www.jmri.org
www.fingerlakeslivesteamers.org
www.cnymod.com
www.syracusemodelrr.org


Locked Re: turnout table

 

The field is called ¡°Hardware Address¡±. You should enter the number used by the hardware, in this case 1. Not LT1, just 1. See also the also the tool tip (from hovering the cursorr over the field), which suggests ¡°a number from 1 to 2048 inclusive¡±/

Bob

On Nov 5, 2018, at 2:02 PM, canoephil <canoephil@...> wrote:

I type in LT1 (Loconet Turnout 1) on the yellow highlight line, but when I drop down to the next line the letters and numbers (LT1) turn blue and rest of the line turns orange. JMRI does not let me type in anything on the third line nor lets me complete the entry.
Philip
--
Bob Jacobsen
rgj1927@...