My understanding is that when setting a max limit it is supposed to roll over to the minimum limit when reached. When I set the max Limit it gets to the max limit and stops. I had Assumed that the minimum limit would default to 0. Unfortunately when it gets to 1000 it stops
Question
mick1221
I'm currently reading from a Quad08 card into a c# program using the Universal library.
Here is how I'm configuring the counter I'm using
CounterMode mode = CounterMode.Bit32 | CounterMode.RangeLimitOn | CounterMode.Rollover; ErrorInfo err = board.CConfigScan(Axis, mode, CounterDebounceTime.DebounceNone, CounterDebounceMode.TriggerBeforeStable, CounterEdgeDetection.RisingEdge, CounterTickSize.Tick20ns, 0);
My understanding is that when setting a max limit it is supposed to roll over to the minimum limit when reached. When I set the max Limit it gets to the max limit and stops. I had Assumed that the minimum limit would default to 0. Unfortunately when it gets to 1000 it stops
err = board.CLoad32(CounterRegister.MaxLimitReg0, 1000);
So I tried setting the minimum limit to 0
err = board.CLoad32(CounterRegister.MinLimitReg0, 0);
However when I do this I receive the error
Bad counter arg passed to cbCLoad.
Is there something I'm missing here to be able to set and roll over at the limits?
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now