Simatic manager - SFB3 as an input parameter to an FB or FC

naturephoenix

Member
Join Date
Jan 2015
Location
Vienn
Posts
181
I'm trying to pass SFB3 (TP) as an input parameter to FC or FB but it is not working.
The best would be if a SFB3 would be a part of my UDT since I can pass UDT to Fc or FB, but to declare SFB3 inside UDT it is not possible.
Ok so I decide that I will make some of SFBs inside my FB as a STAT variable and pass it to my FC where I'm doing the logic, but I don't know how.
 
Change your FC to an FB and put the timer in the FB and then use multiple instances.


I have done that, take a look but it just means I can declare a lot of SFB3 TP timers as a STAT variable. I need it as an input parameter. Take a look picture.
I have a UDT and a variable array of UDT. Since the code is same for all fields(all UDTs in Array) I'm trying to make code just for 1 field. But inside code I need SFB TP counter.

It means every UDT needs to have its TP counter, but it is not possible to declare SF3B TP inside UDT. Ok so I can declare as much as I need SFB TP inside FB as STAT variable, but
that means I need to write code for every UDT in my ARRAY. I mean code is fixed it does not depends on the input/inout parameter

FixedTP_Variable.jpg
 
Last edited:
Hey, thx on help, couldn't answer it before since I'm on commissioning to far away from home.
Solution was just like "L D[AR2,P#0.0]" said.


Part1: One FBx contains my logic part and inside are STAT TP variables.
Part2: Another FBy contains array of FBx instances declared as a STAT variables as well
 

Similar Topics

I'm trying to build my Classic Step 7 programming skills this weekend. I get stuck on little things that are not covered in YouTube tutorials. I'm...
Replies
7
Views
311
Got a VIPA 315-2AG23 that i try to go online with but can't seem to make it work through a network. I can go online if i'm plugged directly in the...
Replies
4
Views
259
Hello all. I went to a customers location, uploaded from the S7-300 (CPU312) and performed a save, performed some work then came back to the shop...
Replies
7
Views
596
Hello.We are trying to convert a program written with S7-300 Simatic Manager to S7-1200 V16.Unfortunately, there is only LAD,FBD option in S7-1200...
Replies
2
Views
746
Hi, I have recently gone full in on TIA after holding on to Simatic Manager. One thing which I find more difficult is the filter function for...
Replies
6
Views
1,709
Back
Top Bottom