Overview of SFC 14 and SFC 15 on Siemens S7-300 Profibus DP
The system functions SFC 14 (DPRD_DAT - Read Consistent Data of a DP Standard Slave) and SFC 15 (DPWR_DAT - Write Consistent Data of a DP Standard Slave) are the only correct way to exchange process data larger than four bytes with a DP standard slave / PROFINET IO device. They guarantee consistent, gap-free transfer of the entire data record in a single DP cycle, which is critical when reading drive parameters and writing control words on a Profibus DP link such as that between a Siemens CPU 313C-2DP and an ABB ACS800 inverter with an RPBA-01 Profibus adapter.
Without SFC 14/15, only the first four bytes of a DP slave's input/output area are guaranteed consistent. Drive PZD (Process Data) frames routinely exceed four bytes - PPO 1 has 12 bytes, PPO 2 has 20 bytes, and PPO 5 has 4 bytes - so the standard process-image access (L PIB, T PQW) must NOT be used for the entire PZD area.
Reference: Siemens FAQ: Consistent Data with SFC 14/15 (PDF)
Prerequisites and Required Components
Verify that the following hardware and software are on hand before starting configuration:
| Item | Specification | Notes |
|---|---|---|
| S7-300 CPU | 6ES7 313-6CE01-0AB0 (CPU 313C-2DP) or later | Integrated DP-Master interface on port X2 (MPI/DP) |
| STEP 7 | STEP 7 V5.5 + SP2 or STEP 7 Professional (TIA Portal V13+ with S7-300/400 legacy support) | GSD file for RPBA-01 must be installed before placing the slave |
| ABB ACS800 | Firmware AU.x or later (Standard or System Drive Application) | Parameter 98.02 must be set to FIELDBUS |
| RPBA-01 Profibus Adapter | 3AFE 64504223 | Slot-in module inside the ACS800, node address on rotary switch |
| GSD file | ABB_0812.GSD (RPBA-01) | Import via HW Config -> Options -> Install GSD File |
| Profibus cable | Two-wire shielded, terminated 120 Ω at both ends | Maximum segment 100 m at 12 Mbps, up to 1200 m at 9.6 kbps |
Understanding the LADDR Parameter (Hexadecimal Logical Address)
LADDR is the most error-prone input to SFC 14 and SFC 15. It is the configured Profibus I/O start address of the slave module, entered as a 16-bit WORD in hexadecimal form with the prefix 16#.
The address is set in HW Config when the DP slave is placed on the Profibus line:
- Open SIMATIC 300 Station -> double-click the DP master line on the CPU.
- Insert ABB RPBA-01 from the hardware catalog (PROFIBUS DP -> Additional Field Devices -> Drives -> ABB -> RPBA-01).
- Select the PPO type (e.g., PPO 2 "4 PKW / 6 PZD").
- In the properties dialog of the inserted slot, click "Addresses" and read the configured input and output start addresses.
| HW Config setting | Decimal | Hexadecimal LADDR |
|---|---|---|
| Input start address | 256 | 16#100 |
| Output start address | 256 | 16#100 |
| Input start address | 512 | 16#200 |
| Output start address | 512 | 16#200 |
Configuring the RECORD Parameter (ANY Pointer)
The RECORD parameter is an ANY pointer that defines where the read data is placed (SFC 14) or where the write data is taken from (SFC 15). The standard STEP 7 syntax is:
P#DB<number>.DBX<byte>.<bit> BYTE <length>
| PPO Type | Total bytes I/O | RECORD example |
|---|---|---|
| PPO 5 (0 PKW / 2 PZD) | 4 | P#DB100.DBX0.0 BYTE 4 |
| PPO 1 (4 PKW / 2 PZD) | 12 | P#DB100.DBX0.0 BYTE 12 |
| PPO 2 (4 PKW / 6 PZD) | 20 | P#DB100.DBX0.0 BYTE 20 |
| PPO 3 (0 PKW / 2 PZD) | 4 | P#DB100.DBX0.0 BYTE 4 |
| PPO 4 (0 PKW / 6 PZD) | 12 | P#DB100.DBX0.0 BYTE 12 |
The notation P#DIX30.0 BYTE 12 that appears in some project documentation corresponds to P#DB<n>.DBX30.0 BYTE 12 under standard STEP 7 syntax - the destination is byte 30 of a particular data block, with 12 bytes of consistent data. With PPO 1 (12 bytes total) the entire PKW+PZD area fits in those 12 bytes starting at byte 30 of the destination DB; with PPO 5 (also 12 bytes) only the PKW portion is unused.
PPO Type Selection for ABB ACS800 / RPBA-01
The Parameter Process data Object (PPO) defines the split between the parameter channel (PKW) and process data (PZD):
| PPO | PKW words | PZD words | Total bytes | Use case |
|---|---|---|---|---|
| 1 | 4 | 2 | 12 B | Occasional parameter access + 2 process words |
| 2 | 4 | 6 | 20 B | Continuous parameter polling + multi-word feedback |
| 3 | 0 | 2 | 4 B | Pure control/status, no parameter access |
| 4 | 0 | 6 | 12 B | Pure multi-word process data, no parameters |
| 5 | 4 | 2 | 12 B | Alias of PPO 1 (identical layout) |
For typical ACS800 control with speed reference and feedback plus access to a few diagnostic parameters (e.g., P92.03 actual speed, P93.04 motor current, P93.05 DC bus voltage), choose PPO 2. For minimum-bandwidth applications where only start/stop and one speed value are needed, use PPO 3 or PPO 5.
PZD Mapping Inside the ACS800
After PPO type selection, the user maps which ACS800 signals appear in each PZD word. The mapping is performed via ACS800 parameters (51 group for fieldbus) and must match the expected layout in the destination DB on the PLC.
Default Write PZD layout (PLC -> ACS800)
| PZD word | DB address | Typical content |
|---|---|---|
| 1 | DBx.DBW0 | Control word (16 bits, see encoding table) |
| 2 | DBx.DBW2 | Speed reference (scaled -20000..+20000) |
| 3 | DBx.DBW4 | P90.01 (commonly torque reference or user-mapped signal) |
| 4 | DBx.DBW6 | P90.02 (user-mapped) |
| 5 | DBx.DBW8 | P90.03 (user-mapped) |
| 6 | DBx.DBW10 | P90.04 (user-mapped) |
Default Read PZD layout (ACS800 -> PLC)
| PZD word | DB address | Typical content |
|---|---|---|
| 1 | DBx.DBW0 | Status word |
| 2 | DBx.DBW2 | Actual speed (feedback, scaled) |
| 3 | DBx.DBW4 | P92.03 - Actual speed (rpm) |
| 4 | DBx.DBW6 | P93.04 - Motor current (A) |
| 5 | DBx.DBW8 | P93.05 - DC bus voltage (V) |
| 6 | DBx.DBW10 | P93.06 - Motor torque (%) |
ABB ACS800 Control Word Encoding
The ACS800 control word is a 16-bit field. Each bit triggers a specific drive command; the drive state machine responds to the combination of bits:
| Bit | Name | Description |
|---|---|---|
| 0 | OFF1 | 1 = ready to start, 0 = ramp to stop then open main contactor |
| 1 | OFF2 | 1 = OFF2 inactive (permitted to run), 0 = coast stop (emergency) |
| 2 | OFF3 | 1 = OFF3 inactive, 0 = emergency stop (ramp defined by P22.12) |
| 3 | RUN | 1 = start command, 0 = stop command |
| 4 | RAMP_OUT_ZERO | 1 = ramp output forced to zero, 0 = normal |
| 5 | RAMP_HOLD | 1 = freeze ramp output, 0 = normal |
| 6 | RAMP_IN_ZERO | 1 = ramp input forced to zero, 0 = normal |
| 7 | RESET | Rising edge 0 -> 1 clears active faults |
| 8 | INCHING_1 | Inching speed 1 (defined by P22.13) |
| 9 | INCHING_2 | Inching speed 2 (defined by P22.14) |
| 10 | REMOTE_CMD | 0 = fieldbus control, 1 = local I/O control |
| 11-15 | Vendor specific | Application-defined (P22.x mapping) |
Common control word values used during commissioning and fault recovery:
| Hex | Binary | Meaning |
|---|---|---|
| 16#0476 | 0000 0100 0111 0110 | Coast stop (OFF2 active) |
| 16#047C | 0000 0100 0111 1100 | Emergency stop (OFF3 active) |
| 16#047E | 0000 0100 0111 1110 | Stop (ramp stop, no OFF2/OFF3) |
| 16#047F | 0000 0100 0111 1111 | Run with current reference |
| 16#04FF | 0000 0100 1111 1111 | Run + inching 1 |
| 16#0C7F | 0000 1100 0111 1111 | Fault reset (rising edge on bit 7) |
ABB ACS800 Status Word Decoding
The status word mirrors the drive's operating state back to the PLC:
| Bit | Name | Meaning |
|---|---|---|
| 0 | RDY_ON | 1 = Ready to switch on (main contactor closed) |
| 1 | RDY_RUN | 1 = Ready to operate (no fault, no OFF2/OFF3) |
| 2 | RDY_REF | 1 = Reference allowed (run enable and start active) |
| 3 | TRIPPED | 1 = Drive is in fault state |
| 4 | OFF_2_STA | 0 = OFF2 active |
| 5 | OFF_3_STA | 0 = OFF3 active |
| 6 | SWC_ON_INHIB | 1 = Switch-on inhibit active |
| 7 | ALARM | 1 = Alarm active |
| 8 | AT_SETPOINT | 1 = Actual value equals reference (within tolerance window) |
| 9 | REMOTE | 1 = Drive control place = REMOTE |
| 10 | ABOVE_LIMIT | 1 = Actual value exceeds supervision limit (P32.05) |
| 11-15 | Vendor | Application-specific |
Sample STL Code for SFC 14 and SFC 15
The following STL excerpt in OB1 (cyclic) reads and writes PZD/PKW consistent data between DB100 (write) / DB101 (read) and the RPBA-01 slave at LADDR 16#100 with PPO 2 (20 bytes):
// ---- SFC 15: WRITE 20 bytes from DB100 to RPBA-01 output area ----
CALL "DPWR_DAT"
LADDR := W#16#100 // Logical start address from HW Config
RECORD := P#DB100.DBX0.0 BYTE 20
RET_VAL:= MW210 // Error code (see SFC 15 manual)
// ---- SFC 14: READ 20 bytes from RPBA-01 input area into DB101 ----
CALL "DPRD_DAT"
LADDR := W#16#100
RECORD := P#DB101.DBX0.0 BYTE 20
RET_VAL:= MW212
// ---- Evaluate status bits ----
A DB101.DBX 0.0 // RDY_ON
= M 100.0 // "Drive Ready to Switch On"
A DB101.DBX 0.3 // TRIPPED
= M 100.3 // "Drive Faulted"
A DB101.DBX 0.8 // AT_SETPOINT
= M 100.8 // "Drive at Reference"
// ---- Build control word ----
SET
= DB100.DBX 2.0 // OFF1
= DB100.DBX 2.1 // OFF2 inactive
= DB100.DBX 2.2 // OFF3 inactive
= DB100.DBX 2.3 // RUN
// Speed reference scaled 0..20000 = 0..50 Hz
L MW 150 // Speed setpoint 0..20000
T DB100.DBW 2
For bit access on the second PZD the offset starts at bit 16 (DBW2), which corresponds to byte index 2 in the same DB - keep word-boundary crossing in mind when the destination DB crosses byte 30 or higher.
RET_VAL Error Codes (SFC 14 / SFC 15)
| RET_VAL (hex) | Meaning | Recommended action |
|---|---|---|
| 16#0000 | No error | Continue |
| 16#8090 | LADDR invalid / module not configured / not a DP standard slave | Check HW Config, slot, address assignment |
| 16#8092 | ANY pointer type not BYTE | Confirm RECORD ends with "BYTE n" |
| 16#8093 | LENGTH field of ANY pointer invalid | Length must match PPO size in bytes |
| 16#80A0 | Negative ack when writing; module failure during transfer | Check Profibus cable, slave diagnostics |
| 16#80A1 | Negative ack when writing; module not ready | Confirm RPBA-01 is in OPERATE, no configuration fault |
| 16#80B0 | Slave not configured / not on bus | Check Profibus address, cable, terminator |
| 16#80B1 | Specified length and configured length differ | Align RECORD length to PPO size (12 / 20 bytes) |
| 16#80B2 | System error (hardware fault, watchdog) | Replace DP slave or check grounding |
| 16#80C0 | Read error: module in wrong state | Power-cycle RPBA-01 |
| 16#80C1 | Read error: pending | Retry next cycle; transient DP error |
| 16#80C2 | Read error: parity / framing | Check cable, baud rate, shielding |
| 16#80C3 | Read error: DP protocol violation | Replace RPBA-01 or check GSD revision |
| 16#80C4 | Read error: bus fault | Check all DP slaves on segment |
| 16#80D0 | Write error: module in wrong state | Power-cycle RPBA-01 |
| 16#80D1 | Write error: length mismatch (write side) | Align to PPO size |
| 16#80D2 | Write error: parity / framing | Check cable |
| 16#80FF | Function not executable (e.g., no OB85 handling) | Install OB82/OB85/OB86 in the CPU |
Diagnostic Indicators and Troubleshooting Matrix
| Symptom | Likely cause | Fix |
|---|---|---|
| RET_VAL = 16#80B1 every cycle | RECORD BYTE length does not equal PPO configured length | Set BYTE 12 for PPO 1/5, BYTE 20 for PPO 2, BYTE 4 for PPO 3 |
| RET_VAL = 16#80B0, slave diag shows "Station failure" | Wrong Profibus address or cable break | Verify node address on RPBA-01 (parameter 51.02) and inspect cable |
| RET_VAL = 16#80A1 on every write | RPBA-01 in SETUP or CLEAR, not OPERATE | Check DP master mode in HW Config, set "DP master -> DP slave" mode |
| Read works but control word has no effect | Drive parameter 98.02 (command source) ≠ COMM | Set 98.02 = FIELDBUS; restart drive |
| Speed reference is half of expected value | P50.01 frequency max ≠ 50 Hz or scaling parameter changed | Verify P50.01, P11.05, P22.11 |
| Status bit 3 (TRIPPED) latched after power off | Active fault not cleared | Send rising edge on bit 7 (0x047F -> 0x0C7F or 0x04FF) |
| SFC 14 call returns SF LED on CPU | OB85 not loaded; diagnostic interrupt not serviced | Download empty OB82/OB85/OB86 or service diagnostics in OB82 |
| PKW returns "parameter not found" | Drive in LOCAL mode or wrong active parameter set | Set 98.01 = FIELDBUS; check active set via 99.05 |
CPU 313C-2DP Specific Notes
- Maximum DP slaves supported: 32 (limited by DP address space 0-127, not CPU resource).
- Maximum cyclic I/O per slave: 244 bytes input + 244 bytes output - well above PPO 2's 20 bytes.
- The integrated analog inputs (AI0..AI3) of the CPU are NOT to be confused with the ACS800 analog feedback - the drive transmits its values only via Profibus PZD.
- If SFC 14/15 trigger OB85 (diagnostics interrupt), download OB82 and OB85; otherwise the CPU will go into STOP with "OB85 not loaded".
- Firmware version V2.6 or later is recommended for ACS800 with PPO 2 communication (improved DP state machine and diagnostic buffer format).
- The DP port (X2) auto-detects baud rate from 9.6 kbps to 12 Mbps; ensure the rotary switches on RPBA-01 are set to a unique node address between 1 and 126.
Communication Topology and Flow
Commissioning Procedure (Verification)
- Wire RPBA-01 inside the ACS800, set Profibus node address (rotary switch or P51.02), confirm baud rate auto-detect.
- Set drive parameter 98.02 = FIELDBUS, 98.01 = FIELDBUS; save with P99.05 (Save).
- In STEP 7 HW Config, install GSD file ABB_0812.GSD, place RPBA-01 on the DP master line, choose PPO 2.
- Note configured input and output start addresses (e.g., 256 / 256 = 0x100).
- Create DB100 (write) and DB101 (read), each 20 bytes; define symbolic names (e.g., "ControlWord", "SpeedRef", "StatusWord", "ActualSpeed").
- Program SFC 14 and SFC 15 calls in OB1 (cyclic) using LADDR = W#16#100 and RECORD = P#DBxxx.DBX0.0 BYTE 20.
- Download HW Config + OB1 + DB100/101 to the CPU. CPU should remain in RUN with no SF / BF LED.
- Online -> Monitor DB101.DBW0 (status word) - expect 0x0F31 at idle (RDY_ON | RDY_RUN | RDY_REF | REMOTE bits all set).
- Write 16#047F to DB100.DBW0 and 16384 to DB100.DBW2 (half-speed reference); monitor actual speed DB101.DBW2 / DB101.DBW4.
- Trigger a fault (e.g., block motor rotation with overload); verify status word bit 3 (TRIPPED) sets and a 0x047F -> 0x0C7F transition clears it.
- Disconnect the Profibus cable; verify RET_VAL changes to 16#80B0 / 16#80C2, BF LED lights, and OB82 / OB86 are invoked.
- Reconnect cable, clear diagnostics (SF / BF should extinguish within one DP cycle), confirm RET_VAL returns to 16#0000.
FAQ
What is SFC 14 used for in Siemens S7-300 Profibus DP?
SFC 14 (DPRD_DAT) reads consistent data from a DP standard slave or PROFINET IO device in a single bus cycle. It must be used whenever more than four bytes of process data are exchanged with a DP slave, e.g., PPO 1 (12 bytes) or PPO 2 (20 bytes) between a CPU 313C-2DP and an ABB ACS800 / RPBA-01.
How is the LADDR value for SFC 14 and SFC 15 calculated for ABB RPBA-01?
LADDR is the configured Profibus I/O start address of the RPBA-01 slot from HW Config, entered in hexadecimal with the prefix 16#. If the slot is placed at input/output start address 256 decimal, LADDR = W#16#100. SFC 14 uses the input start address, SFC 15 uses the output start address.
Why must the RECORD parameter be an ANY pointer such as P#DB100.DBX0.0 BYTE 12?
The ANY pointer gives SFC 14/15 both the destination/source DB and the byte count. For PPO 1 (4 PKW + 2 PZD) the count is 12 bytes; for PPO 2 (4 PKW + 6 PZD) it is 20 bytes. Mismatched length produces RET_VAL = 16#80B1 (read) or 16#80D1 (write) and the data transfer is aborted.
Which control word hex values start and stop an ABB ACS800 via Profibus?
16#047E stops the drive (ramp stop with OFF1). 16#047F starts the drive with the current speed reference. 16#04FF starts with inching 1 active. 16#0C7F performs a fault reset (rising edge on bit 7). The drive ignores control commands until parameter 98.02 (command source) is set to FIELDBUS.
Does the CPU 313C-2DP support analog input readings from the ACS800 over Profibus?
No. The CPU's on-board analog inputs are its own AI0..AI3 channels and have no connection to the ACS800. Analog drive values (motor current, DC voltage, actual torque) are transmitted as PZD words and must be read via SFC 14 - they never appear as analog voltage on the CPU inputs.