Sign in to follow this  
Followers 0
iic_hyd

one millisecond software timer in S7-300

4 posts in this topic

Hi, Can any on help me in making a one millisecond software timer in S7-300 or SLC

Share this post


Link to post
Share on other sites
In Siemens you can make your own timer by using an ADD statement with a reset input inside an FC, then calling the FC whenever you need a timer. It uses a couple of addresses from a data block - the accumulated value, a 1-shot, and a timer done bit. The minimum time base of the standard S7-300 timer blocks provided by Siemens are 10MS.

Share this post


Link to post
Share on other sites
Are you after a timer that has 1 millisecond resolution, or a timer that times exactly for 1 millisecond ? If it is the first, then you can take an IEC timer. It operates with milliseconds as timebase. If it is the latter, then your PLC must be very fast, a 319 or a VIPA Speed7 maybe ? I cant really see an easy solution, as the IEC timers and the clock in S7 has a resolution of 1 millisecond, so to achieve exactly 1 millisecond will only be possible with a large error (+/- a half millisecond or worse). Theoretically you should be able to configure a cyclic interrupt with OB35, and specify the absolute minimum cycle of 1 ms. In OB35 you could then turn a bit on in one cycle and off in the next cycle. But this sounds like a cludge to me. I am also not sure if it is advisable to have cyclic interrupts with such a short cycle. edit: The FM352 module will allow you to create separate logic that has an extremely low cycle time. It should make it possible to operate in the µs region. Edited by JesperMP

Share this post


Link to post
Share on other sites
Solution with OB35 has +/- 200us jitter. I'd say it's a lot. But in the end everything depends what is to be achieved. Dear iic_hyd, you should elaborate a little bit more on your requirements.

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