Posted 3 Mar 2006 Trying to figure out the best way to create a 1 sec pulse in order to use to increment a counter and track cycles per minute. It appears from reading the documentation on a micrologixs 1200 that you have to use a comination of the free running clock bits added together to create a 1 sec clock pulse. When using a omron plc, there are special mem bits such as 1 sec clock pulse, .1 sec clock pulse, etc., is there the same thing with a AB, and I am just brain dead and overlooking it. thanks Share this post Link to post Share on other sites
Posted 3 Mar 2006 if the free running clock is not something you can use, just make your own... you can create as many timers as you wish unless you run out of memory. Share this post Link to post Share on other sites
Posted 3 Mar 2006 (edited) There is a timer which increments every 20ms (I think). The result of that is that if you use bit 0 its 20ms, bit 1 is 40ms ... 6th bit is 640ms, 7th bits 1280ms. As panic mode says, I belive the free running clock is calculated using this pulse and has a second 'hand' in S:42 (S:42/0) which you could use. I don't know if it's accurate but I expect so. You could also use a timer which resets itself with a XIO DN bit, however that will ve inaccurate. Edited 3 Mar 2006 by Spedley Share this post Link to post Share on other sites
Posted 3 Mar 2006 The lowest order bit of any timer accumulator toggles at the timers timebase. When the ACC is even, the bit is off, when ACC is odd, the bit is on. Create a self resetting timer, lets say T4:0. Give it a 1 second time base and a preset of 32766. (The preset needs to be an even number) XIC T4:0/DN TON T4:0 1.0 32766 0 Bit T4:0.ACC/0 will be on for one second, off for one second. Share this post Link to post Share on other sites
Posted 4 Mar 2006 Thanks for input, thats what i did, i created a timer with a 1 sec time base and used it to increment a counter. Share this post Link to post Share on other sites
Posted 29 Mar 2006 Not that it should be a problem in a 1200, but if you adapt this schema to a higher level processor make sure your scan time is less than 100 ms or you'll be innaccurate. Share this post Link to post Share on other sites
Posted 29 Mar 2006 (edited) clock.xlsLike Bob said the system clock is inaccuret for the most part I like to do something like this. Edited 29 Mar 2006 by Smoke Share this post Link to post Share on other sites
Posted 31 Mar 2006 Thanks for replys Smoke - I did exactly as you posted, and works great Share this post Link to post Share on other sites
Posted 31 Mar 2006 That is probably the least accurate method! Share this post Link to post Share on other sites
Posted 31 Mar 2006 That's how I make lights blink at different rates. All critical time is done here with a time sync form the mainframe Share this post Link to post Share on other sites
Posted 5 Apr 2006 (edited) I would use: XIO T4:0/DN TON T4:0 200 0 GEQ T4:0.ACC 100 OSR CTU C5:0 32000 0 Change the compare statement to give you whatever frequency you want. Edited 5 Apr 2006 by Jamie571 Share this post Link to post Share on other sites