How does a Siemens PLC communicate with a robot (PROFINET, I/O signals, PROFIsafe)?

Robot-to-PLC integration is the connection of the robot controller to the line controller so that the two devices exchange control and safety signals. The protocol depends on the PLC manufacturer. This post covers cells with Siemens S7 controllers (S7-1200, S7-1500, TIA Portal), where the PLC connects to the robot over a PROFINET network: the PLC is the network controller, the robot is its device, and safety functions travel over the same cable in the PROFIsafe protocol. Controllers from other brands have their own networks, for example Allen-Bradley works in EtherNet/IP with CIP Safety.

How are the roles divided between the PLC and the robot?

The PLC decides the order of work for the whole station, and the robot carries out the tasks it is given and reports the result. The PLC knows which part type has arrived, whether the fixture is closed and whether the next station is free. The robot knows where its arm is, which program it is running and whether the gripper has confirmed the part.

Thanks to this division the robot logic stays simple and repeatable: wait for the order, run the program, report the end. All the knowledge about the line sequence is gathered in one place, the PLC program, where maintenance has it at hand in the controller’s environment (TIA Portal for Siemens) together with the diagnostics of the other devices. This is how most automotive cells work, and the standards of the automotive groups (VASS, Daimler Integra, BMW TMO) describe this division explicitly.

How does PROFINET connect a Siemens S7 PLC to a robot?

PROFINET is industrial Ethernet, the basic network of Siemens S7-1200 and S7-1500 controllers, which have its ports built into the CPU. In it the PLC acts as the IO controller and the robot controller as the IO device. For the PLC the robot is therefore just another network node, like a valve island or a drive, only with a much larger number of signals.

Three elements are needed for the connection:

  • GSDML file: a device description in XML format, supplied by the robot manufacturer and imported by the programmer into the controller project in TIA Portal. The file must match the version of the controller software;
  • PROFINET device name: the PLC finds the robot in the network by the name assigned in the project, not only by IP address, so the same name must be set in the robot controller;
  • data area mapping: the same block of input and output bytes is defined on both sides, so that every bit and every word means the same to the PLC and to the robot.

The exchange is cyclic: the controller and the robot refresh the entire exchange area within milliseconds, so no signal needs a separate request. In the vast majority of robot applications RT (Real-Time) mode is enough, while IRT (Isochronous Real-Time) mode, with short, synchronised cycles, is used mainly with drives that have to work in step.

The robot manufacturers common on automotive lines provide a PROFINET interface with a PROFIsafe option. The KUKA KR C5 controller has PROFINET certification with the PROFIsafe and PROFIenergy profiles, the ABB OmniCore works as a PROFINET device, and FANUC offers PROFINET Safety that works with DCS functions.

PROFINET and PROFIsafe, however, are not the language of every PLC. On lines with Allen-Bradley controllers the same division of roles is built in the EtherNet/IP network, and safety functions travel in the CIP Safety protocol. Robot controllers have options for both networks, so the protocol is chosen for the line controller, not for the robot.

Older and very simple stations connect the robot to the PLC with wires: each signal is a separate 24 V input or output. Such an interface is easy to read, but every change means new wires, and diagnostics ends at the state of the input LED.

What I/O signals does a PLC exchange with a robot?

The PLC sends the robot an order and permissions, and the robot returns its state and the result of the task. The exact bit layout depends on the customer’s standard and the robot manufacturer, but the groups of signals repeat on every line:

DirectionSignalsPurpose
PLC → robotmotion enable, start, program or part type number, error acknowledgementthe robot moves only when the station is ready, and knows which variant to run
robot → PLCready, program running, robot at home position, task completed, error codethe PLC runs the sequence and shows the operator the cause of a stop
both directionsrelease and occupation of shared zonesthe robot and the fixture (or a second robot) do not enter the same space
robot ↔ PLCstates of the gripper, sensors and toolthe PLC sees whether the part is in the gripper before it closes the fixture

The program number works like an order: the PLC issues the type number, confirms its validity, and the robot starts the matching program and returns a confirmation. Thanks to this, one robot handles several part variants without changes in the PLC program other than the type table.

Most downtime is born at the junction of these signals:

  • “in position” sent at an approximated point: the robot reports the end of the motion before it has physically arrived, and the PLC closes the fixture on a moving arm;
  • waiting without a timeout: the robot or the PLC waits for a signal that will never come, and the station stands still with no message;
  • no error codes: the PLC knows only that the robot is not ready, so maintenance goes to the robot cabinet instead of reading the cause on the HMI panel;
  • incorrect mapping: a byte shifted by one position on one side changes the meaning of all following signals.

An interface in which the robot passes the cause of a stop to the PLC as a code shortens every future downtime of the station. Each of these signals is checked separately before the first automatic motion, as part of the IO Check procedure.

Looking for an integrator to connect a Siemens PLC to a robot on your line?

How does PROFIsafe work in integrating a robot with a Siemens PLC?

PROFIsafe is a protocol that sends safety signals over the same PROFINET cable as ordinary data. For it the network is a so-called black channel: the protocol does not assume that the cable, switches or communication modules work without error, but detects every transmission error itself. According to PROFIBUS & PROFINET International the protocol is suitable for applications up to SIL 3 (IEC 61508, IEC 62061) as well as category 4 and PL e (ISO 13849-1), and it is described in the IEC 61784-3 standard.

In a cell with a robot the role of the safety host (F-Host) is played by a Siemens controller in the safety version (F-CPU), e.g. S7-1500F or S7-1200F, and the robot controller is a safety device (F-Device). Each PROFIsafe telegram has a sequence number, a CRC checksum and the F-address of the device, and the receiver monitors the time within which the next telegram must arrive. A missing telegram, a wrong number or a wrong address causes a transition to the safe state.

PROFIsafe usually carries signals in both directions:

  • from the line to the robot: emergency stop from the pushbutton stations and the fence, an open cell door, permission to work in automatic mode;
  • from the robot to the line: emergency stop from the robot panel, states of safe zones and speeds from the KUKA SafeOperation, ABB SafeMove or FANUC DCS packages, e.g. “robot outside the loading zone”, after which the operator can enter the fixture.

The challenge here is the telegram monitoring time. Set too short, it stops the station under a momentary network load even though nothing dangerous is happening. Set too long, it extends the reaction time of the whole safety circuit, and the required distance of guards from the hazardous zone depends on the reaction time. PROFIsafe parameters are part of the machine’s safety analysis, not a network setting, so changing them on site requires revalidation.

Robot safety packages also have a practical advantage: the zones and speed limits are calculated by the robot controller, and the safety controller receives a ready result as a safe signal. This allows the cell guarding to be reduced or the operator to be let into the loading zone without stopping the robot in the whole cell.

How is the PLC-robot interface checked before production starts?

The interface is checked in three steps: first each signal separately, then the sequences, and finally the safety functions with the involvement of the person responsible for validation. The order matters, because testing the sequence on unchecked signals produces errors whose causes are hard to find.

  1. Signal test: every bit in both directions, compared with the interface list, including group signals such as the program number.
  2. Sequence test: work in automatic mode on all part types, a stop in the middle of the cycle, a missing part, a restart after operator intervention.
  3. Safety validation: the operation of every emergency stop, door and zone, with a measurement of the reaction time and a report.

More and more of this work is moving to before installation. The PLC program and a virtual robot controller are connected in a simulation, and the interface is tested on a cell model before the equipment is on the shop floor.

An interesting direction is moving the robot motion programming into the PLC itself. In TIA Portal Siemens provides the SIMATIC Robot Library, whose specification it developed together with robot manufacturers, among them ABB, FANUC, KUKA, Kawasaki, Stäubli and Yaskawa. The PLC programmer calls the robot’s motions in it with standard blocks, without knowing the manufacturer’s language.

This is how we connected Siemens S7-1500 controllers with KUKA robots on the production line of the eATS2.0 electric engine for Daimler AG, where communication went over PROFINET and safety functions over PROFIsafe, in line with the Powertrain standard. The signal layout imposed by the group is described in the post on the VASS standard.

No Siemens PLC programmer at your plant? Get in touch and, as an integrator, we will write the program and commission the line with robots.

FAQ

Sources

  • PROFIBUS & PROFINET International, PROFIsafe (black channel, SIL 3, PL e, IEC 61784-3): https://www.profibus.com/technologies/profinet/profiles/profisafe
  • PROFIBUS & PROFINET International, PROFINET System Description (PROFIsafe mechanisms).
  • PROFIBUS & PROFINET International, product catalogue: KUKA KR C5 (PROFINET, PROFIsafe, PROFIenergy).
  • ABB Robotics, Application manual “PROFINET Controller/Device” (RobotWare 7) and “Functional safety and SafeMove”.
  • FANUC, PROFINET Safety for robots with DCS: https://www.fanucamerica.com/products/software/robot/profinet
  • Siemens, announcement of the SIMATIC Robot Library for TIA Portal.
Scroll to Top