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
bronco9588
Posts: 38
0 Kudos

Counter Missing Triggers

Hi,

 

Running a hardware based sampling setup (attached). I keep getting error 201027 stating that more than 3 samples got lost due to hardware to software buffering. I am getting 6.6 - 33.4 khz of samples based on a 720 tooth encoder with 1 piece of data per sample. Please let me know if I did something wrong.


Member
NathanS
Posts: 72
0 Kudos

Re: Counter Missing Triggers

Hi bronco9588,

 

I am wondering, why is your sample rate set to 1Hz? Could you sample faster?

 

Regards,

Nathan S.
Applications Engineer
National Instruments
Member
bronco9588
Posts: 38
0 Kudos

Re: Counter Missing Triggers

[ Edited ]

The sample rate is 1 HZ because I only want 1 sample per hardware trigger. Is there a better way to do this? Wouldn't bumping this up greater than 1 cause an array to be inerted into the while loop?

Member
bronco9588
Posts: 38
0 Kudos

Re: Counter Missing Triggers

I swiched to a for loop and everything seems fine... I would like to go back to a whil loop, but if it means that I collect data...

Member
bronco9588
Posts: 38
0 Kudos

Re: Counter Missing Triggers

Hey All,

 

Hoping to fix this problem before Tuesday:

 

"Counter task detected three or more missed Sample Clock pulses. Samples
were lost before the application could read them. Decrease the Sample
Clock rate or restructure the application so that DAQmx Read runs more
frequently. Setting the Convert Error to Warning property to True does not
eliminate the error, because samples were lost."

 

That is the error code 201027. I have attached my latest code. Please note that the code does just fine at 550 RPM, but bumping up to 1100 RPM is causing it to trip the error signal. I need not only go 2X faster, but 5X faster. I have created an error rejection device that will only add 720 piece arrays with zero at the front of each array. Is there a way I can force the program to keep running despite the error? Are 5 shift registers and a case structure too much?

Active Participant
Posts: 485
0 Kudos

Re: Counter Missing Triggers

When using a counter to count pulses from a rotating shaft, there is a lot to consider. 

1) getting the voltage levels right - sounds like your counter is incrementing on the pulses it sees.

2) synchronizing the counter with the analog input tasks - this requires sharing the base clock (could be 1Mhz for general DAQ for example)

3) runnig the counter in buffered event count mode - it collects an array of timestamps in tthe DAQ base clock counts - that can then be used to calculated intervals and of course speed. 

 

Our Sound and VIbration Measurement Suite has this built in, via a series of examples.  However - if you use buffered event counts, run the counter at full speed, and have it time stamp events in the DAQ clock domain, you will have the basics. 

 

 

Preston Johnson
Global Program Manager
Asset Monitoring Systems
Vibration Analyst II - www.vibinst.org
National Instruments
preston.johnson@ni.com
www.ni.com/mcm
www.ni.com/soundandvibration
512-683-5444
Member
bronco9588
Posts: 38
0 Kudos

Re: Counter Missing Triggers

Is there a way I can force the program to keep running despite the error? The code is made to reject a compiled array if there is not 720 units in the array. I just need to keep it from crashing. 

Active Participant
Mcdan
Posts: 463
0 Kudos

Re: Counter Missing Triggers

Which hardware are you using for this application?

Member
bronco9588
Posts: 38
0 Kudos

Re: Counter Missing Triggers

Got it figured out... I had a broken encoder...

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