You are on page 1of 60

Discription of Handling CPU 313C-2 DP MPI communication

Order no.: Description: Designation: Status: Author: Graphics: Layout: Description of Handling CPU 313C-2 MPI-communication August 2007 Wolfgang Eckart Wolfgang Eckart Festo Didactic GmbH & Co

© Festo Didactic GmbH & Co. KG Internet: www.festo.com/didactic e-mail: did@festo.com All rights reserved, including translation rights. No part of this publication may be reproduced or transmitted in any form or by any means, electronic, mechanical, photocopying, or otherwise, without the prior written permission of Festo Didactic.

Table of Contents

Table of Contents _________________________________________________________ 1 Introduction _____________________________________________________________ 2 Description______________________________________________________________ 3 Edit a new project _____________________________________________________ 3 Insert two stations ____________________________________________________ 5 Hardware configuration of the CPU 1 – MPI_2 ________________________________ 8 Hardware configuration of the CPU 2– MPI_3 ________________________________ 17 Edit the symbol table of the CPU 1 – MPI_2 _________________________________ 26 Insert a Function FC1 in the first station – CPU1 – MPI_2 _______________________ 28 Edit OB1 and FC1 of CPU1 – MPI_2 _______________________________________ 30 Edit the symbol table of the CPU 2– MPI_3 _________________________________ 35 Insert a Function FC1 in the first station – CPU2– MPI_3 _______________________ 37 Edit OB1 and FC1 of CPU2_MPI_3 _______________________________________ 39 Definition of the MPI Global Data _________________________________________ 44 Download the stations into the CPU´s _____________________________________ 57

© Festo Didactic GmbH & Co. • MPI

1

Introduction We will configure and program an easy exercise of bidirectional communication via MPI – Multi Point Interface between two independent stations (example Distribution Station and Testing Station). The PLC configuration for both Stations is: The exercise shall be. • MPI 2 . as long as a Start-button is pressed. the START-light of the communication partner shall be on. The communication shall be bidirectional. this means. Start-Button Distribution START-light on Distribution START-light on Testing Start-Button Testing Please don´t connect the CPU´s with the fieldbus cable (pink color) at the beginning. © Festo Didactic GmbH & Co. pressing START on both Stations and the light of each partner station is on.

• MPI 3 .Description Edit a new project Simatic Manager is open File New © Festo Didactic GmbH & Co.

Description (Type in a name – here MPI) OK © Festo Didactic GmbH & Co. • MPI 4 .

• MPI 5 .Description Insert two stations Insert Station 2 SIMATIC 300 Station © Festo Didactic GmbH & Co.

Description (Change the name of the station – here MPI_2 which means MPI networking and the CPU will have MPI address 2) © Festo Didactic GmbH & Co. • MPI 6 .

Description (Click on the project MPI) Insert Station 2 SIMATIC 300 Station MPI_3 which means the second CPU will have the MPI address 3) (Change the name to © Festo Didactic GmbH & Co. • MPI 7 .

• MPI 8 .Description Hardware configuration of the CPU 1 – MPI_2 MPI_2 (double click) Hardware (double click) © Festo Didactic GmbH & Co.

• MPI 9 .Description + SIMATIC 300 + RACK-300 Rail (double click) © Festo Didactic GmbH & Co.

• MPI 10 . 2) OK (the MPI-network will be defined later) © Festo Didactic GmbH & Co.Description .RACK-300 + CPU-300 + CPU 313C-2DP 6ES7 313-6CE01-0AB0 (please check the order number of the CPU on the lower left corner of the CPU and click and hold and move the CPU to Slot no.

• MPI 11 .Description CPU 313C-2DP (double click on the CPU on Slot no. 2) Properties © Festo Didactic GmbH & Co.

Description MPI (1) (check the MPI address is 2) OK © Festo Didactic GmbH & Co. • MPI 12 .

Description Cycle/Clock Memory (click on the Clock Memory to activate it) clock memory – here 100) (Type in the address of the © Festo Didactic GmbH & Co. • MPI 13 .

• MPI 14 .Description Retentive Memory (Change all values for Memory Bytes. Timers and Counters to 0) OK © Festo Didactic GmbH & Co.

Description

Station

Save and Compile

© Festo Didactic GmbH & Co. • MPI

15

Description

(Connect the PC with the first CPU (MPI_2) via the PC/MPI-adapter) the commands on the screen) (after download complete) Station

PLC Exit

Download (follow

© Festo Didactic GmbH & Co. • MPI

16

Description

Hardware configuration of the CPU 2– MPI_3

MPI_3 (double click)

Hardware (double click)

© Festo Didactic GmbH & Co. • MPI

17

Description + SIMATIC 300 + RACK-300 Rail (double click) © Festo Didactic GmbH & Co. • MPI 18 .

Description .RACK-300 + CPU-300 + CPU 313C-2DP 6ES7 313-6CE01-0AB0 (please check the order number of the CPU on the lower left corner of the CPU and click and hold and move the CPU to Slot no. • MPI 19 . 2) OK (the MPI-network will be defined later) © Festo Didactic GmbH & Co.

Description CPU 313C-2DP (double click on the CPU on Slot no. 2) Properties © Festo Didactic GmbH & Co. • MPI 20 .

Description MPI (1) (check the MPI address is 3) OK © Festo Didactic GmbH & Co. • MPI 21 .

• MPI 22 .Description Cycle/Clock Memory (click on the Clock Memory to activate it) clock memory – here 100) (Type in the address of the © Festo Didactic GmbH & Co.

Timers and Counters to 0) OK © Festo Didactic GmbH & Co.Description Retentive Memory (Change all values for Memory Bytes. • MPI 23 .

Description Station Save and Compile © Festo Didactic GmbH & Co. • MPI 24 .

Description (Connect the PC with the second CPU (MPI_3) via the PC/MPI-adapter) PLC Download (follow the commands on the screen) (after download complete) Station Exit After the download of both hardware configurations is complete. please connect the two CPU´s with the fieldbus cable (pink cable) together and connect the first CPU (MPI_2) with the PC via the PC/MPI-adapter. © Festo Didactic GmbH & Co. • MPI 25 .

Description Edit the symbol table of the CPU 1 – MPI_2 + MPI_2 + CPU 313C-2DP S7 Program(1) Symbols (double click) © Festo Didactic GmbH & Co. • MPI 26 .

0 © Festo Didactic GmbH & Co. • MPI 27 . please use the addresses I 124.Description (Edit the symbols. addresses and comments like shown within the screen shot) Save Symbol Table Exit Remark: Symbol Table If you use the TP 300 equipment with the Edutrainer PLC.0 and Q 124.

Description Insert a Function FC1 in the first station – CPU1 – MPI_2 + S7 Program(1) Blocks Insert S7 Block Function © Festo Didactic GmbH & Co. • MPI 28 .

Description (Insert a Function FC1 programmed in FBD – Function Block Diagram) OK © Festo Didactic GmbH & Co. • MPI 29 .

Description Edit OB1 and FC1 of CPU1 – MPI_2 OB1 (double click) (check that the programming language is FBD) OK + Program Control (in the Overviews) CALL (double click) (edit FC1 to be called) File Save File Exit © Festo Didactic GmbH & Co. • MPI 30 .

Description FC1 (double click) + Bit Logic button) Insert Symbol = Assign (double click) (click on the Input) (right mouse © Festo Didactic GmbH & Co. • MPI 31 .

• MPI 32 .Description (Choose the START button) START (double click) © Festo Didactic GmbH & Co.

The addresses are free.Description Type Q 40. 40 is just an example) © Festo Didactic GmbH & Co. • MPI 33 .0 for the output – later we will define QB 40 and IB 40 to be used for the MPI communication.

• MPI 34 .Description Insert Network (inserts a second network) screen shot) File Save File Exit (edit the second network like shown within the © Festo Didactic GmbH & Co.

Description Edit the symbol table of the CPU 2– MPI_3 + MPI_3 + CPU 313C-2DP S7 Program(2) Symbols (double click) © Festo Didactic GmbH & Co. • MPI 35 .

addresses and comments like shown within the screen shot) Save Symbol Table Exit Remark: Symbol Table If you use the TP 300 equipment with the Edutrainer PLC.Description (Edit the symbols. • MPI 36 . please use the addresses I 124.0 and Q 124.0 © Festo Didactic GmbH & Co.

• MPI 37 .Description Insert a Function FC1 in the first station – CPU2– MPI_3 + S7 Program(2) Blocks Insert S7 Block Function © Festo Didactic GmbH & Co.

Description (Insert a Function FC1 programmed in FBD – Function Block Diagram) OK © Festo Didactic GmbH & Co. • MPI 38 .

Description Edit OB1 and FC1 of CPU2_MPI_3 OB1 (double click) (check that the programming language is FBD) OK + Program Control (in the Overviews) CALL (double click) (edit FC1 to be called) File Save File Exit © Festo Didactic GmbH & Co. • MPI 39 .

Description FC1 (double click) + Bit Logic button) Insert Symbol = Assign (double click) (click on the Input) (right mouse © Festo Didactic GmbH & Co. • MPI 40 .

Description (Choose the START button) START (double click) © Festo Didactic GmbH & Co. • MPI 41 .

• MPI 42 . The addresses are free.Description Type Q 40.0 for the output – later we will define QB 40 and IB 40 to be used for the MPI communication. 40 is just an example) © Festo Didactic GmbH & Co.

• MPI 43 .Description Insert Network (inserts a second network) screen shot) File Save File Exit (edit the second network like shown within the © Festo Didactic GmbH & Co.

Description Definition of the MPI Global Data (Click onto the project) MPI MPI(1) (double click) © Festo Didactic GmbH & Co. • MPI 44 .

Description (Click onto the MPI line) Options Define Global Data © Festo Didactic GmbH & Co. • MPI 45 .

Description Click onto the first column) (right mouse button) CPU © Festo Didactic GmbH & Co. • MPI 46 .

Description (Choose the CPU 313C-2DP from MPI_2) OK © Festo Didactic GmbH & Co. • MPI 47 .

• MPI 48 .Description (Click onto the second column) from MPI_3) OK (right mouse button) CPU (choose the CPU 313C-2DP © Festo Didactic GmbH & Co.

• MPI 49 .Description (Click onto line 1 in column 1) send via MPI) (right mouse button) Sender (to define an output byte to be © Festo Didactic GmbH & Co.

• MPI 50 .Description (Click onto line 2 in column 2) (right mouse button) Sender © Festo Didactic GmbH & Co.

• MPI 51 .Description (Type all sender and receiver bytes like shown within the screen shot– here 40) © Festo Didactic GmbH & Co.

Description GD Table Close Compile (make sure that the compilation was successful) © Festo Didactic GmbH & Co. • MPI 52 .

• MPI 53 .Description PLC Download to Module … complete) GD Table Save (follow the instructions on the screen – after the download is GD Table Exit © Festo Didactic GmbH & Co.

• MPI 54 .Description (Make sure that the MPI-line is still active (bold) and check everything) OK Network Save and Compile (Compile © Festo Didactic GmbH & Co.

Description (If there are no errors) X (close the message window) © Festo Didactic GmbH & Co. • MPI 55 .

• MPI 56 .Description PLC Download to Current Project Stations on the Subnet (follow the instructions on the screen – after the download is complete) Network Exit © Festo Didactic GmbH & Co.

Description Download the stations into the CPU´s (Switch both CPU´s to Stop) MPI_2 (click onto the first station – here MPI_2) Download (follow the commands on the screen to complete the download) PLC © Festo Didactic GmbH & Co. • MPI 57 .

Description MPI_3 (click onto the second station – here MPI_3) commands on the screen to complete the download) Switch both CPU´s to Run and test your program PLC Download (follow the © Festo Didactic GmbH & Co. • MPI 58 .