![TREBING + HIMSTEDT SPI 3 Скачать руководство пользователя страница 21](http://html1.mh-extra.com/html/trebing-himstedt/spi-3/spi-3_manual_1154873021.webp)
Using data channel with »MODBUS_ Kanal« module and FB 127
21
MODBUS RTU | SPI 3 | Trebing & Himstedt
Parameters for data transfer for SIMATIC S7
Upon data transfer, the user data to be exchanged are copied into a data area (data
block or marker area) from where they are sent to the SPI 3 by the PLC through the
DP master.
The structure of the data blocks or marker areas for the user data depends on the
MODBUS function as follows:
Note!
»n« is a byte or word address from the »Data« parameter.
The DB can contain data for several send or receive operations, but the data
areas must not overlap.
Various parameters are available to call the FB:
Parameters for address information:
specify location and length of the SPI 3 address field in the PLC address space
Function
Data area for user data
Marker area for user data
Contents
Functions 1, 2, 15
DBB(n)
DBB(n+1)
:
MB(n)
MB(n+1)
:
Byte 1
Byte 2
:
Function 5
DBB(n)
DBB(n)
MB(n)
MB(n)
0xFF (set bit)
0x00 (reset bit)
Functions 3, 4, 6, 16
DBW(n)
DBW(n+2)
DBW(n+4)
:
MW(n)
MW(n+2)
MW(n+4)
:
Word 1
Word 2
Word 3
:
Name
Type
Description / Function
A_Anfang
INTEGER
Start of address area for outputs
(according to hardware configuration)
E_Anfang
INTEGER
Start of address area for inputs
(according to hardware configuration)
EA_Laenge
INTEGER
Length of SPI 3 I/O field (in byte) - always use 8 (4 words) for this setting
Instanz_DB
INTEGER
Number of instance data block which is specified upon calling the FB127
(see example project)