Five steps turn a sequence into deployable PLC code: declare variables, link them to equipment channels, assign physical addresses, translate to your target language, and import the result. By the end you will know which command to run at each stage, which export format to pick, and how to hand the file off to CODESYS, TwinCAT, or any other IEC 61131-3 environment.
| Stage | Goal | Primary command |
|---|---|---|
| 1. Declare | Reference variables in sequences and machine config | (write in main.py, .seq, or .machine) |
| 2. Link | Assign variables to equipment channels | Machine editor Architecture tab |
| 3. Address | Map variables to PLC memory | Assign Addresses Automatically |
| 4. Translate | Generate PLC code | Translate to Target Language |
| 5. Export | Package for the PLC IDE | Export Project |
Every signal that enters or leaves the PLC needs a variable. AutomationView does not create variables from a panel button - it auto-registers any name referenced in a transition condition or action when the file is parsed, plus the instances and globals declared in your machine configuration. So the workflow is simply to write the sequence and configure the machine; the variables follow.
| Category | Typical use |
|---|---|
| Input | Sensor, push-button, encoder feedback |
| Output | Solenoid, contactor, indicator lamp |
| Local | Internal flag, counter, timer instance |
The Variables panel groups variables by category. Filter via the Command Palette:
Toggle between Set Global View (project-wide) and Show Active File Variables (current file only) from the panel header.
Right-click a variable for quick actions: Rename Variable, Variable Info, Get Variable Value, Set Variable Value.
Linking ties a logical variable to a physical channel exposed by a module. This is done in the Machine editor, on its Architecture tab. The mapping is saved inside the .machine file.
.machine file in the Machine editor.The assignment is written back to the .machine file as a channel assignment. AutomationView then computes the variable's %I/%Q address from the channel's direction, bit size, and offsets.
| Benefit | Effect |
|---|---|
| Catalog-driven sizing | The channel's bit size selects the address size (X / B / W / D) |
| Computed address | The %I/%Q address is derived from the channel, not typed by hand |
| Documentation | The exported program carries the resulting I/O declarations |
See Equipment Catalog for catalog management.
Once variables are declared and linked, map them to PLC memory.
Run AutomationView: Assign Addresses Automatically from the Command Palette. AutomationView:
The palette command computes and counts the assignments and opens the Architecture tab. To persist them in the
.machinefile, apply the assignments from the Architecture tab.
Each channel yields an address of the form % + area + size + byte offset (+ .bit for bit channels). Area is I for inputs and Q for outputs; size is X (<= 1 bit), B (<= 8 bits), W (<= 16 bits), or D (> 16 bits). Typical digital I/O on a CODESYS target:
| Variable | Direction | Address |
|---|---|---|
S_HOME |
Input | %IX0.0 |
S_OUT |
Input | %IX0.1 |
Y_EXTEND |
Output | %QX1.0 |
Y_RETRACT |
Output | %QX1.1 |
For channels that must take a specific variable, assign them directly in the Architecture grid: pick the variable per channel from the dropdown. The address is computed from the channel.
Run AutomationView: Validate All Addresses. It reports the result in a notification:
| Issue | Meaning |
|---|---|
| Two variables on the same address | Conflict |
| Variable mapped to a non-existent channel | Unassigned / unresolvable |
The notification shows the conflict and unassigned counts. It does not write to the Problems panel. Clear conflicts before translating.
Translation reads your .seq file and produces PLC code.
Set the default once in Settings:
"automationview.defaultPLCTarget": "codesys"
Supported targets:
| ID | Brand |
|---|---|
siemens-s7 |
Siemens S7-1200 / S7-1500 |
allen-bradley |
Allen-Bradley ControlLogix / CompactLogix |
schneider |
Schneider Modicon M340 / M580 |
beckhoff |
Beckhoff TwinCAT 3 |
codesys |
CODESYS V3 |
omron |
Omron NJ / NX |
mitsubishi |
Mitsubishi iQ-R / iQ-F |
generic |
Generic IEC 61131-3 |
| How | Steps |
|---|---|
| Editor title bar | Click the Translate icon while a .seq file is open |
| Command Palette | Run AutomationView: Translate to Target Language |
Watch mode re-translates the sequence every time you save it.
| Setting | Default | Description |
|---|---|---|
automationview.translation.watchMode |
false |
Enable auto re-translation on save |
automationview.translation.watchDebounceMs |
500 |
Debounce delay in ms |
automationview.translation.openAfterTranslate |
false |
Open the translated file on success |
Stop watch mode for the session with AutomationView: Stop Live Translation.
| Use one-shot when | Use watch mode when |
|---|---|
| Iterating on hardware addresses | Iterating on sequence logic |
| Translating before a code review | Demonstrating live behaviour |
| Producing a frozen release artefact | Pairing with engineers reviewing translated ST |
The export step packages translated files for handoff. Choose the format that matches your downstream tool.
| Format | Setting value | Best for | Notes |
|---|---|---|---|
| PLCopen XML | plcopen-xml |
CODESYS, TwinCAT, EcoStruxure, Logix Designer (via converter) | Recommended default; preserves SFC structure |
| IEC Structured Text | iec-st |
Any IEC 61131-3 ST editor | Loses graphical SFC, keeps logic |
| CSV | csv |
Auditing, address-list review, ERP intake | Variables and addresses only |
| JSON | json |
Custom tooling, CI pipelines, dashboards | Machine-readable full project tree |
Set the default once:
"automationview.export.defaultFormat": "plcopen-xml"
| Goal | Command |
|---|---|
| Export the active sequence | AutomationView: Generate PLC Output |
| Export the full project bundle | AutomationView: Export Project |
Export every .seq in one call |
AutomationView: Export All Sequences |
| Print or export the sequence as a diagram sheet | Toggle Print Mode (editor title bar) or Ctrl+P / Cmd+P |
The output folder is controlled by your machine target configuration. By default it sits next to machine.machine under export/.
To package the project on every change without lifting a finger:
| Setting | Default | Description |
|---|---|---|
automationview.export.autoExport |
false |
Trigger full project export on sequence change |
automationview.export.autoExportDebounceMs |
2000 |
Debounce delay before auto-export |
automationview.export.autoExportOnSave |
false |
Export individual sequences on every save |
Drop the exported file into your PLC environment.
.xml.If your tool only accepts ST, set the default format to iec-st before exporting and paste the file into the appropriate POU.
Always re-run the address validator after import. Some IDEs renumber unassigned channels on import.