How to get Siemens S7-400 PLC diagnostic buffer PLC fault information?

DenZ_P

Member
Join Date
Jun 2016
Location
SomeWhere
Posts
64
Hello Experts,

I would like to seek advise on how or what tag i should use or do to get the PLC diagnostic buffer to know what is the root cause of the current PLC faults from Siemens S7-400 PLCs? We are having PLC system fault instantaneously but at random times and i cannot be on site 24/7 to standby and wait for the issue to show. So i am thinking to get the text description of the fault from the controller so operators can feed me the information. Maybe i can put in alarms description or save it in a notepad with triggering bit from HMI. Save as .csv file. Detailed help would be wonderful, i havent done this yet. thanks!

Control system specs:
Simatic Manager v5.5
InTouch v11

Diagnostic buffer.JPG
 
I'm going to go out on a limb and say the solution revolves around SFC51 to read the diagnostic buffer.

Usually, for the purpose you want, programming one or all of the fault OBs to capture and record the information would be the way forward.

Additionally, if you want to "mess" with the diagnostic buffer, you can use WR_USMSG (SFC52) for the program to write a custom message to the buffer. Sadly, I don't have Step7 with me but I'm sure I have the software to do this in one of my old archives.
 
If the PLC is not too old, and has an ethernet port, you can enable the webserver on the CPU.
This allows anyone to go online with a webbrowser and amongst other things access the diagnostics buffer. Also, it allows you to save the diagnostics buffer to a text file for easy emailing.

Not sure if this feature works with an S7-400 without ethernet onboard but equipped with an ethernet-CP.
 
The easiest way is using the CPU Messages feature in STEP 7

https://support.industry.siemens.com/cs/document/5416665/how-can-you-display-the-messages-in-step-7-using-the-cpu-messages-function-?dti=0&lc=en-WW

Unfortunately, it requires STEP 7 to be connected to the PLC 24/7, but the messages will be captured. It also requires some auto-generated code to be downloaded to the CPU.

This solution might not be possible since our customer on site doesn't have a Step 7 software. Thanks for the response. Appreciate this.
 
Apart from webserver you can (actually should) program all error OBs so that:
1. When an error-OB is triggered, it activates a corresponding alarm-bit that makes the HMI display and log an alarm.
2. Store diagnostics data from the error-OB in a DB that for example can be accessed by the HMI.
It is relatively easy to do.
With this you have useful information that is helpful for troubleshooting.

Yet another possibility is to use the report-system-error functionality. This is a canned solution to have all diagnostics information be integrated into the HMIs alarm messaging system.
However, it only works with Siemens HMIs.

edit: Both of these suggestions works on CPUs without ethernet or webserver.
 
I'm going to go out on a limb and say the solution revolves around SFC51 to read the diagnostic buffer.

Usually, for the purpose you want, programming one or all of the fault OBs to capture and record the information would be the way forward.

Additionally, if you want to "mess" with the diagnostic buffer, you can use WR_USMSG (SFC52) for the program to write a custom message to the buffer. Sadly, I don't have Step7 with me but I'm sure I have the software to do this in one of my old archives.

@Cardosocea thank you for this advise about SFC51 because of this i have seen this link below in siemens support.

https://support.industry.siemens.com/cs/ww/en/view/23330722

it provides sample programs. Thanks a lot!
 
If you go by my suggestion about the error-OBs, you can expand so that when an error-OB is triggered you extract more detailed information with SFC51.
Here is an example project:
https://support.industry.siemens.com/cs/de/en/view/22407622

The example project is for WinCC Flexible, but I think it can be adapted to any kind of HMI. It essentially places the entries of the diagnostics buffer in a list as message code numbers.

edit: Wow, got overtaken on the inside.
 
If the PLC is not too old, and has an ethernet port, you can enable the webserver on the CPU.
This allows anyone to go online with a webbrowser and amongst other things access the diagnostics buffer. Also, it allows you to save the diagnostics buffer to a text file for easy emailing.

@jesperMP Not sure if this feature works with an S7-400 without ethernet onboard but equipped with an ethernet-CP.

As per checking it seems webserver is only available for TIA porta. We have Simatic manager on site. Do you have documentation or a link on how to do this? thanks
 
Apart from webserver you can (actually should) program all error OBs so that:
1. When an error-OB is triggered, it activates a corresponding alarm-bit that makes the HMI display and log an alarm.
2. Store diagnostics data from the error-OB in a DB that for example can be accessed by the HMI.
It is relatively easy to do.
With this you have useful information that is helpful for troubleshooting.

Yet another possibility is to use the report-system-error functionality. This is a canned solution to have all diagnostics information be integrated into the HMIs alarm messaging system.
However, it only works with Siemens HMIs.

edit: Both of these suggestions works on CPUs without ethernet or webserver.

Thanks! I will take note about this alternative as well.
 
If the problem occurs but you are not there, the entry will still be in the diagnostic buffer - is it that the buffer is too small to show the problem? You can set the size of the buffer in the h/w config (the default value is 10 entries I believe).

diag1.jpg
 
As per checking it seems webserver is only available for TIA porta. We have Simatic manager on site. Do you have documentation or a link on how to do this? thanks
If the CPU or CP supports it, regardless if STEP7 Classic or TIA, you open the properties of the CPU or CP and there will be tab or folder called "webserver".
You simply enable the webserver and chose at least one user language. That is all there is to it.
Because it is so easy to enable, I use it instead of more complex solutions via the user program.
 
If the problem occurs but you are not there, the entry will still be in the diagnostic buffer - is it that the buffer is too small to show the problem? You can set the size of the buffer in the h/w config (the default value is 10 entries I believe).
For an S7-400 the default is 120.
 

Similar Topics

Good day, I need help locating/dowloading PLC Siemens Saphir SIO ACX32 driver for Proface GP-Pro/PBIII. I am in the process of upgrading a...
Replies
0
Views
1,374
Dear Sir, I have a healthy profibus communication between SIEMENS PLC S7 400 and Allen Bradley drive PF700 using 20-comm-p profibus dp module...
Replies
3
Views
2,809
Hi good morning all... First, I want to know what is the role of subroutine program in PLC programmming and type of subroutines how its...
Replies
6
Views
2,091
Hello Everyone, I use PLC S7-400 with Ethernet module CP 443-1 and i want to communicate with My galaxy via DAServer. I configure my PLC with...
Replies
2
Views
3,398
Hello everyone on PLC talk. Im new here, so i will be humble and was wondering if anyone have a complete description on the simatic s7-400 PLC...
Replies
6
Views
2,340
Back
Top Bottom