Sign in to follow this  
Followers 0
douyi

Question about Time Base

9 posts in this topic

Hi guys, 1. I checked with Siemens manuals, it seems that S7 only support 10ms TimeBase or up. Is that correct? If it support 1ms TimeBase, how to setup? 2. I found it's possible to use another format as W#16#wxyz instead of S5T#aH_bM_cS_dMS (normal s5time format), but it doesn't work, why? 3. I use "MOVE" function to convert a DINT number to s5time, it successful, but what's how can I set timebase at that time? Thanks a lot.

Share this post


Link to post
Share on other sites
Use the IEC timers. They use a timebase with 1ms resolution.

Share this post


Link to post
Share on other sites
Thanks, but I checked with all the timer instructions, they all are s5time. Which one is the IEC timer? how to use that in LAD? Thanks again.

Share this post


Link to post
Share on other sites
You will find them in the standard library. I think that SFB4 is a TON timer. Copy the SFB's from the library to your project. Click on an SFB and hit F1 to get help on how to use it,

Share this post


Link to post
Share on other sites
Thanks. that IEC Timer and Counter is very similar to RSLogix version, because it's a SFB, so everytime I use that, I need to add an instant DB for that. I'm thinking if I can make a FC which include Timer or Counter function and a converter inside ( so I have exactly .DN, .TT and .EN bits ) and only one instant DB for that call. Is that possible? Thanks again and again.

Share this post


Link to post
Share on other sites
Douyi Create one large FB to hold all the Timers you need. Declare them as multiple STATIC variables of type SFB4. Write the code in this 'parent' FB to activate the individual SFB timers when you require. You won't have to use separate DBs for each of these calls. Now make a single call to the parent FB and assign a single DB to it. That DB will be a 'multi-instance data-block' which holds all the instances of SFB4 that you declared. Call that parent every scan and you can control all the SFBs as you want. regards Ken

Share this post


Link to post
Share on other sites
You can certainly make your own timer in an FC. I have done that and it works OK. But try to use the IEC timers with multiple instance as Ken suggested. HERE is an example with using multiple instance and IEC timers. Edited by JesperMP

Share this post


Link to post
Share on other sites
Thanks! I tried to use an instance of IEC timer and it's successful. But on the other hand, I can't use SFB as a data type like what you did in the picture, how can I do that? another question is, is the instruction "--(P)--" as same as "one shot" in RSLogix? Thanks a lot.

Share this post


Link to post
Share on other sites
http://www.plctalk.net/qanda/showthread.ph...ghlight=s7+time See message 11. (FC 33/FC 40) I've tried them they work fine!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0