开云体育

Locked Capability of Decoderd/Panel Pro


 

Because of the sparse documentation about most of the advanced features of the suite of software that we call JMRI, I'm not sure if what I'd like to implement is even possible.

Here goes what I'd like to accomplish:

I have a question related to operating in a consist using CV19.

Assume that the consist has the lead and trailing loco coupled in opposite directions, no matter how many locos are in the consist.
?
The issue/question is how do you operate the consist when you want to operate the consist in the opposite direction, specificall concerning CV21-22 which defines which function keys are supposed to respond to the consist address. Obviously, the 'new' lead loco function keys would need to operate differently than when it was a traling loco.

I don't think there's a simple way to reverse operation and have the now lead loco to respond to the function keys as the now new lead loco.

So, although I've actually answered own question, it'd be nice to be able to define direction for function response when direction is changed. Also, you'd have to define which of the consist locos was the trailing loco, so other locos that are not the lead or trailing loco in the consist would still ignore the correct function keys.

So, can a macro type operation read CV values, and then change the CV 21 U& 22 values to accomplish the correct response to function buttons when reversing a consist? I completely understand that there may be different macros needed for various consist combinations, as trying to make it universal would be beyond the ability of most JMRI users.

And lastly, assuming such a macro could be implemented somehow, how would the macro be triggered?

Maybe the decoder manufactures need to help with this, but there's not much chance that would happen.


 

You don't say what system you are/will use, but you can do this with the NCE system advanced consisting, no macros needed.? Far as I know DCC itself does not have this function. ? ?Maybe someone who knows macros will have a work around for other systems.

Rick

In a message dated 8/2/2018 4:42:20 PM Mountain Standard Time, crusader2752939@... writes:

Here goes what I'd like to accomplish:

I have a question related to operating in a consist using CV19.

Assume that the consist has the lead and trailing loco coupled in opposite directions, no matter how many locos are in the consist.
?
The issue/question is how do you operate the consist when you want to operate the consist in the opposite direction, specificall concerning CV21-22 which defines which function keys are supposed to respond to the consist address. Obviously, the 'new' lead loco function keys would need to operate differently than when it was a traling loco.


 

On 8/3/2018 4:53 PM, Rick Uhlenkott via Groups.Io wrote:
You don't say what system you are/will use, but you can do this with the NCE system advanced consisting, no macros needed.? Far as I know DCC itself does not have this function. ? ?Maybe someone who knows macros will have a work around for other systems.

Rick

In a message dated 8/2/2018 4:42:20 PM Mountain Standard Time, crusader2752939@... writes:

Here goes what I'd like to accomplish:

I have a question related to operating in a consist using CV19.

Assume that the consist has the lead and trailing loco coupled in
opposite directions, no matter how many locos are in the consist.

The issue/question is how do you operate the consist when you want
to operate the consist in the opposite direction, specificall
concerning CV21-22 which defines which function keys are supposed
to respond to the consist address. Obviously, the 'new' lead loco
function keys would need to operate differently than when it was a
traling loco.

I'm using a simple system that ONLY supports CV19 for consisting.


 

开云体育

Assuming this is “on the main line” for all locos, you’re not taking them off to a programming track mid-session, and a DCC system with no special capabilities to manage consists.? Then…

?

If the decoders are already read on the programming track into the Roster of locos, your computer “knows” the starting position for CV’s 21/22.?

?

So, from that Roster entry you could just use the Ops-Mode (programming on the main) to change CV21/22 as required for each loco.?

Moving on from using the programmer, it would be possible to write a “custom programmer” which got rid of all the other stuff, leaving just CV21/22 per loco.??? There are several approaches to that.?

?

Making the above automatic, or almost automatic, on change of direction of a consist. I think it might be possible, but gets more complex. ??Needs a consist manager tool to add locos to a consist, and from that a means to define and alter the CV21/22 settings for the lead loco, writing the results to both the loco and the Roster (for later use).??? I think I could see how to sketch that out with scripts.?? ??
Triggering change of direction on the script might end up as system dependent.? If you can track the throttle for the consist address, then the change of direction can be noted and the script triggered, but that may be system specific tracking of the throttle, rather than universal for any DCC system.?

?

?

Nigel

?

?

Nigel Cliffe :??? nigel.cliffe@...? or? nigel@...

?

From: [email protected] [mailto:[email protected]] On Behalf Of crusader27529
Sent: 02 August 2018 23:42
To: [email protected]
Subject: [jmriusers] Capability of Decoderd/Panel Pro

?

Because of the sparse documentation about most of the advanced features of the suite of software that we call JMRI, I'm not sure if what I'd like to implement is even possible.

Here goes what I'd like to accomplish:

I have a question related to operating in a consist using CV19.

Assume that the consist has the lead and trailing loco coupled in opposite directions, no matter how many locos are in the consist.
?
The issue/question is how do you operate the consist when you want to operate the consist in the opposite direction, specificall concerning CV21-22 which defines which function keys are supposed to respond to the consist address. Obviously, the 'new' lead loco function keys would need to operate differently than when it was a traling loco.

I don't think there's a simple way to reverse operation and have the now lead loco to respond to the function keys as the now new lead loco.

So, although I've actually answered own question, it'd be nice to be able to define direction for function response when direction is changed. Also, you'd have to define which of the consist locos was the trailing loco, so other locos that are not the lead or trailing loco in the consist would still ignore the correct function keys.

So, can a macro type operation read CV values, and then change the CV 21 U& 22 values to accomplish the correct response to function buttons when reversing a consist? I completely understand that there may be different macros needed for various consist combinations, as trying to make it universal would be beyond the ability of most JMRI users.

And lastly, assuming such a macro could be implemented somehow, how would the macro be triggered?

Maybe the decoder manufactures need to help with this, but there's not much chance that would happen.


 

On 8/5/2018 6:44 AM, Nigel Cliffe wrote:

Assuming this is “on the main line” for all locos, you’re not taking them off to a programming track mid-session, and a DCC system with no special capabilities to manage consists.? Then…

If the decoders are already read on the programming track into the Roster of locos, your computer “knows” the starting position for CV’s 21/22.

So, from that Roster entry you could just use the Ops-Mode (programming on the main) to change CV21/22 as required for each loco.

Moving on from using the programmer, it would be possible to write a “custom programmer” which got rid of all the other stuff, leaving just CV21/22 per loco.??? There are several approaches to that.

Making the above automatic, or almost automatic, on change of direction of a consist. I think it might be possible, but gets more complex. ??Needs a consist manager tool to add locos to a consist, and from that a means to define and alter the CV21/22 settings for the lead loco, writing the results to both the loco and the Roster (for later use).??? I think I could see how to sketch that out with scripts.
Triggering change of direction on the script might end up as system dependent.? If you can track the throttle for the consist address, then the change of direction can be noted and the script triggered, but that may be system specific tracking of the throttle, rather than universal for any DCC system.

Nigel

Nigel Cliffe : nigel.cliffe@... <mailto:nigel.cliffe@...>? or nigel@... <mailto:nigel@...>

*From:*[email protected] [mailto:[email protected]] *On Behalf Of *crusader27529
*Sent:* 02 August 2018 23:42
*To:* [email protected]
*Subject:* [jmriusers] Capability of Decoderd/Panel Pro

Because of the sparse documentation about most of the advanced features of the suite of software that we call JMRI, I'm not sure if what I'd like to implement is even possible.

Here goes what I'd like to accomplish:

I have a question related to operating in a consist using CV19.

Assume that the consist has the lead and trailing loco coupled in opposite directions, no matter how many locos are in the consist.

The issue/question is how do you operate the consist when you want to operate the consist in the opposite direction, specificall concerning CV21-22 which defines which function keys are supposed to respond to the consist address. Obviously, the 'new' lead loco function keys would need to operate differently than when it was a traling loco.

I don't think there's a simple way to reverse operation and have the now lead loco to respond to the function keys as the now new lead loco.

So, although I've actually answered own question, it'd be nice to be able to define direction for function response when direction is changed. Also, you'd have to define which of the consist locos was the trailing loco, so other locos that are not the lead or trailing loco in the consist would still ignore the correct function keys.

So, can a macro type operation read CV values, and then change the CV 21 U& 22 values to accomplish the correct response to function buttons when reversing a consist? I completely understand that there may be different macros needed for various consist combinations, as trying to make it universal would be beyond the ability of most JMRI users.

And lastly, assuming such a macro could be implemented somehow, how would the macro be triggered?

Maybe the decoder manufactures need to help with this, but there's not much chance that would happen.

I understand the likely complexities of what would need to be done, as I programmed low level firmware/machine code for many years.


What I don't know is how to get started in JMRI......


 

Unfortunately, working with things like CVs has a lot of similarity to low level firmware/machine code. Lots of worrying about individual bits; not enough information on what those bits do!

An experimental approach might work for you.

1) Install JMRI, get it working with your equipment.

2) Read up on how JMRI uses Python for a scripting language (You can also work in JavaScript/ECMAScript, but we have more documentation for Python and more people can help) Then try running some sample scripts

3) Read the jython/OpsProgExample.py script, to see how it does ops-mode programming. It’s nothing like your use case but it’s a start.

4) Create (perhaps starting with jython/OpsProgExample.py) a script that does what you want on forward->reverse; you might want to do this with lots of print statements, etc to make sure it’s writing what you expect, or do part of it on the service track so you can read back.

5) Iterate to success.

Bob


On Aug 5, 2018, at 4:44 AM, crusader27529 <crusader2752939@...> wrote:


I understand the likely complexities of what would need to be done, as I programmed low level firmware/machine code for many years.


What I don't know is how to get started in JMRI......
--
Bob Jacobsen
rgj1927@...


 

On 8/5/2018 11:12 AM, Bob Jacobsen wrote:
Unfortunately, working with things like CVs has a lot of similarity to low level firmware/machine code. Lots of worrying about individual bits; not enough information on what those bits do!

An experimental approach might work for you.

1) Install JMRI, get it working with your equipment.

2) Read up on how JMRI uses Python for a scripting language (You can also work in JavaScript/ECMAScript, but we have more documentation for Python and more people can help) Then try running some sample scripts

3) Read the jython/OpsProgExample.py script, to see how it does ops-mode programming. It’s nothing like your use case but it’s a start.

4) Create (perhaps starting with jython/OpsProgExample.py) a script that does what you want on forward->reverse; you might want to do this with lots of print statements, etc to make sure it’s writing what you expect, or do part of it on the service track so you can read back.

5) Iterate to success.

Bob


On Aug 5, 2018, at 4:44 AM, crusader27529 <crusader2752939@...> wrote:


I understand the likely complexities of what would need to be done, as I programmed low level firmware/machine code for many years.


What I don't know is how to get started in JMRI......
--
Bob Jacobsen
rgj1927@...




OK, that's what I needed to hear.....Python is the preferred tool......THANKS.


 

开云体育

>>>> Making the above automatic, or almost automatic, on change of direction of a consist. I think it might be possible, but gets more complex. ??Needs a consist manager tool to add locos to a consist, and from that a means to define and alter the CV21/22 settings for the lead loco, writing the results to both the loco and the Roster (for later use).??? I think I could see how to sketch that out with scripts.?<<<<

? ??
>>>> Triggering change of direction on the script might end up as system dependent.? If you can track the throttle for the consist address, then the change of direction can be noted and the script triggered, but that may be system specific tracking of the throttle, rather than universal for any DCC system. <<<<

      Or, one could save one’s self a lot of time, effort, and tears by simply replacing whatever DCC system one has with any of the NCE systems that already handles all of this for you, including the ability to set CVs 21 and 22 _once_ (while initially programming the engine), and never having to set/reset them each time an engine is added to a consist, or the opposite end of the consist is now selected as the lead locomotive.

      The Power Cab lists for 199.95, and is typically discounted around 20% for an advertised price of around $160.00.? If you understand MAP policies, they can be found for even less.

      So for $160 or less one can have a DCC system that handles all this for you.? And . . . . you can further reduce the cost of that new NCE system by selling off your old system.? When I was a contract software develop 15 years ago that price was slightly more than two hours pay.

      Now before I get a ton of hate mail <GRIN> I realize there are folks out there who are on fixed incomes, think that specific features of whatever system they have are the Bees Knees, or are vested in their current systems for some reason or other, and there are folks out there with the skills, interest and drive to come up with a programming solution to a problem that’s already been solved.? If that’s your gig, go for it, enjoy it, and have fun.

      Why re-invent the wheel?

      Best regards,

      Steve

      Steve Haas

      Snoqualmie, WA


 

On 8/5/2018 3:06 PM, Steve Haas wrote:
RE: [jmriusers] Capability of Decoderd/Panel Pro

Making the above automatic, or almost automatic, on change of
direction of a consist. I think it might be possible, but gets more complex. ??Needs a consist manager tool to add locos to a consist, and from that a means to define and alter the CV21/22 settings for the lead loco, writing the results to both the loco and the Roster (for later use).??? I think I could see how to sketch that out with scripts. <<<<


Triggering change of direction on the script might end up as system
dependent.? If you can track the throttle for the consist address, then the change of direction can be noted and the script triggered, but that may be system specific tracking of the throttle, rather than universal for any DCC system.<<<<

Or,one could save one’s self a lot of time, effort, and tears
by simply replacing whatever DCC system one has with any of
the NCE systems that already handles all of this for you,
includingthe ability to set CVs 21 and 22 _/once/_ (while
initially programming the engine), and neverhaving to
set/reset them each time an engine is added to a consist, or
the opposite end of the consist is now selected as the lead
locomotive.

The Power Cab listsfor 199.95, and is typically discounted
around 20%for an advertised price of around $160.00. If you
understand MAP policies, they can be found for even less.

So for $160 or less one can havea DCC system that handles all
this for you.? And . . . . you can furtherreduce the cost of
that new NCE system by selling off your old system.? When I
was a contract software develop 15 years ago thatprice was
slightly more than two hours pay.

Now before I get aton of hate mail <GRIN> I realize thereare
folks out there whoareonfixed incomes, think that specific
features of whatever system they have are the Bees Knees, or
are vestedin their current systems for some reason or other,
and there are folks out there with the skills, interest and
driveto come up with a programming solution to a problem
that’s already been solved.? If that’s your gig, go for it,
enjoy it, and have fun.

Why re-invent the wheel?

Best regards,

Steve

Steve Haas

Snoqualmie, WA


It's for my club, which is not large membership wise, and has little extra money available. The system we us is DCC++ which is not commercial, but works great.


I also re-engineered the DCC++ to make more room for loco slots, and it supports a total of up to 8 power districts, including the program track. ANY of the power districts other than the program track can either be a dumb district or a reverse section or a programmable intelligent district with different current limits, OR a combination reverse and intelligent district.


It's all modular allowing you to assemble it as you need, and uses ONLY readily available EBAY parts. It also uses RS-485 to drive the remote power district DCC signal and track power signal, so essentially there is no degradation at any realistic distance. The most expensive part of the system is the power board(s) which cost less than $10 per power district.


So, the investment in time and effort to change to an equivalent capability with a commercial system is simple not practical.


 

开云体育

>>>> It's for my club, which is not large membership wise, and has little extra money available. The system we us is DCC++ which is not commercial, but works great. <<<<

      I certainly understand the constraints you are working under.

?? I also re-engineered the DCC++ to make more room for loco slots, and it supports a total of up to 8 power districts, including the program track. ANY of the power districts other than the program track can either be a dumb district or a reverse section or a programmable intelligent district with different current limits, OR a combination reverse and intelligent district. ??

      Isn't DCC+ open source?? Based on the changes you've implemented above, I doubt it would be particularly hard for you to adapt it to an NCE style of consist control.

?? So, the investment in time and effort to change to an equivalent capability with a commercial system is simple not practical. ??

      Quite true, given the constraints you have shared with us.? But . . . . . rather than treating the symptoms with the scripting to re-write CVs whenever the opposite end of the consist is the lead engine, what if you spent your efforts deeper in the core of DCC++ developing the equivalent of the NCE consisting experience?

      I'm just throwing that out there, my professional it experience is in business/MRP/ERP/Finance systems . . . . . doubt I could do much of anything in newer languages!

      Best regards,

      Steve

      Steve Haas

      Snoqualmie, WA


 

Assuming that the engines always run together. Set both to run headlights based on consist address. Set both to never turn reverse headlight on.

If you're worrying about horns/bells, etc unfortunately it'll come from the wrong unit, though most people don't notice that even when engines a foot apari.


On Thu, Aug 2, 2018, 15:42 crusader27529 <crusader2752939@...> wrote:
Because of the sparse documentation about most of the advanced features of the suite of software that we call JMRI, I'm not sure if what I'd like to implement is even possible.

Here goes what I'd like to accomplish:

I have a question related to operating in a consist using CV19.

Assume that the consist has the lead and trailing loco coupled in opposite directions, no matter how many locos are in the consist.
?
The issue/question is how do you operate the consist when you want to operate the consist in the opposite direction, specificall concerning CV21-22 which defines which function keys are supposed to respond to the consist address. Obviously, the 'new' lead loco function keys would need to operate differently than when it was a traling loco.

I don't think there's a simple way to reverse operation and have the now lead loco to respond to the function keys as the now new lead loco.

So, although I've actually answered own question, it'd be nice to be able to define direction for function response when direction is changed. Also, you'd have to define which of the consist locos was the trailing loco, so other locos that are not the lead or trailing loco in the consist would still ignore the correct function keys.

So, can a macro type operation read CV values, and then change the CV 21 U& 22 values to accomplish the correct response to function buttons when reversing a consist? I completely understand that there may be different macros needed for various consist combinations, as trying to make it universal would be beyond the ability of most JMRI users.

And lastly, assuming such a macro could be implemented somehow, how would the macro be triggered?

Maybe the decoder manufactures need to help with this, but there's not much chance that would happen.


 

开云体育

I am coming to this late, but I wanted to make a comment about something noted here...


On Aug 5, 2018, at 6:44 AM, Nigel Cliffe <nigel.cliffe@...> wrote:

Making the above automatic, or almost automatic, on change of direction of a consist. I think it might be possible, but gets more complex. ??Needs a consist manager tool to add locos to a consist, and from that a means to define and alter the CV21/22 settings for the lead loco, writing the results to both the loco and the Roster (for later use).??? I think I could see how to sketch that out with scripts.?? ??


JMRI already HAS a consist tool:

It keeps track of what locomotives are in each consist, even between sessions. ?It does not, currently, add the consists to the roster ( there is an NCE specific tool that does ).

On the DCC++ system being discussed here the consist tool uses a consist creation packet to build the consist. ?I.e. it does not use an operations mode programming request. ?( there are decoders that prevent writing values to address CVs in operations mode programming requests ).

The consist tool also has a reverse button that will swap the order of the decoders, changing the directions as necessary. ?In theory it is possible to do other things, but we don’t currently do so.

One of the issues of making the reverse button change CV21 and CV22 is that not all decoder manufacturers implement CV21 and CV22 in the same way. ?Many manufacturers allow you to set individual bits for individual functions, but I know there is at least one decoder manufacturer that has a simple “functions respond to consist address” for any nonzero value.

Triggering change of direction on the script might end up as system dependent.? If you can track the throttle for the consist address, then the change of direction can be noted and the script triggered, but that may be system specific tracking of the throttle, rather than universal for any DCC system.?


A simple change in direction should not actually change the end of the consist where sounds come from. ?Remember that for the sounds to change ends, the engineer has to walk from one end to the other. ?That simply isn’t something that is done if, for example, you are switching cars at an industry on the road.

Paul