Siemens Sfb Timer

kevintfa

Member
Join Date
Jun 2005
Location
Windsor, Ontario CANADA
Posts
22
If I Got This Correctly,in Order To Make A Sfb Timer, I Need To Add It In One Of The Sfb Blocks In The Library....which In My Case Is Write Protected. Do I Have This Right? If So Does Anyone Know A Way Around It?
 
Open a block in your project where you want to call the SFB timer, I'm using OB1 in this example. Make sure the overviews button is pressed, then drill down into the libraries and drag SFB4 onto a blank network. Give it an instance DB and then parameterize it and away you go. Once you have used the SFB it will appear in your list of blocks in your project. (If you want to use SFB's inside an FB you can declare multiple instances - more of that later if required)
sfb5002.JPG
 
Last edited:
Ok, Up To Here All Good, I Have The Timer Displayed In The Network. When You Say Give It An Instance And Parameterize, How Exsactly Do I Do That? I Want To Use Db301, Which In My Project Is General Timers. When "parameter Assignment For Data Blocks" Opens,there Are 7 Timers In There, With Adresses From 0.0 To 132.0. How Do I Add My New Timer In There?
 
Each call to the SFB requires an instance data block. By parameterize I mean supply the logic for starting the timer (IN), and setting the time delay (PT). The Q output is the delayed output and ET is the elapsed time. These timers work by calling them from the program - they do not operate like S5 timers which are part of the 'operating system'.
 
If you want to use DB301 as a standard for timers, then you could create a FB for for timers and place all the SFB calls in that one block. Then make DB301 the instantaneous DB for that.

If on the other hand, DB301 is a block you want as an HMI interface containing just the presets and actiual for timers, then you could just have DB301.DBWx addesses for the timers. You wold still need an instance DB as all FB's and SFB's require them.
 
I Supplied The Logic, Filled In The Preset Time, Assigned The Output. In The Main Program I Called Fb9, And Db309 Which Is The Db Assigned To The Fb. What Do I Have To Enter In The Top Of The Timer? When I Save The Fb It Keeps Telling Me I Have To Enter Something There. I Tryed Db309, Doesn't Like It....then My Computer Completely Shut Off ( I Just Love Toshiba Laptops!)
 
Every FB/SFB call requires its own DB, you cannot assign a used DB, as the DB needs to match the FB parameters. The DB is created by the systen when you call.

If you didn't want to create another DB, then in the FB9 STAT parameters, add a BLOCK_FB parameter and set it up as SFB4.

You can then drag that block from the multiple instances folder instead of the library folder, it will become part of DB309.
 
Ok, I Get It! In The Project I'm Working On They Had The Timer Inside A Function Block With Multiple Instances, Like You Explained. I Was Trying To Use A Data Block That Was Already Being Used....thank You So Much For Your Patience, I Really Appreciate It!!
 

Similar Topics

can anyone plz guide me some information about SFB AND SFC
Replies
2
Views
2,448
All I need some help, I need to read and write some data to a device on my Profibus DPV1 Network. The device in question is an Anybus Card...
Replies
3
Views
5,367
Dear all, i tried to use the SFB 4 timer but it seems that the timer just refused to count and im not sure why. I understand that with an IN...
Replies
4
Views
4,043
Dear Experts, My Task: An analog input is to be monitored for 30min by the plc and its highest value during this 30min is to be stored at a...
Replies
7
Views
2,652
Hello everyone, I am programming a Siemens CPU317-2 and I wanted to reset TON and TOR timers. In Allen Bradley world, there is actually a...
Replies
13
Views
42,093
Back
Top Bottom