S7 communication via MPI

H

Thread Starter

HNK

I'm trying to set up an S7 connection via MPI between 414-2DP and 315-2DP. I've set up the configuration in Netpro and downloaded all in the CPUs. In the 414 program I'm using SFB14 and SFB15 to PUT and GET data from the 315 but all i get is error=true and status=W#16#0001. this means that there is no communication. Netpro shows that "communication is being set up". I've mailed the project to Siemens Support but they can not find any errors.
Who can help me out or has any experience in this particular type of communication?
 
D

Daniel Chartier

Hello, HNK;
I am thinking of 2 things in Netpro:
1) do you have a CP342-5 (comm. processor for DP networks) in the S7-315-2DP rack; you cannot set-up a S7 connection through the integrated DP port of the CPU
2) can you tell us how the S7 connection is parametrized, and how you use these parameters in SFB 14 and 15?
Hope this helps,
Daniel Chartier
 
A

Andrew Hawdon

Hi

To transfer data across MPI using get and put you do not require to use Netpro. All you require is the 2 Cpu's to be at differant MPI addresses and paramatise the GET and PUT blocks correctly. Have u checked that u can see all MPI nodes from the programmer?

Andrew
 
<p>1) I did not use a CP342-5 but connect the 315-2DP and 414-2DP directly via MPI. In Netpro The S7 connection generates ID W#16#0001.
I expect the 414 to set up a connection (similiar to a TP or OP or MP). Then the 414 should be able to collect data directly from the 315CPU


<p>2) The parameters of the SFBs are:
<pre>
CALL SFB 15 , DB15
REQ :=DB4.DBX 0.0
ID :=W#16#1
DONE :=DB4.DBX6.0
ERROR :=DB4.DBX6.1
STATUS:=DB4.DBW8
ADDR_1:=P#DB11.DBX0.0 BYTE 240
ADDR_2:=
ADDR_3:=
ADDR_4:=
SD_1 :=P#DB10.DBX0.0 BYTE 240
SD_2 :=
SD_3 :=
SD_4 :=
NOP 0


CALL SFB 14 , DB14
REQ :=DB4.DBX 12.0
ID :=W#16#1
NDR :=DB4.DBX18.0
ERROR :=DB4.DBX18.1
STATUS:=DB4.DBW20
ADDR_1:=P#DB10.DBX0.0 BYTE 240
ADDR_2:=
ADDR_3:=
ADDR_4:=
RD_1 :=P#DB11.DBX0.0 BYTE 240
RD_2 :=
RD_3 :=
RD_4 :=
NOP 0
</pre>
<p>The first call (OB100) is with REQ=false
 
The 414 has MPI address 2 and the 315 has MPI address 3. I'm able to download and monitor both CPUs so the hardware connection must be ok.

If I don't need Netpro. which SFBs can i use to put and get data to a unknown communication partner?
 
P
False, false, false. The integrated MPI port on the 315 will work for MPI communications. I know I've done many times.
 
A

Andrew Hawdon

Hi

sorry my mistake I was thinking of X_GET AND X_PUT which allow you to specify the MPI address as a parameter on SFC67/SFC68. The limit with these blocks is data consistency which is 8 bytes. Have you ensured that after configuring the connections in netpro that you perform a compile and download?

Andrew
 
Ron,

As far as I understand now, MPI communication via the MPI port of the 315 should be possible, and the way i did it is ok? In netpro i've set up the connections, after that i save and compile, then download the configuration into 414 and 315. If i look at the system data the date is changed so obviously the new configuration is saved. I can also compare the on and offline systemdata and there are no differences so the download procedure must be ok to.

Is it possible for you to mail me a working configuration so i can compare to my situation. My E-mail address is [email protected]

Thanks in advance.

HNK
 
P
Correct, correct, correct. Good question about the compile and download. You may want to add compile and download the Connections and Gateways and only to the 414. It is the one that needs the information.
 
Guys,

Thanks for your reply. Today i saw the light.
The problem was in the hardware configuration of the 315CPU. At the properties of the CPU at TAB Communications you can reserve connection resources for communication. Total maximum is 12. I reserved 2OP, 2PG and 8 S7 standard communication. (I thought that S7 connection uses S7 standard communication). I found out at the help file that only resources that are NOT reserved can be used for S7 connections. I reduced the S7 standard communication reservations to 2 and now the communication is working properly. (Sometimes solutions can be so simple).
 
Top