Auto reload value for counter | LabJack
 

Auto reload value for counter

2 posts / 0 new
Last post
Folkert
f.d.roscamabbing's picture
Auto reload value for counter

Hi,

I am using a counter to count the quadrature output of an incremental rotation/angle encoder (its an LM15 type from RLS). The encoder is connected to FIO0 and FIO1. I use the following settings:

DIO0_EF_ENABLE = 1
DIO1_EF_ENABLE = 1
DIO0_EF_INDEX = 10
DIO1_EF_INDEX = 10

The number of counts per rotation is known to be 48000, I want the counter to automatically resets when it reaches this number. Usually in microcontrollers, this can be set in the form of an auto reload value. Does the T7 feature a similar feature? If so, what are the associated registers?

LabJack Support
labjack support's picture
We do not support a zero-on

We do not support a zero-on-compare feature.  Some options:

1.  Do a modulus divide by 48000 in your software or during post-processing.

2.  Do the zero-on-compare in a Lua script.  Might be tough if you counts are too fast.

3.  Do a modulus divide by 48000 in a Lua script and store the result in user-ram.  Then read that user-ram rather than the dio-ef value.

4.  If your encoder has z-phase use that to zero the count (quadrature mode).