Internet PLC Forum

General => Technical support => Topic started by: jbrandall on July 16, 2013, 02:58:11 PM

Title: high speed counter
Post by: jbrandall on July 16, 2013, 02:58:11 PM
why does my high speed counter start to count down when input(3) pulse stop coming?  all else it seems to work ok.  I do use PMON 2 to monitor input(4).  When that stops, the counter stops counting down.  What do I do??
Title: Re:high speed counter
Post by: jbrandall on July 17, 2013, 07:57:19 AM
follow up.  if I do PMOFF 2 the counter seems to work right.  the problem is that I need to monitor imput 4 for speed (rpm) and want to use input 3 for the high speed counter because of the interrupt feature.  is there any way to uncouple the linkage between input 3 and input 4?  I have no spare inputs to juggle so as to leave half a pair disconnected.
Title: Re:high speed counter
Post by: support on July 19, 2013, 01:14:04 PM
High speed counter are designed mainly for quadrature counter and hence uses both inputs #3 and #4.

Are you using single phase counting? When input #3 is used as single phase HSC input #4 controls the direction of count (increment or decrement).

As such these two inputs cannot be uncoupled since they together serves the HSC.

If the speed is not too fast you could implement input #3 as an interrupt input and increment/decrement a variable (e.g. C =  C+1) whenever the interrupt service function is run.

This way input #4 can still be used as PMON input and it may do what you want.