MODBUS :CASE STUDY AND IMPLEMENTATON
DEVELOPMENT OF MODBUS BASED DIGITAL I/O CARD WITH RS-485 PORT FOR INDUSTRIAL APPLICATIONS
Abstract
To
receive the Temperature values from the far distance where human beings cannot
go frequently, because the Temperature is very high .so we fix the temperature
sensor there and we receive the temperature from the receiver and display.
Development of MODBUS based digital
I/O cards are very easy to deploy the network and it is royalty free for
distribution and it is widely used in industries and industrial application.
This application is very easy to deploy
the network and it is very easy to access the data from the large distance
about 4000 meters with using wire or wire less also.
Objective
A data logger is any device that
can be used to store data. This includes many data acquisition devices such as
plug-in boards or serial communication systems which use a computer as a real
time data recording system. However, we can consider a data logger a stand
alone device that can read various types of electrical signals and store the
data in internal memory for later download to a computer.
The advantage of data loggers is that they can operate
independently of a computer, unlike many other types of data acquisition
devices. Data loggers are available in various shapes and sizes.
1.2 Block Diagram
FIGURE 1.1:
BLOCK DIAGRAM
MODBUS FOR
COMMUNICATON
MODBUS
is a serial communication protocol published by Modicon in 1979 for the use
with its programmable logic controllers (PLC’s).It has become a defacto
standard commucations protocol in industry and now the most commonly means of
connecting industrial electronic devices. The main reasons for the extensive
use of Modbus over other communications protocols are
1.
It is openly published and
royalty-free.
2.
Relatively easy industrial network
to deploy.
3. It
moves raw bits or words without placing many restrictions on vendors.
It
is the communication protocol used for client-server communication
- the Master is a Client
- the Slave is a Server
FIGURE 5.2 MODBUS
COMMUNICATION
MODBUS FRAME FORMAT
The
MODBUS protocol defines a simple protocol data unit (PDU) independent of the
underlying communication layers. The mapping of MODBUS protocol on specific
buses or network can introduce some additional fields on the application data unit
(ADU).
FIGURE 5.3 General frame format
The MODBUS application data
unit is built by the client that initiates a MODBUS transaction. The function
indicates to the server what kind of action to perform. The MODBUS application protocol
establishes the format of a request initiated by a client.
The function code field of a
MODBUS data unit is coded in one byte. Valid codes are in the range of 1 ...
255 decimal (the range 128 – 255 is reserved and used for exception responses).
When a message is sent from a Client to a Server device the function code field
tells the server what kind of action to perform. Function code "0" is
not valid.
FIGURE 2.1MODBUS transaction (error free)
If an error is occur than the
following trasaction will be done
FIGURE 2.2: MODBUS transaction (exception
response)
The size
of the MODBUS PDU is limited by the size constraint inherited from the first MODBUS
implementation on Serial Line network (max. RS485 ADU = 256 bytes). Therefore:
MODBUS PDU for serial line communication = 256 - Server address (1byte) - CRC
(2 bytes) = 253 bytes. Consequently:
RS232 / RS485 ADU = 253 bytes + Server address (1 byte) + CRC (2 bytes) = 256bytes.
TCP MODBUS ADU = 253 bytes + MBAP (7 bytes) = 260 bytes.
2.1 RS-485
Rs-485 is
formally called as EIA-485(Electronic industry association) only specifies
electrical characteristics of the drivers and the receiver.It does not specify
or recommend any data protocol.EIA-485 enables the configuration of
inexperience local networks and multidrop commumications links.it offers high
data transmission speeds(35 Mbit/s up to 10 m and 100 Kbit/s at 1200 m).
Applications
EIA-485 signals
are used in a wide range of computer and automation systems. In a computer
system, SCSI -2 and SCSI-3 may use this specification to implement the physical
layer for data transmission between a controller and a disk drive. EIA-485 is
used for low-speed data communications in commercial aircraft cabins vehicle
bus.It requires minimal wiring, and can share the wiring among several seats,
reducing weight.
EIA-485 is used
as the physical layer underlyingmany standard and proprietary automation protocols
used to implement industrial control systems, including the most common
versions of Modbus and profibus. These are used in programmable logic
controllers and on factory floors. Since it is differential, it resists
electromagnetic interference from motors and welding equipment.
In theatre and
performance venues, EIA-485 signals are used to control sound systems and
lighting. The EIA-485 link is typically implemented over standard cables more
usually used for microphones, and so can be run between stage and control desk
without laying special cables. Theatrical and disco lighting is controlled with
the DMX protocol.
EIA-485 also is
used in Building automation as the simple bus wiring and long cable length is
ideal for joining remote devices. It may be used to control video surveillance
systems or to interconnect security control panels and devices such as access
control card readers.
Although many
applications use EIA 485 signal levels, the speed, format, and protocol of the
data transmission is not specified by EIA 485. Interoperation even of similar
devices from different manufacturers is not assured by compliance with the
signal levels alone.
Full
duplex operation
EIA-485, like
EIA-422 can be made full-duplex by using four wires. Since EIA-485 is a multi-point
specification, however, this is not necessary in many cases. EIA-485 and
EIA-422 can interoperate with certain restrictions.
Converters
between EIA-485 and other formats are available to allow a personal computer to
communicate with remote devices. By using "Repeaters" and
"Multi-Repeaters" very large RS485 networks can be formed. The
Application Guidelines for TIA/EIA-485-A has one diagram called "Star
Configuration. Not recommended." Using an RS485 "Multi-Repeater"
can allow for "Star Configurations" with "Home Runs" (or
multi-drop) connections similar to Ethernet Hub/Star implementations (with
greater distances). Hub/Star systems (with "Multi-Repeaters") allow
for very maintainable systems, without violating any of the RS485
specifications. Repeaters can also be used to extend the distance or number of
nodes on a network.
2.2 Configuring Minicom (Linux Host)
- Minicom
is a sophisticated tool for dialing, but it emulates a fancy ANSI and
VT102 terminal
- Which
is quite enough for us. Minicom is installed by default with most of the
Linux distribution.
- The
default configuration of minicom for using with TinyBOOT is as follows:
- Bits
per second 57600
- Data
bits 8
- Parity
None
- Stop
bits 1
- Flow
control none
- To
configure minicom:
- Run
the program by typing “minicom” on the console (Terminal).
- Press CTRL-A and then O to open the
configuration dialog box.
- Use the arrow keys to move down to Serial
port setup and press Enter.
- Press “A” to select the serial port that
is connecting to the developing board,
Such as
- “/dev/ttyS0”.
Press “Enter” to make it accepted.
- Type
E to open the “Comm Parameters” dialogue box.
- Type
“H” and “Q” to select 57600 8N1 as the Bps/Par/Bits.
- Ensure
that Hardware Flow Control and Software Flow Control are both set to No.
- Press
ESC three times to exit the configuration dialog boxes.
- Reset
the developing board to see the banner of TinyBOOT, and then the command
- Prompt,
in minicom.
- Press
CTRL-A and then X to exit minicom at any time.
3. RESULTS
TB550 with MAX3232
for UART COMMUNICATION
4. CONCLUSION
In this study, The data
logger is very useful in broad range of applications. We chose a data logger
system among many themes for graduation thesis. As prerequisite for
accomplishment of the logger system project, we must have integrated knowledge
related with microcontroller, C programming skill, digital circuit design,
digital communication and so on.
Because it is hard to
implement, it is required for them to possess capabilities of hardware design,
programming of microcontroller and GUI. We selected carefully a microcontroller
so that it could effectively support sensors currently available as well as any
others that may be added in the future.
Thus, first of all we must
select a general low cost and high performance microcontroller. After looking
into microcontroller products, we have decided to use the EP9302
microcontroller with ARM920T core.
The data logger system using
EP9302 microcontroller with ARM920T core was implemented during one semester.
Proposed data logger will be used in many different applications to monitor and
collect specific types of information.
Here are
a few examples:
1) Assess
operating temperatures of monitors.
2)
Monitor equipment operating temperatures
3) Monitor temperature of rooms in building
remotely and so on.
Our designed schematic, circuit board layouts,
parts list, EP9302 microcontroller with ARM920T core and host software, and
other associated items will be helpful for others as sufficient information to
develop their own data logger.
No comments:
Post a Comment