
Implemented protocols in UNIGATE RS
Deutschmann Automation GmbH & Co. KG
26
UNIGATE fieldbus gateway for ProfibusDP V. 4.7
29.4.11
9.4.1
Operating sequence of the data transmission
The first 6 bytes of the above described data always contain an RK512-command, that is initiated
by the sender.
The last two bytes either contain 2 byte data (as a reply to a FETCH-command) or 2 byte receipt
(as a reply to a SEND-command).
In order to signal to the receiver of the 8 byte data block, which data (command or reply) are
valid, the toggle-flags (see above) are used. That means in case bit 7 is changed (MSB) of the
first byte, the bytes 1 to 6 have to be evaluated. When it comes to a change of bit 4, the bytes 7
and 8 have to be evaluated.
These bits can be used as toggle-bits, as in the first byte only the commands 41H, 45H and 4FH
are possible. Thus the bits 4 and 7 are not used.
Examples 1:
PLC will describe DB3, DW7 with 1234H:
Data to UNIGATE = C1H 44H 03H 07H 12H 34H xxH xxH
(Toggle-bit command = 1, if it was 0 before)
The UNIGATE replies:
Data to the PLC = 1xH xxH xxH xxH xxH xxH 00H 00H
(Toggle-bit reply = 1,if it was 0 before)
Examples 2:
RS-device gets the data word from DB2 DW9 from PLC (it says 4711H there)
Data to the PLC = C5H 44H 02H 09H xxH xxH
(Toggle-bit command = 1, if it was 0 before)
The PLC replies:
Data to the UNIGATE = 1xH xxH xxH xxH xxH xxH 47H 11H
(Toggle-bit reply = 1, if it was 0 before)
9.5
MODBUS-RTU
9.5.1
Notes
For reasons of simplicity, "MODBUS-RTU“ is referred to as "MODBUS“ in the text below.
The terms "input“ and "output“ are always viewed from the gateway’s point of view,
i.e. fieldbus input data is the data sent by the fieldbus Master to the gateway.
9.5.2
UNIGATE as MODBUS-Master
9.5.2.1
Preparation
Before data exchange is commenced, the parameters "Baud rate", "Parity", "Start bits", "Stop
bits" and "Data bits" and, if applicable, the "Trigger byte" and the "Length byte" must be set.
In addition, a "Response time" which corresponds to the maximum time up to which the Modbus
Slave responds after a request must be set.
Содержание UNIGATE RS232/422
Страница 2: ......