Sign in to follow this  
Followers 0
becs

OB121 Fault

6 posts in this topic

I wanted to test if an output on an aux rack was addressed how I suspected. Instead of forcing the output bit high from either the hardware config or a vat table I wrote a simple line of logic in the FC where I would be using this output. A M30.0 = Q2.2 Neither bit is currently being used in the program. I was going to modify M30.0 between high and low and monitor the output on the rack. I downloaded the new FC, and my test seemed to fail. It wasn't until I was handing the machine back to the operator did I notice that the PLC was faulted and I had an OB121 fault. I hadn't saved the changes in the FC yet so I downloaded the original and cleared the fault. So I've never seen anything like this before. I didn't add a new block, the addresses in the PLC go much higher than M30.0. What are some of the other possible causes for this fault? Are there some other things I should check? Thanks

Share this post


Link to post
Share on other sites
You may use temp data to get where and why the error occur. This is the better way the retreive data from error. Help file you'll give you more info. Edited by slcman

Share this post


Link to post
Share on other sites
OB121 = Programming Error. The answer slcman gave above is a bit misleading, the TEMP data in the error OB's does indeed give you information on the error, this is used where you want to write code to handle errors. When you get a fault that stops the PLC, you should look at the diagnostic message, which tells you the fault and where it is. Without that information and without seeing the code, no-one would really be able to help you.

Share this post


Link to post
Share on other sites
if the fault appen during the week-end, diagnostic buffer maybe full and you'll not able to get any info about the error. As example, a simple power down and power up may lead to 40 event in the diagnostic buffer ( profinet station loss, profinet station return) if you have 20 profinet IO. use TEMP data in OB121 to write info about error in memory ( you could create a DB for fault). Then you'll be able to get the info, even if you are on vacation because your DB keep it until you delete it.

Share this post


Link to post
Share on other sites
As I said, if you want to write code to handle the error (saving it is one example). I have never seen this done in 30 odd years in OB121. I have seen the hardware OB's used to get the information for displaying HMI messages for hardware faults. In this instance we are talking of a software fault which put the PLC to STOP. The normal action when getting to a stopped PLC is to look at the diagnostic data, which OB121 will not tell you anything unless you have written code to store it, then you'd be looking at a DB instead. (But why, when you have the diagnostics) As a side note, if OB121 has not been loaded into the PLC then the PLC will STOP on error. If its been loaded in (even as an empty block) it will not STOP unless there is code to tell it to do so. I would normally ensure this was in when making changes and remove it later. The decision of course depends on the risk there is of the PLC processing incorrect code. Edited by Groo

Share this post


Link to post
Share on other sites
If you can accept to halt the program, then I suggest that you delete OB121 from the online program. This will force the CPU to fault, and importantly will allow you to examine the Stacks. You can use these to jump straight to where in the program the erronous code is. You can also save the OB121 information in a DB (the TEMP values previously suggested). But, it will only tell what you could have found out by investigating the diagnostics buffer. And that information will probably just be that there is a problem in a certain FC or FB. Not precisely what or where the error is.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0