Reading and Writing Danfoss FC 300 over PROFIBUS DP on S7-300

David Krause16 min read
S7-300SiemensTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Overview

The Danfoss VLT FC 300 series drive exposes a Profidrive-compliant PROFIBUS DP interface that exchanges process data (PZD) and parameter data (PKW) with a Siemens S7-300 CPU 315-2DP. The CPU 315-2DP integrates a PROFIBUS DP master port on the X2 (DP) interface, eliminating the need for a CP 342-5 communications processor. Cyclic PZD words are read with the standard PIW (Periphery Input Word) and written with PQW (Periphery Output Word) instructions, while parameter channel access (PKW) and acyclic services use SFC14 / SFC15 (DPRD_DAT / DPWR_DAT) for consistency on word counts above four words.

This guide covers the complete configuration path: GSD file import, hardware configuration in STEP 7 / TIA Portal, PPO type selection, byte and word mapping, direct load/transfer (L/T) program examples for sub-4-word I/O, SFC14/15 block calls for larger PPOs, Profidrive parameter addressing for FC 300, scaling of current/frequency/frequency reference, and the verification checks used to confirm a healthy bus.

The FC 300 follows the Profidrive Profile (PNO order no. 3.072). The control word, status word, main actual value, and main setpoint occupy fixed offsets inside the PZD section of the PPO, so any Siemens program addressing these slots works the same way it would on a Siemens MASTERDRIVES or SINAMICS G120 drive.

Prerequisites

  • Hardware: SIMATIC S7-300 CPU 315-2DP (6ES7315-2AFxx-0AB0 or later), Danfoss FC 300 with PROFIBUS DP option card (MCA 101, ordering code 130B1100), and a PROFIBUS DP cable terminated at both ends (220 Ω termination resistors, both ON at the two physical end nodes only).
  • Configuration software: STEP 7 V5.5 + SP2 (or later) with HW Config, or TIA Portal V13 SP1 / V14 / V15.1. The Danfoss GSD file DANFOSS0F.GSD (or DAFC3000.GSD, revision varies with firmware) must be installed before the FC 300 appears in the catalog.
  • FC 300 firmware: Verify with parameter 15-61 "Option SW Version" that MCA 101 firmware is current. The Profidrive profile is supported across all FC 300 firmware versions, but a recent GSD is required if PPO type 7 or 8 is used.
  • FC 300 PROFIBUS address: Set parameter 8-30 "Protocol" to "FC" (or "PROFIdrive" on newer firmwares), parameter 8-31 "Address" to a unique DP slave address (1-126). Default 1 will collide with most master default address spaces — change it.
  • DP baud rate: FC 300 auto-detects up to 12 Mbit/s. Set the S7 master to 1.5 Mbit/s or 12 Mbit/s for the cable length used; the cable budget is the same as for any PROFIBUS DP segment.

Installing the Danfoss GSD File

  1. Download the latest DANFOSS0F.GSD from the Danfoss Drives product page for the FC 300 / VLT AutomationDrive FC 300.
  2. In STEP 7 V5.5: HW Config → Options → Install GSD File. Browse to the unpacked GSD directory and select DANFOSS0F.GSD.
  3. In TIA Portal: Options → Manage General Station Description Files (GSD), browse the directory, and tick the FC 300 DP-V0 / DP-V1 device.
  4. Close and reopen HW Config / the device catalog. The FC 300 appears under PROFIBUS DP → Additional Field Devices → Drives → Danfoss.
Always restart HW Config after a GSD import. The bitmap file DANFOSS0F.BMP is optional but recommended — it puts the FC 300 icon in the DP subnet graphic view.

Hardware Configuration in STEP 7

  1. Open the S7 station in HW Config and confirm the CPU 315-2DP is inserted in slot 2. The DP master port is on the CPU itself, not on a CP.
  2. Place a PROFIBUS subnet on the CPU's DP interface and add the FC 300 from the catalog to that subnet at the same PROFIBUS address entered in FC 300 parameter 8-31.
  3. Open the FC 300 slot configuration. The catalog exposes the FC 300 as slot 0 (drive object). PPO types are configured by selecting the slot configuration that matches the data length required.
  4. Choose the PPO type. The available PPOs (Profidrive Profile Drive Technology) for FC 300 are summarized below.
PPO Type PKW Words PZD IN Words (FC 300 → PLC) PZD OUT Words (PLC → FC 300) Total I/O Words Typical Use
PPO 1 4 2 2 8 Control + status + 1 actual + 1 reference, with parameter channel
PPO 2 4 4 4 12 Same as PPO 1 with extra actual values
PPO 3 0 2 2 4 Compact, no parameter access (use direct PIW/PQW)
PPO 4 0 4 4 8 Compact with extra PZD, no parameter channel
PPO 5 4 6 6 16 High-word-count PZD with parameter channel
PPO 6 4 10 10 24 Maximum PZD with parameter channel
PPO 7 4 2 2 8 Identical to PPO 1, DP-V1 only
PPO 8 4 6 6 16 Identical to PPO 5, DP-V1 only
  1. STEP 7 assigns a logical base address (for example I 256..I 271 and Q 256..Q 271 for PPO 5). Record these — they are the offsets used by PIW/PQW in the user program.
  2. Save, compile, and download the hardware configuration to the CPU.

PPO Layout and PZD Word Map

The PPO is laid out contiguously in the slave's I/O image. The first PKW words (if any) are the parameter channel; the trailing PZD words carry process data. For FC 300, the standard PZD map inside the drive is fixed regardless of PPO type and is described below.

PZD Slot (relative to PZD start) Direction Content Width
PZD1 OUT PLC → FC 300 Control word (STW1, Profidrive) 1 word
PZD2 OUT PLC → FC 300 Speed / frequency reference (NSOLL_A) 1 word
PZD1 IN FC 300 → PLC Status word (ZSW1, Profidrive) 1 word
PZD2 IN FC 300 → PLC Actual speed / frequency (NIST_A) 1 word
PZD3..N Bidirectional User-selectable per FC 300 par. 8-10/8-20/8-50/8-70 1 word each

Parameters that select additional PZD content on FC 300:

  • 8-10 "Control Word Profile" — must be set to 0 (FC profile) or 3 (Profidrive) to expose the standard map.
  • 8-50/8-51 — selection of which drive parameter appears in PZD3 OUT / PZD3 IN (motor current, DC-link voltage, torque, etc.).
  • 8-70/8-71 — selection of which drive parameter appears in PZD4 and beyond.

Reading and Writing the PZD with Direct PIW / PQW (≤ 4 Words)

For PPO 3 and PPO 4 (no PKW), the entire PZD image fits in ≤ 4 words. STEP 7 guarantees consistency on the I/O update only when the access width matches the configured slot width. A direct L PIW / T PQW cycle, called once per OB1 scan, is acceptable on the S7-300 because the DP update is word-aligned and the FC 300 PZD slots are configured as word-sized.

STL example for PPO 3 (base address 256):

// Network 1: read FC 300 PZD
L PIW 256          // PZD1 IN: Status word (ZSW1)
T MW 20
L PIW 258          // PZD2 IN: Actual frequency (NIST_A)
T MW 22
// Network 2: write FC 300 PZD
L MW 10            // Control word (STW1) from user program
T PQW 256          // PZD1 OUT
L MW 12            // Speed setpoint (NSOLL_A) from user program
T PQW 258          // PZD2 OUT

Replace MW 10/12/20/22 with any DB word (e.g. DB10.DBW0) for a structured I/O image. The base address is the I and Q start address shown in HW Config for the FC 300 slot.

Direct PIW/PQW access without SFC14/15 is supported on S7-300 DP master for contiguous, word-aligned PZD images up to 4 words. For 6+ word PZD (PPO 5, 6, 8) the slave's process image is byte-streamed by the master and the byte/word swap will appear scrambled unless you read/write the entire PZD image atomically through SFC14/15. The S7-300 firmware does not give you a hardware guarantee of consistency for partial reads on a 12-word PZD.

Using SFC14 (DPRD_DAT) and SFC15 (DPWR_DAT) for ≥ 5 Words

When the PPO has more than four PZD words, Siemens SFC14 "DPRD_DAT" and SFC15 "DPWR_DAT" are the only consistent way to copy the entire slave image to/from a DB. The SFCs handle the byte/word orientation in the master image and present the data to the user as a contiguous 16-bit word array.

Parameter Type Description
LADDR (INPUT, INT) WORD Logical base address of the slave from HW Config (e.g. W#16#100 for 256 dec.)
RECORD (OUTPUT, ANY) BYTE / WORD Pointer to a DB of the same length (in bytes) as the configured I/O
RET_VAL (OUTPUT, INT) WORD Return code: 0 = OK; non-zero see SFC manual

STL example for PPO 5 (12 words PZD, base address 256, DB100):

// Read 12 PZD words from FC 300 into DB100 (bytes 0..23)
CALL SFC 14
  LADDR  := W#16#100            // decimal 256
  RET_VAL:="DB_RetVal_Read"
  RECORD :=P#DB100.DBX0.0 BYTE 24

// Write 12 PZD words to FC 300 from DB110 (bytes 0..23)
CALL SFC 15
  LADDR  := W#16#100
  RET_VAL:="DB_RetVal_Write"
  RECORD :=P#DB110.DBX0.0 BYTE 24

DB100.DBW0 = PZD1 IN (status), DB100.DBW2 = PZD2 IN (actual), … DB100.DBW22 = PZD12 IN. DB110.DBW0 = control word, DB110.DBW2 = reference, etc.

Accessing the PKW Parameter Channel

When a PPO with PKW (PPO 1, 2, 5, 6, 7, 8) is configured, the first 4 words of the slave image are the parameter channel. The FC 300 parameter channel uses the standard Profidrive PNU request/response mechanism described below.

PKW Word Request (PLC → FC 300) Response (FC 300 → PLC)
PKE (word 0) Bits 0-10: parameter number; bits 11-15: AK (request ID) Bits 0-10: parameter number; bits 11-15: AK (response ID, with bit 15 = error)
IND (word 1) Bit 15: PNU page; bits 0-7: sub-index; bits 8-14: array index Mirror of IND
PWE (word 2) Low word of parameter value Low word of parameter value
PWE (word 3) High word of parameter value High word of parameter value

Common request IDs (AK):

  • 1 = Read parameter (single word)
  • 2 = Write parameter (single word, non-volatile = RAM only)
  • 3 = Write parameter to RAM only
  • 5 = Read parameter (double word, 32-bit)
  • 6 = Write parameter (double word, RAM only)
  • 7 = Read parameter (array element)
  • 8 = Write parameter (array element)

FC 300 parameter numbering is one-based. The Profidrive mapping (parameter 8-50/8-51 "PCD Read/Write Configuration") uses the FC 300 index; do not apply the PNU page conversion used on some Siemens master drives.

Acyclic Parameter Access over DP-V1 (SFB52/53/81)

For DP-V1 slaves (any modern FC 300 with MCA 101), acyclic read/write is preferred for non-time-critical parameter changes. The S7-300 does not have a generic SFB for this on the integrated DP master; it uses the Siemens SIMATIC function blocks for acyclic PROFIBUS DP-V1 communication (SFB 52 RDREC / SFB 53 WRREC) on the CPU 315-2DP from firmware V3.x onwards, with slot 0 and index 47 for parameter access per PROFIdrive parameter channel.

// Read FC 300 parameter 1-00 (configuration mode) acyclically
CALL SFB 52 // RDREC
  REQ     := TRUE
  ID      := DW#16#100         // DP master ID
  INDEX   := 47                // Profidrive parameter channel index
  MLEN    := 32                // Max record length
  RECORD  := P#DB120.DBX0.0 BYTE 32
  BUSY    := "SFB52_Busy"
  VALID   := "SFB52_Valid"
  ERROR   := "SFB52_Error"
  STATUS  := "SFB52_Status"
  LEN     := "SFB52_Len"
Acyclic DP-V1 access coexists with the cyclic PZD exchange; it does not interrupt the PZD cycle. The block is consistent with the SFC 14/15 cyclic access because they use different record channels.

Scaling the Process Data

FC 300 PZD scaling follows Profidrive conventions. Apply these formulas in the S7 program after copying PZD words to a DB.

Quantity Direction Scaling (Profidrive N2 / N4) Engineering Range
NSOLL_A — speed setpoint PLC → FC 300 0x4000 = 100 % of motor nominal -200 % to +200 %
NIST_A — actual speed FC 300 → PLC 0x4000 = 100 % of motor nominal -200 % to +200 %
Motor current (PZD3 IN) FC 300 → PLC 0x4000 = 100 % of inverter rated current 0 % to 200 %
Frequency (NSOLL_B / NIST_B) Bidirectional 0x4000 = 0.5 × (f_max + f_min), 0xC000 = 0.5 × (f_max − f_min) 0 to FC 300 par. 4-14

STL example: scaling motor current from PZD3 IN to engineering units in Amps.

// PZD3 IN is in DB100.DBW4 (PPO 5 layout). Convert to REAL Amps.
// FC300 rated current is in parameter 1-24 (1-25 / 1-26 are alternate units)
L DB100.DBW 4
ITD                    // sign-extend to double integer
DTR                    // convert to REAL
L 1.0                  // or L "Rated_Current_A" REAL tag from DB
/R
T "Motor_A"            // result in Amps

For a raw hex value of W#16#009B at PZD3 IN, the Profidrive formula gives 0x9B = 155, divided by 0x4000 (16384) × rated current. A common 10 A drive thus returns 155 / 16384 × 10 = 0.0946 × 10 = 0.946 A. The snippet 0.01 × WORD_TO_INT is a quick first-order scaling; replace it with the rated-current-aware formula for accurate readings.

Control Word (STW1) Bit Map

The FC 300 Profidrive control word occupies PZD1 OUT. Sequence the bits as follows for a normal start/stop/profile control.

Bit Name (Profidrive) Function
0 ON / OFF1 0 = ramp-stop to 0; 1 = enable drive
1 OFF2 (coast stop) 0 = immediate pulse inhibit; 1 = OFF2 inactive
2 OFF3 (quick stop) 0 = quick stop with par. 3-81 ramp; 1 = OFF3 inactive
3 Enable operation 0 = inhibit; 1 = enable pulses
4 Ramp generator enable 0 = freeze RFG; 1 = enable RFG
5 Ramp generator start 0 = freeze output; 1 = release
6 Setpoint enable 0 = setpoint = 0; 1 = setpoint active
7 Fault acknowledge (0→1) Rising edge resets faults
8 Jog 1 Jog speed bit 1
9 Jog 2 Jog speed bit 2
10 Control by PLC 1 = PZD control, 0 = local control
11 Reverse 0 = forward, 1 = reverse (with FC 300 par. 8-04)
12..15 Speed control bits Vendor specific (FC 300 uses for fixed setpoints / quick stop ramp)

Standard start sequence (STW1): 0x047E → 0x047F. Acknowledge a fault with 0x0480 → 0x047F. A coast stop is 0x047C. A quick stop is 0x047A.

Status Word (ZSW1) Bit Map

Bit Name Meaning
0 Ready to switch on DC link charged, no fault
1 Ready to operate Control section energized
2 Operation enabled Pulses active, drive running
3 Fault present 1 = active trip
4 Coast stop active OFF2 active
5 Quick stop active OFF3 active
6 Switch-on inhibited Drive will not start until STW1 bit 0 toggles
7 Warning present Non-fatal alarm active
8 Speed = reference Drive at setpoint
9 Control requested Drive requires PLC control (bit 10 STW1)
10 f or n reached/exceeded Threshold per par. 8-48
11..15 Vendor specific Speed, current, torque limit, etc.

Commissioning and Verification

  1. Download the HW Config to the CPU 315-2DP and put the CPU in RUN. The DP master enters the OPERATE state once a slave responds to the parameterization telegram.
  2. Read parameter 15-61 on the FC 300 to confirm MCA 101 firmware and Profidrive version. Read 15-60/15-62 for the FC 300 master SW / option SW versions.
  3. Watch the S7 diagnostic buffer. Bus errors are recorded with cause codes: 0x001F (station failure) → slave not responding at the configured address; 0x0044 (parameterization fault) → GSD mismatch or wrong PPO; 0x004D (configuration fault) → slot configuration mismatch.
  4. Use the STEP 7 PLC → Monitor/Modify on the configured I/O to confirm PZD toggling. With the drive in HAND ON, force PQW 256 to W#16#047E and read PIW 256; bit 0 of ZSW1 should be 1 (ready to switch on).
  5. Force PQW 256 = W#16#047F and verify ZSW1 = W#16#0C37 (ready, enabled, switch-on inhibited cleared). The drive should now ramp the motor to the value written to PQW 258 (NSOLL_A).
  6. Read PQW 256 / PIW 258 in real time to verify the feedback (NIST_A) tracks NSOLL_A. For NSOLL_A = 0x4000, the actual frequency should be 100 % of motor nominal speed.
  7. For parameter channel validation, write a request to read parameter 1-00 (PKE = 0x1001, IND = 0) and verify the response is 0x1001 / value = 0.

Troubleshooting Matrix

Symptom Diagnostic Buffer Code Likely Root Cause Corrective Action
Drive goes to SAFE STOP / FC 300 reports bus timeout 0x001F Wrong PROFIBUS address in par. 8-31 or wrong slave address in HW Config Match the two values. Re-power the drive after changing par. 8-30 / 8-31.
Diag buffer "Configuration fault" 0x004D PPO type in HW Config does not match the FC 300 slot configuration Re-import the GSD, re-insert the drive with the correct PPO. Save, compile, download.
Diag buffer "Parameterization fault" 0x0044 GSD revision mismatch with MCA 101 firmware Update GSD to match the option firmware version reported by 15-61.
PZD reads back as 0x0000 / 0xFFFF n/a Base address in SFC14/15 does not match HW Config Re-read the LADDR in HW Config; convert to hex (256 → W#16#100).
PZD values are swapped or rotated 16-bit n/a Direct PIW/PQW used on PPO with 6+ words Switch to SFC14/15 with a properly sized DB.
Control word written, drive does not start n/a STW1 bit 10 not set, or par. 8-50 = "No operation" Set bit 10 of STW1, then set bit 0 (rising edge). Check par. 8-10 is set to Profidrive.
Motor current reads as zero even though drive is running n/a PZD3 IN is mapped to "No operation" in par. 8-51 Map par. 16-14 (motor current) or 16-15 (motor current %) into PZD3 IN.
DP-V1 acyclic read returns STATUS = 0x80A7 0x80A7 CPU firmware < V3.0 or wrong INDEX Use INDEX = 47 for Profidrive. Update CPU firmware if required.
Drive acknowledges parameter but value not visible n/a PKW is double-word but AK = 1 (single-word read) Use AK = 5/6 for double-word values (e.g., par. 3-41 ramp-up time).

Cross-Reference and Standards

The PROFIdrive application profile is published by PI (PROFIBUS & PROFINET International). The current profile (PROFIdrive V4.2) is order no. 3.172 from PI, and is the governing document for the STW1/ZSW1 bit map and the PPO type definitions used here. The Schneider Electric TeSys T LTMR PROFIBUS DP Communication Guide and the TeSys Tera PROFIBUS DP Guide document the same PKE/IND/PWE channel layout and the SFC14/15-equivalent acyclic services, useful when validating the slave side. Rockwell Automation publication 2711-UM005 covers the same PI (input) / PO (output) direction convention used in the FC 300 slave configuration.

FAQ

Do I need SFC14 / SFC15 for a PPO 3 configuration on the S7-300?

No. PPO 3 has only two PZD words in each direction (four words total, word-aligned) and is read / written directly with L PIW and T PQW in OB1. Use SFC14/15 only when the PZD image is more than four words (PPO 1, 2, 5, 6, 7, 8) to guarantee consistency.

How do I read parameter 16-14 (motor current) on FC 300 from the S7-300?

Map parameter 16-14 to PZD3 IN by writing its index to FC 300 parameter 8-51, then read PIW x+4 (offset 4 bytes from the PZD start) with the direct PIW access (PPO 3) or DB100.DBW4 after SFC14 (PPO 5/6/8). Scale the raw 16-bit value with the inverter rated current to obtain Amps.

What is the difference between SFC14 and SFC15 on the CPU 315-2DP?

SFC14 (DPRD_DAT) reads a contiguous block from the slave into a DB; SFC15 (DPWR_DAT) writes a contiguous block from a DB to the slave. Both are required for any PPO with more than four PZD words; the LADDR is the W#16#xxxx form of the slave base address from HW Config (e.g. 256 decimal = W#16#100).

Why does the drive show "no PCD communication" with the FC 300 after I press Start?

FC 300 default is HAND/AUTO mode and looks for control from the LCP unless bit 10 of STW1 is set to 1 in the cyclic PZD. Set STW1.10 = 1, toggle STW1.0 for an off-to-on transition (0x047E → 0x047F), and confirm FC 300 parameter 8-50 "Coasting Select" is set to "[1] Bus" so the drive listens to the network commands.

Can I use a CP 342-5 instead of the integrated DP master on the CPU 315-2DP?

Yes — a CP 342-5 is required if the CPU does not have a DP port (e.g. CPU 314) or if the number of slaves exceeds 32, but the application code is the same: SFC14/15 against the CP-assigned I/O base address or direct PIW/PQW. The PPO types and parameter channel are unchanged.

Back to blog