SLC 504 PLC and Pulse inputs

R

Thread Starter

RWC

I need to count the numer of pulses from a flow meter. (<40hz) Can I use a regular 24vdc card or do I need a high speed counter? Will I miss some counts due to scan times?
 
T

Trevor Ousey \(lists\)

Just some quick notes -

40hz = 25mSec cycle time

I would suggest using an STI in the SLC, maybe around 12mS mark. You would have to watch that the sequential tasks/routines don't drag out with the scan time. The standard input should be around 8mS, should be okay. But the safer bet is to use a 1746-HSCE counter module, which I have used before. No scan time issues.

Cheers.
 
S
I have successfully counted up to a couple hundred Hz with standard inputs. There are three things you have to do: Use the fast version of the discrete input card, such as the 1746-ITV. This isn't a high speed count module, just a discrete module with a faster response time. At your input frequency you might be able to get by with the standard input module.

Next, use an STI (selectible timed interrupt). Put the counting logic in the STI file. Finally, you have to use an IIM in the STI or the input won't update between scans. You may want to mask off the other bits in the module, as this routine will execute many times per scan, and the other inputs will be updating asynchronously if you don't.

DO NOT use the minimum legal STI period of 1ms. I found that there was approximately 700-800 microseconds of overhead per STI execution, exclusive of the execution time of the ladder in the file, so if you set the period at 1ms, the STI will increase your scan time by about 400%! This was a very hard earned lesson. When I was doing this, it wasn't documented anywhere by AB; I don't know if it is now or not.

If you have only a single input to count in this way (I had more than one per card), you have another option. You can set up an interrupt on the input itself. This may be easier and more convenient if you have only one flow meter input.
 
G

Gerald Beaudoin

The standard DC input card, 1746-IB16, has a max response time of 8ms on and 8 ms off. So right off the bat you have 16 ms just to get the card to see your signal. A frequency of 40 HZ means that we are talking a signal that occupies 25 ms leading edge to leading edge. Therfore assuming that the signal is symetrical, the "high" or "on" portion of the signal will only occupy about 12.5 ms... too short for the standard IB16 card. However, the fast ITB16 card response time is spec'd at max .3ms on and .5ms off time... so that leaves you over 10ms for a scan, which should be easily attainable unless you have a huge program. So do you need the high speed counter card... NO, unless your scan time is longer than most, but you will
need the high speed input card 1746-ITB16... and you will get lots of extra input points in the deal. If you can afford to sacrifice some precision, an other option could be to change the K factor of your pulses in the mass flow
meter to lower the frequency to something that is useable by the standard input card.

Gerald Beaudoin
 
Top