Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

X series PCIe-6351 encoder reset

Hi,

 

I am working on the X series PCIe-6351 encoder input by using an example gpctex4.cpp from X series DDK. It seems counting fine. However, it doesn't reset the counter even it is setup as follow:

 

counter->Gi_Mode_Register.setGi_Loading_On_Gate(nCounter::kReloadOnStopGate, &status);

counter->Gi_Mode_Register.setGi_Trigger_Mode_For_Edge_Gate(nCounter::kGateLoads, &status);

and

counter->Gi_Counting_Mode_Register.setGi_Index_Mode(indexMode, &status);  //indexMode = nCounter::kIndexModeSet;

 

Can anyone tell me what is wrong? Do I miss something?

 

Thanks,

Larry

 

0 Kudos
Message 1 of 4
(7,296 Views)

Hi Larry,

 

I see you've created a duplicate post here. The DDK thread will likely be more helpful. Also, you may want to get involved in the NI Community group for DDK Programmers here. You can start a discussion on that board as well.

Josh Y.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(7,285 Views)

The problem has been solved.

 

It was due to wrong index phase setup. It must ensure thet Z is high during at least a portion of the phase that you specify for reload (indicated in X series User's Manual).

0 Kudos
Message 3 of 4
(7,276 Views)

Hi Josh,

 

Thanks for the suggestion.

 

Can any of you response to my question on AO EEPROM? Thanks.

 

Larry

0 Kudos
Message 4 of 4
(7,275 Views)