Siemens PLC programming for robot cells, written in TIA Portal
When your plant runs on Siemens, the cell should too. We write S7 programs in TIA Portal and test them on the real panel in our Fontana, CA shop before the cell ships.
- Controllers
- Siemens S7-1200 and S7-1500
- Software
- STEP 7 in TIA Portal
- Safety
- Fail-safe CPU or safety relays
- Robots
- FANUC
- Also program
- Allen-Bradley in Studio 5000
Siemens PLC programming for a robot cell usually starts with a plant standard. If your maintenance team supports Siemens S7 controllers, owns TIA Portal licenses and keeps Siemens spares on the shelf, a cell that arrives on another platform becomes the odd one out on the floor. We write PLC and safety logic for Siemens S7 in TIA Portal, and for Allen-Bradley in Studio 5000, so the cell can match whatever your plant already runs.
In short
What a PLC does in a robot cell, whatever the brand, is covered on our PLC programming page. This page is the Siemens detail.
S7-1200 or S7-1500?
Both current S7 families are programmed in STEP 7 inside TIA Portal. Siemens sells STEP 7 Basic as a lower-cost subset of STEP 7 Professional; Basic covers the S7-1200, while the S7-1500 needs Professional. The languages differ too, according to Siemens’ programming guideline for the two families:
| S7-1200 | S7-1500 | |
|---|---|---|
| Usual fit | Small machines and single cells with modest I/O | Larger cells and lines with more I/O and networked devices |
| STEP 7 edition | Basic or Professional | Professional |
| Languages | LAD, FBD, SCL | LAD, FBD, SCL, GRAPH, STL |
| Fail-safe version | S7-1200F | S7-1500F |
GRAPH is worth knowing about on a robot cell. It lays out a step sequence (clamp, robot in, robot clear, unclamp) as a chain of steps and transitions that maintenance can watch advance online, and it is only on the S7-1500.
How a TIA Portal program is put together
A Siemens program is built from organization blocks that the CPU calls (the main cycle, startup, interrupts), function blocks with their own instance data, functions, and global data blocks. The practical habits that make one easy to support are the same on any platform:
- One block per device type. A cylinder, a conveyor zone or a servo axis gets a function block, and each instance carries its own data. Fix the block once and every cylinder gets the fix.
- PLC data types for anything that repeats. A station’s status, a recipe or a fault record is defined once and reused.
- Libraries for reuse across projects. TIA Portal keeps project and global libraries with versioned types, so the same cylinder block can go into the next cell unchanged.
- The language that fits the job. LAD for interlocks maintenance will troubleshoot, SCL for math and data handling, GRAPH for step sequences on an S7-1500.
TIA Portal also lets a programmer put know-how protection on a block, which hides its logic. On a cell you own, ask for none.
PROFINET basics for a robot cell
PROFINET is the industrial Ethernet standard that Siemens plants usually run, maintained by PROFIBUS & PROFINET International (PI). A few points come up on every cell:
- Every device is described by a GSD file that gets imported into TIA Portal, so the controller knows its modules and data.
- Devices are addressed by name. Each one gets a device name, and the controller assigns its address on startup. PI notes that a replacement device of the same model can receive its name and configuration from the controller automatically, where the controller supports it, which matters at 2 a.m. with a failed I/O block.
- Two real-time classes. PI describes RT for typical I/O and motion, with deterministic performance in the 1 to 10 ms range, and IRT for high-precision synchronization, which needs hardware support in the devices.
- Safety rides the same cable. PROFIsafe adds a safety layer on top of PROFINET, so E-stops and guard switches on networked safety I/O reach a fail-safe CPU without separate wiring.
FANUC robots on a Siemens PLC
The robot needs FANUC’s PROFINET option to join a PROFINET network. FANUC says the option supports both I/O device and I/O controller functions. For robots with FANUC Dual Check Safety, the controller can exchange safety signals with a fail-safe PLC as a PROFIsafe F-Device, which FANUC lists as certified to Category 4, PL e, SIL 3. The other route is discrete I/O and hardwired dual-channel safety circuits.
Either way, settle the network before the robot is ordered, because the options go on the robot’s order. The signals themselves are the same as on any PLC: the robot’s operator panel signals for enable, start, hold and fault reset, plus the cell handshake of part present, robot clear and cycle complete. The Allen-Bradley PLC programming page lists them in more detail, and the FANUC DCS guide covers the robot’s own safety functions.
Siemens HMI programming and the operator screen
Siemens operator panels are configured with WinCC, and Siemens says WinCC Unified is engineered inside TIA Portal, in the same project as the PLC, so the screens use the PLC’s tags directly. The screen platform gets decided with the PLC: a Siemens panel to match the rest of your floor, or a custom web HMI. Either way, the layout follows the crew. Our custom HMI page shows how we lay out operator screens and fault text.
Mixed plants: Allen-Bradley and Siemens on one floor
Plenty of plants run both, often because machines came from different builders or a second plant was bought. The simplest rule is to build each new cell on the plant standard for the area it goes into. Where an EtherNet/IP machine has to trade signals with a PROFINET line, a network gateway between the two, or a handful of hardwired handshake signals, usually does the job. Safety signals between machines from different platforms are often simplest hardwired and dual-channel, so each side’s safety design stays easy to check.
Older S7-300 and S7-400 machines
Siemens’ product page says the S7-300 and ET 200M system families will be available until 2033, so there is time to plan a move rather than react to a failure. Siemens’ migration guide says STEP 7 V5.x programs can generally be migrated into TIA Portal, with adjustments afterward depending on the commands and special blocks used. The hardware changes with the new CPU, so plan on reviewing and testing the whole program. Our controls retrofit page covers how a cutover is planned.
Tested in Fontana, installed where you are
The panel is built and wired in our shop, and the program is tested against the real I/O and robot during the run-off. The cell then ships and is commissioned on your floor, anywhere in the United States, and where you allow it, cells we install can be reached over a secure VPN connection for program changes and troubleshooting. The safety side of the cell is on safety PLC programming, every robot cell we build goes through the same steps, and the rest of our controls work is on robot cell controls and software. To talk through a Siemens job, call or text (818) 397-4809.
Common questions
- Do you program both Siemens and Allen-Bradley PLCs?
- Yes. We write PLC and safety logic on both, Siemens S7 in TIA Portal and Allen-Bradley in Studio 5000, and test it in our Fontana shop. The cell should follow your plant standard rather than our preference, so your maintenance team supports it with the software, training and spare parts they already have. Tell us the standard in the first conversation, because it changes the panel and the parts list as well as the code.
- Which TIA Portal version will our project be in?
- The one your plant uses, if you tell us before we start. A TIA Portal project can be upgraded to open in a newer version, but a project saved in a newer version won't open in an older one. If your maintenance laptops run an older release than the cell's project, someone ends up upgrading software in the middle of a breakdown. Put the version in the RFQ.
- Can a FANUC robot talk to a Siemens PLC?
- Yes. FANUC sells a PROFINET option for its robot controllers that can act as an I/O device on the PLC's network or as an I/O controller of its own. For robots with FANUC Dual Check Safety, the controller can also exchange safety signals with a fail-safe PLC as a PROFIsafe F-Device. These are options on the robot order, so settle the network before the robot is ordered.
- Can an old S7-300 program be moved to an S7-1500?
- Usually, with work. Siemens' migration guide says STEP 7 V5.x programs can generally be migrated into TIA Portal, but some commands and special blocks need adjusting afterward, and the hardware configuration and I/O addresses change with the new CPU. Plan on reviewing and testing the whole program. Send the project archive and photos of the rack, and we will tell you whether it is a job for us.
- What files should come with a Siemens cell?
- The archived TIA Portal project with the version noted, any GSD files for third-party PROFINET devices, a list of device names and IP addresses, the I/O list, electrical drawings, and the robot backups. Ask for blocks without know-how protection, so your team can open everything. If the cell has a fail-safe CPU, ask for the safety program's documentation and test records too.
Sources
- Siemens: STEP 7 in TIA Portal
- Siemens: Programming Guideline for S7-1200/S7-1500 (TIA Portal)
- Siemens: Guide for migrating SIMATIC S7-300/S7-400 to S7-1500 and TIA Portal
- Siemens: SIMATIC S7-300
- Siemens: SIMATIC WinCC Unified
- PROFINET: Technology description (PI)
- PROFINET: PROFIsafe
- FANUC America: PROFINET, PROFIsafe and PROFIenergy
