tc_mapping
Export all variable mappings to XML for backup, import XML to add links, or delete all variable links project-wide.
Instructions
Bulk variable-mapping (ALL links) ops on the loaded TwinCAT project via ITcSysManager2/3, whole-project (no tree path): produce (read-only) — ProduceMappingInfo serializes every current variable link/mapping to ONE XML blob (the IDE's "Export Mapping Information"); the blob is returned as raw XML. consume (xml) — ConsumeMappingInfo re-applies/merges a previously produced blob, ADDING links; MUTATES the offline config only (no runtime impact until a later twincat_activate_configuration); optional save:true saves the solution after. clear — ClearMappingInfo deletes ALL variable links project-wide; destructive, GUARDED: requires confirm="ALLOW_TWINCAT_DELETE" (reuses the existing delete token); optional save:true. These are PROJECT-WIDE config-tree ops, NOT runtime writes. SAFETY: the mapping blob spans the whole project and CAN include TwinSAFE I/O image links — produce/consume/clear may touch safety-related links; by policy nothing should write toward safety, so run produce FIRST as a backup and treat the blob as opaque (export -> store -> consume round-trip). The exact XML schema is undocumented; test-import hand-edited blobs in the IDE before relying on them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | No | ||
| save | No | ||
| action | Yes | ||
| confirm | No |