[ablegacy] AbLegacy — PLC-5 octal I/O addressing #321
Reference in New Issue
Block a user
Delete Branch "auto/ablegacy/1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
PLC-5 RSLogix 5 uses octal for I:/O: word and bit indices; SLC / MicroLogix use decimal. Today the parser silently accepts both as decimal, misreading real PLC-5 configs.
AbLegacyPlcFamilyProfile.cs— newOctalIoAddressingbool.truefor Plc5 only; false for Slc500 / MicroLogix / LogixPccc.AbLegacyAddress.cs— new family-aware overloadTryParse(string?, AbLegacyPlcFamily?). Parses I:/O: word + bit indices as octal when the family enables it. Defers numeric parsing of the bit suffix until the file letter is known so it picks the right base. OriginalTryParse(string?)preserved (decimal everywhere) for back-compat.AbLegacyDriver.cs— three call sites updated (read decode, write decode,EnsureTagRuntimeAsync) to passdevice.Options.PlcFamily.ToLibplctagName()continues to emit decimal — libplctag's PCCC layer expects decimal regardless of the source format. The record stores decimal values internally.AbLegacyDriverOptions.cs.Test plan
dotnet build src/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy— clean (0 / 0)dotnet test tests/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Tests— 110 / 110 passed, including new positives (I:001/17→ word=1 bit=15;I:010/10→ 8/8), octal-digit negatives (I:8/0,I:0/9), SLC500 decimal back-compat, profile flag assertion🤖 Auto-generated by the Mode-B execution loop. Closes #244.
Closes #244