tc_link
Manage variable links between producer and consumer in TwinCAT. Supports batch link/unlink operations and auto-resolves dot-form paths to subitem format.
Instructions
Variable links (producer↔consumer); dot-form PLC subfields auto-resolve to XAE ^ subitem form. BATCH-FIRST: for more than one link use link_batch/unlink_batch — N ops in ONE DTE attach, failures-only roll-up by default ({count,succeeded,failed}; details:true for every row incl. resolved paths), instead of an attach per link. Actions, grouped single / batch: LINK — link (a=source, b=destination) / link_batch (links:[{a,b}]); UNLINK — unlink (a, optional b; a alone removes all its links) / unlink_batch (links:[{a,b?}]); resolve (report valid path forms for a — compact {originalPath,resolvedPath,resolved} on success; verbose:true for the attempts[] permutation list); links (a=item path; reports that item's current variable links — closes the discover→act→verify loop). link/resolve drop resolution detail by default — verbose:true restores it. Mutating batch verbs accept save:true to save once after the batch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | No | ||
| save | No | ||
| links | No | ||
| action | Yes | ||
| details | No | link_batch/unlink_batch: include ok:true rows (with resolved paths); default failures-only | |
| verbose | No | link/resolve: return the full resolution detail (producerResolution/consumerResolution or attempts[]); default compact | |
| autoResolve | No |