西门子CP314作为DP主站应用和实现S7 connection

更新时间:2023-04-22 11:19:01 阅读量: 实用文档 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

西门子CP314高级应用,CP314作为Profibus主站使用,方便实现系统的扩展,利用CP314实现PLC之间的通讯

Part2: S7-300 master station with ET200M through the CP342-5

Step1: create a new project and insert a S7-300 station, make the hardware configuration:

Step2: double click the CP342-5 module, choose the ‘Operating Mode’ manual, active the ‘DP

master’. Then choose the ‘General’ set the CP address and create a new profibus network.

西门子CP314高级应用,CP314作为Profibus主站使用,方便实现系统的扩展,利用CP314实现PLC之间的通讯

CP342-5 now is the master of the new network..

Step3: insert the ET200M slave station

西门子CP314高级应用,CP314作为Profibus主站使用,方便实现系统的扩展,利用CP314实现PLC之间的通讯

Step4: Compile and save, then download into the CPU. Now the LED BF is on, it is not the system fault but haven’t active by programming. Step5: programming

FC1, FC2 are the function block to send and receive data from the CP. There are two important addresses using in the program: the I/O address assigned to CP by the PLC.

西门子CP314高级应用,CP314作为Profibus主站使用,方便实现系统的扩展,利用CP314实现PLC之间的通讯

It can be set here or use the system default (320).

Attention: when you set the address yourself, the two must be set the same one.

西门子CP314高级应用,CP314作为Profibus主站使用,方便实现系统的扩展,利用CP314实现PLC之间的通讯

Here in the FC1, the means of the data MB0-MB9 is shown in the following table:

No matter there is Q0.0 / I0.0 or not.

西门子CP314高级应用,CP314作为Profibus主站使用,方便实现系统的扩展,利用CP314实现PLC之间的通讯

Part3: S7 connection between the S7-300 and S7-300 with CP342-5

Step1: Create a new project and make the hardware configuration of the two stations A, B. Be careful with the station address, the two stations must be different with each other. Step2: set CP property for each station

Station A:

as the active connection partner

Open the CP 342-5 property window and choose the Operation Mode menu, then active the No DP.

Create a new profibus connection.

西门子CP314高级应用,CP314作为Profibus主站使用,方便实现系统的扩展,利用CP314实现PLC之间的通讯

Do the same thing to the station B. But when create the profibus connection, choose the profibus

created by the CP342-5 of station A.

Save and compile, then download the hardware configuration to both stations separately through the MPI.

Step3: Establish the S7 connection

Open the Netpro, highlight the CPU of the station A, and then a list will be shown in the down window.

西门子CP314高级应用,CP314作为Profibus主站使用,方便实现系统的扩展,利用CP314实现PLC之间的通讯

Right click in the first line of the Local ID, choose Insert New Connection, a new window will be

created.

Choose the CPU of station B and select the S7 connection in the menu of Connection Type. Click OK.

西门子CP314高级应用,CP314作为Profibus主站使用,方便实现系统的扩展,利用CP314实现PLC之间的通讯

In the new pop window, active the Establish an active connection (for the station A, as the active connection partner, for station B, no active) and set a Hex number for the Local ID witch will be used in the program. Press OK, then a new connection will be created both in the station A and

station B. T

The difference is just the Partner and the Active connection Partner. Save and compile. Then

download.

Connect the two stations with profibus cable through the CP342-5 DP interface. Step4: program

FB12, FB13 are used for the CP342-5-CP342-5 data transfer. They work in couple. For example, if you want to transfer data from station A to station B, you have to use FB12 in station A and FB13 in station B.

西门子CP314高级应用,CP314作为Profibus主站使用,方便实现系统的扩展,利用CP314实现PLC之间的通讯

Profibus experiment

22

本文来源:https://www.bwwdw.com/article/o92q.html

Top