Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting ND_GATE = ND_NONE on 6602 yields error

The NI-DAQ function reference help file says that calling ND_NONE is a valid value for the ND_GATE parameter in GPCTR_Change_Parameter, but if I do:

GPCTR_Change_Parameter(1, 0, ND_GATE, ND_DEFAULT_PFI_LINE);
GPCTR_Change_Parameter(1, 0, ND_GATE, ND_NONE);

the first function returns 0 and the second returns -10123 (invalid paramID used).

What is the proper way of disabling gating on a counter for which gating is currently enabled?
0 Kudos
Message 1 of 2
(3,061 Views)
Jonathan,

This is very strange behavior. Calling GPCTR_Change_Parameter() with a parameter value of ND_NONE is the correct method for disabling gating. I just verified that it works correctly on my system. Maybe you could attach a section of your code that demonstrates the problem?

Spencer S.
0 Kudos
Message 2 of 2
(3,061 Views)