Back
Loading views...PROFINET
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
- Siemens SIMATIC PLC to ET200SP distributed I/O
- Variable frequency drives (SINAMICS, ABB, Danfoss)
- Robots (KUKA, FANUC with PROFINET option)
- Smart cameras and vision systems
- 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
- What EtherType does PROFINET use?
- What is the difference between RT and IRT?
- What is a GSDML file?
- What is DCP used for?
- What PLC family primarily uses PROFINET?
- Configure PROFINET IO Device with TIA Portal.
- Implement PROFINET alarm handling in IO Device firmware.
- How does PROFIsafe add safety over PROFINET?
- Implement acyclic record data read for device parameterization.
- Measure PROFINET cycle jitter with oscilloscope.
- Implement PROFINET IO Device with Hilscher netX90.
- Build PROFINET to OPC UA gateway.
- Implement PROFIDRIVE control word for servo speed control.
- Add PROFIsafe to a PROFINET IO Device.
- Migrate existing PROFIBUS DP network to PROFINET.
- IO Device: netX90 PROFINET slave, exchange 16 I/O bytes with TIA Portal PLC.
- Drive Control: control SINAMICS G120 speed via PROFIDRIVE over PROFINET.
- Network Scanner: proneta-like tool discovering all PROFINET devices.
Intermediate
Advanced
Hands-on Projects
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