Sie sind auf Seite 1von 18

Error! Unknown document property name. Error! Unknown document property name.

Ó Error! Unknown document property name.; 2011

MODBUS TCP CONFIGURATION

INTRODUCTION:

The following document is just an excerpt to show the communication between a MODBUS slave
and AC800M as MO DBUS M aster.This is just a generalized approac h f or establ ishing comm unications
between t he 2 s ystems and t he dev eloper has to write appl ication s pecific c odes to s atisfy t heir
requirements. Modbus i s a s erial communications protocol published by M odicon in 1979 f or use w ith
its programmable logic controllers (PLCs. This is a modbus variant used for communications over TCP/IP
networks. It does not require a checksum calculation as lower layer takes care of the same.

Modbus TCP Frame Format

Name Length Function

For synchronization between messages of server


Transaction Identifier 2 bytes
& client
Protocol Identifier 2 bytes Zero for MODBUS/TCP
Length Field 2 bytes Number of remaining bytes in this frame
Unit Identifier 1 byte Slave Address (255 if not used)
Function code 1 byte Function codes as in other variants
Data bytes n bytes Data as response or commands

LIMITATIONS

· Since Modbus was designed in the late 1970s to communicate to programmable logic controllers,
the number of data types is limited to those understood by PLCs at the time. Large binary objects
are not supported.

· No standard w ay ex ists for a node to find the description of a data object, for example, to
determine if a register value represents a temperature between 30 and 175 degrees

· Modbus transmissions must be contiguous which limits the types of remote communications
devices to those that can buffer data to avoid gaps in the transmission.

· Modbus protocol provides no security against unauthorized commands or interception of data.


Error! Unknown document property name. Error! Unknown document property name.
Ó Error! Unknown document property name.; 2011

MODBUS TCP CONFIGURATION

CONTROL BUILDER:
1.Open a new project in the control builder.

2. For AC800M to become a m osbus TCP master ,we need to connect the CI867 card to it.So as a first
step,CI867 harware serial library needs to be added.
Error! Unknown document property name. Error! Unknown document property name.
Ó Error! Unknown document property name.; 2011

MODBUS TCP CONFIGURATION

This screen shot shows the hardware library after addition of CI867 card.
Error! Unknown document property name. Error! Unknown document property name.
Ó Error! Unknown document property name.; 2011

MODBUS TCP CONFIGURATION

4. Now we have to insert the hardware in position 1 for configuring AC800M as ModBus TCP m aster.By
deafult Modbus slave can be inserted in Channel 1 of the card.CI867 supports 70 T CP slaves and 8 TCP
masters.
Error! Unknown document property name. Error! Unknown document property name.
Ó Error! Unknown document property name.; 2011

MODBUS TCP CONFIGURATION


Error! Unknown document property name. Error! Unknown document property name.
Ó Error! Unknown document property name.; 2011

MODBUS TCP CONFIGURATION

4.Now we have to specify the settings for the Modbus slave .IP address of the slave should be set here.
Error! Unknown document property name. Error! Unknown document property name.
Ó Error! Unknown document property name.; 2011

MODBUS TCP CONFIGURATION

5. Next we have to do t he settings of CI867 card .IP address of the CI867 card.Usually it i s of the same
subnet as slave device.
Error! Unknown document property name. Error! Unknown document property name.
Ó Error! Unknown document property name.; 2011

MODBUS TCP CONFIGURATION

6.Next in C I867 car d sett ing , we ill see t he im portance of loop back .Loop back works only if the slav e
device supports FC8.It is a diagonistic function which works at the start of the device
Error! Unknown document property name. Error! Unknown document property name.
Ó Error! Unknown document property name.; 2011

MODBUS TCP CONFIGURATION

7. Next we have to start the IP configuration settings for the AC800m controller.
Error! Unknown document property name. Error! Unknown document property name.
Ó Error! Unknown document property name.; 2011

MODBUS TCP CONFIGURATION


Error! Unknown document property name. Error! Unknown document property name.
Ó Error! Unknown document property name.; 2011

MODBUS TCP CONFIGURATION

8.Now all hardware part configuration is completed.Next we have to configure the software library and we
have develop the application for MODBUS TCP.
Error! Unknown document property name. Error! Unknown document property name.
Ó Error! Unknown document property name.; 2011

MODBUS TCP CONFIGURATION


Error! Unknown document property name. Error! Unknown document property name.
Ó Error! Unknown document property name.; 2011

MODBUS TCP CONFIGURATION

10. Application code is dev eloped via struc tured c ode f or the m ore c larity.Same code can be written i n
structured text also.

MBTCPConnect function block is inserted first to establish the connection between master and slave.This
block helps the m aster to identify the c hannel f or communication of slave device and the valid output of
the MBTCPconnect block denotes the pr oper connection between both. Communication channel denotes
the internal channel in control builder(location of the modus TCP slave)
Error! Unknown document property name. Error! Unknown document property name.
Ó Error! Unknown document property name.; 2011

MODBUS TCP CONFIGURATION

A pulse generator is installed inorder to provide periodic signals to the read block and write block.Inorder
to giv e the peri od tim e and pul se time,we have created to proj ect tim e constant s with time of 5 sec and
2.5 sec
Error! Unknown document property name. Error! Unknown document property name.
Ó Error! Unknown document property name.; 2011

MODBUS TCP CONFIGURATION


Error! Unknown document property name. Error! Unknown document property name.
Ó Error! Unknown document property name.; 2011

MODBUS TCP CONFIGURATION

10. In a MBTCP Read bl ock,Read Req is connec ted from the pul se generator output .Start addr of the
MB TCP Read Block is framed according to IEC61131-5 direct addressing format.

Function Code MB Read MB Write Address range

Read Coil status(FC1) %QX 0xxxx

Read Input Coil status(FC2) %IX 1xxxx


Error! Unknown document property name. Error! Unknown document property name.
Ó Error! Unknown document property name.; 2011

MODBUS TCP CONFIGURATION

Read Hol ding Regi sters %QW,%MW 4xxxx


status(FC3)

Read Input Registers(FC4) %IW 3xxxx

Force Single Coil(FC5) %QX

Force Multiple Coils(FC15) %QX

Force S ingle Preset %QW,%MW


register(FC5)

Force Multiple %QW


Registers(FC15)

The same format is applicable for writing also.

NOTE:When Read reque st is av ailable from the Read bl ock and NDR i s not en abled af ter a r ead
operation it means mainly there is a problem in addressing the registers.

A few more snapshots to execute MODBUS Communication using structred text language:
Error! Unknown document property name. Error! Unknown document property name.
Ó Error! Unknown document property name.; 2011

MODBUS TCP CONFIGURATION

Das könnte Ihnen auch gefallen