don't miss pulses
Firstly you need to eliminate the dry contact and replace it with
an optocoupler. The relay simply will not last at that operational rate. As it wears off it will bounce more and more. If you have to use
relay then I suggest that you use CHAVAK's suggestion and use
Banner one shot module. Custom designed one shot can be accomplished with a 555 timer or a 74123 retriggerable one shot.
Once you have streched the pulse you can use a standard ladder
logic to process it.
If you use an optocoupler you should use an STI and process the
pulse in the STI routine. 15 mS should be no problem what so ever.
Been there done that.
You can count on it! or would that be, You can't count on it? Puns can be difficult sometimes.
You will miss pulses.
I say that you will never miss pulses if you use STI!
If so, what can I do to capture them?
If your PLC has Pulse-Stretching capabilities... that's the easiest way to go.
Your PLC can't stretch something that it cannot see! You need to stretch the pulses outside of the PLC!
Use the Discrete Input Interrupt (DII) command with this card. AB states with 100usec polling you can read up to 1 Khz. Regards Alan Case
Problem with this idea is that it requires you to put the DII and associated logic in the ladder program numerous times.
DII is not a vector type interrupt it only gets processed when you scan the instruction.
I like the cap idea. Simple. It probobly needs a series resistor to control bleed off. I'll play with it. More on Monday. Thanks to all.
I would like to know what type of capacitor you will be using?
Tantalum, electrolytic, monolythic etc etc??
Caps have tendency to leak after a while.
Most caps have tolerance of about 20%, so if you get it somehow working with one will you get it working again with another?
What formula will you be using to calculate your time duration?
It's not going to be a one shot! Would you let me know how you get this working? I can tell you that the 74123 one shot chip
is well documented in TI's manuals and 555 timer is well documented in
in National's handbooks.
Use an optocoupler and an STI and YOU WILL NOT LOSE ANY PULSES!