Modbus

Aus Deutschmann Wiki
Zur Navigation springen Zur Suche springen

The Deutschmann UNIGATE implements the Modbus-Protocol in a simplified form.

WINGATE configuration

The easiest way to use the Modbus protocol is via the WINGATE configuration.

With this flexible method the user can replace any data frame. The UNIGATE transfers it transparently.

Data exchange: PLC ← address function data → Fieldbus: UNIGATE :RS232/485 ← Start address function data CRC-Check → Modbus participant. The user has to manage the Modbus frame in the PLC.

Universal-Script

The script is loaded in every CL device in delivery condition. Detailed information can be found in the corresponding manual in chapter "Implemented protocols in UNIGATE CL with Universal Script".

CL-MPI

The following picture shows an example configuration, in which the UNIGATE functions as Modbus RTU Master on the application side and supports the Siemens MPI protocol on the fieldbus side.

Wingate UniversalScript CL-MPI Modbus RTU Master.jpg ( CL-MPI_UniversalScript.gwc )

Procedure: The UNIGATE reads the data out of the data block 101, which must correspond to the above described build up (address function data), sends it as a request via the application interface to the connected Modbus slave participant, who replies with a response. The response is stored in the data block 101 from word address 0 on. With the next change of data content of the data block 101, the next request occurs.

Universal-Script Modbus

Only "data" is exchanged. The UNIGATE works the configured request indepently, a Modbus data frame in the superior PLC does not have to be present. This saves programming in the PLC.

CL-PROFIBUS

The following image shows an example configuration, in which the UNIGATE functions as Modbus RTU Master on the Application side und supports the fieldbus protocol PROFIBUS on the fielbus side.

Wingate UniversalScriptModbus CL-Profibus Modbus RTU Master.jpg ( example_CL-DP-Config256_Universal-Modbus.gwc )

Procedure: The UNIGATE automatically carries out the configured requests via the application interface to the connected Modbus slave participant, that reacts with a response. The data of the response is copied to the fieldbus.

A 'record' consists of the parameter "Slave ID = Address, Modbus Function = Function, Start/Adr/No.Reg = data". Furthermore there is also the parameter "Fieldbus Map Adr". With it the payload can be copied specifically in/out of the fieldbus section. If the value is 0, the payload is completely lined up. Is it equal to zero, it is the x-th byte position in the fieldbus section. If the entry is in "Modbus Function" = "no Function" or "disable", this and the following record will not be processed anymore, the inquiry loop starts over again with the first record.

Programming with the PROTOCOL DEVELOPER

Script commands

Interface Master/Slave Device version
Apl. Fieldbus CL, IC Fieldbus
Max_Modbus_Tx_Len M S " all
ModbusRTUTimeout M " all
ExchangeModbusRTUMaster M " all
ExchangeModbusASCIIMaster M " all
ModBusASCII_Slv S " all
ModbusSlaveAddress S " all
ReadModbusSlave S " all
WriteModbusSlave S " all
BusBaudrate M S " only RS
FBRS_ANZ_DAT_BITS M S " all
FBRS_ANZ_STOP_BITS M S " all
FBRS_PARITY M S " all
FBRS_TYPE M S " all
FBRSExchangeModbusRTUMaster M " all
FieldbusID S " all
FBRS_ModBusASCII_Slv S " all
FBRSModRTUSlvRead S " all
FBRSModRTUSlvWrite S " all
InitFastEthernet S(erver) " only: Fast Ethernet

ModbusTCP, IC-FEX

ReadBus S(erver) " only: Fast Ethernet

ModbusTCP, IC-FEX

WriteBus S(erver) " only: Fast Ethernet

ModbusTCP, IC-FEX

Weblinks