How to integrate and call SFB into FB

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
Scarch
Posts: 103
Joined: Fri Aug 31, 2007 8:17 pm
Location: Europe

How to integrate and call SFB into FB

Post by Scarch »

I need to call 128 times the SFB3. I have it declared in the STAT of the FB, but how to call it? and how to generate the instance DB associated with the SFB?

Many thanks
almaz78
Posts: 108
Joined: Tue Dec 16, 2008 7:36 pm

Re: How to integrate and call SFB into FB

Post by almaz78 »

you call sfb3 in the same way as any other FB.

Creating a large number of timers is a perfect example where "function block nesting" can be used.
here is a sample program where 128 timers created using "nesting":

https://www.sendspace.com/file/1gngo1

it took me about 7 minutes to make it, so it's a huge time savier, but it's a bit messy:)

Its done in TIA12. i hope it helps
Scarch
Posts: 103
Joined: Fri Aug 31, 2007 8:17 pm
Location: Europe

Re: How to integrate and call SFB into FB

Post by Scarch »

Many thanks almaz78 but unfortunately I am not using TIA portal (too many failures yet), I have a 319 CPU with normal Step7...

I wonder if you could put the example you have done under Step 7... (oo)
almaz78
Posts: 108
Joined: Tue Dec 16, 2008 7:36 pm

Re: How to integrate and call SFB into FB

Post by almaz78 »

I dont have access to classic vesrsion right now, may be on monday...
almaz78
Posts: 108
Joined: Tue Dec 16, 2008 7:36 pm

Re: How to integrate and call SFB into FB

Post by almaz78 »

Scarch
Posts: 103
Joined: Fri Aug 31, 2007 8:17 pm
Location: Europe

Re: How to integrate and call SFB into FB

Post by Scarch »

(tyou)