Call FB without DB (Simatic S7)

bartjanisse

Member
Join Date
Mar 2006
Location
Wijchen
Posts
7
Hi All,

Today i came across the following syntax: UC FB 1

as you can see this calls FB 1 without an instance DB.

My question is where are the static variables stored ?

Thanks a lot in advance,

Bart Janisse
 
LD said that alredy ;)

erm.. no he didn't..

You can open a instance DB before unconditionally calling a FB
(as LAR said), or you can ensure the parameters (TEMP excluded) of your secondary FB matches the parameters of another FB up to the point you need, then call the secondary FB unconditionally from within (as I said)


Two totally different methods. 🤾
 
What DB u think is open just before UC in either case. The DB that has stat variables (atleast should have).

LD said intance db open at the moment of UC. It can either be the parent FB:s instance DB (with suitable offset added to AR2 if needed) or another separate instance DB opened before UC.

It also might be one big shared DB with suitable datastructure, opened as IDB, either with added offset or no offset depending on how programmer has wanted to structure the program.

In the instance DB open immediately before the UC FB 1
 
Last edited:

Similar Topics

Hello everyone. I am working on designing a call light/alarm system I have roughly 20 stations that will each have their own call switch. Then...
Replies
20
Views
522
I've gotten to the learning curve where I can program a call for pump to come on at set point but I'm not sure how to turn the same pump off when...
Replies
1
Views
148
Hi Siemens Experts, I am hoping someone can shed some light on my issue. I have uploaded the code from a S7-300 (317-2PN/DP) using Step 7...
Replies
9
Views
714
I created this FC and it compiles, but when I use it in my MAIN OB1, it appears to have two outputs. See pictures. What am I doing wrong here...
Replies
9
Views
1,496
Is there a way in CX-Programmer to call Ladder Instructions from a structured text program? I can see several functions in the autocomplete...
Replies
3
Views
2,009
Back
Top Bottom