How to know that Profibus DP nodes are alive and well ?

JesperMP

Lifetime Supporting Member + Moderator
Join Date
Feb 2003
Location
ᚴᚬᛒᛅᚾᚼᚬᚠᚾ
Posts
16,239
Hi,

I have a system with S7-400 and several Profibus DP nodes, mostly ET200S and a few drives.

How can I programatically know that a particular node is OK ?

I know that I can use OB86 to flag when a node is missing. But it is the opposite that I am after. To get a confirmation that a node is online and OK. In that way I can trap errors in the configuration as well. In the end I will like to make a nice diagram on my HMI with the entire configuration, and then animate it live with the status of the nodes. If there is a problem, the operator can look on the diagram and know where he has to go looking.
I have searched high and low for a solution to this problem that I thought simple. Everything I find seeems to point me to lists of error codes and Profibus status words that contain error bits.
I find it amazing that a simple "OK" bit for each node cannot be found.

Anyone knows ?
 
Jesper

You can use SFC51 to examine the state of the nodes on a bus, to check this every scan just call SFC51 in OB1.

I haven't done this, but it rings a bell with me. Have a read of the SFC51 help files.

I expect that Daniel or S7Guy have done this and will have a working example for you.

Paul
 
Thanks Paul,

I am looking into SFC51 right now, but the learning curve isnt steep, it is vertical :confused:
I will definitely hope for someone (Daniel ? S7Guy ?) to deliver the goods.

I am also looking into SFC13 DPNRM_DG (slave diagnostics). I think now that it can be done with relative ease in this way:
Start an SFC13 call and also start a timeout timer.
If the SFC13's output parameter RET_VAL is returned with a positive sign, then the node is OK.
If the SFC13's output parameter RET_VAL isn't returned with a positive sign within the timeout OR it is returned with a negative sign, then there is an error.
 
Jesper

I knew this rung a bell!!

Give this a try:-



In OB1

CALL SFC51
REQ : = TRUE //Use an always true bit here
SZL_ID : = W#16#692 // 692 checks the status of DP slaves attached to an integrated DP master.
INDEX : = W#16#1 //The DP master system number.
RETVAL : = MW150 // Error code.
BUSY : = M152.0 //Self explanatory
SZL_HEADER : = #ssl_header // Insert into header of OB1
DR : = P#M60.0 BYTE 16 // 8 words for DP node status, 1 bit per node up to 128 nodes.




You can then interrogate MB60 to MB75 for the status of your DP slaves.

For example:-

MB60 is being monitored in BIN format:-

2# 0000 – 0000 this show all slaves are OK, if slaves 3, 4, 5, 6 and 7 then went down it would look like this:-

2# 0111 – 1100

MB60 us for monitoring slaves 1 to 8, 1 being the least significant bit, 8 being the most. MB61 for slaves 9 to 16 and so on up to MB75 for slave 121 to 128.

Hope this helps

Paul
 
One more question to round this off:

What is the "DP master system number" that is assigned to INDEX ?
In the help text it is called "0/ DP master system ID"
I guess that it can't allways be "1".

Thanks in advance, as I would never have figured this out myself (y)

I will be able to check out the code in a couple of weeks.
 
Hi Jesper, I know Paul has given you the answer but just to add to this, Siemens have created an FB125 Diagnostic Block that can be downloaded Free from their website. We use it on our CPU315-2DP's and as far as I know can be used on a few of the 400's.

It can tell you which DP Slaves are configured, which are actually present on the bus, which are faulty or have broken down. Done in simple bit format.

In addition you can request a more detailed diagnostics which provides you with detailed information about a specific slave device.

A far as I can recall you just simply insert the FB125 and call in OB1. All the info is then feed into DB125. Would be useful in the Scada package you mentioned.
 
Thanks RPax,

I will try out that FB125 as well. If others are interested it can be found HERE.
Interestingly, that FB125 calls SFC51 and a lot of other SFCs. I would guess that Siemens made FB125 because it was too difficult for most people to figure out how to use the SFCs by themselves.

Now that Paul has made the solution for me I will still give SFC51 a go.
 
Jesper

I have used FB125 once in the past, but only for experimenting with. I still have the notes on it at work (I am enjoying a few days off at the moment, I am back at work on Friday). You might well be able to extract the 'node OK, not OK' information out of it, just like SFC51.

I will have a look at my notes on it on Friday and see if I can help you with it, if you require help that is.

Paul
 
Paul,

please take a breather. You have provided the critical nudge in the right direction that I needed. (y)
It will be a couple of weeks before I am back on the site where I can give it a try "in real time".
 
Jesper

I would be very interested in the end result whether you use SFC51 or FB125, I have only experimented with these blocks, I haven't had a need to use them to their full capabilities, yet! So I would like to see what results you get with them, especially the protool part.

Paul
 
Hi Jesper,

Altough it's rather big, (over 6k) we implement FB125 in most of our projects in conjunction with the Protool screen in our TP170b's, and rather to our satisfaction:

It is even capable of giving advanced diagnosis on faulty DP-slaves. In case of a broken IO-module in an ET200s station, it is even telling you on the HMI-device what slot causes the diagnosis state. So, this is a great tool for your customer's technical department.

In addition of a complete DP diagnosis, it is also possible to diagnose a single DP-slave, and receive an OK value if the slave is up and running (this is what you want, not?)
 
Its exactly what I am after.
And the Protool screenshots look great too. Especially as I use Protool Pro, they look quite finished and ready to use.

I cant wait to get started myself, but if you are waiting for some feedback, please have some patience for at least two weeks.

By the way, the reason why it is so important to check the DP slaves is that everything hangs on the DP network. There is no resident i/o in the S7-400 rack. Only CPU and CP. Its a great solution I think, I get the most powerful CPU, combined with the flexibility and low price of ET200S i/o.
 
Last edited:

Similar Topics

My Siemens Step 7 education progressed today. I'm getting more familiar with how it all works, but at the end of the day I got stuck trying to...
Replies
0
Views
1,008
I've encountered a strange problem today and thought I'd share to see if anyone else has seen it before. We have a system on test that has a...
Replies
18
Views
5,341
Hi all, Have a modular design in which the machine must be able to be configured with optional drives on a DP network. With S7, it is possible...
Replies
0
Views
1,323
Generally what faults are occurred in a Profibus & Nodes of a PLC & how to rectify th Generally what faults are occurred in a Profibus & Nodes of...
Replies
4
Views
2,620
Back
Top Bottom