Repository navigation
Emit L5X for readable objects instead of aborting on edge cases - #62
Merged
hutcheb merged 1 commit intoNov 3, 2026
Merged
Conversation
The ACD->L5X export aborted on real projects and, when it did run, dropped all ladder logic for some firmware layouts. Three targeted fixes make it emit valid L5X for everything readable and report what it cannot: - Classify a tag Produced/Consumed only when its 0x6B link is a full 4-byte object reference; a short stub now stays Base instead of raising in _legacy_linked_data and aborting the whole controller export. - Make the controller-scoped tag loop resilient: a tag that cannot be faithfully reconstructed is recorded in controller._skipped_tags and skipped, so the rest of the project still exports (nothing is guessed). - Fall back to RLL for a routine that reads back TypeLess but carries "Rung NT" ladder regions, so its rungs are serialised instead of dropped. Verified against a known project: well-formed L5X with 100% exact rung-text match vs the Studio 5000 export; the existing test suite passes unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
The ACD->L5X export aborted on real projects and, when it did run, dropped all ladder logic for some firmware layouts. Three targeted fixes make it emit valid L5X for everything readable and report what it cannot:
Verified against a known project: well-formed L5X with 100% exact rung-text match vs the Studio 5000 export; the existing test suite passes unchanged.