AbLegacy Test Connect probe passes the raw ProbeAddress (PLC-5 octal probe address read as decimal) #660
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Found by the #659 review (2026-10-09), pre-existing.
AbLegacyDriverProbe.cs:97-106(Test Connect) passesProbeAddressto the tag factory without normalising it through the family-awareAbLegacyAddressparser, unlike the driver's own read/write/probe paths. On PLC-5 (and LogixPccc), I/O element numbers are authored in octal and must be converted to decimal before reaching the transport, so a probe address likeI:017would address element 17 decimal instead of 15.Impact is narrow: the default probe
S:0is unaffected, and only a PLC-5 Test Connect with a custom octal I/O probe address is wrong. Fix: parse/normalise the probe address with the device's family (same as the driver probe loop) before creating the runtime; add a unit test with a PLC-5 octal probe address.Fixed and pushed in master
ea220363(mergeede40b6c, branch commitc0fbe746). Test Connect now normalises the probe address through the same family-aware parser as the driver's probe loop (newAbLegacyProbeAddress.Normalise→AbLegacyAddress.TryParse(...).ToLibplctagName()), so a PLC-5I:017probe becomesI:15(octal → decimal) and then composes with the #659 libplctag translation (I1:15). An unparseable probe address now returns a clean Ok=false ("not a valid AbLegacy address for this PLC family") instead of throwing. SLC/MicroLogix/LogixPccc unchanged. Tests: AbLegacyDriverProbeTests 14/14 (7 fail with the fix reverted); AbLegacy.Tests 595 green; full suite 13214 passed / 0 failed. Docs: AbLegacy.md.