Jump to content

Recommended Posts

Posted
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.
Posted
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,
Posted
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.
Guest Guest
Posted
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
Posted (edited)
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
Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...