S7 - ProfiNet Status

Join Date
Jun 2012
Location
England
Posts
64
Hello
I was wondering if anyone could help me? My question is;
Is there an easy way to discover if a remote ProfiNet station is online or not.

I have used OB86 to flag any changes in status, but this doesn’t work if the profinet device is offline when the cpu was powered up as there is no change in status, so no OB is called.

I just need something simple to determine if a ProfiNet device is healthy at least once after start-up. I can see the BF light flashing, but not sure how to read its status in my program.

Thank you
 
Ok, I installed the libraries from the project and now have PNIODiag in my library. If I double click on the FB126 block I get this (see image) in my program.
In the brief instructions how to use the block, it says that there is an instance DB126 for the storage of the statuses, etc. When I try to insert DB126 in my project, I get an error box with no message in it. When I first tried to create the instance DB the error said something about “ASCII not being available from FB126”, then every time since the message was blank.
I am assuming that the three red ??? are expecting me to enter DB126 or do I enter the other DB200 described?

PNIODiag.gif
 
Ok, I installed the libraries from the project and now have PNIODiag in my library. If I double click on the FB126 block I get this (see image) in my program.
In the brief instructions how to use the block, it says that there is an instance DB126 for the storage of the statuses, etc. When I try to insert DB126 in my project, I get an error box with no message in it. When I first tried to create the instance DB the error said something about “ASCII not being available from FB126”, then every time since the message was blank.
I am assuming that the three red ??? are expecting me to enter DB126 or do I enter the other DB200 described?
No idea what goes wrong. Maybe the symbol connection to the DB you specify is bad. You can try and open the symbol table and manually clear the DB from the table.

Normally you can specify any DB. Try an unused DB number. STEP7 will ask to create it. Say yes to that. Then add a symbolic name to the DB.

Another way is to copy-paste all the relevant blocks from the sample project to your project. That will only go smoothly if the FBs and DBs have not been used in your project already.
 
Thanks Jesper, that worked (see image).
Two questions remain;
1. Do I need the DB200 described, if so where do I tell FB126 to use it?
2. What do the IN0 and OUT1 represent?

Thanks again for your help.

PNIODiag2.gif
 
If you select FB126 and hit F1, an online help will open.
IN0 should be the number of the global DB used for diagnostics data. If you leave it empty, it will assume DB200. If DB200 does not exsit, it will be created (according to the online help).
 
Yes you are correct as always. The bit I missed was that FB126 needs to be present in OB100, this is where it is initiated and the DB200 is set-up. Here are the results;-

In my Profinet IO system 100, the word at byte position 1642 of DB126 reflects the state of the Profinet system. There is a 15 second delay before the DB is updated.
DB200 reflects the same code as above but with separate words per station. Word 0 went to #108 when I unplugged station 1 and word 1 for station 2, etc. Again, there is a 15 second delay before the DB is updated.

Not as simple as I had hoped but its a solution that works!
Thanks all :site:

PNIODiag3.gif
 

Similar Topics

Hello I have a s7-1200 and I would like to read the tags present in this controller with my controllogix controller. The two controllers don't use...
Replies
4
Views
66
Hello Guys, I want to establish profinet communication between siemens plc and my system using python programming. Which python lib can i use to...
Replies
12
Views
361
I want to establish a Profinet network in my production plant to connect multiple devices, including a PLC, HMI, and multiple Profinet-based...
Replies
19
Views
676
Hi, I have a customer with a S7300 from around 2013 which they link to approx 25 inverters, 3 DP to DP converters and 5 IM153 remote I/O units...
Replies
8
Views
320
Hi Guys, I am trying to establish communication over profinet between Siemens S7-1200 PLC as IO device and codesys plc as IO controller. But I am...
Replies
43
Views
2,853
Back
Top Bottom