Doing the "impossible" with S7 DP comms.

JesperMP

Lifetime Supporting Member + Moderator
Join Date
Feb 2003
Location
ᚴᚬᛒᛅᚾᚼᚬᚠᚾ
Posts
16,286
My personal entry to this problem is that I have a project where differnt parts/machines are supplied with Profibus DP capable S7s. Now I'm presented with the task to let all these parts talk to each other, and all machines have a DP port, so whats the problem ?

What is more natural than to let all CPUs communicate with each other via the built-in DP ports that all the CPUs have ?
In other words, no extra CPs are used, only the built-in DP ports.
Also no DP coupler is used.

The snag is this:
In order to set up communication with PUT and GET (and with the above mentioned constraints) all CPUs must be included in the same STEP7 project .
This is simply not possible. Different vendors cannot put their projects in the same STEP7 project. Its even a hassle when its the same company !

There are lots of projects where different vendors supply S7-300s and S7-400s with their equipment. So I bet I am not alone about this "problem".

I am pondering a possible workaround :
Create separate STEP7 projects for each CPU.
In each project all the other CPUs must be included - but only with dummy programs - only the CPU and comms parameters will have to match.

Paul Lucas has gratitously offered to use his S73152DP + S74122DP for experimenting (clap clap clap clap).
We just have to feed him with instructions.

Are there others out there willing to join the party ?
 
Jesper

That was quick, I had only just read your PM!

Anyway, as I said to you before, what you want to do is possible with ethernet comms.

In netpro you insert an 'other station', a dummy. Double click that dummy and open up it's properties, in the interface tab, you add ind ethernet.... wait a minute, I will have to check what 'interfaces' are available, there just might be a profibus option. Anyway, as I was saying you add ind ethernet, set up the IP address and close that down, then open up the 'connections' for the local CPU and add the other station to it, you will need the TSAP address of the 'other' station.
Once they are all set, download to the local station and bob's your uncle.
As I also mentioned to you in the PM, it was a couple of years ago when I done this last and my notes are not as good as I thought they were.
I will have to have a play.

Paul
 
Sounds interesting, I think it's a bit above my capabilities at the moment, but I shall certainly watch with interest.

I shall still have the 317 and the 314 around for a couple of weeks yet to play with, then the 317's supposed to ship, although with what I hear about the state of the site, I suspect it's going to slip back to early next year.

Edit: Just seen your post Paul,

wait a minute, I will have to check what 'interfaces' are available, there just might be a profibus option.
That's ringing little bells in the back of my head that tell me that I seem to remember reading somwhere in the Simatic Net stuff, that effectively you could treat ProfiNet links as if they were Ethernet. Must see if I can dig it up.


Good luck :site:
 
Last edited:
So far I have been able to create an integrated project with one S7-412 2DP and two S7-315 2DPs.
I can make connections between the S7-400 and both S7-300s, but not between the two S7-300s (its OK for me, as I can use the S7-400 as a data concentrator).

[attachment]

This project would then be a template for three separate projects, but only the program in one CPU will be "for real" in each project.

The next step will be to setup PUT and GET comms.
So there is going to be something to do next week also ;)

s7connection.gif
 
Jesper

I have been having a little play...

I have the 412 as a single project and I added an 'other station' to the project in netpro, set the interface up as profibus (universal DP/FMS), setup the S7 connection compiled it and downloaded to the 412. Then in OB1 I used X_PUT to write some data to the 315, the intial test proved succesful, just for the experiment I am writing the 412's real time clock to DB1 in the 315, then monitoring the DB in a VAT on the 315 I can clearly see my data being written.

I have got to go and do some real work now, but I will be back later with some screen shots and details on the setup.

It was a bit of a grapple initially, so what I will probably do is delete the whole lot and start again from scratch, taking screen shots and notes as I go along.

I see from your screen shot that you have 'defined' the extra station, with the above method that is not even required, but you will just have to ensure that they different profibus address's

Paul
 
I wasnt even thinking about X_PUT/X_GET (data exchange for unconfigured connections).

I thought that X_PUT/X_GET was for MPI only.
Here is a snippet from the manual "System Software for S7-300/400 system and Standard Functions":
SFCs for exchanging data between an S7 CPU and other modules with communication functionality, if the communication partners are connected to a common MPI subnet (identified by the preceding "X” for external).

If it really works on DP then that is another eye-opener.
I have taken spcial note of this:
You have to set the 412 2DP port as Universal DP/FMS to get it to work.
 
Last edited:
So there is going to be something to do next week also

Glad to know we're not going to be bored next week :D

I'll be off home for the weekend shortly, so I'll wish you a good weekend, and see you next week.

Unless that is, I get withdrawal symptoms over the weekend!

This site should carry a health warning - it's addictive! :site:

Cheers
Roy
 
Jesper

Just a quick reply to your latest post..

I used X-PUT (not X-GET yet) as that was what you mentioned in the PM, what SFC was you hoping to use? X-PUT and X_GET should suffice for what you want, or not?

I set the port up as universal, because that was the only way I could set it up without receiving error messages due to the 'other station' being undefined.

Do we want to try this a specific way? or any way we can.

If you want to do this as a structured test, maybe we could come up with the various connections and SFC's etc, and perform each test one at a time, logging the results as we go.

Paul
 
Right, X_PUT and X_GET on the S7-400 will be the way to go.
edit: I dont think that we need to experiment with other methods, as this one seems to be the most flexible and simple. Not having to setup configured connections is a big bonus.

Originally I was thinking about "regular" PUT and GET because I thought that connections MUST be setup for comms over DP.

Did you set both S7-400 and S7-300 to "universal DP/FMS" or only the S7-400 ?

I am also looking at the options that can be found under:
HW config - DP port .. Properties .. Parameters tab - Subnet Pofibus - Properties button .. Network settings tab - Options button.
Here you can include "passive stations". Maybe this is important in order to avoid errors.
 
Last edited:
Aha,

swithing from DP to Universal mode increases Ttr (Target rotation time) from 25ms to 230ms at 1.5M !
(and from 181ms to 1088ms at 187.5k - more than a second !!).

So thats the penalty you have to pay for being lazy.
I still believe that for my particular project I will use this method as the update time isnt so critical.
 
Wait wait - there is more.

Experimenting with the bus parameters certainly is interesting.
The previous statement 1088ms at 187.5k is only valid if you choose to "include " other stations under "options".
Without that Ttr is 217ms.
And the "typical token rotation time" is only 15 ms. Not bad at all.
 
JesperMP said:

Did you set both S7-400 and S7-300 to "universal DP/FMS" or only the S7-400 ?


The 300 was only installed in my office yesterday, and it is was configured yesterday in netpro for ethernet comms to the 412 only, I haven't changed the configuration or program in the 300 what so ever today, while I had a play this morning. The only configuration and program I have changed is the 400.

So the answer to your question is no, I didn't set the 300 to DP/FMS

Hopefully I will have a bit of time this afternoon to start from scratch and go with this again, logging the steps as I go. I will set the 300 up as a stand alone unit, and just have a DB in it to read and write to from the 400. I will see how I get on with that. If I don't get time I will have to try and find time next week.

Paul
 
Oops I made a mistake

Jesper

I have just been running some tests through my lunch break and what I have to report is a little bit embaressing for me :oops:

This is what I have just done:-

1. A complete memory reset on the 412 and the 315, including deleting the MMC card on the 315.

2. set the 315 up as a stand alone PLC, I removed the 343 from the rack. In hardware config set the 315 up as not networked.

3. Set up a DB (DB1) in the 315 to 8 bytes of data. Compiled the lot and downloaded it to the 315. Shut that project down in simatic manager

4. New project for the 412. Again setup as a stand alone unit, but networked via profibus to 'another station'. Profibus set as universal DP/FMS.

5. Stuck a network in OB1 to move the OB1_DATE_TIME to a DB (DB1), compliled that lot and downloaded to the 412. Went online to confirm I had data in DB1 ready to put in the 315.

6. Using X_PUT, as I apparently did earlier, I set it up to PUT 8 bytes of data into the 315. Downloaded this to the 412.

I then opened up a VAT in the 315 and took a peek in the DB where I was expecting to see my data and what did I see...

All zero's... nothing being written!

I must have made a mistake somewhere along the line this morning, I am now back to square 1, I will have a try with SFB15 and see if that works with the setup I have now. If I still get no joy, I will try sticking a dummy '300' into netpro on the 412 project.

Sorry for getting your hopes up... that will teach me to try these things out methodically.

Paul

P.S I took a peek at the help file for X_PUT and it clearly states MPI address, DOH!!
 
2. set the 315 up as a stand alone PLC, I removed the 343 from the rack. In hardware config set the 315 up as not networked.
Then you have effectively shut down the DP port on the 315.
Try to set it as networked with DP (or Universal) profile.
 

Similar Topics

I am latching and unlatching "result_Data_latch" bit within same rung. Will This copy/move instruction execute correctly??
Replies
4
Views
172
Hi All, I have a click plc the I need to bit strip and 16Bit int. This is to get the alarms from these bits in the int. Do anyone know how to bit...
Replies
1
Views
500
In Easy Builder Pro: Unexpected results... I've got a toggle switch set to trigger a macro to write a specified integer or a 0 depending on the...
Replies
7
Views
2,282
Good Morning , Since I’m loading a new laptop , what are you doing for the 32 bit FactoryTalk View projects that you run into ? Are you...
Replies
8
Views
3,804
Is K4M101 a constant? Is K7 a constant? What does this instruction do? Thanks
Replies
19
Views
5,054
Back
Top Bottom