Repository navigation
Conversation
The (vendor, product_type, product_code) CIP identity triple does not encode a module's hardware "series" letter (/A, /B, ...) -- Rockwell ties the series to a firmware-major-revision breakpoint instead, and that breakpoint differs per catalog family. catalog_number_for_identity() could therefore only ever resolve one name per triple, which is wrong whenever the same triple has shipped as more than one series (verified fleet-wide: 5069-OB16/A vs /B, 1734-IB8S/A vs /B, 1734-OB8S/A vs /B, 1769-SDN/A vs /B, 1734-AENTR/A vs /C all collide on their triple). - catalog_number_for_identity() gains an optional major_rev= parameter; when given, it is tried as a (v, t, c, major_rev) key before falling back to the plain (v, t, c) key, so a revision-aware table resolves the exact series while an old plain table keeps working unchanged. - load_external_catalog()/merge_catalog() now accept a 4th colon/array key component (the major revision) alongside the existing 3-part form. - ModuleBuilder.build() passes major_rev=major (the firmware major byte it already parses from the extended module record) through to catalog_number_for_identity(), so every module benefits automatically. - resources/external_catalog.rockwell_logix_designer.json: 1,665 base + 1,054 revision-specific CIP-identity -> catalog-number entries, mined directly from a locally-installed Logix Designer's own catalog data (RSLogix 5000\Module Profiles\**\*.xml, the modern per-catalog AOP format, merged with RSLogix 5000\ENU\v20\Bin\*.xml, the legacy monolithic "Classic" format kept for pre-v21 project compatibility) -- not reverse-engineered from customer L5X files. Cross-checked against 136 tuples verified from real ACD/L5X ground-truth pairs with no disagreements once series-suffix placement is normalized. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The ModuleBuilder.build() change is a one-line pass-through (major_rev=major); the resolution logic it depends on is already exhaustively covered by the pure-function tests in test_catalog_numbers.py and test_catalog_external.py. Building a synthetic binary module record just to re-prove that same logic through a real ModuleBuilder added more test-maintenance weight than the one-line change warranted. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Owner
|
@colinlove, Thanks for the PR, however, I don't think that I will be able to merge it as it has used copyrighted material to produce it. I will get through the rest of the PRs when I have time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
catalog_number_for_identity()resolves a module's catalog number purely from its(vendor, product_type, product_code)CIP identity triple. That triple does not encode the hardware "series" letter (/A,/B, ...) — Rockwell doesn't allocate a new product code for a new series, it ties the series to a firmware-major-revision breakpoint instead, and that breakpoint differs per catalog family.This means the current one-triple-to-one-name table is provably wrong whenever a single triple has shipped as more than one series. Confirmed against a fleet of 3,092 real ACD files with L5X ground truth:
5069-OB16/Avs/B,1734-IB8S/Avs/B,1734-OB8S/Avs/B,1769-SDN/Avs/B, and1734-AENTR/Avs/Call collide on their triple.Fix
catalog_number_for_identity()gains an optionalmajor_rev=parameter. When given, it's tried as a(v, t, c, major_rev)key before falling back to the plain(v, t, c)key, then theCIP-...placeholder. Omitting it reproduces the exact old behavior — fully backward compatible.load_external_catalog()/merge_catalog()now accept a 4th colon/array key component (the major revision) alongside the existing 3-part form.ModuleBuilder.build()passesmajor_rev=major— the firmware major byte it already parses from the extended module record — through to the resolver, so every module benefits automatically with no other call-site changes (ProcessorTypederivation downstream just reusesModule.catalog_number).Data
resources/external_catalog.rockwell_logix_designer.json: 1,665 base + 1,054 revision-specific entries, mined directly from a locally-installed Logix Designer's own catalog data — not reverse-engineered from customer L5X files:RSLogix 5000\Module Profiles\**\*.xml)RSLogix 5000\ENU\v20\Bin\*.xml), kept by the installer for opening pre-v21 projects, which also covers some controller/older identities the modern tree no longer lists separatelyCross-checked against 136 tuples verified from real ACD/L5X ground-truth pairs with no disagreements once series-suffix placement is normalized (Designer's own
<CatalogNumber>tag is the bare name; the series lives in a separate<Variant MajorRev="N"><Series>block, which is exactly what the*:major_reventries capture).Testing
Added pure-function unit tests to
test_catalog_numbers.py(major_rev resolution order, fallback when the specific revision is unknown, zero-identity unaffected) andtest_catalog_external.py(4-part key loading, and a test that loads the bundled Rockwell resource file and resolves the worked5069-OB16/Avs/Bexample end-to-end). Full suite: 137 passed, 2 skipped (path-relative, expected outsidetest/), 7 pre-existing errors intest_database.py/test_unzip.pyconfirmed unrelated (they fail identically on unmodifiedmain).🤖 Generated with Claude Code