Configuring SIMOTION D435 X_SEND X_RCV to S7 CPUs over PROFIBUS
SIMOTION D435 motion controllers expose two PROFIBUS DP interfaces and can act as class-1 masters on the network. S7-CPU stations connected as DP slaves exchange user data with the D435 through the S7 communication services X_SEND / X_RCV (SFC 65 / SFC 66). On the SIMOTION side, the same services are exposed as system functions _xsend and _xreceive, callable from ST, MCC, or LAD/FBD with the same semantics. The payload is carried in a single contiguous buffer; 200 bytes is the typical field-tested size, with the SDU upper bound reaching 240 bytes on current D435 firmware (V4.5 / V5.x).
This guide walks through the complete configuration: HW Config on both sides, the S7 connection definition, the data buffer declaration, the ST programs on SIMOTION, and the SCL/LAD program on the S7 CPU. A worked example maps DB10.DBB0 bit flags from the S7 into individual BOOL variables on the SIMOTION motion program.
Prerequisites
| Item | Specification |
|---|---|
| SIMOTION controller | SIMOTION D435 (or D425, D445, D445-1) with PROFIBUS master interface |
| SIMOTION firmware | V4.4 or higher recommended; V5.4+ recommended for extended diagnostics and 240-byte PDU |
| SIMOTION engineering | SCOUT TIA V4.5+ or SCOUT V5.x with TIA Portal integration |
| S7 CPU | S7-300 (CPU 31x, 31xC, 31x PN/DP), S7-400, S7-1200, S7-1500 |
| S7-CPU firmware | Any current firmware that supports S7 communication |
| PROFIBUS cable | PROFIBUS DP cable, twisted shielded, characteristic impedance 150 Ω |
| PROFIBUS connector | Siemens 6ES7972-0BA12-0XA0 (with PG port) or 6ES7972-0BB12-0XA0 (without PG port) |
| Bus terminator | Activated on first and last physical station |
| Max cable length | 1,200 m at 9.6 kbit/s, 1,000 m at 187.5 kbit/s, 400 m at 500 kbit/s, 200 m at 1.5 Mbit/s, 100 m at 12 Mbit/s |
| Max DP stations | 32 per segment (126 with repeaters); up to 124 slaves on D435 |
PROFIBUS Network Topology and Addressing
The SIMOTION D435 is assigned the role of DP class-1 master on the segment. Each S7 CPU is a DP slave. Each station must have a unique PROFIBUS address between 1 and 126; the address 0 is reserved for class-2 masters (e.g., programming devices).
The physical bus must be terminated at both ends with the bus terminator switch set to ON. Unterminated or double-terminated segments cause intermittent errors, retries, and elevated bus error counters. Maximum bus load should stay below 70% to leave headroom for retries; sustained bursts above this produce timeouts and STATUS 0019 (network error) responses.
Hardware Configuration in SIMOTION Scout
- Open the SIMOTION project in SCOUT and switch to HW Config. Right-click the D435 station and choose Open HW Config.
- Configure the PROFIBUS interface. Double-click the DP master interface (X126 or X136). Set the PROFIBUS address of the D435 to a free value (2 in this example). Set the baud rate to match the segment — 1.5 Mbit/s is a safe default; 12 Mbit/s requires short cable and good shielding.
- Add S7 CPUs as DP slaves. Drag the appropriate S7-CPU object (e.g., SIMATIC 300 / CPU 315-2 DP) from the hardware catalog into the DP master system. Assign each a unique PROFIBUS address (3, 4, ...).
- Insert a universal slot if the S7 station is not in the catalog. Use DPV0 Slave and configure slot 0 with the desired number of input/output bytes. Note: this is the direct I/O image, not used by X_SEND/X_RCV. S7 communication is a separate service that runs over the same PROFIBUS connection regardless of the I/O slot configuration.
-
Configure the S7 connection. Switch to NetPro (in classic SCOUT) or use the Connections editor (in SCOUT TIA). Right-click the D435 station, choose Insert New Connection, select the S7-CPU partner, and choose S7 connection with protocol S7 communication. Assign a unique local connection ID — this is the reference SIMOTION passes to
_xsend/_xreceive. - Download the hardware configuration to the D435 and the S7-CPU stations.
Reference documentation: Direct data exchange via PROFIBUS DP in the SIMOTION SCOUT TIA manual.
S7 CPU Side: Programming SFC65 X_SEND
On the S7 CPU, the X_SEND / X_RCV blocks are part of the standard IEC library — they do not need to be installed, but they require an active PROFIBUS interface. SFC 65 (X_SEND) and SFC 66 (X_RCV) reside in the CPU firmware and are called from any OB, FB, or FC.
SFC 65 X_SEND interface
| Parameter | Declaration | Type | Description |
|---|---|---|---|
| REQ | INPUT | BOOL | Start the job on a rising edge |
| CONT | INPUT | BOOL | TRUE = send/recv job remains in queue after DONE |
| DEST_ID | INPUT | WORD | PROFIBUS address of the partner CPU in the low byte (W#16#00XX) |
| REQ_ID | INPUT | DWORD | Unique identifier of the data block (32-bit) |
| SD | INPUT | ANY | Pointer to the source data area |
| LEN | INPUT | INT | Number of bytes to send (1–200 typical, 240 max) |
| RET_VAL | OUTPUT | INT | Return value of the job (0 = OK, ≠ 0 = error code) |
| DONE | OUTPUT | BOOL | Job completed without error (one-cycle pulse) |
| ERROR | OUTPUT | BOOL | Job completed with error (one-cycle pulse) |
| STATUS | OUTPUT | WORD | Detailed status code |
Typical SCL (S7-300/400) call from OB1 or a cyclic OB:
// SCL — S7-300/400 calling X_SEND to send DB10.DBB0 to SIMOTION D435
IF bStartSend THEN
X_SEND(REQ := TRUE,
CONT := FALSE,
DEST_ID:= W#16#0002, // D435 PROFIBUS address = 2
REQ_ID := DW#16#1001_0001, // unique send identifier
SD := P#DB10.DBX0.0 BYTE 1,
LEN := 1,
RET_VAL:= iXsendRetVal,
DONE := bXsendDone,
ERROR := bXsendError,
STATUS := wXsendStatus);
END_IF;
For S7-1200/1500, SFC 65 / SFC 66 are available when the access level allows "PUT/GET communication from remote partner." The DB access must use symbolic or absolute P# pointer format. The function block names are X_SEND / X_RCV in the S7-1500 instruction set; the parameter signature is identical.
S7 CPU Side: Programming SFC66 X_RCV
| Parameter | Declaration | Type | Description |
|---|---|---|---|
| REQ | INPUT | BOOL | Start a receive job; with CONT=TRUE may be left permanently TRUE |
| CONT | INPUT | BOOL | TRUE = job remains in queue after receipt |
| RET_VAL | OUTPUT | INT | Return value |
| REQ_ID | OUTPUT | DWORD | Identifier of the received data block |
| NDA | OUTPUT | BOOL | TRUE = new data available in RD |
| RD | IN_OUT | ANY | Pointer to the receive buffer |
| LEN | OUTPUT | INT | Number of bytes actually received |
| ERROR | OUTPUT | BOOL | TRUE = error during receive |
| STATUS | OUTPUT | WORD | Detailed status code |
// SCL — S7 CPU receiving the SIMOTION heartbeat / status word
X_RCV(REQ := TRUE,
CONT := TRUE, // job stays queued
RET_VAL:= iXrcvRetVal,
REQ_ID := dwXrcvReqId,
NDA := bXrcvNewData,
RD := P#DB11.DBX0.0 BYTE 20,
LEN := iXrcvLen,
ERROR := bXrcvError,
STATUS := wXrcvStatus);
SIMOTION: Data Buffer Declaration
The data buffer in SIMOTION is declared as an ARRAY [0..199] OF BYTE in the interface or implementation section of the program. The actual size can be tuned down (1, 10, 50) to match the payload of the specific transfer. The buffer is then passed to the system function as an in-out variable.
// ST — variable declaration in a SIMOTION program unit (e.g. POU_Comm)
INTERFACE
VAR_GLOBAL
// Per-CPU buffers, one pair per S7 partner
cpu1_recv_buffer : ARRAY[0..199] OF BYTE; // data received from CPU 1
cpu1_send_buffer : ARRAY[0..199] OF BYTE; // data sent to CPU 1
cpu1_len : INT;
// Bit flags exposed to motion / HMI
cpu1_error_1 : BOOL;
cpu1_error_2 : BOOL;
cpu1_error_3 : BOOL;
cpu1_error_4 : BOOL;
cpu1_error_5 : BOOL;
cpu1_error_6 : BOOL;
cpu1_error_7 : BOOL;
cpu1_error_8 : BOOL;
// Diagnostics
wCommStatus : WORD; // status of last _xsend/_xreceive
bCommError : BOOL; // sticky error flag
END_VAR
END_INTERFACE
An AT view can be used to map bytes to booleans without manual bit-slicing, but the most common field approach is direct bit-slice extraction on the named booleans:
// In the program (ST):
cpu1_error_1 := cpu1_recv_buffer[0].%X0;
cpu1_error_2 := cpu1_recv_buffer[0].%X1;
cpu1_error_3 := cpu1_recv_buffer[0].%X2;
cpu1_error_4 := cpu1_recv_buffer[0].%X3;
cpu1_error_5 := cpu1_recv_buffer[0].%X4;
cpu1_error_6 := cpu1_recv_buffer[0].%X5;
cpu1_error_7 := cpu1_recv_buffer[0].%X6;
cpu1_error_8 := cpu1_recv_buffer[0].%X7;
SIMOTION: _xsend and _xreceive System Functions
The _xsend and _xreceive system functions are part of the SIMOTION runtime. They are configured in the SCOUT project (Connections) and invoked in the user program. The system functions are documented in the SCOUT online help under System functions / Communication / S7 communication.
Command structure
Each command has the structure:
// ST — _xsend invocation (documented signature)
_xsend(
EXECUTE : BOOL, // start a new job
COMPLETION : BOOL, // job completed (one-cycle)
ERROR : BOOL, // job completed with error
ERRORID : WORD, // return code (see status table)
CONNECTION_ID : INT, // matches the connection ID in NetPro
REQ_ID : DWORD, // unique job identifier (sender-defined)
DATA : ARRAY[0..n] OF BYTE // in-out buffer (bytes to send)
);
// ST — _xreceive invocation
_xreceive(
EXECUTE : BOOL, // re-queue receive
COMPLETION : BOOL, // data received (one-cycle pulse)
ERROR : BOOL, // error
ERRORID : WORD, // return code
CONNECTION_ID : INT, // connection ID
REQ_ID : DWORD, // job identifier (filled on receive)
DATA : ARRAY[0..n] OF BYTE // out buffer (received data)
);
Calling _xsend/_xreceive from a cyclic task
// ST — typical cyclic send/receive block, called every motion task cycle
PROGRAM POU_Comm
VAR
fTrigSend : R_TRIG; // one-shot start
bSendTrigger : BOOL; // external trigger, e.g. from a motion event
END_VAR
// Build outgoing payload (example: a 20-byte status block)
cpu1_send_buffer[0] := bCam1Active;
cpu1_send_buffer[1] := bCam2Active;
cpu1_send_buffer[2] := bCam3Active;
// ... populate buffer[0..19] ...
fTrigSend(CLK := bSendTrigger);
IF fTrigSend.Q THEN
// _xsend
_xsend(EXECUTE := TRUE,
CONNECTION_ID := 1, // 1 = connection to S7 CPU at addr 3
REQ_ID := 16#1001_0001,
DATA := cpu1_send_buffer,
COMPLETION := bXsendDone,
ERROR := bXsendError,
ERRORID := wXsendStatus);
END_IF;
// _xreceive — leave running continuously
_xreceive(EXECUTE := TRUE,
CONNECTION_ID := 1,
REQ_ID := dwXrcvId,
DATA := cpu1_recv_buffer,
COMPLETION := bXrcvDone,
ERROR := bXrcvError,
ERRORID := wXrcvStatus);
// Map byte 0 to bools
cpu1_error_1 := cpu1_recv_buffer[0].%X0;
cpu1_error_2 := cpu1_recv_buffer[0].%X1;
cpu1_error_3 := cpu1_recv_buffer[0].%X2;
cpu1_error_4 := cpu1_recv_buffer[0].%X3;
cpu1_error_5 := cpu1_recv_buffer[0].%X4;
cpu1_error_6 := cpu1_recv_buffer[0].%X5;
cpu1_error_7 := cpu1_recv_buffer[0].%X6;
cpu1_error_8 := cpu1_recv_buffer[0].%X7;
// Sticky error latching for HMI alarming
IF bXrcvError OR bXsendError THEN
bCommError := TRUE;
wCommStatus := SEL(bXrcvError, wXsendStatus, wXrcvStatus);
END_IF;
END_PROGRAM
Complete Example: Error Flag Mapping (DB10 Byte 0)
Goal: S7 CPU 1 has DB10.DBB0 containing eight error bits. The S7 sends that byte via X_SEND to the D435; the D435 receives it and exposes each bit as a named BOOL on the motion program.
S7 side (in OB1 or cyclic OB)
// SCL — CPU 1 (address 3) sends DB10.DBB0 to D435 (address 2)
IF bTriggerSend THEN
X_SEND(REQ := TRUE,
CONT := FALSE,
DEST_ID:= W#16#0002, // SIMOTION D435 PROFIBUS address
REQ_ID := DW#16#A000_0001, // identifies the job
SD := P#DB10.DBX0.0 BYTE 1,
LEN := 1,
RET_VAL:= iRetVal,
DONE := bDone,
ERROR := bErr,
STATUS := wStatus);
END_IF;
SIMOTION side
The corresponding D435 has connection ID 1 in the SCOUT Connections editor pointing to the S7 CPU at address 3. The ST program above is the complete example. The receive buffer cpu1_recv_buffer[0] is filled with the byte from DB10.DBB0 on the S7 side, and the bit extractions feed cpu1_error_1 through cpu1_error_8.
To avoid byte-order surprises: X_SEND/X_RCV transmits bytes in raw form, no byte swap. The first byte of the SD ANY pointer on the S7 lands in cpu1_recv_buffer[0]; bit 0 is the least significant bit of that byte. cpu1_recv_buffer[0].%X0 corresponds to S7 bit 0 of DB10.DBB0.
Return Codes and Diagnostics
The STATUS / RET_VAL / ERRORID parameters of the SIMOTION system functions and the S7 SFCs carry a 16-bit code with the structure shown in the following table. The same families of status codes apply on both sides; the mapping is consistent.
| Code (hex) | Class | Meaning | Suggested action |
|---|---|---|---|
| 0000 | OK | Job completed successfully | — |
| 0001 | Send / recv | Length error (LEN < 1 or > max) | Verify LEN parameter; max is 200 typical, 240 firmware-dependent |
| 0002 | Send / recv | Address / data type error in ANY pointer | Check DB number, byte offset, and length |
| 0003 | Recv | RD buffer too small for incoming SD | Increase length of the RD ANY pointer |
| 0004 | Send | SD length mismatch with LEN | Verify SD length matches LEN |
| 0005 | Send / recv | Partner CPU not connected | Check PROFIBUS wiring, partner PROFIBUS address, CPU RUN/STOP |
| 0006 | Send / recv | Partner busy, retry needed | Leave CONT=TRUE to retry; monitor REQ_ID changes |
| 0007 | Send / recv | Local resource error | Reduce concurrent S7 connections; check system resources |
| 0008 | Send / recv | Connection error | Recompile the connection in SCOUT and download to D435 |
| 0009 | Send / recv | Partner reset (re-initialization) | Re-establish the connection in the next cycle; expect transient |
| 000A | Send / recv | Partner error | Inspect partner CPU diagnostic buffer |
| 000B | Send / recv | Connection aborted by partner | Check partner power supply and PROFIBUS termination |
| 000C | Send / recv | Connection not yet established | Wait for SCOUT to fully initialize; check connection configuration |
| 000D | Send / recv | Connection rejected by partner | Verify PROTECTION / PUT-GET access level on partner |
| 000E | Send / recv | Connection terminated | Check for duplicate connection IDs |
| 000F | Send / recv | Partner CPU in STOP | Bring partner to RUN; S7 communication requires RUN or RUN with stop |
| 0010 | Recv | Passivation (partner de-energized) | Check partner power and PROFIBUS connection |
| 0011 | Send / recv | Partner CPU in HOLD | Resume partner or accept delayed response |
| 0012 | Send / recv | Partner in restart | Wait for restart to complete |
| 0013 | Send / recv | Cold restart triggered | Wait, retry |
| 0014 | Send / recv | Hot restart triggered | Wait, retry |
| 0015 | Send / recv | Error in partner CPU | Read partner diagnostic buffer |
| 0016 | Send / recv | Resource error (memory) | Reduce S7 connection count; check CPU memory |
| 0018 | Send / recv | Remote address error | Verify DEST_ID matches the partner PROFIBUS address |
| 0019 | Send / recv | Network error | Inspect PROFIBUS diagnostics (bus errors, retries) |
| 001A | Send / recv | Local network error | Check local DP interface, baud rate, segment termination |
| 001B | Send / recv | Connection aborted by local CPU | Check local CPU diagnostic buffer |
| 001C | Send / recv | Security violation | Check CPU protection level; enable PUT/GET on S7-1200/1500 |
| 0020 | Send / recv | Internal error | Power-cycle D435, re-download project |
For PROFIBUS physical-layer diagnostics, the S7 FB 125 (DP_DIAG) and the SIMOTION PROFIBUS Diagnostics panel in SCOUT provide station status, bus error counters, and retry counts. A healthy segment shows 0 retries and 0 station failures. In SCOUT, open Target system → PROFIBUS → Diagnostics to inspect counters and per-slave status.
Verification Procedure
- Compile and download the S7 project. Use STEP 7 or TIA Portal. The S7-1200/1500 requires Permit access with PUT/GET communication from remote partner enabled.
- Compile and download the SIMOTION project. Select the D435 station in SCOUT and click Download (full project). Confirm Download to target system with Replace all.
- Switch both sides to RUN. SIMOTION goes through the standard startup sequence; the S7 CPU keyswitch must be in RUN or RUN-P.
-
Open the SCOUT online watch window on the variables
cpu1_recv_buffer,cpu1_error_1..8, and the status wordswXrcvStatus/wXsendStatus. Set the display format forcpu1_recv_buffer[0]to Bin for direct bit visibility. -
Force a bit in DB10.DBB0 on the S7 side (or use a VAT). Within one motion cycle, the corresponding
cpu1_error_nin SIMOTION must go TRUE. -
Check NDA and REQ_ID. After a successful receive,
bXrcvDonemust pulse anddwXrcvIdmust equal the S7'sREQ_IDvalue (16#A000_0001in the example). -
Reverse direction. Force
cpu1_send_buffer[0]in SIMOTION, triggerbSendTrigger, and confirm the value appears in the S7 DB11.DBB0 (or wherever the S7's RD buffer points). - Verify the PROFIBUS diagnostics panel. Station status of the S7 CPU must be OK; bus error counter must be 0; retry counter must be 0.
Troubleshooting Matrix
| Symptom | Likely cause | Fix |
|---|---|---|
| STATUS = 0005 on every cycle | Partner CPU PROFIBUS address wrong or partner in STOP | Verify DEST_ID matches the actual DP address; bring partner to RUN |
| STATUS = 000C intermittent | Connection not fully established; startup ordering | Add a startup delay; check connection download in SCOUT |
| STATUS = 000D on S7-1500 | PUT/GET disabled | Enable Permit access with PUT/GET communication from remote partner |
| STATUS = 000F (partner in STOP) | Partner CPU keyswitch in STOP or STOP due to fault | Clear partner fault; turn keyswitch to RUN |
| STATUS = 0018 | DEST_ID format error (high byte not zero) | Use W#16#00XX — high byte must be 0 for PROFIBUS |
| STATUS = 0019 + rising bus errors | Bad cable, wrong termination, or EMI | Check terminator switches; replace connector; verify shield bonded to the connector shell |
| STATUS = 001B | D435 local connection table missing the entry | Re-open NetPro, confirm the connection is downloaded |
| cpu1_recv_buffer always 0 | SFC 65/66 not called cyclically, or SD/RD length mismatch | Place SFC 65 call in OB1 or a cyclic OB; verify LEN parameter matches SD/RD length |
| Bits swapped or rotated | Byte-order assumption wrong | Confirm bit indexing: X_SEND does not swap bytes; X0 is LSB of the first byte |
| Connection works at 1.5 Mbit/s, fails at 12 Mbit/s | Cable too long, missing terminator, or poor shielding | Reduce baud rate to 1.5 Mbit/s, or replace cable and connectors with 12 Mbit/s-rated types |
| S7-1500 reports SF LED, but SFC returns 000C | Security event log active | Read S7-1500 diagnostic buffer for security violation |
| D435 SF LED + system fault 7502/7503 | Connection configuration not loaded | Re-download HW Config; in SCOUT, right-click D435 → Download connections |
| Intermittent timeouts at 8 ms task cycle | Task cycle too fast for 200-byte PDU | Increase send interval to 20–50 ms; 1.5 Mbit/s segment supports ~10 kbytes/s effective |
| Receive buffer holds stale data | RD pointer not refreshed by X_RCV when no new data | Gate the BOOL extraction with NDA from the receive block, not on every cycle |
| _xsend works once, then STATUS 0006 forever | REQ_ID collision; partner expects new ID | Increment REQ_ID by 1 on each new send, or use the partner's REQ_ID echoed back |
PROFIBUS Performance and Bus Load
For a 1.5 Mbit/s PROFIBUS segment, the effective user data throughput is approximately 0.7 Mbit/s. A 200-byte X_SEND/X_RCV PDU requires ~1.3 ms of bus time including token-passing, header, trailer, and acknowledgements. Calling _xsend every 1 ms in a fast motion task saturates the segment; in practice, the call should be triggered from a 10–20 ms cyclic task or a TO event. A guideline for production commissioning:
| Baud rate | Max PDU / ms | Recommended minimum cycle |
|---|---|---|
| 9.6 kbit/s | ~1 byte | 200 ms |
| 187.5 kbit/s | ~20 bytes | 20 ms |
| 500 kbit/s | ~60 bytes | 10 ms |
| 1.5 Mbit/s | ~200 bytes | 8 ms |
| 12 Mbit/s | ~200 bytes | 2 ms |
Direct data exchange (DPV0/DPV1 slave-to-slave) and X_SEND/X_RCV are independent. The S7 communication path uses its own service access points and is unaffected by the slave I/O configuration. For more information, see the Direct data exchange via PROFIBUS DP manual page.
Multi-Partner and Edge Cases
When the D435 communicates with more than one S7 CPU, the SCOUT Connections editor must define a unique S7 connection entry per partner, each with a unique local connection ID. The user program instantiates one set of buffers per partner, e.g., cpu1_recv_buffer, cpu2_recv_buffer, etc., and calls _xreceive once per connection with the corresponding ID. Mixing buffers across partners corrupts data because each _xreceive block is tied to its connection.
Edge cases to consider during commissioning:
- Startup race. The S7 CPU may reach RUN before the D435 has finished downloading connections. Add a startup delay (5–10 s) on the S7 side before the first X_SEND call to avoid STATUS 0005 / 000C in the first cycles.
-
REQ_ID lifecycle. The REQ_ID is an arbitrary 32-bit tag. The S7 returns the REQ_ID it received via X_RCV's
REQ_IDoutput. Use this echo to correlate send and receive jobs in logs and HMI screens. - Buffer length changes. Reducing the buffer size in the SIMOTION POU while the S7 still sends the old size produces STATUS 0003. Re-compile and download both sides to keep the size consistent.
- Hot-swapping S7 CPUs. S7 communication recovers automatically after a partner CPU restart. Expect transient STATUS 0009 / 0012 for a few hundred milliseconds. Latch the error with a debounce filter to avoid flooding the HMI alarm log.
FAQ
What is the maximum payload per X_SEND/X_RCV call between a SIMOTION D435 and an S7 CPU over PROFIBUS?
Up to 240 bytes per call on current D435 firmware (V4.5 / V5.x), although 200 bytes is the most commonly tested payload in the field. The LEN parameter on the S7 side and the array upper bound on the SIMOTION side must match the actual payload. Exceeding the limit returns status code 0001 (length error).
Do I need to configure an S7 connection in NetPro for X_SEND/X_RCV to work?
Yes. The D435 must have an S7 connection entry in the Connections editor of SCOUT pointing to the S7-CPU partner. The connection ID assigned there is the reference passed to _xsend / _xreceive. Without a configured connection, _xsend returns status 0008 (connection error).
Why does my S7-1500 partner return status 000D (connection rejected) immediately?
The S7-1500 CPU rejects incoming S7 communication by default. In TIA Portal, open the CPU properties → Protection & Security → Permit access with PUT/GET communication from remote partner and enable it. Re-download the project; status 000D clears on the next startup.
How do I map a single byte from the S7 DB to individual BOOL variables in SIMOTION?
Declare the receive buffer as ARRAY[0..n] OF BYTE in the SIMOTION POU. Use bit-slice operators (buffer[0].%X0, buffer[0].%X1, ...) to assign each bit to a named BOOL. Bit 0 corresponds to the least significant bit of the byte transmitted by X_SEND, with no byte swapping.
Can I use X_SEND/X_RCV while the D435 is also exchanging DP slave I/O on the same PROFIBUS interface?
Yes. X_SEND/X_RCV and direct DP I/O data exchange are independent services running over the same physical PROFIBUS segment. The S7 communication uses the master's S7 connection table; the DP I/O uses the slave slot configuration. Make sure that the bus load at the chosen baud rate does not exceed ~70% to leave headroom for retries.
What is the right bus cycle time to avoid STATUS 0019 (network error)?
For a 200-byte PDU at 1.5 Mbit/s, the bus transfer takes ~1.3 ms. With three S7 partners each at 20 ms cycle time, sustained bus load is ~3.9%. With ten partners at 20 ms, load is ~13%, still well under the 70% threshold. Below 1.5 Mbit/s, lengthen the cycle proportionally. Always inspect the SCOUT PROFIBUS Diagnostics panel for the actual retry counter during commissioning.