iic_hyd Posted October 19, 2007 Report Posted October 19, 2007 Hi, Can any on help me in making a one millisecond software timer in S7-300 or SLC Quote
Rod_Hackney Posted October 19, 2007 Report Posted October 19, 2007 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. Quote
JesperMP Posted October 23, 2007 Report Posted October 23, 2007 (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 October 23, 2007 by JesperMP Quote
jacekd Posted October 24, 2007 Report Posted October 24, 2007 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. Quote
Recommended Posts
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.