NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
LarryL
Posts: 24
0 Kudos

X series PCIe-6351 encoder reset

[ Edited ]

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(nC​ounter::kReloadOnStopGate, &status);

counter->Gi_Mode_Register.setGi_Trigger_Mode_For_E​dge_Gate(nCounter::kGateLoads, &status);

and

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

 

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

 

Thanks,

Larry

 

Active Participant
Steven_T
Posts: 543
0 Kudos

Re: X series PCIe-6351 encoder reset

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.

Active Participant
JoeFriedchicken
Posts: 404
0 Kudos

Re: X series PCIe-6351 encoder reset


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(nC​ounter::kReloadOnStopGate, &status);
counter->Gi_Mode_Register.setGi_Trigger_Mode_For_E​dge_Gate(nCounter::kGateLoads, &status);
counter->Gi_Counting_Mode_Register.setGi_Index_Mod​e(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-PCIe-6351-encoder-reset/m-p/1996057#M10458

Joe Friedchicken
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 ]
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page