Counter Problem at low sampling rate

What I am trying to do is to count the input from the camera and generate the number of pulses depending on the delay and interval. At the rate of 33ms the program works perfectly but if the sampling rate is 150ms it generates 2 pulses at a time. Is there a better solution to my problem ? Am I doing anything wrong ? Is it a problem with the loop timing or acquisition timing? I have attached the program. What puzzles me is that it doesnt work if the rate is lower! Please HELP.
Thanks 
p.s. I am very new to LabView so please excuse my ignorance.
Attachments:
CoolSnap.vi ‏142 KB

Hello sha33,
Thank you for getting back to me with more information. After looking through your code once more, I believe I have found the issue. Since this application is timed entirely in software, it is based on how quickly your operating system can run the program, and thus cycle through loop iterations. Since you have no Timing VIs in the program, this loop is running as fast as possible. Now, in the 33 ms case, you are getting a TTL edge a lot faster, so the DAQ assistant is updating its count faster as well. Lets say hypothetically that your loop is iterating at 60 ms. This means that every time you run through the loop your DAQ assistant will read the updated count value, and since you are counting every 33 ms, your count value will have updated.
Now let's look at your 150 ms TTL signal. This is significantly longer than the 33 ms signal in the previous case. Lets say hypothetically your loop is running on average at 60 ms again. This time, your edge will come in and the counter will increment, generating a pulse with the second DAQ assistant accordingly. Now your loop will run through again 60 ms later but your next edge on the 150 ms signal is still around 80-90 ms away. This means that your DAQ assistant will return the same count value as the last iteration, and once again a pulse will be generated.
Obviously the numbers I used for the loop iteration timing are hypothetical and entirely dependent on the operating system and its resources (i.e. it will run slower with an MP3 or Movie playing in the background). My suggestion would be to use a timing VI such as Wait Until Next ms Multiple to clock your loops more consistently. The goal would be to make sure that your loop is repeating faster than your counter is updating. Alternatively, you could account for the possibility of no counter input in your overall application to prevent a false positive.
Let me know if I can clarify any of the above information, or if you have any additional questions related to this issue.
Regards,
Chris Behnke
Sr. RF Engineer
High Frequency Measurements

Similar Messages

  • Low sample-rat​e measuremen​ts on the PCI-6115 DAQ card

    I need to measure an analog signal at a sampling rate of a few tens to hundreds of Hz in sync with the rising edge of an external clock. I have a PCI-6115 DAQ card w/ Labview 6.1 and NI-DAQ 6.9.2. The PCI-6115 is a high speed card and has a minimum sample rate of 10 KS/s. Is there any way of implementing a low sampling rate measurement using the PCI-6115 in sync with an external clock?
    Thanks in advance.

    Kuldeep,
    It is possible to do what you are describing above (in fact I don't think an external clock is required to do this), however, bear in mind that the reason for this minimum sampling frequency is due to the ADCs used on this high speed board. The ADCs used are pipelined ADCs, meaning that when a signal is digitized, it is digitized in distinct stages within the ADC (in the case of the 6115, I think there are 3 stages involved). Data is moved from one stage of the ADC to the next each time a sample clock pulse is recieved. If too much time elapses between these clock edges, the signal to be digitized can actually 'leak' off of the ADC. This can result in improper digitization, which can lead to less accurate measurements. So, while it is possible to mak
    e the device sample below it's minimum rate, it may be advisable to sample faster than the rates required by your application, and either average multiple data points per measurement, or throw away extra points taken.
    I hope this helps,
    Dan

  • Problem with audio sample rate when exporting

    I am having an issue with my audio sample rate. For some reason it is set at 8 khz by defualt when I am exporting. This was not an issue until the latest update (2 weeks ago). I'll try and give all the info I can up front. Also I tried customer support...that was a nightmare.
    Ok the issue I am addressing is that the audio sample rate when exporting is at 8khz by default. Which to my knowledge has NO relevant use what so ever. Even when I set the file format to h.264 it insists on resetting to 8khz. Even if I manually set everything look at the render queue and click on output module again it changes the sample rate back to 8 khz automatically which I must adjust again. Why can it not just be set at 48000 like every other adobe product is and like it used to be two weeks ago. Does anybody have an answer?

    This problem is addressed by the After Effects CC (12.2.1) bug-fix update, which is now available:
    http://adobe.ly/AE_CC_1221
    Note the part at the end of that page about a crucial update for the Creative Cloud desktop application, which addresses some severe problems with AME, Premiere Pro, and After Effects.

  • Lossless to lower sampling rate automatic?

    I use Apple lossless for many of my imported songs. Will the iPod touch offer to lower the sampling rate on the fly? My shuffle used to do this.

    Okay, I tried to bite the bullet and include lossless ripped music files in a synch. I did a SmartPlaylist and limited it to 10GB taken from my general Music Playlist, not played in 90 days. It is now synching a little over 5.6GB in lossless and the rest of the 10GB 128/256. All told 1,235 songs.
    It is taking forever to sych. Pardon the pun, but this just about rips it I've got to downgrade the my lossless library which comes from CD's I own. I'm reducing the lossless files now. Hope this works without mucking up the sound too much.
    Apple, please add the automatic conversion to a small file via iTunes like my iShuffle!!! Otherwise I've got to manage two music libraries. Any other Apple Lossless Touch users out there?

  • Problems with audio sample rate when capturing DV50

    Hello from Spain, I have a problem when capturing DV50 source footage: I setup my sequence settings and capturing settings like always, DV50 codec and 48k sample rate for audio, then when the capturing process finish the result is a file that contains audio to a non-48k audio sample rate, then video and audio don´t match. The sample rate is 47945 and other similars, not always the same, sometimes 47214 sometimes 48000, and there is no rules...My capturing device works ok in other computers and the footage has been capture ok in other Mac...I don´t know what happens.
    Sebas, kind regards
    G5 Quad   Mac OS X (10.4.6)  

    Hello!, first of all thanks for your reply. Yes, the camera is the same, the problem is on my computer, I have discovered a solution: first I capture the audio, only the audio, and then the video, only the video. After this I soncronize the two separate files on Final Cut timeline. It´s a slow process, but I am really desesperated. I don´t know what happens, I few minutes ago I have captured a 30 mins. video and the sample rate of the audio was 42.145k (???). It´s a crazy thing...

  • How To Lower Sample Rate

    Is it possible to adjust the sample rate lower than the default when attempting to record an audio source?

    44.1 is the lowest sample rate to record audio at in Logic. But put a Bit crusher plugin on the track and change the resolution there for more lo-fi sounds.
    JG

  • Lock-in amplifier, low sample rate options

    Hello!
    I would like to implement a lock-in amplifier in labview (version 8.5).  I understand that there is a developer kit for the LIA available, and have checked it out; however, it is incompatible with my equipment.
    I have a usb 1608fs card that I am using for for digital to analog conversion, which has a max sample rate of 16000 hz for two channels (signal and reference).  The signal I am trying to lock in on is between 5 and 10 hz.  The main contribution to the noise is 60Hz noise from the air, which shouldn't be a problem.
    However, the lock-in amplifier by labview refuses to work at under 50KHz sample rate, so I am at an impasse.  I could put one together myself, but I wanted to see if there were any options available to me; no point in reinventing the wheel.
    Regards,
    MB

    Here it says the minimum rate is 50kHz. Sorry, but ther is no option to change that.
    Also look at Lock-In Amplifier Startup Toolkit Compatibility with National Instruments Hardware.
    Btw, there is no USB 1608fs card from NI.

  • Low sample rate with NI USB-6008

    Hello,
    We are working on a project collecting data from a hybrid rocket motor for
    University research. We are using a NI USB-6008, which has a sample rate of
    10kHz. We are using 3 channels and getting a sample rate of ~60 samples per
    second. I have attached the VI. Is this slowed by software, or physical
    computer computation speed? This sample rate needs to be much higher. Any help
    is greatly appreciated.
    - Theo
    Attachments:
    Hybrid DAQ_10.vi ‏73 KB

    Hi Rocket 154,
    You’ve already had some
    great responses, but I just wanted to add a little bit. A great starting point
    to writing good code would be the Getting Started with NI-DAQmx: Main Page,
    as well as the shipping examples (In LabVIEW, Help » Find Examples) already
    mentioned.
    If you navigate a bit
    through the links (Basic Programming with NI-DAQmx » Getting Started with NI-DAQmx
    Programming in LabVIEW) you’ll end up with some great resources. I recommend Learn
    10 Functions in NI-DAQmx and Handle 80% of your Data Acquisition Applications.
    It will detail many of the functions you can use and give you a feel for proper
    code style in LabVIEW.
    I hope that helps.
    Mark E.
    Precision DC Product Support Engineer
    National Instruments
    Digital Multimeters (DMMs) and LCR Meters
    Programmable Power Supplies and Source Measure Units

  • Why LV 6.1 and Nidaq 6.9.3 can't acquire low sampling rate and high frame size

    My platform is LV 6.1, Nidaq 6.9 on win98
    Everytime i want to acquire data with sampling rate 6 Hz
    and frame size 7200, it acquire just 2 or more data (under 10 data), never 7200 data.

    Greetings,
    I assume by "frame size" you are referring to the numbers of samples to acquire. Please launch the "Find Examples" browser in LabVIEW 6.1. Open the example "Acquire N Scans.vi." This VI has only 4 inputs. After setting your device and channel you will set number of scans to acquire to 7200 and your scan rate will be 6. Since you're only acquiring at 6Hz and wanting 7200 samples, this VI will take 20 minutes to run. At that point the graph will be updated with your data.
    Regards,
    Justin Britten
    Applications Engineer
    National Instruments

  • NI 5761 with low sampling rate

    Hi,  is it possible to change the NI 5761 sampling rate without programming FPGA? Thank you very much!

    Hi, as mentioned above you can play with the sample rate by using an external Sample clock. Take a look at the picture attach for the general idea. Simply replace the Boolean buttons for digital input ports. I hope this helps
    Alejandro | Academic Program Engineer | National Instruments
    Attachments:
    Capture.JPG ‏256 KB

  • Resample DASYLab Data to Lower Sampling Rate

    Hi.
    My hardware has built-in antialiasing filters at 20 kHz so I'll be scanning at 40 kHz minimum. 
    My needed data range is low pass at 1 kHz. 
    Can DASYLab resample the 40 kHz input to "decimate" the signal to the needed 1 kHz input? 
    40x less data would be very helpful.  And if the data can be reduced, is this process CPU intensive (would it impose a large computational load on my computer)?
    I prefer to use DASYLab but does LabView have this interpolation/decimation capability? 
    Thanks,
    Bob

    signal1,
    In LabVIEW there are several VIs (functions) that can be used to resample a signal.  Among these are the Decimate.vi and the Resample Waveforms.vi.  The Decimate.vi averages values to obtain the resampled waveform while the Resample Waveforms.vi employs interpolation.  You can view the help for these VIs at http://zone.ni.com/reference/en-XX/help/371361A-01/lvwave/resample_waveforms_cont/ and  http://zone.ni.com/reference/en-XX/help/371361A-01/lvanls/decimate/.  You can get the specific details about DASYLab from DASYLab Online support found at http://www.dasylab.com/content/mydasylab.php?action=start.
    Regards,
    Neil
    Applications Engineer
    National Instruments

  • Problems with Sampling rate in LabVIEW with 1/4 bridge strain gage

    Hello,
    I have a question.  I have SCXI 1001 and am trying to read strain gages and thermocouples.  In the slot 1 I have a 1122/1322 with thermocouples that works great.  In slot 2 I have a 1121/1321 that needs help.  I cannot figure out how to make a LabVIEW program to read the strain gage. 
    Is computer hardware a factor?  I have a relatively old Dell, 1.7 ghz, 256 MB RAM, and all of my programs bog my machine down.  My thermocouple program with 1 functioning channel takes almost 2 minutes to load. 
    Anyway, I program the DAQ assistant like I think it should be done, but I am having problems with the sampling rate.  Everytime I run the program I get an error message saying that it could not get the recommended samples in time.  I have had my delay time on my While Loop as low as .25 s and as high as 1.5 s.  I have changed my sampling rate from 1 hz to 1000 hz. 
    I would really appreciate any and all help on this matter.  I am still very new to LabVIEW. <I could not contain my excitement when my thermocouple program worked>
    Thanks,
    CDawgttu

    Hi CDawgttu,
    I think the best thing that we can do for the moment is to try and see what the maximum rate you can get on the 1121 is, when working on its own.
    According to the DataSheet the 1122 is more likely to be what's slowing you down.  There could also be some concerns with how the internal jumpers are set on the 1121, so you may want to make sure that the settings there match how you have configured your board in Measurement and Automation Explorer. 
    -You can set this up by right clicking on the SCXI module and adjusting the Properties.  On the Jumpers Tab you should then make sure the values match what you've set internally (SCXI-1121 User Manual - Chapter 2)-
    When you use just the 1121, see if that makes a difference in your overall application speed.
    Finally, it may be easier to use an example program than the DAQ Assistant since you are using such an old machine.  You can find Strain Gauge examples by opening LabVIEW and following this path:
    Help > Find Examples > Browse > Hardware Input and Output > DAQmx > Analog Measurements > Strain > Cont Acq Strain Samples.vi
    I hope some of these tips get you pointed down the right path.
    Regards,
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

  • Why is it that I can't do a continuous streaming to disk with a 5102 scope card (PCI) when I can do it with a DAQ Card of much lower specs (my requirement is for small sampling rates only)?

    I am told that the 5102 Card (PCI) does not support continuous streaming of data to the hard disk. My application requires only very low sampling rates. If I can do it with a low spec DAQ Card using LabView why can't I do it with this card?

    Hello,
    The PCI-5102 is a high-speed digitizer card that has a slightly different architecture than the DAQ cards and was not built with the ability to stream data to the PC. However if you are sampling at low rates you can still acquire up to 16 million samples, which is done by using dma to tranfer data from the onboard memory on the 5102 to the PC memory. However, you will not be able to save the data to disk until the acquisition is complete.
    Another option would be to purchase either a DAQ card or a PCI-5112. Both boards can continuously stream data to the host PC and you should not run into any PCI bus limitations if you are stream to disk at relativiely slower rates.

  • DASYLAB QUERIES on Sampling Rate and Block Size

    HELP!!!! I have been dwelling on DASYLAB for a few weeks regarding certain problems faced, yet hasn't come to any conclusion. Hope that someone would be able to help.Lots of thanks!
    1. I need to have more data points, thus I increase the sampling rate(SR). When sampling rate is increased, Block size(BS) will increase correspondingly.
    For low sampling rate (SR<100Hz) and Block size of 1, the recorded time in dasy and the real experimental time is the same. But problem starts when SR>100Hz for BS=1. I realized that the recorded time in dasylab differs from the real time. To solve the time difference problem, I've decided to use "AUTO" block size.
    Qn1: Is there any way to solve the time difference problem for high SR?
    Qn2: For Auto Block Size, Is the recorded result in dasylab at one time moment the actual value or has it been overwritten by the value from the previous block when AUTO BS is chosen.
    2. I've tried getting the result for both BS=1 and when BS is auto. Regardless of the sampling rate, the values gotten when BS=1 is always larger than that of Auto Block size. Qn1: Which is the actual result of the test?
    Qn2: Is there any best combination of the block size and sampling rate that can be used?
    Hope someone is able to help me with the above problem.
    Thanks-a-million!!!!!
    Message Edited by JasTan on 03-24-2008 05:37 AM

    Generally, the DASYLab sampling rate to block size ratio should be between 2:1 and 10:1.
    If your sample rate is 1000, the block size should be 500 to no smaller than 100.
    Very large block sizes that encompass more than 1 second worth of data often cause display delays that frustrate users.
    Very small block sizes that have less than 10 ms of data cause DASYLab to bog down.
    Sample rate of 100 samples / second and a block size of 1 is going to cause DASYLab to bog down.
    There are many factors that contribute to performance, or lack there of - the speed and on-board buffers of the data acquisition device, the speed, memory, and video capabilities of the computer, and the complexity of the worksheet. As a result, we cannot be more specific, other than to provide you with the rule of thumb above, and suggest that you experiment with various settings, as you have done.
    Usually the only reason that you want a small block size is for closed loop control applications. My usual advice is that DASYLab control is around 1 to 10 samples/second. Much faster, and delays start to set in. If you need fast, tight control loops, there are better solutions that don't involve Microsoft Windows and DASYLab.
    Q1 - without knowing more about your hardware, I cannot answer the question, but, see above. Keep the block size ratio between 2:1 and 10:1.
    Q2 - without knowing more about your hardware, and the driver, I'm not sure that I can fully answer the question. In general, the DASYLab driver instructs the DAQ device driver to program the DAQ device to a certain sampling rate and buffer size. The DASYLab driver then retrieves the data from the intermediate buffers, and feeds it to the DASYLab A/D Input module. If the intermediate buffers are too small, or the sample rate exceeds the capability of the built-in buffers on the hardwar, then data might be overwritten. You should have receive warning or error messages from the driver.
    Q3 - See above.
    It may be that your hardware driver is not configured correctly. What DAQ device, driver, DASYLab version, and operating system are you using? How much memory do you have? How complex is your worksheet? Are you doing control?
    Have you contacted your DASYLab reseller for more help? They should know your hardware better than I do.
    - cj
    Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.

  • IIR Filtering and response .vi: Butterwort​h filter magnitude response depends on sampling rate -why?

    Hi folks,
    I am not expert in filter design, only someone applying them, so please can someone help me with an explanation?
    I need to filter very low-frequent signals using a buttherwoth filter 2. or 3. order as bandpass 0.1 to 10 Hz .
    Very relevant amplitudes are BELOW 1 Hz, often below 0.5 Hz but there will be as well relevant amplitudes above 5 Hz to be observed.
    This is fixed and prescribed for the application.
    However, the sampling rate of the measurement system is not prescribed. It may be between say between 30 and 2000 Hz. This will depend on whether the same data set is used for analysing higher frequencies up to 1000 Hz of the same measurement or this is not done by the user and he chooses a lower sampling rate to reduce the file sizes, especially when measuring for longer periods of several weeks.
    To compare the 2nd and 3rd order's magnitude response of the filter I used the example IIR Filtering and response .vi:
    I was very astonished when I the found that the magnitude response is significantly influenced by the SAMPLING RATE I tell the signal generator in this example vi.
    Can you please tell me why - and especially why the 3rd order filter will be worse for the low frequency parts below 1 Hz of the signal. I was told by people experienced with filters that the 3rd oder will distort less the amplitudes which is not at all true for my relevant frequencies below 1 Hz.  
    In the attached png you see 4 screenshots for 2 or 3 order and sampling rate 300 or 1000 Hz to show you the varying magnitude responses without opening labview.
    THANK YOU for your ANSWERS!!!
    chris
    Solved!
    Go to Solution.
    Attachments:
    butterworth-filter-differences.png ‏285 KB

    Hello Lynn,
    thanks for the answer. You are right that there are few points "behind" the curve in the graph, see png.
    However, this is the filter response which Labview (2009) provides to me directly out of the "IIR Filter for 1 Channel. vi" in the "filter information" output cluster. Where up to now I do not know how to influence it - apart from adjusting the input parameters "IIR filter specifications". OK, I assume I have to gain more knowledge of this. The curve of the magnitude resonse dies not change when I change the number of samples of the input signal of the signal generator, only wehn I change the sampling rate.
    I used directly the example vi from Labview with the name indicated in my first post "IIR Filtering and Response.vi".
    So I assumed that everybody has it in his/her examples shipped with LV and it is not necessary to post it.
    I just adjusted the size of the diagram of magnitude response to see the curves better as you see in the attached vi.
    So I did no changes to the vital parts of signal generation and filter of the example. The screenshots are like they come from the example when using the option "one waveform" where I as user assume that this which is behind is quality-controlled by NI.
    I was also astonished that the filter magnitude response is different to the one I copied out of graphs 1 year ago - but I unfortunately cannot reconstruct which example I used there...
    Thanks for any further comments
    chris
    Attachments:
    IIR Filtering and Response_CH.vi ‏55 KB
    butterworth2nd_order_bandpass_0p1to10Hz_mag_response.PNG ‏18 KB

Maybe you are looking for

  • NOT ALLOWED TO INSTALL!!!

    I downloaded the iTunes software 8.0.1, * I'm trying to install the software. * I uninstalled the old version. * I ran Registry Doctor. * I rebooted the computer. "There is a problem with this Windows Installer package. A program run as part of the s

  • How can i use audio through hdmi on mac book pro i have video no audio version10.6.8

    how can i use audio through hdmi on mac book pro i have video no audio version 10.6.8 in audio it just has internal speaker options

  • Wism and aaa server communication

    Hi  How a wism  talking to aaa server .? The wism will talk on behalf of the user ?  What i mean if there is an acl on the interface vlan ( switch) , Do we need to allow the aaa server in the access list ?  Thanks 

  • How to upload forecast into sap.

    how to upload forecast into sap.

  • Using CCBPM

    I have a scenario where I have to execute a stored procedure , then a sql statement and again a stored procedure to get the data out of a oracle db.After that it needs to be mapped to an idoc. Can it be done without CCBPM? The stored procedure is bas