¿ªÔÆÌåÓý

Locked JMRI Logix to control a back & forth shuttle #scripting


 

Group:

Before I try to reinvent the wheel, has someone already created a JMRI Logix to control a back & forth train movement, similar to a trolley shuttle? The layout is Digitrax-controlled, if that is important. I imagine that I will need two optical detectors, one at each end of the track area, to generate the control signals.

I wish to use a small DCC decoder equipped switcher to move 3 grain cars VERY slowly back & forth at an unloading spot. I want the movement to be essentially unnoticeable if one watches it, but apparent if one looks away for a few minutes.

L.A. (Larry) Sebelley
Convention Chair, Pacific Northwest Region
Assistant Treasurer, Pacific Northwest Region
Treasurer, PNR 7th Division
Treasurer, Coldslap Free-mo
(604) 858-5717


 

There is a script to do this included with every release. For some
funny reason it is called "backandforth.py". It is in the jython
folder of the resources folder.

On Sat, 1 Feb 2020 at 18:41, :Larry Sebelley <sebelley@...> wrote:

Group:

Before I try to reinvent the wheel, has someone already created a JMRI Logix to control a back & forth train movement, similar to a trolley shuttle? The layout is Digitrax-controlled, if that is important. I imagine that I will need two optical detectors, one at each end of the track area, to generate the control signals.

I wish to use a small DCC decoder equipped switcher to move 3 grain cars VERY slowly back & forth at an unloading spot. I want the movement to be essentially unnoticeable if one watches it, but apparent if one looks away for a few minutes.

L.A. (Larry) Sebelley
Convention Chair, Pacific Northwest Region
Assistant Treasurer, Pacific Northwest Region
Treasurer, PNR 7th Division
Treasurer, Coldslap Free-mo
(604) 858-5717


 

Even more simple is BackAndForthTimed.py.

No need to sensors at each end.?

These are run within PanelPro? >? Panels? > Run Script? after you have started? PanelPro > Thread Monitor and? Script Output? to see what goes on.
You can also stat up Monitor Loconet and Slot Monitor to see what is going on? without being connected to the layout, just a command Station.

Engine is on address 14.. and top speed is 90.

Marc


 

Larry,

For the timed script you can run it from DP or PP. Using the timed script, you will find the loco drifts one way or the other over time.

Using optical sensors, you need the additional hardware to connect to LocoNet.

--
Peter Ulvestad

JMRI Users Group Moderator - ( )
Tam Valley Group Moderator - ( )
Sprog-DCC Group Moderator - ( )
Edmonton Model Railroad Association -


 

Thank you for the guidance. I will give it a go.

L.A. (Larry) Sebelley
Convention Chair, Pacific Northwest Region
Assistant Treasurer, Pacific Northwest Region
Treasurer, PNR 7th Division
Treasurer, Coldslap Free-mo
(604) 858-5717


 

Peter:

Could you please advise how to connect the optical sensors to LocoNet.
Feel free to communicate with me directly, if you prefer.
--
?

L.A. (Larry) Sebelley
Convention Chair, Pacific Northwest Region
Assistant Treasurer, Pacific Northwest Region
Treasurer, PNR 7th Division
Treasurer, Coldslap Free-mo
(604) 858-5717


 

You could use the Digitrax BDL168? and two of it's 16 detection zones.? The detection is via current draw on the track section. Detection generates a Loconet message.
Or use the Digitrax BD4.? But this requires more hardware to get the Loconet Message back to the Command Station or computer.? Or the BD4 is wired into some
I/O device to see the voltage state change.

Marc


 

On Sat, Feb 1, 2020 at 05:59 PM, Peter Ulvestad wrote:
For the timed script you can run it from DP or PP.
The advantage of using PP is the Thread Monitor and Script output to view until you understand what is going on and confirm all is well.
Plus the added capability to KILL the script without having to reboot, turn off the computer, quit JMRI

Marc


 

On Sun, Feb 2, 2020 at 12:22 PM, <forfoum@...> wrote:


On Sat, Feb 1, 2020 at 05:59 PM, Peter Ulvestad wrote:


For the timed script you can run it from DP or PP.
The advantage of using PP is the Thread Monitor and Script output to view
until you understand what is going on and confirm all is well.
Plus the added capability to KILL the script without having to reboot, turn
off the computer, quit JMRI

Marc
True, I forgot about the thread monitor.
--
Peter Ulvestad

JMRI Users Group Moderator - ( )
Tam Valley Group Moderator - ( )
Sprog-DCC Group Moderator - ( )
Edmonton Model Railroad Association -


 

Larry,

You are not limited to LocoNet, I just assumed because of you using Digitrax. Marc has suggested some LocoNet options.

At my club, we are using RR-Circuits Tower Controllers for LocoNet. I have IR detector sets wired directly into the TC. But this is an expensive option just for what you are looking to do.

--
Peter Ulvestad

JMRI Users Group Moderator - ( )
Tam Valley Group Moderator - ( )
Sprog-DCC Group Moderator - ( )
Edmonton Model Railroad Association -