Posted 19 Sep 2007 Hi, I've a quick question relating to the counters whilst using an s7300 system. I'm probably missing something really simple here, but I can't seem to find a contact that closes when the counter has reached it's preset value. There is an output that comes on when the count is not equal to zero but I can't see what use that is. The only way I can see of using these is to use a compare instruction elsewhere in the program. Is this right? Also the count limit seems to be 999, is there any way around this. This seems quite low if you were for example counting products in a production run. Thanks, Matt Share this post Link to post Share on other sites
Posted 20 Sep 2007 (edited) Well, you can always cascade 2 or more counters.Other solutions are: 1 - use IEC counters instead of S7 counters (if 2^15-1 counts are enough for you) 2 - build your own counter with dint data type as counter base (2^31-1 increments, or much more if you cascade them) And answer to not asked question - why the hell there're S7 counters ? Because they are backward compatible with S5 counters and they are hardware - it means very small load on the cpu - nothing to compare with load caused by the IEC timers. Edited 20 Sep 2007 by jacekd Share this post Link to post Share on other sites
Posted 21 Sep 2007 If you are trying to use S7 counters for the purpose of having something happen every X instances of something else, use a count down timer and use nc contact of output. Don't bother using S7 counters for things like production numbers. Just use the math instructions. My $0.02. Share this post Link to post Share on other sites
Posted 22 Sep 2007 Thanks for the help guys. I've used the down counter with the n.c. contact before, but I've just been used to other manufactures where you have a counter coil with a preset (eg C1) driven by an input and then you can use a n.o. contact (this is LAD that I'm talking about) with the label C1 that closes when the preset has been reached. I think I'll give the IEC counter ago. As for batch counting I probably would just increment a data register as opposed to using a counter, just that I've never come across a counter with a limit of 999 before. I've also got a query with monitoring a ladder program but I think I'd better start a new thread for that one! Matt Share this post Link to post Share on other sites