Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Locked JMRI Not Identifying Locomotives Properly
I have many locomotives with proper road numbers that overlap with others. For example, I have a Kato NYC PA unit with the number of 4301, but I also have a Kato SD70ACE in MRL with the same number.? I have many instances of this same situation.? There must be a better way to assign the identity of a locomotive so that these miss-identities do not happen. I have 62 of these occurrences. This is where better indexing could keep this from happening.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
开云体育?????? I do a lot of installs for others so it is not unusual to get locos with the same number. My method of assigning the file name would be in your case:- NYC 4301 MRL 4301 I then have the owners initials after the number - so NYC 4301 xx and MRL 4301 yy This might help.? You can also sort the roster either by File ID or Loco number. Gerry
On 3/01/2019 7:57 am, dcesharkman via
Groups.Io wrote:
I have many locomotives with proper road numbers that overlap with others. For example, I have a Kato NYC PA unit with the number of 4301, but I also have a Kato SD70ACE in MRL with the same number.? I have many instances of this same situation.? There must be a better way to assign the identity of a locomotive so that these miss-identities do not happen. I have 62 of these occurrences. This is where better indexing could keep this from happening. -- Gerry Hopkins MMR #177 FNMRA Great Northern Downunder NMRA Australasian Region Contest & AP Chairman Web Administrator |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
开云体育Name?
I name my entries with the following format which addresses your issues. Road Name, Road Number, type of engine. So IC 4000 SD40-2 as an example.?
At my club we preface the names with the members initials.?
David Klemm
From: [email protected] on behalf of dcesharkman via Groups.Io <dcesharkman@...>
I have many locomotives with proper road numbers that overlap with others. For example, I have a Kato NYC PA unit with the number of 4301, but I also have a Kato SD70ACE in MRL with the same number.? I have many instances of this same situation.? There must
be a better way to assign the identity of a locomotive so that these miss-identities do not happen. I have 62 of these occurrences. This is where better indexing could keep this from happening.
Sent: Wednesday, January 2, 2019 14:57 To: [email protected] Subject: [jmriusers] JMRI Not Identifying Locomotives Properly ?
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The Identify button is a crude identification procedure because it relies on reading CV information from any arbitrary decoder and matching it to the roster entries.
toggle quoted message
Show quoted text
What identification is in the roster entry is limited. No matter what manner the roster entry has been created (read type from decoder or simple manual selection), the only (hopefully reliable) information is the DCC address (in CVs 29,1,17&18) stored in the roster entry (provided the user either read or set and wrote that). There's no guarantee that CVs 7 and 8 have been read by the user either (however the identify procedure does attempt to match them as well - hopefully only if non-zero, I haven't checked the code). Any attempt to read (and store) ProductID from a decoder during Identify is not only time consuming but not gaining anything because again there's no guarantee the user used the "Read type from Decoder" rather than manually picking (possibly incorrectly). There's no way JMRI can tell the difference between liveries etc. from the decoder. Furthermore many Sound decoders share ProductIDs between decoders with different sound projects, or have differing ProductIDs due solely to hardware batch numbers. -- Dave in Australia On 3 Jan 2019, at 7:57 AM, dcesharkman via Groups.Io <dcesharkman@...> wrote: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
开云体育??????? Here is just a small section of my roster - all have the same Road identification, most have the same road number, but different decoders. This roster only has 1,405 entries - some N Scale, Some HO and Some O scale. These locos are all green.
The locos with QSI decoders were
factory fitted the others were fitted "after market" - in numerous
cases they were upgrades to replace the QSI decoders. There are 63
locos in this group - not counting other roads with identical
numbers such as UP and Rio Grande.
How could you make a database of all
locos - the decoder is the only part of the equation that can be
identified with Decoder Pro. It is only in recent years that
Decoder Manufacturers have added an extra CV to identify the
particular model of decoder.
Just my thoughts
Gerry
On 3/01/2019 12:35 pm, dcesharkman via
Groups.Io wrote:
This is why the application needs a database engine under the hood. That would also allow picklists for road names and locomotive models. That would make it very easy for make an indexable ID system.? -- Gerry Hopkins MMR #177 FNMRA Great Northern Downunder NMRA Australasian Region Contest & AP Chairman Web Administrator |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
开云体育I just reread this and are you thinking that once you identify the loco and create an entry, that any of that descriptive data is written to the decoder? ?So that the next time JMRI pulls up the correct entry?
The only descriptive data on the decoder is the CVs set by the manufacturer. Many times the same code is used for several different decoders.?
What we have is the solution given the source data.?
David Klemm
? From: [email protected] on behalf of dcesharkman via Groups.Io <dcesharkman@...>
I have many locomotives with proper road numbers that overlap with others. For example, I have a Kato NYC PA unit with the number of 4301, but I also have a Kato SD70ACE in MRL with the same number.? I have many instances of this same situation.? There must
be a better way to assign the identity of a locomotive so that these miss-identities do not happen. I have 62 of these occurrences. This is where better indexing could keep this from happening.
Sent: Wednesday, January 2, 2019 14:57 To: [email protected] Subject: [jmriusers] JMRI Not Identifying Locomotives Properly ?
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
...and is the discussion about the DCC ID or the JMRI ID? I am totally confused.
-- Stefan Bartelski Home layout: The Blue Ridge Line, an HO representation of the L&N Etowah Old Line from Etowah to Elizabeth, set in 1986 9under construction) Modular Layout: Shoofly module of the Country RRoads Modular group |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
That is the problem. There's no way of uniquely determining the JMRI ID (user-created and stored in the roster entry) from what is stored in (and we can read back from) the decoder (DCC ID, CV7, CV8). (That is what the original poster asked for.)
toggle quoted message
Show quoted text
JMRI attempts to do just that. In some cases you may be lucky, in other cases (see Gerry's, mine is similar) you are going to get many matches to the only readable information. The Identify button is a blunt instrument. If it works for you, count yourself lucky. -- Dave in Australia On 3 Jan 2019, at 2:19 PM, Stefan ` Bartelski <stefan@...> wrote: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The identify-locomotive engine is here:
It’s just a simple state machine that reads CV29 to decide whether the short or long address is in use, then reads the appropriate CVs to get the address. It’s used in several places, but a typical one is here: where the address is used to do a selectLoco operation. In turn, that selectLoco operation knows whether one or more matched. That would be a good place for the program to reason about whether any additional reads (CV7, CV8, etc) would be able to distinguish the different choices, and if need be, spend the time to do them. If somebody wants to write that, the process is described here: and related pages in the left index. Bob -- Bob Jacobsen jacobsen@... +1-510-708-5988 AIM, Skype JacobsenRG |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
开云体育The "Identify" button on the main DecoderPro window already reads the following CVs, in the order listed below: CV29 CV17 & CV18 OR CV1 (depending on the result from CV29) CV7 CV8 All the uses cases I checked (long and short addresses, no address match, unique address match, multiple address match) exhibited this behaviour. So the "Identify" button is already reading CVs 7 and 8. We don't need to add them. I don't have time to check the code at present to see if it actually uses the read values of ?CVs 7 and 8 nor in what way. Tea time over here now and time to slow down for the day... Not to mention the thunderstorms starting... --? Dave in Australia On 3 Jan 2019, at 4:35 PM, Bob Jacobsen <rgj1927@...> wrote:
In turn, that selectLoco operation knows whether one or more matched. That would be a good place for the program to reason about whether any additional reads (CV7, CV8, etc) would be able to distinguish the different choices, and if need be, spend the time to do them. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
It’s true that IdentifyLoco reads CV7 and CV8, but in at least some of the places in the code it does not use those values. Other places it does use them.
For example, java/src//jmrijmrit/roster/swing/RosterFrame.java has a selectLoco(int dccAddress, boolean isLong, int mfgId, int modelId) that uses the CV7/CV8 information when multiple values would otherwise match just the address. See the code right below the "//Still more than one possible loco, so check against the decoder family” comment. Other places _don’t_ use the CV7/CV8 information. For example: java/src//jmri/jmrit/symbolicprog/KnownLocoSelPane.java java/src//jmri/jmrit/symbolicprog/CombinedLocoSelPane.java java/src//jmri/jmrit/symbolicprog/CombinedLocoSelTreePane.java which just use the address. Depending on what code is selecting the locomotive, the selection might use CV7 and CV8 or it might not. RosterFrame (which does use CV7 and CV8, at least as far as I can see) handles the “Identify” button on the upper left of the main DecoderPro roster pane. So that should be doing what’s requested already. It’s not clear to me what invokes the other code, but if somebody is seeing CV7/CV selection not working, that might be why. If somebody wanted to read the ProductID from the decoder, that could be done only when needed by putting another check on the number left selected at the end fo the code in RosterFrame, and perhaps in the other places. Bob On Jan 2, 2019, at 10:28 PM, Dave Heap <dgheap@...> wrote:-- Bob Jacobsen rgj1927@... |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
开云体育Reading the ProductID from a decoder is not a simple operation as it is manufacturer-specific. The code is in: Haven't got a computer on at present so can't refresh my memory on the details but it would need to be a case of using that class. We wouldn't want that code to be duplicated elsewhere. But I should be heading towards bed... --? Dave On 3 Jan 2019, at 6:38 PM, Bob Jacobsen <rgj1927@...> wrote:
If somebody wanted to read the ProductID from the decoder, that could be done only when needed by putting another check on the number left selected at the end fo the code in RosterFrame, and perhaps in the other places. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
We also need to be careful to not lead a user into jumping to conclusions.
Just because a loco on the programming track returns an exact match to either: A) DCC Address alone. or B) DCC Address plus CVs 7 & 8. or C) DCC Address plus CVs 7 & 8 plus ProductID. Does not unequivocally mean that the loco under test is represented by that roster entry. 1) It's possible that the loco under test has had its DCC Address accidentally reset or changed and you have a false match. 2) It's possible that the loco under test doesn't have a roster entry but its DCC Address (and possibly also other items listed above) happen(s) to match an existing roster entry. It is not uncommon to encounter user confusion between the roles of the "Identify" button versus the "Read Type from Decoder" button, since both of them involve the concept of identifying something. We tend to assume others have the background knowledge we do. Another unrelated gotcha is that if you have a roster group selected and an "Identify" returns a match to a non-visible entry the "Identify" will succeed but no loco will be seen to be selected. Dave |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
My experience is that the "Identify" button currently does a "first match" and doesn't flag multiple matches (unlike "Read Type from Decoder").
toggle quoted message
Show quoted text
In my testing I often create multiple test entries (of the same or another decoder) without changing the address from the default of 3. I occasionally hit "Identify" without thinking and get a first-match. -- Dave On 3 Jan 2019, at 9:58 PM, Dave Heap via Groups.Io <dgheap@...> wrote: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
开云体育I've tried (unsuccessfully) to sleep on this but have realised that we've ended up in an old area of misunderstanding. We need to go back to basics of the problem and what is or is not possible. The Problem: On 3 Jan 2019, at 7:57 AM, dcesharkman via Groups.Io <dcesharkman@...> wrote: I have many locomotives with proper road numbers that overlap with others. For example, I have a Kato NYC PA unit with the number of 4301, but I also have a Kato SD70ACE in MRL with the same number.? I have many instances of this same situation.? There must be a better way to assign the identity of a locomotive so that these miss-identities do not happen. I have 62 of these occurrences. This is where better indexing could keep this from happening. From this we have interpreted that ?dcesharkman has multiple locos with the same DCC address and he wants the "Identify" button in JMRI (at the top left of the main DecoderPro window or the Roster window in PanelPro) determine (by reading decoder CVs) which is the correct roster entry for those locos that happen to have identical DCC addresses. What identifying information we can read from decoder CVs: - The currently-assigned DCC address. This can be done by reading CV29 and then either CV1 or CVs 17 & 18. - The NMRA-assigned ManufacturerID. This is stored in CV8. - A version number from CV7. The usage and interpretation of this is up to the manufacturer. In some cases it indicates a decoder model, in other cases it represents a firmware version (which may be user-updatable by manufacturer-supplied hardware/software). In some cases the manufacturer chooses to not use this CV for identification??but instead store identifying information in other CVs, or not at all. - In some cases (where the manufacturer implements and documents them) we can read what we call a ProductID from special CVs and some calculations. When we do a "New Loco"->"Read Type from Decoder" we attempt to read ManufacturerID, VersionID and ProductID (if implemented), a task attempted by our IdentifyDecoder Java class,?and try to match these against known values in our decoder definition index file to find a correct decoder definition (characterised by the unique combination of a "family" name and a "model" name). - In some cases this may lead to a unique identification. - In many cases this may lead to multiple possibilities, leaving the user to make a manual choice of decoder model. A given decoder model may cover a range of VersionIDs and possibly more than one ProductID. So we can't store either of these in the roster entry. - In many cases a user already knows the exact decoder model and doesn't even bother with the "Read Type from Decoder " procedure, but simply manually picks the known family/model. As above, a?given decoder model may cover a range of VersionIDs and possibly more than one ProductID. So we can't store either of these in the roster entry. See: <> The identity-related information we store in a Roster Entry. - The user-created ID string: This is entirely up to to the user but JMRI ensures there are no duplicates in a user's roster. There is no way we can store this into decoder CVs. - The currently-assigned DCC loco address, as per what has been read and/or written in the relevant NMRA address CVs. - The "family" and "model" unique combination as per above. (Note that using this we can retrieve the ManufacturerID from our decoderIndex.xml file.) - Note that (as briefly explained in the following link) we do not directly store ManufacturerID, VersionID or ProductID. To do so will cause problems as one or more of. these are often not reliably and uniquely determined at roster entry creation time and furthermore are subject to change (even in existing decoders) by external events outside our control (such circumstances have occurred and will continue to occur). <> - However we do have complete control over our assigned?"family" and "model" names and we have procedures already in place to manage needed changes in both our decoder definitions and a user's existing roster entries. <> Can we solve?dcesharkman's problem? Not completely. 1) We can read the DCC address from the decoder and try to match against roster entries. But that will not yield a unique match in his (or many other cases). 2) We can supplement (1) by using the IdentifyDecoder class to retrieve current values of ManufacturerID, VersionID and ProductID (if applicable) and attempt to derive the "family" and "model" to narrow our list of roster entries from (1). Unfortunately?ManufacturerID, VersionID and ProductID do not always return a single unique match. We may end up with another list. E&OE Dave |
to navigate to use esc to dismiss