You are on page 1of 17

TRAINING MODULE PLC COMMUNICATION

_
Control Desk Solutions Pvt. Ltd. [Training Unit]

PLC-PLC
Communication
Document Ref: CDSPLTRG_S700E003_100

Version History

Serial Version Highlights Version No Date


1. First release 1.0.0 21/12/2015

CDSPLTRG_S700E003_100 Page 1 of 17 21-Dec-15


TRAINING MODULE PLC COMMUNICATION
_
Control Desk Solutions Pvt. Ltd. [Training Unit]

Preface

This document is developed for Basic of Step-7 user or learner. Before reading this document
user or learner must have basic knowledge of SIMENS PLC & its architecture. User of this
document should have sufficient knowledge about SIEMES PLC programing and should be
familiar with STEP7 programing software.

The document is prepared in reference to the Siemens standard manuals & literatures and
practical experience. Snap shots used in this manual are taken from real time software Step7 V5.5
+ SP2.

Pictures & screen shots used in this document is from an example project which may vary from
user actual program.

CDSPLTRG_S700E003_100 Page 2 of 17 21-Dec-15


TRAINING MODULE PLC COMMUNICATION
_
Control Desk Solutions Pvt. Ltd. [Training Unit]

Table of Contents
1. Introduction .......................................................................................................................................... 4
2. Direct data exchange ............................................................................................................................ 4
3. PLC-PLC Communication ....................................................................................................................... 6
3.1 Create connection diagram ......................................................................................................................6
3.2 Create program ...................................................................................................................................... 10
4. Example (LD#3 BOF1-GCP1) ................................................................................................................ 15

CDSPLTRG_S700E003_100 Page 3 of 17 21-Dec-15


TRAINING MODULE PLC COMMUNICATION
_
Control Desk Solutions Pvt. Ltd. [Training Unit]

1. Introduction
Here in this chapter we shall discuss the various communications with PLC and other systems.

2. Direct data exchange


With direct data exchange PLC can read write data from/to another devices cyclically or
acyclically. Direct data exchange takes place via PROFIBUS or MPI communication.

Step1: Insert the desired hardware in the h/w configuration. For detail please follow basic of
step 7.

CDSPLTRG_S700E003_100 Page 4 of 17 21-Dec-15


TRAINING MODULE PLC COMMUNICATION
_
Control Desk Solutions Pvt. Ltd. [Training Unit]

Step2: Please specify the Output/Input address.

Step3: Now it is possible to use the addresses directly in program as I/Q/PIW/PQW.

CDSPLTRG_S700E003_100 Page 5 of 17 21-Dec-15


TRAINING MODULE PLC COMMUNICATION
_
Control Desk Solutions Pvt. Ltd. [Training Unit]

3. PLC-PLC Communication
In the following section we will describe detail steps to establish PLC-PLC communication.

3.1 Create connection diagram

Step1: Create NETPRO connection. Go to configured network from tool bar of step7 home
window.

Step2: Select the CPU for which connection to be established. Connection table will open.
Select the first empty row in the connection table.

CDSPLTRG_S700E003_100 Page 6 of 17 21-Dec-15


TRAINING MODULE PLC COMMUNICATION
_
Control Desk Solutions Pvt. Ltd. [Training Unit]

Step3: Double click on the empty row new connection property window will open. Select the
connection type. For H-System “S7 connection fault-tolerant” for stand-alone CPU “S7
connection”.

CDSPLTRG_S700E003_100 Page 7 of 17 21-Dec-15


TRAINING MODULE PLC COMMUNICATION
_
Control Desk Solutions Pvt. Ltd. [Training Unit]

Step4: Select the desired CPU from the Connection Partner list and press OK.

Step5: Connection properties window will open. Check the detail connection properties and
press OK.

CDSPLTRG_S700E003_100 Page 8 of 17 21-Dec-15


TRAINING MODULE PLC COMMUNICATION
_
Control Desk Solutions Pvt. Ltd. [Training Unit]

Step6:

CDSPLTRG_S700E003_100 Page 9 of 17 21-Dec-15


TRAINING MODULE PLC COMMUNICATION
_
Control Desk Solutions Pvt. Ltd. [Training Unit]

3.2 Create program

For PLC-PLC communication there are several standard blocks available. Following are the
blocks that can be used for communication over Ethernet.

SFB/FB/FC Designation Brief Description


SFB8/FB8 USEND Uncoordinated data exchange using a send and a receive SFB

SFB9/FB9 URCV Max. Length SFB 8/9: 440 bytes split into 4x100 bytes.

Max. length FB 8/9: 160 bytes


SFB12/FB12 BSEND Exchange blocks of data of variable length between a send SFB
and a receive SFB
SFB13/FB13 BRCV
Max. length SFB 12/13: 64 KB

Max. length FB 12/13: 32 KB


FC 5 AG_SEND Send data by means of a configured connection to the
communication partner (<= 240 bytes).
FC 6 AG_RECV Receive data by means of a configured connection from the
communication partner (<= 240 bytes, not email).
FC 50 AG_LSEND Send data by means of a configured connection to the
communication partner.
FC 60 AG_LRECV Receive data by means of a configured connection from the
communication partner (not email).

We shall demonstrate only BSEND/BRCV here in this document.

CDSPLTRG_S700E003_100 Page 10 of 17 21-Dec-15


TRAINING MODULE PLC COMMUNICATION
_
Control Desk Solutions Pvt. Ltd. [Training Unit]

Send function (BSEND):

REQ: Set a periodic trigger BIT to execute send. Send function works only in rising edge of
REQ signal.

R: 1 to Reset sends communication.

ID: Connection ID from NETPRO Connection table.

CDSPLTRG_S700E003_100 Page 11 of 17 21-Dec-15


TRAINING MODULE PLC COMMUNICATION
_
Control Desk Solutions Pvt. Ltd. [Training Unit]

R_ID: A hexadecimal value to be entered here. This value should be the same value of the
partner R_ID of BRCV block.

SD_1: Specify the source DB here.

LEN: Specify the length to be sent in Byte.

CDSPLTRG_S700E003_100 Page 12 of 17 21-Dec-15


TRAINING MODULE PLC COMMUNICATION
_
Control Desk Solutions Pvt. Ltd. [Training Unit]

Receive function (BRCV):

EN_R: Set the signal to 1. Receive function works only when EN_R = 1.

ID: Connection ID from NETPRO Connection table.

CDSPLTRG_S700E003_100 Page 13 of 17 21-Dec-15


TRAINING MODULE PLC COMMUNICATION
_
Control Desk Solutions Pvt. Ltd. [Training Unit]

R_ID: A hexadecimal value to be entered here. This value should be the same value of the
partner R_ID of BRCV block.

RD_1: Specify the destination DB here.

LEN: Specify the length to be sent in Byte.

CDSPLTRG_S700E003_100 Page 14 of 17 21-Dec-15


TRAINING MODULE PLC COMMUNICATION
_
Control Desk Solutions Pvt. Ltd. [Training Unit]

4. Example (LD#3 BOF1-GCP1)


Chart Description:

In LD3 CFC block is used for data exchange through DB. Here is example we are showing GCP
PLC data is shared in BOF PLC through DB. Open chart DXG_GCP_BOF.

Here is two block are used for data sending and data receiving here DB806 is used for data
send and DB 805 is used for data receive.

CDSPLTRG_S700E003_100 Page 15 of 17 21-Dec-15


TRAINING MODULE PLC COMMUNICATION
_
Control Desk Solutions Pvt. Ltd. [Training Unit]

Send block description

REQ: Control parameter request, activates the data exchange at a rising edge. It is a
memory bit is used for request data for exchange here is M1.5 is refreshing data after 1sec.

ID: It is the data receiver PLC address (it is fault tolerance address from NET PRO). Here
local and partner ID is given. Block parameter is for local address number (GCP PLC) and
W#16#3 (BOF PLC)

R_ID: It is the data sender address.

SD_1: DB address that is used for data sending.

LEN: Length of DB.

CDSPLTRG_S700E003_100 Page 16 of 17 21-Dec-15


TRAINING MODULE PLC COMMUNICATION
_
Control Desk Solutions Pvt. Ltd. [Training Unit]

Receive block description

EN: High always.

EN_R: High always.

ID: It is the data receiver PLC address (it is fault tolerance address from NET PRO).

R_ID: It is the data sender address.

RD_1: DB address where data receiving.

LEN: Length of the DB.

CDSPLTRG_S700E003_100 Page 17 of 17 21-Dec-15

You might also like