Overview: The BiCo Logic 1/0 Problem
Engineers commissioning Sinamics S120 and Sinamics DCM drives frequently need to force a BICO (Binector/Connector) parameter to a constant high or low state from a Siemens PLC using acyclic (parameter) PROFINET or PROFIBUS communication. In the STARTER or Startdrive commissioning tool, every BiCo source field offers a "logic 1" or "logic 0" dropdown entry that the engineer selects in seconds. From a CPU 315, CPU 317, S7-1500, or ctrlX controller using acyclic write services, that constant does not exist as an addressable binector. The drive firmware rejects any attempt to write a literal "1" or "0" as a BiCo source identifier because BiCo sources are interconnections, not raw numeric values.
This reference explains the underlying PROFIdrive parameter channel, why the dropdown entries are not real parameters, and three field-proven workarounds (free AND/OR gates, fixed CU binectors, and digital input binectors) that allow a PLC to toggle a BiCo parameter high and low using only standard acyclic write requests.
BiCo Technology Fundamentals
BiCo is Siemens' internal signal-routing concept implemented in the Sinamics firmware. There are two signal classes:
| Signal Class | Data Width | Storage Type | Sink Parameter Prefix | Source Parameter Prefix |
|---|---|---|---|---|
| Binector | 1 bit (Boolean) | Digital interconnect | BI (Binector Input) | BO (Binector Output, e.g. r0722) |
| Connector | 16/32-bit word | Analog/numeric interconnect | CI (Connector Input) | CO (Connector Output) |
A BI parameter (e.g., P0840, P0844, P3104) accepts a source reference in the form of (parameter_number, bit_index). For example, r0722.4 references bit 4 of the digital-input status word. The actual numeric payload is a 32-bit double word whose value is the binector number, not a logic level. The drive internally decodes the binector number into the signal source.
When STARTER displays "logic 1" in a BiCo dropdown, the tool stores a special internal source descriptor. The drive firmware does not implement a binector that is permanently high; the dropdown entry is a placeholder that STARTER substitutes before the value is written to the drive.
Acyclic PROFIdrive Parameter Channel
Acyclic parameter access on Sinamics drives follows the PROFIdrive profile (PNO order no. 3.172). The PLC sends a parameter request to a specific PROFINET/PROFIBUS data record; the drive replies with a parameter response.
| Element | Value | Notes |
|---|---|---|
| Data record index (PROFINET) | 0xB02E (47 decimal) | Standard parameter access channel for PROFIdrive on PROFINET |
| Data record index (PROFIBUS) | DS 47 (DS = data set) | Equivalent PROFIBUS DPV0 slot |
| Max request size | 240 bytes per record | Up to 39 parameter requests per call |
| Request header byte 0 | 0x01 = read / 0x02 = write | Function code, MSB nibble reserved |
| Request header byte 1 | Number of parameters | 1..39 |
| Request header byte 2-3 | Drive Object reference | DO-ID, typically 1 for the Control Unit (CU320-2) |
| Parameter address | Attribute, Number of elements, PNU, Subindex | 10 bytes per parameter entry |
The PNU (parameter number) is the same number visible in the parameter list of the SINAMICS S120/S150 List Manual. For BiCo parameters, you must specify the correct drive object; selecting the wrong DO yields status word bit 0 (DO mismatch) in the parameter response.
Drive Object Addressing on Sinamics S120
A Sinamics S120 CU320-2 control unit hosts multiple drive objects (DOs). Each BiCo parameter belongs to a specific DO. Writing to the wrong DO triggers parameter error 0x02 (parameter does not exist) or 0x08 (no write access).
| Drive Object | Typical DO-ID | Examples of BiCo Parameters Hosted |
|---|---|---|
| Control Unit (CU320-2) | 1 | P3104, P3105, free blocks P20030..P20094 |
| Line Module (Active Line Module, Smart Line Module, Basic Line Module) | 2..7 | Line module control words |
| Motor Module / Drive Axis | 2..15 (configurable) | P0840 (ON/OFF1), P0844 (OFF2), P0848 (OFF3), P1155, P1156 |
| Terminal Module (TM31, TM15, TM120) | 20..31 | Digital I/O routing |
| Sensor Module (SMC, SME) | 30..39 | Encoder parameter interconnections |
| Hub (DCM, CX) | 100+ | Sinamics DCM cabinet DO |
The DO-ID is configured in the topology editor of STARTER or via parameter P9780 (DO numbering list). The PROFINET device model uses slot-based addressing that maps each DO to a subslot; acyclic records use the PROFINET API/slot/subslot triple, but the PROFIdrive data record index is always 0xB02E.
Why "Logic 1" and "Logic 0" Cannot Be Written Acyclically
A BiCo parameter stores a 32-bit value where bits 0..15 hold the parameter number of the source and bits 16..31 hold the bit index (or 0x8000xxxx encoding for indexed connectors). The "logic 1" dropdown in STARTER does not write any value at all; it writes no interconnection. Without a source, the BiCo sink is left at its default interconnection (often 0 = open). Toggling a BiCo to high via acyclic write therefore requires you to point it at a real, drive-internal binector that the firmware treats as a logical true at runtime.
Direct numeric writing of 0 or 1 to a BI parameter using acyclic parameter channel is technically accepted by the drive (the parameter accepts a U32), but the value is interpreted as a binector source descriptor, not as a logic level. A value of 0 means "no source" (open / false); a value of 1 means "use parameter 1 as source", which on most DOs does not exist. This is why Behnam's field note states: "There is no such thing as addressable 0 or 1 in the Drive."
RDREC and WRREC Programming Interface
Siemens S7-300, S7-400, S7-1200, and S7-1500 PLCs access the PROFIdrive parameter channel through the standard record services. The official Siemens documentation for these function blocks is in the STEP 7 Online Help and "System Software for S7-300/400, System and Standard Functions" reference manual.
| Block | Direction | Hardware Family | FB/FC Number |
|---|---|---|---|
| RDREC | Read record (PROFINET/PROFIBUS) | S7-300/400, S7-1200/1500 | SFB52 / SFB53 (S7-300/400), FB (S7-1500) |
| WRREC | Write record (PROFINET/PROFIBUS) | S7-300/400, S7-1200/1500 | SFB53 / SFB54 (S7-300/400), FB (S7-1500) |
WRREC inputs:
-
REQ: Trigger (rising edge starts the job) -
ID: PROFINET device / PROFIBUS slave hardware identifier (from device configuration) -
INDEX: Data record index = 0xB02E -
LEN: Length of the request payload in bytes -
DONE,ERROR,STATUS: Result outputs -
RECORD: ANY pointer to the parameter request buffer
Solution 1: Free AND / OR Blocks as Toggleable Logic 1
Sinamics S120 firmware from V4.x onwards exposes free AND, OR, XOR, and NOT blocks on the Control Unit. These blocks sit in the BICO routing fabric; their inputs and outputs are parameterised, so you can drive one input from a fixed source and toggle the other input acyclically from the PLC. When the AND block is configured so that one input is always a fixed 1 source (or the gate has the appropriate input combination), toggling the other input forces the output high or low.
| Block | Parameter (Input) | Parameter (Output) | Function |
|---|---|---|---|
| AND 0 | P20030 (input 1), P20031 (input 2) | r20032 | Bitwise AND; if both inputs are 1, output is 1 |
| OR 0 | P20046 (input 1), P20047 (input 2) | r20048 | Bitwise OR; output 1 if any input is 1 |
| XOR 0 | P20062 (input 1), P20063 (input 2) | r20064 | Bitwise exclusive OR |
| NOT 0..7 | P20070..P20077 | r20078..r20085 | Bitwise inverters |
Typical toggle setup: connect P20031 (AND 0 input 2) via STARTER to a digital input binector like r0722.4. From the PLC, write the BI source descriptor of r0722.4 to P20031, and the PLC toggles the digital input to force the AND output. Because both inputs are under PLC control, this is the most flexible solution.
Solution 2: Fixed Binector Constants from the Control Unit
For applications where the PLC should be the only authority, route the BI parameter to one of the fixed CU binectors listed below. Each of these is a real binector that resolves to a constant in firmware and is available on the CU320-2 DO.
| Fixed Source | Type | Resolved Value | Use Case |
|---|---|---|---|
| 0 | Constant | Logic 0 | Disable a BiCo sink |
| 1 | Constant | Logic 1 (only valid on certain BICO types) | Force a BiCo sink high |
| BI: P0840 = r2090.0 (often default) | Status word bit | Control word bit 0 (ON/OFF1) | Standard ON command |
Warning: Constant binector "1" is firmware-version dependent. Sinamics S120 firmware V4.4, V4.5, V4.6, V4.7, V4.8, V5.1, V5.2, and V5.3 accept it for sinks that allow a constant source; firmware V5.4 onwards may reject it during parameter consistency check (F07085). Always run parameter consistency check (P397) before download.
Solution 3: Toggle via Digital Input Binector Mirror
This is the technique originally used by the engineer in the field thread: connect the BI sink to r0722.x (digital input status, bit x). The PLC cannot directly toggle the drive's 24 V input, but it can connect r0722.x to P20031 (AND 0 input 2) and connect P20030 (AND 0 input 1) to a constant-high source. The PLC then writes P20031 between the source descriptor of r0722.x and the source descriptor of a constant-0 binector. Although this is functionally equivalent to Solution 1, it preserves the original BiCo wiring and is the least invasive change to existing projects.
Complete STEP 7 Code Example (S7-300 / CPU 315)
The following STL snippet shows how to write the BI source descriptor for r0722.4 to P20031 on the CU320-2 (DO-ID = 1). The parameter request layout follows the PROFIdrive profile; only one parameter is written per call.
// --- Data block for PROFIdrive parameter request ---
DATA_BLOCK DB4711
STRUCT
// Request header
reqFunction : BYTE := B#16#02; // 0x02 = write parameter
reqCount : BYTE := B#16#01; // 1 parameter request
reqDO_ID : WORD := W#16#1; // Drive Object = Control Unit
// Parameter address (10 bytes)
pAttr : BYTE := B#16#10; // Attribute: Value (10h = write value)
pElems : BYTE := B#16#01; // Number of elements = 1
pPNU : WORD := W#16#4E4F;// PNU 20031 = 0x4E4F
pSubIdx : WORD := W#16#0; // Subindex = 0
// Value (4 bytes): BI source descriptor of r0722.4
// r0722 = 0x02D2; bit 4 means offset 0x10000 (bit index 4)
pValue : DWORD := DW#16#000102D2;
END_STRUCT
END_DATA_BLOCK
// --- Trigger a write call (FC4711 "Write_BiCo") ---
CALL FB4711 "Write_BiCo"
REQ := M4711.0 // start on rising edge
ID := W#16#12 // PROFINET device HW identifier
INDEX := B#16#2E // 0x2E low byte = 47 dec = 0xB02E
LEN := 16 // 16 bytes payload
DONE := M4711.1
ERROR := M4711.2
STATUS:= MW4714
RECORD:= P#DB4711.DBX0.0 BYTE 16
To set the BI source to a constant 0, write a DWORD value of 16#00000000. To point at a fixed high binector (when firmware accepts it), write the firmware-defined constant source descriptor; consult the SINAMICS S120/S150 List Manual for the value the firmware reserves for the "constant 1" sink type.
WRREC Status Word Interpretation
The STATUS output of WRREC contains two stacked values: the lower 8 bits are the standard PROFINET/PROFIBUS error code, the upper 8 bits are the PROFIdrive parameter error code.
| STATUS (hex) | Meaning | Corrective Action |
|---|---|---|
| 0x0000 0000 | Job running (no result yet) | Wait for DONE or ERROR |
| 0x0000 0001 | DONE - write successful | None |
| 0x0000 80A7 | PROFINET: record busy | Retry after 100 ms |
| 0x0000 80B0 | PROFINET: invalid index | Verify INDEX = 0xB02E |
| 0x0000 80B1 | PROFINET: wrong length | Match LEN to actual RECORD length |
| 0x0000 80B2 | PROFINET: invalid slot/subslot | Check device configuration in HWCN |
| 0x0000 80C0 | PROFINET: read conflict | Re-issue WRREC |
| 0x0000 80C1 | PROFINET: write conflict | Another writer is active; serialise jobs |
| 0xDF00 xxxx | Drive-side parameter error (xxxx = PROFIdrive error code) | See PROFIdrive error table below |
| 0xDF01 xxxx | Application-level parameter error | Inspect drive BICO list |
PROFIdrive Parameter Error Codes (xxxx)
| Code (hex) | Meaning |
|---|---|
| 0x00 | No error |
| 0x01 | Parameter number invalid |
| 0x02 | Parameter does not exist on this DO |
| 0x03 | Parameter read-only |
| 0x04 | Missing parameter value(s) |
| 0x05 | Type mismatch (e.g. writing DOUBLE to INTEGER) |
| 0x06 | Value out of range |
| 0x07 | Write access not enabled (BOP/IOP level) |
| 0x08 | No write access at this access level / state |
| 0x09 | Service currently not available |
| 0x0B | Operation rejected (drive in wrong operating state) |
| 0x0E | Sub-index not available |
| 0x0F | No array |
| 0x10 | Wrong data type / wrong length |
| 0x11 | Service not supported by DO |
| 0x14 | Value lower than minimum |
| 0x15 | Value higher than maximum |
Verification Procedure
- Commission the drive with STARTER and route the BI sink to
r20032.0(AND 0 output) instead of the previous source. - Connect one AND input (e.g. P20030) to a real binector that you control, such as the digital-input word
r0722.0. - Connect the second AND input (P20031) to a real binector that the PLC toggles. A common choice is another
r0722bit under PLC control, or a CU fixed binector. - Save the project to ROM (RAM to ROM copy, parameter P0971 = 1) so the wiring survives a power cycle.
- From the PLC, write the BI source descriptor of the controlled binector to P20031 using WRREC.
- Observe the AND output (r20032.0) online in STARTER trace or via the parameter monitor. It should follow the state of the controlled binector.
- Verify that the drive-side PROFIdrive parameter error code is 0x00 and WRREC STATUS equals 0x00000001 (DONE).
Field-Proven Diagnostics
| Symptom | Likely Cause | Action |
|---|---|---|
| WRREC returns 0xDF00-0002 | DO-ID mismatch | Read P9780 (DO list) on the drive; match reqDO_ID in the request header |
| WRREC returns 0xDF00-0007 | Access level too low | Set P0003 to 4 (Expert) and ensure the PLC is connected at the correct access level |
| WRREC returns 0xDF00-000B | Drive in commissioning mode | Finish commissioning (P0010 = 0), exit quick commissioning |
| Parameter accepts value but BI sink stays 0 | Source descriptor points at non-existent binector | Verify the parameter number in the BI descriptor exists on the addressed DO; r0722 is on CU, not on the drive axis |
| Drive enters F07085 after parameter download | BICO inconsistency (constant source not allowed) | Use Solution 1 (free block) instead of constant 1 |
| PLC toggles input but drive responds slowly | PROFINET IRT not configured; record retries | Switch to IRT top sync or use PROFIBUS DP for acyclic traffic |
Notes on Sinamics DCM and Other Sinamics Families
The same procedure applies to the Sinamics DCM DC converter and the Sinamics G120, G130, and S150 families. The parameter numbers of the free blocks differ on each family:
| Family | Free AND 0 | Free OR 0 | Reference Manual |
|---|---|---|---|
| SINAMICS S120 (CU320-2) | P20030 / P20031 / r20032 | P20046 / P20047 / r20048 | SINAMICS S120/S150 List Manual |
| SINAMICS G120 (CU250S-2, CU240E-2) | P20130 / P20131 / r20132 | P20136 / P20137 / r20138 | SINAMICS G120 List Manual |
| SINAMICS DCM (CUD) | P50500..P50530 family | P50540..P50570 family | SINAMICS DCM List Manual |
| SINAMICS V90 (BASIC) | Not available (no free blocks) | Not available | SINAMICS V90 Operating Instructions |
On Sinamics V90 the only way to toggle a BiCo-like parameter via acyclic write is to use the digital input mirror r0722.x; there are no free logic blocks. On Sinamics DCM the procedure is identical to S120 but the DO-ID is typically 1 for the CUD (Control Unit DC).
Safety Considerations
Toggling a BiCo source acyclically from a PLC bypasses the safe stop path if the parameter is part of a STO/SS1/SLS chain. Sinamics S120 functional safety (F-DI via PROFIsafe) is implemented in parameter P9650 / P9850 and must not be interconnected to free blocks that are PLC-toggled. The PLC must hold the safety rights in PROFIsafe and the safety stop commands (OFF1/OFF2/OFF3 sources P0840, P0844, P0848) should remain on their hardwired safe sources when the safety configuration requires it.
FAQ
Why does writing a literal 0 or 1 to a BI parameter fail to toggle the BiCo sink?
The drive interprets a BI parameter value as a 32-bit binector source descriptor: the lower 16 bits hold the parameter number and the upper 16 bits encode the bit index. A value of 0 means "no source" (the sink stays at its previous state, typically 0). A value of 1 means "parameter 1" which on most DOs does not exist. The "logic 1" entry you see in STARTER is a placeholder, not a real binector.
Which DO-ID do I use to write to a Control Unit parameter such as P3104?
Use DO-ID = 1 for the CU320-2 control unit on a Sinamics S120. The DO-ID is the second and third byte of the PROFIdrive request header (low byte first, big-endian order: B#16#01, B#16#00). For other DOs such as a Motor Module or Terminal Module, read the DO-ID list with P9780 or inspect the STARTER topology.
Can I use the free AND block P20030 with both inputs controlled from the PLC?
Yes. Drive P20030 and P20031 acyclically from the PLC with the desired BI source descriptors and read r20032 to confirm the output. With one input forced low (e.g. descriptor for a 0 binector), the AND output follows the other input - effectively giving you a BiCo buffer that the PLC can drive high or low.
What is the difference between WRREC error code 0x80B1 and 0xDF00-0005?
0x80B1 is a PROFINET-level error returned when the record length field in the request does not match the actual RECORD payload length. 0xDF00-0005 is a drive-side PROFIdrive error returned when the parameter data type does not match (e.g. you sent a U32 but the parameter is a U16). The first is fixed by correcting LEN on the PLC side, the second by correcting the parameter value format on the request buffer.
Does the same procedure apply to Sinamics DCM?
Yes. Sinamics DCM uses the same PROFIdrive acyclic channel with data record 0xB02E and the same WRREC/RDREC programming interface. The free block numbers differ (P505xx family on DCM versus P20030+ on S120). Consult the SINAMICS DCM List Manual for the exact PNU.
How fast can the PLC toggle a BiCo parameter via acyclic write?
On PROFINET with typical IRT cycle of 1 ms, a single WRREC call takes 2 to 4 PROFINET cycles (2-4 ms). High-speed toggling (>10 Hz) should use the cyclical process data (PZD) rather than acyclic; map the BI sink to a control word bit and drive it from the cyclical PZD for deterministic latency.