User Tools

Site Tools


siemens_iso

Siemens S7 Communication

Since version 1.7.0.3180 WebHMI supports work with Siemens S7 controllers via S7 Communication protocol over Ethernet (Profinet interface on the controller). It makes it possible for WebHMI to work with PLCs such as Siemens S7-300, S7-400, S7-1200, S7-1500, and others that support this protocol. To configure the connection, you must define the following parameters in the controller configuration:

  • PLC address - This is the IP address of the controller or the communication module.
  • TSAP - This is the device address in the COTP protocol. It is indicated in hexadecimal format. The high byte indicates the access type (default is 03). The low byte consists of two values ​​of Rack (default is 0) and Slot (default is 1). See the documentation for the controller for more details. WebHMI uses local TSAP number = 1000.

In the S7 Communication protocol, the following registers are supported:

Register Description Data type Read/Write
Qx.y Digital outputs of the controller. X — offset address, Y — bit address. You can address both bits and bytes and words. Examples: Q0.2, QB2, QW0, QD2 Bit, Byte, Word, Double Word Read/Write
Ix.y Digital inputs of the controller. X — offset address, Y — bit address. You can address both bits and bytes and words. Examples: I0.2, IB2, IW0, ID2 Bit, Byte, Word, Double Word Read/—
Mx.y М memory. X — offset address, Y — bit address. You can address both bits and bytes and words. Examples: M0.2, MB2, MW0, MD2 Bit, Byte, Word, Double Word Read/Write
Vx.y Synonymous to DB1.DBxx. Accessing to memory block DB1. X — offset address, Y — bit address. You can address both bits and bytes and words. Examples: V0.2, VB2, VW0, VD2 Bit, Byte, Word, Double Word Read/Write
DBx.DBy.z Addressing data block DBx, where X - data block number (1, 2, 3 …). Y — offset inside the data block, Z — bit number. You can address both bits and bytes and words. Examples: DB1.DBB0.2, DB4.DBD2, DB4.DBW13.3 Bit, Byte, Word, Double Word Read/Write

Note that although WebHMI correctly recognizes addresses with the data size included in them (for example, IW0 in the notation Siemens stands for a Word type register), but the data size from the address itself is ignored and instead the data size specified in the WebHMI project settings of this register is used. I.e. the address is used exclusively as a base address and in fact, the three addresses IW0, IB0, ID0 are equivalent to the record I0.

Example of setting up a connection for the S7-1200 controller see here.

Connecting WEBHMI to Siemens controllers is possible simultaneously with other devices on the same network (HMI panels, other controllers), because the controllers support several connections, depending on the type:

See the application note on this page

siemens_iso.txt · Last modified: 2023/09/08 07:03 by emozolyak

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki