Download Print this page

Siemens SIMATIC S7 System Manual page 12

Hide thumbs Also See for SIMATIC S7:

Advertisement

Table of contents
10.3.1.2
Requirements for using Modbus instructions .................................................................... 515
10.3.1.3
Initialization and execution time for Modbus protocol....................................................... 517
10.3.2
Modbus RTU master ......................................................................................................... 517
10.3.2.1
Using the Modbus RTU master instructions....................................................................... 517
10.3.2.2
MBUS_CTRL / MB_CTRL2 instruction (initialize master) ...................................................... 519
10.3.2.3
MBUS_MSG / MB_MSG2 instruction .................................................................................. 520
10.3.2.4
Modbus RTU master execution error codes ....................................................................... 523
10.3.3
Modbus RTU slave............................................................................................................ 525
10.3.3.1
Using the Modbus RTU slave instructions.......................................................................... 525
10.3.3.2
MBUS_INIT instruction (initialize slave) ............................................................................. 526
10.3.3.3
MBUS_SLAVE instruction.................................................................................................. 528
10.3.3.4
Modbus RTU slave execution error codes .......................................................................... 529
10.3.4
Modbus RTU master example program ............................................................................. 529
10.3.5
Modbus RTU advanced user information........................................................................... 531
10.4
Modbus TCP library .......................................................................................................... 533
10.4.1
Modbus TCP library features ............................................................................................. 533
10.4.2
Modbus TCP client ........................................................................................................... 535
10.4.2.1
MBUS_CLIENT instruction................................................................................................. 535
10.4.2.2
Modbus TCP client execution error codes.......................................................................... 538
10.4.3
Modbus TCP server........................................................................................................... 539
10.4.3.1
MBUS_SERVER instruction ................................................................................................ 539
10.4.3.2
Modbus TCP server execution error codes......................................................................... 540
10.4.4
Example: Modbus TCP application .................................................................................... 541
10.4.5
Modbus TCP advanced user information ........................................................................... 546
10.4.6
Modbus TCP general exception codes ............................................................................... 548
10.4.7
Modbus TCP general communication exception codes ...................................................... 549
10.5
Open user communication library .................................................................................... 550
10.5.1
Parameters common to the OUC library instructions ......................................................... 551
10.5.2
Open user communication library instructions.................................................................. 553
10.5.2.1
TCP_CONNECT instruction ................................................................................................ 553
10.5.2.2
ISO_CONNECT instruction ................................................................................................ 556
10.5.2.3
UDP_CONNECT instruction ............................................................................................... 559
10.5.2.4
TCP_SEND instruction....................................................................................................... 561
10.5.2.5
TCP_RECV instruction ....................................................................................................... 563
10.5.2.6
UDP_SEND instruction...................................................................................................... 566
10.5.2.7
UDP_RECV instruction ...................................................................................................... 569
10.5.2.8
DISCONNECT instruction .................................................................................................. 571
10.5.3
Open user communication library instruction error codes ................................................. 573
10.5.4
Open user communication library example....................................................................... 574
10.5.4.1
Active partner (client) ...................................................................................................... 574
10.5.4.2
CheckErrors subroutine .................................................................................................... 583
10.5.4.3
Active partner symbol table.............................................................................................. 584
10.5.4.4
Passive partner (server).................................................................................................... 585
10.5.4.5
CheckErrors subroutine .................................................................................................... 592
10.5.4.6
Passive partner symbol table ............................................................................................ 592
10.6
PN Read Write Record library ............................................................................................ 592
10.6.1
PN Read Write Record features.......................................................................................... 592
10.6.2
Input and output interface of PN Read Write Record library ............................................... 593
10.6.3
Definition of parameters for input signal "STATUS" ............................................................ 594
10.6.4
System_defined error code of the library PN Read Write Record ......................................... 594
12
System Manual, V2.7, 08/2022, A5E03822230-AK
S7-200 SMART

Advertisement

loading

This manual is also suitable for:

Simatic s7-200 smart