From an empty workspace to a translated, PLC-ready program for a real pneumatic pick-and-place station.
You will define the hardware, declare I/O, build the sequence, validate it with emulation, assign addresses, translate to your target PLC, and export the final code. The end result is a working .seq program, a configured .machine file, a fully addressed I/O list, and a PLCopen XML file ready to import into your PLC IDE.
A two-axis pneumatic pick-and-place that transfers a part from a feeder to an outfeed conveyor.
Hardware:
S_Z_UP, S_Z_DOWNS_X_HOME, S_X_OUTS_VAC_OKB_STARTB_ESTOPY_Z_DOWN, Y_X_OUT, Y_VACUUMCycle:
| Item | Version |
|---|---|
| AutomationView | 0.4.0 or later |
| Festo equipment plugin | Installed (for the catalog entries used below) |
| CODESYS translation provider | Installed (for the PLC export step) |
If you do not yet have these plugins, install them from the Extensions panel before starting. See Extensions.
pick-and-place.AutomationView scaffolds a new workspace:
pick-and-place/
machine.machine # Machine definition (equipment, I/O modules, PLC target)
main.seq # Main sequence
main.py # Python project entry
The Machine Explorer view in the left sidebar should now show the project tree.
Open machine.machine. AutomationView opens the visual Machine Config Editor by default. Use the title-bar toggle to switch between visual and text views (commands AutomationView: Open Visual Editor and AutomationView: Open Text Editor).
In the Controller panel, choose a real PLC target:
| Field | Value |
|---|---|
| Brand | CODESYS V3 |
| CPU | Generic SoftPLC |
| Cycle time | 10 ms |
Add two modules from the catalog:
| Slot | Module | Channels |
|---|---|---|
| 0 | DI 8x24VDC | 8 digital inputs |
| 1 | DO 8x24VDC/0.5A | 8 digital outputs |
Open the Equipment Catalog in the AutomationView sidebar. Expand Festo > Pneumatic Cylinders and drag the following items onto the machine:
| Equipment ID | Role |
|---|---|
festo.dsbc-32-100 |
Z-axis cylinder |
festo.dsbc-32-200 |
X-axis cylinder |
festo.vacuum-vad-1-4 |
Vacuum gripper |
Right-click any catalog item and choose Copy Equipment ID if you prefer to paste the ID into the machine file by hand.
Save the file. The Machine Explorer now lists three actuators with their I/O channels exposed.
Variables are picked up from your sequence files: any name referenced in a transition condition or an action is registered automatically. You can also declare them up front from the Variables panel in the sidebar - useful when you want to pin types, addresses, or comments before writing the SFC.
Open the Variables panel and add the following entries. Use the panel header to switch between Global (project-wide) and Active (current sequence) modes.
| Name | Comment |
|---|---|
S_Z_UP |
Z cylinder retracted |
S_Z_DOWN |
Z cylinder extended |
S_X_HOME |
X cylinder at home |
S_X_OUT |
X cylinder at outfeed |
S_VAC_OK |
Vacuum confirmed |
B_START |
Cycle start push-button |
B_ESTOP |
Emergency stop (NC) |
| Name | Comment |
|---|---|
Y_Z_DOWN |
Z down solenoid |
Y_X_OUT |
X advance solenoid |
Y_VACUUM |
Vacuum valve |
| Name | Comment |
|---|---|
ready |
Machine in home position |
Switch the panel toggle to Set Global View to confirm all eight inputs and three outputs are visible across the project.
Open main.seq. The visual editor opens. You will assemble the cycle with five steps, six transitions and matching actions.
Click anywhere in the canvas and use the single-key shortcuts:
| Key | Adds |
|---|---|
| I | Initial step |
| S | Standard step |
| T | Transition |
| A | Action on the selected step |
| C | Comment |
Build this layout:
| Step | Type | Name | Comment |
|---|---|---|---|
| 0 | Initial | IDLE |
Home position, wait for start |
| 1 | Step | PICK_DOWN |
Lower Z over feeder |
| 2 | Step | GRIP |
Vacuum on, wait for confirmation |
| 3 | Step | TRANSFER |
Raise Z, move X to outfeed |
| 4 | Step | RELEASE |
Lower Z, release part, raise Z |
| 5 | Step | RETURN |
Move X back to home |
from automation_machine import Sequence, StepType, ActionInstruction
class PickAndPlace(Sequence):
def setup(self):
idle = self.add_step(StepType.INITIAL, name="IDLE")
pick_dn = self.add_step(name="PICK_DOWN")
grip = self.add_step(name="GRIP")
xfer = self.add_step(name="TRANSFER")
release = self.add_step(name="RELEASE")
retn = self.add_step(name="RETURN")
Connect the steps with the following conditions. In the visual editor, select the source step, press T, then click the target step and type the condition.
| From | To | Condition |
|---|---|---|
IDLE |
PICK_DOWN |
B_START AND S_Z_UP AND S_X_HOME AND NOT B_ESTOP |
PICK_DOWN |
GRIP |
S_Z_DOWN |
GRIP |
TRANSFER |
S_VAC_OK AND vac_dwell.Q |
TRANSFER |
RELEASE |
S_Z_UP AND S_X_OUT |
RELEASE |
RETURN |
S_Z_UP AND NOT S_VAC_OK |
RETURN |
IDLE |
S_X_HOME |
Select each step and press A to add actions. Use the Non-stored (N) qualifier unless noted otherwise.
| Step | Qualifier | Target / Instruction | Comment |
|---|---|---|---|
IDLE |
N | ready |
Machine in home position |
PICK_DOWN |
N | Y_Z_DOWN |
Extend Z down |
GRIP |
S | Y_VACUUM |
Latch vacuum on |
GRIP |
N | TON vac_dwell (200 ms) |
Stabilise vacuum |
TRANSFER |
S | Y_X_OUT |
Latch X advance |
RELEASE |
R | Y_VACUUM |
Drop part |
RELEASE |
N | TON release_dwell (150 ms) |
Vent vacuum |
RETURN |
R | Y_X_OUT |
Retract X |
The S (Set) and R (Reset) qualifiers latch outputs across multiple steps - the vacuum stays on while the arm transfers, the X advance stays on while it lowers. See Qualifiers Overview.
Save the file. The visual editor renders the full SFC diagram in real time.
B_START to TRUE by clicking its value field.Follow this script to validate each transition:
| Action | Expected result |
|---|---|
Set B_START = TRUE, S_Z_UP = TRUE, S_X_HOME = TRUE |
IDLE -> PICK_DOWN, Y_Z_DOWN turns on |
Set S_Z_DOWN = TRUE, S_Z_UP = FALSE |
PICK_DOWN -> GRIP, Y_VACUUM latches on |
Set S_VAC_OK = TRUE, wait 200 ms |
GRIP -> TRANSFER, Y_X_OUT latches on |
Set S_Z_UP = TRUE, S_X_OUT = TRUE |
TRANSFER -> RELEASE, Y_VACUUM resets |
Set S_VAC_OK = FALSE, S_Z_UP = TRUE |
RELEASE -> RETURN, Y_X_OUT resets |
Set S_X_HOME = TRUE |
RETURN -> IDLE |
Use Ctrl+Shift+F5 (Cmd+Shift+F5 on macOS) to reset the emulation and start over from the initial step.
When the cycle completes cleanly, press Shift+F5 to stop.
| Symptom | Likely cause | Fix |
|---|---|---|
Step IDLE never advances |
B_ESTOP left active |
Force B_ESTOP = FALSE (assumes NC contact) |
Stuck on GRIP |
vac_dwell.Q not reached |
Wait the full 200 ms or check timer duration |
| Output stays on after stop | S qualifier not reset | Verify the matching R action exists |
Now bind the variables to physical PLC channels.
Expected result for our project:
| Variable | Module | Address |
|---|---|---|
S_Z_UP |
DI slot 0 | %IX0.0 |
S_Z_DOWN |
DI slot 0 | %IX0.1 |
S_X_HOME |
DI slot 0 | %IX0.2 |
S_X_OUT |
DI slot 0 | %IX0.3 |
S_VAC_OK |
DI slot 0 | %IX0.4 |
B_START |
DI slot 0 | %IX0.5 |
B_ESTOP |
DI slot 0 | %IX0.6 |
Y_Z_DOWN |
DO slot 1 | %QX1.0 |
Y_X_OUT |
DO slot 1 | %QX1.1 |
Y_VACUUM |
DO slot 1 | %QX1.2 |
Some channels in real cabinets are reserved. To pin a variable to a specific address:
%IX0.7 for B_ESTOP if your wiring requires it).Run AutomationView: Validate All Addresses from the Command Palette. AutomationView reports:
INPUT or OUTPUTFix every warning before moving on.
With addresses in place, generate PLC code.
main.seq.PLCopen XML when prompted.AutomationView writes the translated file next to the source, typically as main.xml. The Output panel shows a summary of the translation, including any warnings.
To keep the translated file in sync while you iterate:
automationview.translation.watchMode to true.automationview.translation.openAfterTranslate to true.Every save now triggers a fresh translation. Stop watch mode at any time with AutomationView: Stop Live Translation.
See Translation and Code Export for the full reference.
To ship the program to your PLC IDE:
export/
machine.xml # PLCopen project descriptor
sequences/
main.xml # Translated sequence
io/
address-map.csv # Variable to address mapping
doc/
main.pdf # Optional sequence printout
To export every sequence at once (useful for multi-sequence projects), run AutomationView: Export All Sequences.
| Target | Import path |
|---|---|
| CODESYS V3 | Project > Import > PLCopenXML |
| TwinCAT 3 | PLC > Import > PLCopen XML |
| Schneider EcoStruxure | File > Import > PLCopen XML |
For a deeper dive on the PLC handoff, see I/O to PLC Workflow.
The same workflow scales to multi-axis stations and full production lines. Ideas to extend this project:
B_ESTOP using a macro stepautomationview.export.autoExport