Quick Step 7 SFB4 Question

rikcando

Member
Join Date
Apr 2012
Location
Ontario
Posts
128
Ok, with the help of other here I am getting pretty good with the use of SFB's. I do have a simple question though. In the attached picture you can see an example of logic with an S_ODT that I need to repeat 21 times. Is there a way to use a -(S)- on the Q of a TON, or to insert it in the middle of the network to allow a branch around it for the seal circuit?

Or would the only way to be to use a memory bit on the Q and add a second network?

tmr_or_ton.JPG
 
I didn't even think to use the enable output. There is very little information in the help files related to this that I could find.

This is a whole new ball game now. Thanks again for the prompt and informative reply.

ton_wins.JPG
 
You are 100% correct. My daughter had just shown up and I was in a bit of a rush. I thought about it on the trip back from walking her home and realized what I had done. You had given me exactly what I needed and I only used half of the solution. Here is what it looks like now.
Thanks for the follow-up as well.

ton_wins.JPG
 
Looking back at the logic, starting the second starter, I noticed that -|/|- I10.1 is on the wrong side of the branch, but you all probably knew that. Just letting you know that I caught it as well.
 
Another example of multiple instance use attached - I've canned the fault processing logic into it's own block, you then call the block with parameters only.
 
That is exactly what I was thinking of doing but I was unsure about the timer. I understand now that each call has its own DB and therefore its own seperate timer.

I have also added another network to the FB so that it tests failed on and off. I only had to add one Bool to the IN_OUT, and a STAT timer. It will be easier to call this 21 times than to repeat and modify the logic 20 times.

Thank you so much.

Can this be done with an FC? If I understand correctly, timers do not fare well with such calls as the memory is released once the instance has completed processing. Is is safe for me to assume that a beginner with Step 7 (like myself) should avoid timers in FC's?
 
Just to follow up, I have the conveyors seperate into 5 sections. I had the first one programmed long style and changed it to this method. I had to check consistency and recompile things, but after all was done I had reduced the programming by 56 bytes. I expect I will save about 200 bytes of program space and at least 45 minutes of programming time once I complete all 5 sections.

I will also end up with a more professional looking and easier to maintain program.
 
That is exactly what I was thinking of doing but I was unsure about the timer. I understand now that each call has its own DB and therefore its own seperate timer.

Maybe it's your wording, but each call does not have it's own DB. Each call has its own instance data which is located in the instance DB allocated to the FB at the top of the calling tree.
 
Can this be done with an FC? If I understand correctly, timers do not fare well with such calls as the memory is released once the instance has completed processing. Is is safe for me to assume that a beginner with Step 7 (like myself) should avoid timers in FC's?

You can implement processing in Step 7 in so many ways that it can be done in an FC but it will require setting up the address registers and DB registers manually (i.e. just as if you were using a FB when the Step 7 editor does it all for you).

FCs should be used where you pass them a set of input parameters and the FC returns a value (e.g. calculating the volume of a sphere).

My interpretation is that Step 7 FCs were created to allow Step 5 PBs/FBs to be converted to Step 7, and have not been used as true "Functions".
 
I will also end up with a more professional looking and easier to maintain program.

As with most things, there is a down side to using a common function block that is called many times - when you come to monitor the block it is not obvious how to monitor a particular instance of the block. In the debug menu you can specify the call up path to overcome this problem.
 
Maybe it's your wording, but each call does not have it's own DB. Each call has its own instance data which is located in the instance DB allocated to the FB at the top of the calling tree.
Hmm, maybe I don't understand this.
I have the FB set up and when I call it I provide a DB number (eg. DB301). When I call it on the next network for the second starter I used DB302. This continued on until DB321.

Are you saying that I use DB301 for every call and it creates a new instances with each call all by itself?
 

Similar Topics

I'm trying to import a .prj file and I keep getting the error message: Project import error. i Any ideas how to get around this? Thanks.
Replies
0
Views
72
Hi, I am looking for some help with a GE Fanuc Versa Max Micro Controller model IC200UDR001-BF connected to a Quickpanel mini display...
Replies
3
Views
145
Hello, I want to plot a line on X,Y axis with defined start and end points on Quick Panel+. I use PAC Machine Edition 9.7, and it supports...
Replies
14
Views
1,724
Hello, I want to plot a line on X,Y axis with defined start and end points on Quick Panel+. I use PAC Machine Edition 9.7, and it supports...
Replies
0
Views
343
I have previously shared this elsewhere, so I apologize if you have already seen it. Here is a basic and quick introduction to Python for PLCs...
Replies
10
Views
2,245
Back
Top Bottom