EasyManuals Logo

Siemens Simatic S7 Series System Manual

Siemens Simatic S7 Series
726 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #436 background imageLoading...
Page #436 background image
Libraries
9.3 Modbus library instructions
S7-200 SMART
436 System Manual, 09/2015, A5E03822230-AC
9.3.2
Modbus RTU master
9.3.2.1
Using the Modbus master instructions
Procedure
To use the Modbus RTU master instructions in your S7-200 SMART program, follow these
steps:
1. Insert the MBUS_CTRL instruction in your program and execute the MBUS_CTRL on
every scan. You can use the MBUS_CTRL instruction either to initiate or to change the
Modbus communications parameters. When you insert the MBUS_CTRL instruction,
several protected subroutines and interrupt routines are automatically added to your
program.
2. Click the Memory button
from the Libraries area of the File menu ribbon strip to
assign a starting address for the V-Memory that the Modbus library requires.
Alternatively, you can right-click the Program Block node in the project tree and select
"Library Memory" from the context menu.
3. Place one or more MBUS_MSG instructions in your program. You can add as many
MBUS_MSG instructions to your program as you require, but only one of these
instructions can be active at a time.
4. Connect a communications cable between the S7-200 SMART CPU port you assigned
with the MBUS_CTRL port parameter and the Modbus slave devices.
NOTICE
Avoiding unwanted current flow
Interconnecting equipment with different reference potentials can cause unwanted
currents to flow through the interconnecting cable. These unwanted currents can cause
communications errors or damage equipment.
Ensure that all equipment that is connected with a communications cable either shares
a common circuit reference or is isolated to prevent unwanted current flows.
The Modbus master instructions utilize the Modbus functions shown below to read or write a
specific Modbus address. The Modbus slave device must support the Modbus function(s)
required to read or write a particular Modbus address.

Table of Contents

Other manuals for Siemens Simatic S7 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens Simatic S7 Series and is the answer not in the manual?

Siemens Simatic S7 Series Specifications

General IconGeneral
CPUVaries by model (e.g., S7-300, S7-400, S7-1200, S7-1500)
Communication InterfacesPROFIBUS, PROFINET, Ethernet, MPI
ProgrammingTIA Portal, STEP 7
Programming LanguagesLAD, FBD, STL, SCL, GRAPH
I/O ModulesDigital, Analog, Specialty modules available
Operating Temperature0°C to 60°C (standard models)
MountingDIN rail mounting
Operating Voltage24V DC or 120/230V AC (varies by model)
Protection ClassIP20 (standard models)
MemoryVaries depending on the S7 model. Includes work memory (RAM) for program execution, load memory (EEPROM or Flash) for program storage, and system memory for operating system functions. Memory sizes range from kilobytes to megabytes.

Related product manuals