Back

PROFINET

Loading views...

PROFINET

Overview

PROFINET is the leading industrial Ethernet standard by Siemens/PROFIBUS International. It carries real-time (RT) and isochronous real-time (IRT) process data over standard Ethernet, supporting Siemens SIMATIC PLCs, drives, and distributed I/O in discrete and process manufacturing.


1. Theory & Fundamentals

  • Standard 100 Mbps Ethernet hardware
  • RT (Real-Time): cycle ≥1ms; uses standard Ethernet with priority VLAN
  • IRT (Isochronous RT): cycle 250 µs–4 ms; requires PROFINET IRT switches
  • Device types: IO Controller (PLC), IO Device (field device), IO Supervisor (engineering)
  • Device naming: DNS-like name configured in engineering tool
  • Alarm mechanism: process alarms, maintenance alarms, diagnostic alarms
  • DCP (Discovery and Configuration Protocol): device name/IP assignment

2. Frame / Packet Structure

PROFINET RT Frame:
  Ethernet frame with EtherType 0x8892
  PROFINET header: FrameID | Data | CycleCounter | DataStatus | TransferStatus

FrameID ranges:
  0x0001–0x00FF: IRT (high priority)
  0x8000–0xBFFF: RT Class 1/2/3
  0xFE01–0xFEFF: Alarms
  0xFF00–0xFFFF: Acyclic

DCP frames (UDP, EtherType 0x8892, FrameID 0xFEFD/0xFEFE):
  Identify request/response, Set name, Set IP

3. Protocol Mechanics

  • Cyclic exchange: IO controller sends output data; IO device returns input data every cycle
  • Acyclic: Record Data Read/Write for parameterization (like DP-V1)
  • Alarms: event-driven; device signals fault; controller reads alarm info
  • AR (Application Relationship): logical connection between controller and device
  • GSDML: XML device description (replaces GSD); defines modules and parameters

4. Hardware Implementation

  • PROFINET IC: ERTEC200P (Siemens), netX (Hilscher), TPS-1 (Siemens)
  • Standard Ethernet NIC in controller (Linux/Windows + PROFINET stack)
  • Managed switch required for IRT; unmanaged OK for RT
  • IO Device hardware: Hilscher netX90, ERTEC200P dev kit
  • Software: Siemens TIA Portal (engineering), STEP 7, Simatic WinCC

5. Register-Level / Configuration

// PROFINET IO Device via Hilscher netX (CifX API)
CIFX_HANDLE hChannel;
xDriverOpen(&hDriver);
xChannelOpen(hDriver,0,0,&hChannel);
// Exchange I/O data
uint8_t output[64], input[64];
xChannelIORead(hChannel,0,0,64,output,100); // Read outputs from PLC
process_outputs(output);
prepare_inputs(input);
xChannelIOWrite(hChannel,0,0,64,input,100); // Write inputs to PLC

6. Driver / Software Development

  • Implement init, TX, RX functions; use interrupts or DMA
  • Handle errors: timeout, CRC mismatch, arbitration loss
  • Use circular/ring buffers for high-throughput RX
  • Add retry logic and watchdog for reliability
  • Separate hardware layer from protocol logic

7. Debugging & Testing

  • Siemens TIA Portal: Online diagnostics, I-Device monitoring
  • Wireshark: PROFINET RT and DCP dissectors built-in
  • Common issues: device name wrong (DCP); IP conflict; cycle time mismatch; IRT topology not configured
  • proneta tool: free PROFINET network scanner

8. Real-World Applications

  1. Siemens SIMATIC PLC to ET200SP distributed I/O
  2. Variable frequency drives (SINAMICS, ABB, Danfoss)
  3. Robots (KUKA, FANUC with PROFINET option)
  4. Smart cameras and vision systems
  5. Safety IO (PROFIsafe over PROFINET)

9. Advanced Topics & Edge Cases

  • PROFIsafe: Functional safety (SIL2/3, PL e) over PROFINET
  • PROFINET PA Integration: PROFIBUS PA devices via proxy
  • TSN (Time Sensitive Networking): PROFINET over TSN for <250 µs cycle
  • PROFIDRIVE: Drive profile over PROFINET for servo and VFD
  • PROFIENERGY: Power management profile

10. Standards & Variants

Class Cycle Sync Notes
RT Class 1 ≥1 ms None Standard PLCs
RT Class 2 ≥250 µs IRT Motion with IRT switch
IRT 250 µs <1µs jitter High-end motion

💡 Practical Examples

Example 1

Device naming: DCP Set Name request assigns 'my-io-device' to MAC address

Example 2

Cyclic exchange: 1ms cycle, PLC writes 16-byte output, device responds 8-byte input

Example 3

Alarm: drive overcurrent → PROFINET alarm 0x0001; PLC reads alarm info block


🧪 Practice Questions

Beginner

  1. What EtherType does PROFINET use?
  2. What is the difference between RT and IRT?
  3. What is a GSDML file?
  4. What is DCP used for?
  5. What PLC family primarily uses PROFINET?
  6. Intermediate

  7. Configure PROFINET IO Device with TIA Portal.
  8. Implement PROFINET alarm handling in IO Device firmware.
  9. How does PROFIsafe add safety over PROFINET?
  10. Implement acyclic record data read for device parameterization.
  11. Measure PROFINET cycle jitter with oscilloscope.
  12. Advanced

  13. Implement PROFINET IO Device with Hilscher netX90.
  14. Build PROFINET to OPC UA gateway.
  15. Implement PROFIDRIVE control word for servo speed control.
  16. Add PROFIsafe to a PROFINET IO Device.
  17. Migrate existing PROFIBUS DP network to PROFINET.
  18. Hands-on Projects

  19. IO Device: netX90 PROFINET slave, exchange 16 I/O bytes with TIA Portal PLC.
  20. Drive Control: control SINAMICS G120 speed via PROFIDRIVE over PROFINET.
  21. Network Scanner: proneta-like tool discovering all PROFINET devices.

Checklist

  • [ ] Explain PROFINET RT vs IRT
  • [ ] Understand GSDML file structure
  • [ ] Configure IO Device in TIA Portal
  • [ ] Implement cyclic I/O exchange
  • [ ] Handle PROFINET alarms
  • [ ] Use DCP for device naming
  • [ ] Debug with Wireshark
  • [ ] Implement acyclic record data
  • [ ] Add PROFIsafe
  • [ ] Build PROFINET to OPC UA gateway