Connecting to S7-1200

Материал из WebHMI Wiki
Перейти к: навигация, поиск
Эта страница — перевод страницы Подключение к S7-1200. Перевод выполнен на 100%.

Другие языки:
English • ‎русский
Siemens 1200 img.jpg

It is possible to connect to the Siemens 1200 series controllers using the ISO-on-TCP protocol. To do this, several additional settings must be made in the controller configuration. To activate the S7 Communication operation mode in TIA Portal, the PLC must be configured correctly:

  1. Allow GET / PUT commands from third-party partners (in firmware revisions of S7-1200 lower than 4th version, these commands are allowed by default).
  2. Enable Full Access in "Protection PLC" settings.
    Permit access .png
  3. Disable Optimized Block Access for the Data Blocks you are going to exchange with.
    Screen shot optimized 1 1.png

Also, from the controller settings in the TIA portal project, it is necessary to take its IP address and TSAP (this is the device address in the COTP protocol. It is indicated in hexadecimal format.The high byte denotes the access type (by default 03) .The low byte consists of two Rack values ​​(by default 0) and Slot (default 1). See Siemens documentation for controllers for more details).
Example of setting up a connection to the S7 1200 PLC in WebHMI:
S7 Communication.png
After that, you can create registers, using for them the standard notation of memory area addresses in Siemens PLCs - QB0.0, VW0, etc. For more information, see here.
Note - although WebHMI correctly recognizes addresses with the data type included in them (for example, IW0 in the Siemens notation indicates a Word type register), but the data type from the address itself is ignored and the data type specified in the settings of this register is used instead (Register data field type) in WebHMI. I.e. the address is used exclusively as an address and in fact these three addresses - IW0, IB0, ID0 are equivalent to the I0 record (the actual type will be determined by the register data type settings).