|
|||||||||||||
05-16-2012 02:05 PM - edited 05-16-2012 02:07 PM
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
05-23-2012 04:14 PM
Hello,
What are you doing to reset the counter after you make these changes to the example? For instance are you connecting a 5V signal to the Z input (PFI2)?
With your changes, connecting 5V to the Z input results in the encoder seeing a 0 degree rotation change....which is a reset.
Thanks,
Steven T.
05-24-2012 08:33 AM
LarryL wrote:
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); counter->Gi_Counting_Mode_Register.setGi_Index_Mode(indexMode, &status); // indexMode = nCounter::kIndexModeSet;
Can anyone tell me what is wrong? Do I miss something?
Just closing the loop in case others search and find this post later. Larry shared his resolution in another thread:
X series PCIe-6351 encoder reset
http://forums.ni.com/t5/Counter-Timer/X-series-PCI
National Instruments
Software Engineer :: Measurements RLP Group
Applications Engineer :: High Speed Product Group (until Sep 2008)
Get with your fellow OS users :: [ NI's Linux User Group ] [ NI's OS X User Group ]
Get with your fellow developers :: [ NI's DAQmx Base User Group ] [ NI's DDK User Group ]
My Profile | Privacy |
Legal |
Contact NI
© 2011 National Instruments Corporation. All rights reserved. | E-Mail this Page
|
||

E-Mail this Page