![Wenglor ZAG45FN01 Скачать руководство пользователя страница 17](http://html1.mh-extra.com/html/wenglor/zag45fn01/zag45fn01_operating-instructions-manual_956886017.webp)
17
10.4.3 Fieldbus Gateway as MODBUS-Slave
10.4.3.1 Preparation
Before data exchange is commenced, the parameters "Trigger byte" and "Length byte", "Baud rate", "Parity", "Start bits", "Stop bits"
and "Data bits" must be set.
At the rotary switch on the RS-side the MODBUS-ID has to be set, under which the gateway is addressed in the Modbus.
10.4.3.2 Data structure
10.4.3.3 Communication sequence
The gateway always acts as the Slave with respect to the fieldbus and also acts as Slave at the Modbus end. A data exchange is
always initiated by the MODBUS-Master via the RS-interface. If the Modbus-address (1st Byte) which is sent out by the Modbus-
Master is identical with the address set on the gateway, the gateway sends the received data (without Modbus-address and CRC-
check sum) to the fieldbus-master (look picture above). With it the gateway optionally completes as an introduction a Trigger byte
and a Length byte.
The fieldbus-master detects when it has to analyse a record via the Trigger byte which is incremented by the gateway at every
inquiry. The number of the following Modbus-data is to be found in the length byte.
Now the fieldbus-master has to analyse the Modbus-inquiry and it has to send back the answer in the same format (optionally with
the leading Trigger byte and Length byte) via the fieldbus to the gateway.
The gateway then takes this answer and completes the Modbus-address and the CRC and sends the data to the Modbus-Master
via the RS-interface. With it the data exchange is completed and the gateway waits for a new inquiry from the Modbus-Master.
10.4.4 Fieldbus Gateway as Modbus-ASCII Master
On request!
For the description see chapter 10.4.2 "Fieldbus Gateway as MODBUS-Master"
10.5 The trigger byte
In case the data records, that were supplied from the application to the gateway, do not change for a longer period, there is actu-
ally no need to send new data to the master.
The other way round, when it comes to a cyclical query of the gateway, a connected master has to be in the position to distinguish
whether the application constantly provides identical data or if no new data were provided by the application for a longer period.
For this reason, the user can set control of transmission via a trigger byte (data exchange
On Trigger). In this mode, the gateway
always sends (and only then) when the trigger byte is changed.
Accordingly, the application program in the control in Normal mode cannot detect whether the gateway has received several iden-
tical telegrams. If Trigger-Byte mode is activated, the gateway increments the trigger byte each time a telegram has been received.
The first byte in the input/output data buffer is used as the trigger byte if this mode is activated.
10.6 The length byte
The user can configure whether the transmit length is also to be stored as a byte in the input/output data area (Fieldbus lengthbyte
active). In transmit direction, as many bytes as specified in this byte are sent. On reception of a telegram the gateway enters
the number of characters received.
Address
Data field
CRC-high CRC-low
Fieldbus
Function
LengthBus
Trigger
(optional)
(optional)
Data field
Function
RS
Sensoren für Ihren Erfolg
www.
wenglor
.com
Sensoren für Ihren Erfolg
www.
wenglor
.com