Skip to Content
On this page

Siemens Fetch / Write

This plugin accesses Siemens Fetch/Write over plain TCP. Use an S7-300 with a suitable CP343-1 or an S7-400 with a suitable CP443-1. Confirm the exact order number, firmware and supported services. Port 102, rack and slot settings belong to the separate S7 master.

Compatible devices and models

Device series / model examplesConnection requirements
S7-300 + CP343-1; S7-400 + CP443-1Requires a CP module version that supports and is configured for passive Fetch/Write connections. Check connection ports and permitted memory areas. An Ethernet port alone does not establish Fetch/Write support.

Configure the CP in STEP 7

These steps refer to classic STEP 7 / NetPro. Siemens FAQ 1853547  provides CP order numbers and the original engineering screenshots below. The original figures show ISO transport. This plugin supports TCP only: select TCP connection when creating your connection. Do not copy the example MAC address, TSAP or IP.

  1. Add the correct CP in hardware configuration. Open its Ethernet interface, assign the site IP/subnet and connect it to the Ethernet subnet. Use the CP address, not the engineering PC or another CPU interface. Save, compile and download the hardware configuration.

    Official CP443-1 Ethernet interface: IP and subnet

  2. Open Options → Configure Network. Select the CPU in NetPro and use Insert → New Connection. Choose an unspecified partner and TCP connection. Clear Active connection establishment: the gateway initiates and the CP listens.

    Official NetPro General page: passive connection establishment

  3. In Addresses, assign the CP local TCP port. This page uses 2000 as an example, not a fixed protocol port. In Options choose Fetch passive and enable S7 addressing mode, because this plugin uses byte offsets. S5 word addressing can select the wrong DB location.

    Official NetPro Options: Fetch passive and S7 addressing mode

  4. For writes, create a separate Write passive TCP connection on another local port, e.g. 2001, with S7 addressing mode enabled. Compile and download the connections, then check connection resources and CPU access permissions online. An offline save does not start a listener.

    Official NetPro Options: Write passive and S7 byte addressing

TCP identifies services by port; ISO/ISO-on-TCP TSAPs are not TCP ports. See STEP 7 FETCH/WRITE access . Grant only the required CPU data access according to the engineering and firmware version.

Gateway channel and device

Under Development Configuration → Collection Configuration, add a TcpClient channel. Remote address is CP-IP:FETCH-port, e.g. 192.168.10.20:2000. Use plain TCP without TLS or an arbitrary application heartbeat. Leave the bind address empty unless required. Enable the channel after configuring and connecting the CP.

Fetch/Write TCP channel and CP endpoint

Add a Siemens Fetch / Write device, associate the channel and set an interval such as 1000 ms. Start with one known point before adding a larger range.

Fetch/Write device, associated channel and interval

A channel has one endpoint. The device does not route read and write ports independently. For separate CP FETCH/WRITE listeners, create separate channels/devices: read-only variables on FETCH, write-only command variables on WRITE, and read back the same address through FETCH. Retrying WRITE on a FETCH port cannot change the service. Boolean writes first read the original byte; a WRITE-only passive endpoint cannot be assumed to support that sequence. Prefer a complete command word agreed with the PLC engineer for this configuration.

Plugin properties

Fetch/Write packing, scheduling and data order properties

PropertyMeaning and configuration
Maximum pack lengthDefault 200 bytes. Limits merged contiguous reads, not point count or TCP buffers. Follow CP request limits and valid memory ranges. DB/T/C lengths remain even; do not cross areas or DBs.
Read/write timeoutDefault 3000 ms per response. Channel connection timeout is separate. If TCP connects without a Fetch reply, check the service and port first.
Delay before frameDefault 0 ms. Add only when the peer requires a gap; it extends the cycle.
Retry countDefault 3. More retries extend offline waits and cannot repair an invalid address or service.
Read/write duty cycle; write priorityDefaults 3 and off. Schedule reads among writes, or cancel a read to prioritize a write. These do not turn FETCH into WRITE. See Collection configuration.
Data orderDefault ABCD. Compare the PLC INT/DINT/REAL definition and known value. Use BADC/CDAB/DCBA only when storage requires it; individual addresses can override.
Reverse string bytes within wordsDefault off. Applies to string byte pairs; it does not correct a wrong numeric type or string offset.

There is no PLC station, Rack, Slot or TSAP property.

Map a PLC location to a variable

Create and download an accessible test DB. Confirm an INT DB20.DBW100 = 1234 in the STEP 7 online table. Add a variable with address DB20.100, type Int16, array length 0, Read only on FETCH. The offset is byte 100, not word 50. Omit DBW: the data type supplies the width.

Fetch/Write variable: DB20.100, Int16 and scalar length

Field editor represents this as DB area, offset 100 and DB number 20. Confirm and fill back validates the address; also save the parent variable dialog.

Fetch/Write address fields and conversion overrides

FieldRule and effect
AreaDB, I, Q, M, T, C. I is read-only. Choices depend on access mode: select Read only before choosing I. Check actual CPU memory and permissions.
OffsetDecimal byte offset 0–65535, including this plugin’s T/C addresses. Offset plus accessed bytes must not exceed 65536. This is not a guarantee of CPU memory capacity.
BitBoolean requires .0–.7, e.g. M100.3; other types omit it. A larger generic input limit does not override the protocol. A one-byte DB Boolean also encounters the even-length rule; begin with an M bit rather than assuming every area/type works.
DB numberDecimal 0–255, for DB only. DB20/offset100 generates DB20.100. The block must exist, be downloaded and allow access.
Data order overrideVariable-specific ABCD/BADC/CDAB/DCBA; unset inherits the device. Determine from known values.
Encoding; string byte lengthString accesses raw character bytes, e.g. M200;len=8;encoding=ASCII. Length is bytes. Account for standard S7 STRING header bytes when selecting the actual character start. DB string lengths must be even.
BCD; variable string lengthUse only for matching PLC formats. See Common register options for conversion behavior.

There is no s=station option. Selectable types are Boolean, Byte, Int16, UInt16, Int32, UInt32, Int64, UInt64, Float, Double and String. DB/T/C access lengths must be even bytes; the starting offset itself need not be even. A single DB Byte fails this length rule; an INT occupies2 bytes and three INTs occupy6.

PLC definitionGateway address/typeActual access
INT DB20.DBW100 = 1234DB20.100 / Int16 / scalarBytes100–101, decimal1234.
REAL DB20.DBD104DB20.104 / Float / scalarBytes104–107, IEEE754.
MW100, MW102, MW104M100 / Int16 / array3Three words, six bytes.
M100.3M100.3 / BooleanBit3 of byte100; verify reads first.
Input word IW0I0 / UInt16 / Read onlyInput bytes0–1; WRITE cannot change a physical input.

Compare with the online table

Enable the real channel/device. Compare the same address, type and radix and confirm advancing sample times. In Protocol Debug → Read/Write start with DB20.100 / Int16 / count1; count means elements. Check device status in Messages for error responses. TCP connection alone does not prove collection.

Write an approved test word through the WRITE device, then read back through FETCH and STEP 7. The PLC program may immediately overwrite a successful write. Boolean read-modify-write is not atomic and is unsuitable for bytes shared by competing clients.

  • Connection refused/timeout: check CP IP, port, downloaded configuration, resources and network rules.
  • Connected but protocol fails: check FETCH/WRITE direction; avoid ordinary S7 or ISO-on-TCP listeners.
  • Some points fail: check DB length/number, permissions, even byte lengths and merged ranges.
  • Wrong values without errors: check S7/S5 addressing, offsets, types, string headers and byte order.