Jump to content

one millisecond software timer in S7-300


Recommended Posts

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

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...