Communication Between The Intouch 7.0 and PLC 8imatic 87-200

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Copyright © IFAC Programmable Devices and Systems,

Ostrava, Czech Republic, 2000

COMMUNICATION BETWEEN THE INTOUCH 7.0 AND PLC 8IMATIC


87-200

Radek Cervinka
Jifi Tichy
Ing. Jifi Koziorek

Faculty of electric engineering and computer science, VSB - TU Ostrava


Department of measurement and control
17.listopadu 15,70833 Ostrava-Poruba
E-mail: radek.cervinka@vsb.cz.jiri.tichy@vsb.cz.jiri.koziorek@vsb.cz
Tel: +42069 699 3138

Abstract: Main topic of the poster is the communication between PLC Simatic S7
200 and SCADA system Intouch 7.0 via serial link RS 485. On side of the PLC is
used freeport communication mode with our own protocol. The interface between
PLC and Intouch is made by conversion program that use Dynamic Data Exchange
( DDE ). This makes possible with keeping protocol to communicate with other
types of PLC's too. In this manner is also possible to build a communication
between several nodes. Copyright ~2000 IFAC

Keywords: Programmable logic controIler, human-machine interface,


communication, communication protocols, programming approaches

1. INTRODUCTION And, that's why, the thought has arisen to try, for the
teaching reasons, to write a program which would do
Already for long time period the PLC have been used the interface between Simatic S7-200 and the
in the sphere of production control and automation. InTouch program. Later this thought was detailized
Among known producers there belongs the firm on communication between several devices keeping
Siemens which produces several series of these certain rules.
controllers. Among others also PLC Simatic S7-200.
At first the main disadvantage of PLC was the Because of the fact Intouch can use DDE in
communication with the user. As the communication Windows (Dynamic Data Exchange) we decided to
means various bad-arranged panels and displays were apply it ( Wonderware Corp., 1998; Zolotova, I. and
used. With the occurrence of cheap and reliable PC Ocelikova, 1997). As the physical connection the
the situation is changing and already nothing RS 485 was selected because Simatic has this
prevents from their using as the weIl-arranged, easily interface led out. For PC connection we use the firm
operable means of communication between the user programming cable with the RS485IRS232
and PLC. The visualization programs take care of the converter.
work with data and their using. There exist many industrial standards of bus, but all
Their task is to display the state of control process of them were very complex ones (and, by that
and to make possible their modification. One of the complicated ones) for application in PLC. 57 has the
best known representatives is InTouch of the firm firm protocol implemented for communication but its
Wonderware for Windows. using is conditioned by its perfect knowledge and
necessity to modify possible further devices on the
line (what, with the respect of their different structure
2. IMPLEMENTATION and function, can be complicated). For these reasons
we selected the own protocol, and namely the
Unfortunately the InTouch program, in its standard simplest as possible (simplicity = easy realization
installation, has no possibility to communicate with with simple means).
PLC Simatic S7-200 but it is opened sufficiently if
we wanted to extend its possibilities in this direction.

173
applications taking part in a dialog works as a client
2.1 Communication scheme and the another one as a server. The server provides
information, the client works as an application which
requires data, and, by that, it controls the exchange
Device process. The application, which is compatible with
(PLC) DDE, can function as a server for more clients or as a
client for more servers and, at the same time, as a
!
Serial
DDE
client and server as well.

line server ......-. Wonderware's 2.4 Packet Format


~ firstser lnTolIl'h
RS 485
Description Identifier Packet length Data Control byte
: Position
(Destination)
0 +1 +2 - x x+l
Device Format byte byte word byte
(PLC)
Figure 2: Packet format

Figure I: Communication scheme


Length - the total packet length
Identifier - byte determining to whom the packet
belongs ( PLC or computer - it depends only on the
2.2 Communication programmer)
Data - the own data organized as word, format of
The serial communication port, which is storage is LoHi (the first is less important byte)
implemented into PLC Simatic S7-200 can be used in Control byte - calculated as XOR of all packet bytes
the mode called FreePort communication (Siemens, ( Resulting XOR of the packet is then 0 )
1998). In this mode the user defines the baud rate,
number of bits per character, parity and protocol. The
events of receiving and sending are for free disposal 2.5 Time Schedule ofCommunication
of the programmer.
It is necessary for the programmer to create his own In the course of communication the basic problem is
protocol and what the protocol will be it depends the identification of starts and ends of packets. It can
only on the programmer. be secured either by special characters sequence or
This mode can be run both to simply data sending to inserting of obligatory pause after packet transmitting
the printer or display (without control of the (by what the using of the line becomes worse). The
information concerning the receiving) and to creation second possibility was selected for easier realization
of complete protocol for communication between in PLC. Using this method we have to secure the
several devices. time compactness of the packet. The length of
For perfect creation of the protocol it is necessary to separating pause must be selected according to the
use the interruption for the character receiving. communication rate used, required line loading and
In case PLC is in the FreePort mode the according to the technical possibilities of connected
communication with programming devices (PC) is units.
not possible. In the framework of PLC our auxilliary Each connected unit permanently observes
(service) program must run which, thanks to repeated (monitors) the line. Calculates the time since the last
calling, enables the communication itself. All what byte received and it compares itself with the value for
the programmer has to do is only to prepare data for resolution of framework end and with the value for
transfer and to call the subprogram which will realize transmission permission (if we want to limit
the transfer. collisions on the line to minimum it is suitable to set
All data are transmitted as WORD, possible the times for transmission permission at each
conversion (and interpretation) is left on the InTouch equipment in different way, by that, at the same time,
program. we can secure the priorities grading).
The communication itself is independent on PC at all.
In case of the PC defect the communication (i.e.
controlling) goes on. 2.6 Possibilities of Using

The program was created for teaching reasons. In the


2.3 Dynamic Data Exchange - DDE time being it is set for three input and three output
units whereas the computer need not be any of them
DDE enables for two applications to communicate (it can only tap-monitor) or it can work also as more
mutually in the form of a "dialog". One of equipment units. The identifier determines to whom

174
the packet is directed. On the side of PLC not only The recommended setting (the majority of equipment
S7-200 must be but also any other equipment, which units are capable for it): 9600 baud, 1 stop bit, no
will meet the communication conditions (other type parity, 8 bits per character.
of PLC, PLC and the second computer...). The
program is fully modifiable as to the transmission It is suitable to place the frrstser into directory where
parameters are concerned. can be found by lnTouch (in this case the InTouch
The program enables the setting in testing mode automatically starts up the program at its start up).
when the data coming from PLC can be changed (it
si suitable for applications debugging in InTouch Note:
without direct interconnection with PLC). This research was supported by the Czech Grant
Agency GACR under grant number 102/97/0542
Development of software tools for portable and
2.7 The Firstser Program safety application in industrial process control.

The main element of the chain is the Firstser


program, which enables the communication. It runs 3. REFERENCES
under Win32 (i.e. Windows 9x and NT).
Before using the program has to be set, i.e. the Siemens ( 1998 ). Simatic S7 200, System Manual.
identifiers of single equipment units have to be given Wonderware Corporation ( 1998). Intouch, User's
further the communication parameters and the Guide.
interval of data exchange as well. The setting is read Zolotova, 1. and Ocelikova, E. ( 1997 ).
at program start up. Visualisation Systems at the DCA I. In: 1S'97, Efh
International Symposium On Information
Systems, pp. 343-355. Varazdin, Croatia.
UDK:007:681.3 :651 (082).

175

You might also like