Overview; Requirements For Using Modbus Protocol - Siemens SIMATIC S7-200 System Manual

Programmable controller
Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

S7-200 Programmable Controller System Manual

Overview

STEP 7--Micro/WIN Instruction Libraries make communicating to Modbus master and slave
devices easier by including pre-configured subroutines and interrupt routines that are specifically
designed for Modbus communications.
Modbus slave instructions can configure the S7-200 to act as a Modbus RTU slave device and
communicate to Modbus master devices.
Modbus master instructions can configure the S7-200 to act as a Modbus RTU master device and
communicate to one or more Modbus slave devices.
The Modbus instructions are installed into the libraries folder in the STEP 7--Micro/WIN instruction
tree. These instructions enable the S7-200 to act as a Modbus device. When you place a Modbus
instruction in your program, one or more associated subroutines are automatically added to your
project.
There are two versions of the Modbus master protocol library. One version uses port 0 of the CPU
and the other uses port 1 of the CPU. The port 1 library has a _P1 appended to the POU names
(for example, MBUS_CTRL_P1) to denote that the POU utilizes port 1 on the CPU. The two
Modbus master libraries are identical in all other respects.
The Modbus slave library only supports port 0 communication.

Requirements for Using Modbus Protocol

The Modbus Master Protocol instructions use the following resources from the S7-200:
Initializing the Modbus Slave Protocol dedicates the specific CPU port for Modbus Master
-
Protocol communications.
When the CPU port is being used for Modbus Master Protocol communications, it cannot be
used for any other purpose, including communications with STEP 7--Micro/WIN. The
MBUS_CTRL instruction controls assignment of Port 0 to Modbus Master Protocol or PPI.
The MBUS_CTRL_P1 instruction (from the port 1 library) controls assignment of Port 1 to
Modbus Master Protocol or PPI
The Modbus Master Protocol instructions affect all of the SM locations associated with
-
Freeport communications port in use
The Modbus Master Protocol instructions use 3 subroutines and 1 interrupt routine.
-
The Modbus Master Protocol instructions require about 1620 bytes of program space for
-
the two Modbus Master instructions and the support routines.
The variables for the Modbus Master Protocol instructions require a 284 byte block of V
-
memory. The starting address for this block is assigned by the user and is reserved for
Modbus variables.
The S7-200 CPU must be firmware revision 2.00 or greater to support the Modbus Master
-
Protocol Library (CPU MLFB 21x--2xx23--0XB0)
The Modbus Master Library uses the user interrupts for some functions. The user interrupts
-
must not be disabled by the user program.
Tip
To change the operation of the CPU communications port back to PPI so that you can
communicate with STEP 7-Micro/WIN, you can do one of the following:
-- Set the Mode parameter of the MBUS_CTRL instruction to a zero (0).
-- Set the mode switch on the S7-200 to STOP mode position.
Either of these methods will set the CPU communications port to communicate with
STEP 7--Micro/WIN.
348

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents