First Use of SFB4

For the record, I do not have to set the .IN in a seperate network, or seperate FB (or OB), but if it is a BOOL I can simply place it directly onto the IN of the SFB4(5) where it is programmed. Correct?

If I place a time value on PT do I need to reset this on start-up in OB100?

I would not normally assign the .IN in a separate FC/OB - the example I posted earlier was to show how you could use SFB4 timers without having to create a separate instance DB for each timer use. My normal use is to incude SFB3/4/5 timers in the stat area of a function block and only reference these timers from within the FB.
 
LOL, I was tossing a coin to decide which question you had answered. Thanks for following up, and the clarification.
 
Last edited:
Are you in a position where you can test your code either with a real plc (re-read first post - you have a real plc!!!) or with plcsim ? The sooner you test some initial implementations out, the less re-writing you will have to do later.
 
Last edited:
I have not played with hte PLCSim yet, and the actual PLC is at the shop, not available until Monay morning.

Is the PLC Simulator difficult to get set up? Is it just a matter of setting up the PG/PC interface?
 
I have tried all of the PLCSIM interfaces and none of them allow me to go online. No connection to the PLC can be established. I think that in itself might be a new thread.
 
L D[AR2,P#0.0], thank you for the direction. i have the PLC Simulator working and I am testing the timers, and seeing just how this will run. I might actually start to like this.

I did have several stop errors to get past. Mostly because of the calls to FC blocks which I have to convert to FB blocks. Long story that is, but a lesson learned none the less.

I had a productive day, learning about SFB's and their implementation, multi instance data blocks, proper use of FB and FC, and how to test in the simulator. (And that you can't mix symbolic and absolute addresses.)
Couldn't have done it without :site:
 
Last edited:
Ah, once again, thanks. I ran it from the Windows Start Menu. But that was the last time now that I know there is a button for that. I may need to adjust the screen resolution so I can actually see the pictures on the buttons.
 

Similar Topics

Hi All I managed to use SFB4 in a FC using the IN_OUT interface, but I would like to improve if possible. Can I determine where the "timer area"...
Replies
9
Views
3,164
Hello! I have used two instances of the iec function block SFB4. They are defined as STAT instances within a calling function block. The presets...
Replies
1
Views
1,615
Hi! Is it possible to declare several SFB4 (TON) in a UDT and then create several DB of type (from our UDT)? I was hoping not to have them...
Replies
4
Views
2,241
If I want to force a TON (SFB4) to be complete can I use a one-shot to initiate a move where I will take the PT value and place it in the ET...
Replies
12
Views
4,571
Hi, I have a simple function block that does not function when I use multi instance SFB4 IEC Timer On Delay. I could not attached a zip of the...
Replies
7
Views
9,118
Back
Top Bottom