Counting?

I’m not understanding your coded counter being faster than the hardware counter - that doesn’t make sense to me.


if (Forward) then
  Upper_Push_Pulses = Upper_Push_Pulses + GetClearCounter(Upper_Push_Counter);
else
  Upper_Push_Pulses = Upper_Push_Pulses - GetClearCounter(Upper_Push_Counter);
endif

<redact>Okay, so the R2 hardware is slow at counting - now I get it - well this shows that R2’s and EB2’s just can’t count very well.

I think the documentation/spec sheets should mentioned this - it only shows they are not capable of high speed counting - but low speed counting seems to be a problem too, considering the strategy can count faster.</redact>

Update: This was a misunderstanding on my part. However, if the R1 and EB1 units DON’T support counting on non-HDD modules, I think the documentation should be changed to state that.

Thinking about this some more… If you’re using a HDD module, why would it matter if you are using an R1 or R2 since the module does the counting? They should give the same result.

Don’t get me wrong, It was fast enough for my purposes. Maybe some of the lag I was seeing had to do with how the groov polls the variables? I was seeing typically a 2 pulse lag, but when the chain stopped, the counts ended the same. I am measuring between 16-18 pulses/sec.

I have no idea. This is just my observation. I think the R1 has a faster processor… I didn’t see anything listed in the specs so this is speculation on my part. Looking at the comparison chart, the R1 and R2 look the same with a few differences in features (mainly counting from what I can tell).

Okay, I thought you were saying the count totals were different. So everything is working correctly, it just the refresh rate into Groov on the R1 is slower.

The R2/groov refresh slower? Maybe. But why is a coded counter have a faster reaction than a hardware counter on the same processor, at the same time, counting the same thing?

I’m just reiterating what you were saying about refreshing into the Groov. If you wanted to really see if there was a time domain difference, I would read the modules counter in your strategy where you count manually and compare them there. I would expect there to be no difference, but stranger things have happened.

I’ve been contemplating how to do this in real time… debug mode really slows things down… perhaps setup a watchlist of the two counters in aPAC (I’m not sure if the aPAC refresh is fast enough either.

In your strategy, take the difference and store that in a new variable, then display that.

Ha. Yeah… duh…
Thanks!