Hi,
Currently i am using DAQ 6024E and the LS7084 chip to count the number of counts produced by a rotary counter.
The functions that i used are
GPCTR_Control (1, ND_COUNTER_0, ND_RESET);
GPCTR_Set_Application (1, ND_COUNTER_0, ND_SIMPLE_EVENT_CNT);
GPCTR_Change_Parameter (1, ND_COUNTER_0, ND_UP_DOWN, ND_HARDWARE);
GPCTR_Change_Parameter (1, ND_COUNTER_0, ND_INITIAL_COUNT, 100000);
GPCTR_Control (1, ND_COUNTER_0, ND_PROGRAM);
One problem i encounter is that when i run my program, the initial count should be 100000 due to the GPCTR_Change_Parameter (1, ND_COUNTER_0, ND_INITIAL_COUNT, 100000);
however, the number -1 will appear. I cannot consistently get the initial count as 100000. Also when the integer -1 appear, i need to r
estart my computer and run lab windows again to get the desired value of 100000.
when the output initial count is 100000, i am able to get the desired number of counts from my rotary encoder. However when the output is -1 instead of 100000, the number -1 will not change when the shaft of the encoder is rotated.
Please advise.
Regards,
Leroy