You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add symbolic (LID-based) access for S7-1200/1500 optimized DBs
S7-1200/1500 DBs with "Optimized block access" enabled (the TIA Portal
V13+ default) do not use fixed byte offsets — the PLC relocates
variables internally between downloads. Symbolic access navigates the
PLC's symbol tree using LIDs (Local IDs) instead.
Tag extensions:
- access_sequence: list[int] — LID path through the symbol tree
- symbol_crc: int — layout version validation (0 = skip)
- is_symbolic property — True when access_sequence is set
- Tag.from_access_string("8A0E0001.A", "REAL") classmethod using the
S7CommPlusDriver dot-separated hex format (AccessArea.LID.LID...)
S7CommPlus client:
- read_symbolic(access_area, lids, symbol_crc) — GetMultiVariables with
LID-based ItemAddress
- write_symbolic(...) — SetMultiVariables equivalent
- Module-level _build_symbolic_read/write_payload helpers
s7.Client routing:
- read_tag/write_tag detect Tag.is_symbolic and route to S7CommPlus
symbolic access; classic byte-offset tags continue to use legacy
- read_tags falls back to sequential when any tag is symbolic
(batching symbolic reads via optimizer is future work)
- snap7.Client.read_tag raises NotImplementedError for symbolic tags
(legacy S7 has no symbolic support)
Experimental — the wire implementation follows S7CommPlusDriver but
has not been validated against a real optimized-DB PLC yet.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments