A question about Siemens OB100

BobTheBlob

Member
Join Date
Dec 2015
Location
Ontario
Posts
7
OK. You guys helped me out a bunch with my first Siemens question.

I found a bunch of issues with integrity checking the PLC programs I was archiving. Compiling solved a lot of that.

But one thing I am now seeing is that I have some tags in RED in some of the blocks with errors after "recompiling all."

What I can now see is that these are tags (labels? symbols?) in the blocks (in this case, OB100) that are from data blocks that no longer exist. Obviously, this is why they are in red.

But this program just runs hunky-dory and doesn't cause any issues. So, I guess my question is about this OB100.

My understanding from a YouTube video I saw is that there are certain "standard" OB numbers reserved for certain functions: I believe OB100 is one of those, maybe a "cold restart" or "warm restart" block.

I guess the burning question for me is: does OB100 run automatically when switching from program to run mode? Or does OB100 only run if it is called from OB1?

Thanks.
 
OB100 is run once on a new start of the PLC.
See here for a complete list of OB's
So if it runs with a new start of the PLC, and there are these tags in there that aren't associated with any real addresses, the logic just "skips over" them and goes on?
 
Firstly does your offline OB100 match what is actually loaded on the CPU?

I presume you have some of the other error handling OBs downloaded on the CPU? If so, it is likely calling an error OB during startup, but due to OB100 only being processed for 1 scan, you don't notice an SF fault on the CPU.

You'll be able to see this in the diagnostic buffer.
 
Firstly does your offline OB100 match what is actually loaded on the CPU?

I presume you have some of the other error handling OBs downloaded on the CPU? If so, it is likely calling an error OB during startup, but due to OB100 only being processed for 1 scan, you don't notice an SF fault on the CPU.

You'll be able to see this in the diagnostic buffer.
Sorry for the late response.

Yes. The OB100 does match what is in the CPU. Reluctant to put that one in program mode and back to run mode as I am still learning this PLC. But I believe last time we had to do that, we did get faults on the PLC, but were able to clear them through some sort of dialog box online.

So it seems this block is setting some kind of error flag but not any major fault that stops the PLC from continuing on and running.

I'm going to clean that stuff up (eventually) but this Siemens stuff is SO different from Rockwell, I'm still getting comfortable with what I can and cannot do.

Thanks for the input!
 
When the PLC goes into RUN (from STOP, or a memory reset or other reasons), it calls OB100 if it exists before starting into OB1. Before OB100 is called, it also clears out any memory not marked retentive, which is very different behavior from AB. DBs go to a defined initial value, and M/I/Q memory all go to 0/false. This could be a source of startup errors.

It's important to note a couple things about code in Simatic Manager (Step 7 v5.x). You can't save a block if it has any errors in it, but it doesn't automatically check for errors when it downloads. It is fairly common for a block to be correct, with maybe references to a DB, and then the DB is deleted/changed, leaving the references invalid. At that point the system doesn't know anything is wrong until you A) open the block again B) use the block consistency editor you mentioned in the other thread. VERY FEW people know about/regularly use the check block consistency function, and so it can be common for projects to accumulate the sorts of errors you mentioned over time, especially if things get deleted online without deleting in the offline project.

This behavior is cleaned up for newer software/HW from Siemens, if you get introduced to TIA Portal and 1200/1500 PLCs.
 

Similar Topics

Does anyone know why my one string is displaying this way? It is causing issues with my HMI displaying it.
Replies
4
Views
266
Hello all. I have an ESA HMI that is connected to a Simatic S7-300 (CPU312). I have uploaded the program from the PLC which is written with Step7...
Replies
6
Views
1,450
Everyone, i am in the process of purchasing the Slc 500 version of software to support what we have and i have a question. Several of our...
Replies
9
Views
770
We've got very fast machine whose position controlled by interrupt OB35 set at 2ms. For position reading we use Temposonic connected to TM...
Replies
19
Views
2,514
I'm having trouble trying to convert this code to ladder, anyone able to help me? A M4.0 A M4.1 A M117.0 AN M17.7 A ( A I38.6 AN I3.7 O ( A M4.5...
Replies
8
Views
1,210
Back
Top Bottom