viscoelastic Posted May 8, 2018 Report Share Posted May 8, 2018 Easy question, I need a lot of counters in one app. The frequency will be 4-6 counts/sec. Can I get away with just using a PNP input on this? Thanks Quote Link to comment Share on other sites More sharing options...
MVP 2022 Ausman Posted May 8, 2018 MVP 2022 Report Share Posted May 8, 2018 The simple answer is Yes. But...... In instances like this the main thing is how often the rise/fall of the input occurs per second. You weigh that up against the longest scan time your program is going to do and whether it will be possible for the input's change of state to alter twice in that scan time relationship. The one sometimes tricky factor is when you have a varying speed of change input, this needs careful looking at. But in your case I assume that the Hz will be fairly well spread over the second/time, and your program is not taking longer than a few ms per scan, hence the Yes. cheers, Aus Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted May 9, 2018 MVP 2022 Report Share Posted May 9, 2018 Ausman is providing good information, but I want to add just one thing - it's not just how often the input turns on, but also the length of time the input remains on for each count. If it is too short then you could miss a count even if the frequency of counts is much less than your PLC scan time. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted May 9, 2018 MVP 2022 Report Share Posted May 9, 2018 I've done this with the inputs on the main board. If you put Immediate Input blocks into the 1.25 ms interrupt routine you can read signals as fast as 400 Hz. 3 hours ago, Flex727 said: but also the length of time the input remains on for each count. The signal must stay on for at least 1.25 seconds to see it. Get your scope out and verify this. If you're using expansion I/O, you are limited to the scan time of the PLC. Again, the pulse must be on for at least one scan to be caught. Joe T. 1 Quote Link to comment Share on other sites More sharing options...
MVP 2022 Ausman Posted May 9, 2018 MVP 2022 Report Share Posted May 9, 2018 4 hours ago, Joe Tauser said: Immediate Input blocks into the 1.25 ms interrupt routine That's a good idea, Joe. Hadn't ever thought of applying the 1.25 to actual inputs, have always used it for my quick counters. And I'm also assuming your "1.25 seconds" actually means "1.25ms" And can you pls clarify on the "expansion is scan time" comment. I have always thought expansion DI/Os were scan time, but analogue I/Os are a bit longer. cheers, Aus Quote Link to comment Share on other sites More sharing options...
viscoelastic Posted May 9, 2018 Author Report Share Posted May 9, 2018 Thanks guys, 1.25ms should be fine. The max frequency will be 5. I will be using a laser fork sensor and the counts will be on a rotating disk with five 8mm slots in it. it turns at 60 RPM or 1 rev a sec. Thanks again, Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted May 9, 2018 MVP 2022 Report Share Posted May 9, 2018 8 hours ago, Ausman said: I have always thought expansion DI/Os were scan time, but analogue I/Os are a bit longer. You are correct. Discrete I/O status updates with the scan. Analog I/O values are updated over the I/O bus when the multiplexer in the module gets around to it and is 100 ms per defined input. So it could be as slow as 800 ms. Joe T. Quote Link to comment Share on other sites More sharing options...
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.