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 #445 background imageLoading...
Page #445 background image
Libraries
9.3 Modbus library instructions
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
445
9.3.3.2
MBUS_INIT instruction (initialize slave)
Table 9- 27 MBUS_INIT instruction
LAD/ FBD
STL
Description
CALL MBUS_INIT, Mode, Addr, Baud,
Parity, Port, Delay, MaxIQ, MaxAI,
MaxHold, HoldStart, Done, Error
The MBUS_INIT instruction enables, initializes,
or disables Modbus communications. Before an
MBUS_SLAVE instruction can be used,
MBUS_INIT must be executed without errors.
The instruction completes and the Done bit is
set immediately, before continuing to the next
instruction.
The instruction is executed on each scan when
the EN input is ON.
The MBUS_INIT instruction should be executed exactly once for each change in
communications state. Therefore, the EN input should be pulsed on through an edge
detection element, or executed only on the first scan.
Table 9- 28 MBUS_INIT parameters
Inputs/outputs
Data type
Operands
Mode, Addr, Parity, Port
BYTE
VB, IB, QB, MB, SB, SMB, LB, AC, Constant, *VD, *AC, *LD
Baud, HoldStart
DWORD
VD, ID, QD, MD, SD, SMD, LD, AC, Constant, *VD, *AC, *LD
Delay, MaxIQ, MaxAI, MaxHold
WORD
VW, IW, QW, MW, SW, SMW, LW, AC, Constant, *VD, *AC, *LD
Done
BOOL
I, Q, M, S, SM, T, C, V, L
Error
BYTE
VB, IB, QB, MB, SB, SMB, LB, AC, *VD, *AC, *LD
The value for the
Mode
input selects the communications protocol: an input value of 1
assigns Modbus protocol and enables the protocol, and an input value of 0 PPI protocol and
disables Modbus protocol.
Parameter
Addr
sets the address at inclusive values between 1 and 247.
Parameter
Baud
sets the baud rate at 1200, 2400, 4800, 9600, 19200, 38400, 57600, or
115200.
Parameter
Parity
is set to match the parity of the Modbus master. All settings use one stop
bit. The accepted values are: 0 (no parity), 1 (odd parity), and 2 (even parity).
Parameter
Port
sets the physical communication port (0 = RS-485 integrated in CPU, 1 =
RS-485 or RS-232 located on an optional signal board).
Parameter
Delay
extends the standard Modbus end-of-message timeout condition by adding
the assigned number of milliseconds to the standard Modbus message timeout. The typical
value for this parameter should be 0 when operating on a wired network. If you are using
modems with error correction, set the delay to a value of 50 to 100 milliseconds. If you are
using spread spectrum radios, set the delay to a value of 10 to 100 milliseconds. The Delay
value can be 0 to 32767 milliseconds.

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