Why cant I control the sample rate?

I am sure there is a simple programming answer to this but I am drawing a blank. I would like to slow down my sample rate in the following block diagram, however changing the sample rate at my Sample Clock seems to have no effect. Any ideas? Thanks in advance for your help
Solved!
Go to Solution.

NIquist wrote:
How about a Timed Loop?  It's one of the main structures.  You can also just drop the Wait.vi (Timing Palette) in your current loop.
I recommend the Wait (ms) function over a timed loop unless you specifically need the timed loop behavior.  I just learned today (looking up something related to a different thread): "Each timed structure on the block diagram creates and runs in its own execution system that contains a single thread, so no parallel tasks can occur."  In a regular while loop, tasks can run in parallel.

Similar Messages

  • How do I control the sampling rate of a PCI-6602 counter

    Labview version: 7.1
    Processor: Pentium 4 1.8 GHz
    Hello All,
    I have two avalanche photo diodes connected to two counter entrances on a 6602 (ctr 0 and ctr 1).
    As can be seen in the attached VI, I'm generating a signal on ctr2 and using that as an external clock for the counters.
    My objective is to accurately read the counter values at a rate of ~100KHz (i.e. 0.01 ms between measurements) and to be able to control the rate via the front panel. This should be possible (80MHz timebase), however when I run the program it is only able to actually sample at ~5 ms intervals. Also I'm encountering error 200141 even though I set the rate in the counter to 1M, which should buffer enough.
    What am I doing wrong? Any help would be greatly appreciated.
    Thanks a lot,
    Attachments:
    FRET_ver_14.vi ‏456 KB

    Hello Aadam,
    After looking at your code, I would not use the DAQ assistants to implement this. The DAQ assistant are best to be used for simple acquistion and since you are looking to use more lower level properties of you card, I would suggest to move to use the lower level VIs. It will be easier to understand where the problem is occurring at and will run better than using the DAQ assistant.
    I have done some initial research for you to implement this design. I have described each of them below and how they will assist you.
    The first example I have found is the Change Counter Output Frequency While the Task is Running. In this example, it will show you how to change the frequency and duty cycle of a counter output frequency task. One thing to remember about these counters are that the frequency will not change until the period has finished. For example, if you changed the frequency in the middle of a period of frequency of 1 Hz, it has to complete the 1Hz period before changing it to the next frequency.
    The next example I would investgate is in the NI Example Finder called Correlated Dig Write With Counter.vi. The NI Example Finder can be found in Help » Find Examples... This VI will explain how to use the counter as a clock for another task. You will need to combine the concepts of the first example with this to make sure that you can vary the sample clock.
    Finally, in the NI Example Finder, there is an example how to count digital events with an external clock called Count Digital Events-Buffered-Continuous-Ext Clk.vi. With this example, I first suggest to add the counter task and make sure you can get the external clock to work. After this, I would then implement changing clock.
    Jim St
    National Instruments
    RF Product Support Engineer

  • How can I figure out, (and control), the sampling rate of my IMAQ board using LabVIEW?

    My IMAQ board is sampling at a certain rate and I do not know what it is... how do I figure this out using labVIEW? Also, how can I make sure that it is not waiting any time at all for sampling i.e. it is not waiting for any wait time functions or any of them other things that cause the program to slow. The reason that I want to do this is because the Kodak Imaging board that I am using seems to be delivering at a much higher rate and no my graph there are major gaps between each sample according to the time plot (for instance it goes from 178280 to 178290 all the way by 10's to 178340. But when the program is running continuously it has gaps of like 355 or so miliseconds I guess.
    Maybe that is just the time that it takes for the program to refresh itself, I am not sure. where could I find where this missing information is going?
    Thanks much,
    Brian

    Brian,
    Your IMAQ card should be sampling at the same speed of the camera, as long as your camera isn't exceeding the cards limits.
    As for how many images you're acquiring in your program, it depends on how long it takes for you to finish one loop of your code. It sounds to me that you may have a lot of processing happening after each grab, therefore slowing down the system.
    Try to comment out your processing (maybe with a case structure set to false) and output only your acquired images. See if that makes a difference. You might also try running this on a faster computer.
    BB_Phil

  • CS6 will not accept my condensed mic stating; 'the sampole rates of the audio input and output do not match.  Audio cannot be recorded until this is corrected.  Use the appropriate operating system or audio device control panel to adjust the sample rates

    !

    The first things we need to know in order to be able to help are what are your operating system and audio device?
    Also the FAQ Setting the Sample Rate in Windows Vista and 7 may help.

  • If your Lightroom 6 is crashing in the Slideshow module, check the SAMPLE RATE of your music track

    After spending over 2 hours with an Adobe technician who had control over my Windows 7 machine, I've learned something that I don't think Adobe knows yet...  I upgraded from LR 5.7 to LR 6 (not CC) and began having issues when I was working in the Slideshow module.  When trying to add a music track, Lightroom would crash ("unexpectedly quit").  I couldn't for the life of me figure out why.  I turned off the GPU since a fair amount of chatter on the forum related to that, but it didn't change anything.
    So I finally waited patiently for the Adobe Chat line to finally get a tech to respond...and he was exceptionally detailed and methodical in his approach to diagnosing my issues.  I could follow on my screen as he did a variety of things that indicated he understood what he was doing.  Unfortunately he got to a point where he thought (as did I) that he had found the problem/solution...which he thought was related to the bit rate.  He concluded that music with a Variable Bit Rate (VBR) as opposed to a Constant Bit Rate (CBR) was causing the problem.  Also unfortunate was that this "discovery" was near the 2-1/2 hour mark and we did not apply the scientific method to property determine if we had narrowed down to cause/effect.
    Based on my further analysis, he was close, but not right on.  It isn't the BIT rate mode that is causing the crash, but rather the SAMPLE rate.  Turns out that the vast majority of songs in my iTunes library have a sample rate of 44.100 kHz--and those work just fine.  However, I have about 15 songs, mostly downloaded as free background music from the YouTube creation library, that have a sample rate of 48.000 kHz--every single one of those cause my LR6 to crash.
    If you're having a problem with Lightroom crashing in the Slideshow module, check the SAMPLE RATE of your music track.

    If you're on Windows, check out a free program called Audacity--it's fantastic.  With Audacity the process of converting a 48.000 kHz to 44.100 kHz is as simply as opening, changing the sample rate, and then exporting again, as an MP3.

  • Can't figure out how to set my midi controler to control the sampler!

    I have a Korg Kontrol49 and I want to be able to control the sampler knobs and faders with the ones on my Korg. I have it connected threw USB. It works for the keys but I can not figure out how to program the rest of it. Any help would be great. I tried reading everything I could to get it to work but I cant. Please help!
    Thanks
    Mac Pro   Mac OS X (10.4.8)  

    Press Command-L. Touch the onscreen control. Twiddle your MIDI knob. Assignment learnt.
    Then go read the manual on Controller Assignments...

  • Setting the sampling rate in SignalExpress

    I am using a cDAQ-9172 with a strain gauge module and a thermocouple module and using SignalExpress.  I want to acquire data at a pretty low frequency rate (2Hz), but I am unable to use 1 sample on demand in the acquisition setup.  I get the following error.
    Error -201087 occurred at DAQ Assistant
    Possible Reason(s):
    Measurements: Task contains physical channels on one or more devices that require you to specify the Sample Clock Rate.
    Specify a Sample Clock Rate.
    Device: cDAQ1
    I am unable to setup a sample clock rate as it is 'blacked' out by the software in the 1 sample on demand mode.
    When I try to use continuous or 'N' sample mode, the cDaq is sampling at a rate of around 1600 Hz, even though I am putting in a value of 1Hz on the seti[ screen.  The large amount of data will prevent me from downloading the data to Excel for further reporting.  I obviouisly don't need to sample my TC module at that rate either.   
    Is there anything I can 'easily' do to decrease the sampling rate down to a low level?  Everything I have tried doesn't seem to work and I don't really want to go away from SignalExpress.
    Jay 

    Hi Jay
    I am assuming that you are using the NI-9237.  This strain module has only a specific set of sampling rates.  If you specify a rate that is not supported it will corers the rate to the next higher sampling rate.  Also since you are using the cDAQ chassis, there is only sample clock so it must choose the highest sampling rate.  So it is not possible to sample at a lower rate.  Please see the following link.
     If you have access to LabVIEW then I would suggest taking your readings at the fast rate and then average the samples before you write them to your file.  The following link has some more information on this. 
    If you are limited to Signal Express, this task is tricky.  If you select a N-Sample acquisition, set the samples to read to greater than two, and set the post acquisition delay  under the execution control tab to 1000, you acquisition will acquire the two samples at the very fast rate, but it will wait 1000mS between each acquisition.  This will slow the overall sample rate.
    Chris_K
    National Instruments
    Applications Engineer

  • The sampling rate of Multimeter Protek 508 via RS232

    Hi everyone. I have the multimeter Protek 508. I want to take the data from it via RS232. The default detail of RS232 is:
                    Baud rate: 1200
                    Data bit: 7
                    Stop bit: 2
                    Flow control: None
    I write the code and get the data from it. But i only have the sampling rate is 2 data per second, that mean 500 ms per data. I want the sampling rate more than that. Can anyone help me to solve this problem. 
    Thank you.
    Attachments:
    186148720-Multimeter-Protek-506-pdf.pdf ‏553 KB
    Protek 508 RS232.vi ‏35 KB

    You are probably getting everything out of this device that you can. First, it is old, make that, very old. Back in the day, it might have been quick, but that was then. This is now.
    Second it's a multimeter. Very often meters like that would do running averages to make the reading appear more stable. That averaging slows down the rate at which you get new data.
    How fast are you needing to acquire data?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Conflict between the saved data and the sampling rate and samples to read using PXI 6070e

    Hello, I am using PXI 6070e to read an analog voltage. I was sampling at 6.6 MHz and the samples to read were 10. So, that means it should sample 10 points every 1.5 um. The x-axis of the graph on the control panel was showing ns and us scale, which I think because of the fast sampling and acquiring data. I use "write to measurement file" block to save the data. However, the data was saved every 0.4 second and as 35 points data at the beginning of each cycle (e.g. 35 points at 0.4 sec and 35 at 0.8 sec, and so on) and there was no data in between. Can anyone help me how there are 35 reading points every cycle? I could not find the relation between the sampling rate and samples to read, to 35 points every 0.4 second!
    Another thing, do I need to add a filter after acquiring the data (after the DAQ assistant block)? Is there anti-aliasing filter is built in PXI 6070e?
    Thanks for the help in advance,
    Alaeddin

    I'm not seeing anything that points to this issue.  Your DAQ is set to continuous acquire.  I'm not sure if this is really what you want because your DAQ buffer will keep overwriting.  You probably just want to set to Read N Samples.
    I'm not a fan of using the express VIs.  And since you are writing to a TDMS file, I would use the Stream to TDMS option in DAQmx.  If you use the LabVIEW Example Finder, search for "TDMS Log" for a list of some good examples.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Adjusting the sample rate

    How do I adjust the default sample rate setting to 44100? 

    Blastbot wrote:
    If you are not going to answer this because it is on an older product, that is lame.  I tried to get on a forum for said older product, but that is grayed out from the list of products you have a forum on, which is also lame.
    Well, I certainly don't wish to be described as "lame," Blastbot, as it is a personal fear of mine.  The forum for previous versions of Audition is available at http://forums.adobe.com/community/audition/audition_previous but since we're here and my earlier obligations today have wrapped freeing up a few minutes of my time, I'll be happy to walk you through the process for Audition 3.0.
    In Audition, click Edit > Audio Hardware Setup...  In the dialog that pops up, you'll see the current hardware sample rate listed and a Control Panel button that will display the device configuration panel for the selected driver.  You should be able to change your sample rate by clicking that button, depending on which audio driver is selected.  The default "Audition Windows Sound" driver, which is generic and best suited for audio devices without their own drivers, defaults to the Windows sample rate.  If you have a good audio device with its own, native ASIO driver, you can usually modify the sample rate within their control panel.
    Since you're apparently running Windows, although I'm not certain which version you have, you may need to change the sample rate of your audio device at the Operating System level.  You can usually reach this menu by opening the Windows Control Panel and launching "Sounds and Audio Devices" (on Windows XP) or "Sound" (on Windows Vista and Windows 7.)  Here, you'll need to navigate to your playback device selection, open the device properties, and adjust the default sample rate that you desire.
    More detailed information can be found in the Adobe Audition Help documents either from the Help menu item, or the Help button located in the bottom-right corner of the Audio Hardware Setup window.  Additional information about Sample Rates can be found on Wikipedia at http://en.wikipedia.org/wiki/Sample_rate
    I sincerely hope this helps answer your question and relieves me the burden of lameness, at least as far as this issue extends.

  • Sampling Rate- How do I check and adjust the sampling rate on my Laptop?

    For the purposes of matching the sampling rates on my laptop to my usb microphone, (recording in garageband) how do I find out what the sampling rates are on my 2009 macbook?  Many thanks!

    GarageBand '11: Set the audio resolution: http://support.apple.com/kb/PH1873

  • IPhone: AudioQueue - is it possible to change the sample rate?

    I've been playing around with the AudioQueue stuff for a few days and it's all working fine.
    I was trying to build a low-latency playback system by making the streaming buffers the same size as the audio file and pre-loading the buffers (which works fine) but I've hit a snag.
    I've been trying to get the streaming to work at different sample rates so that I can play back the same sample at different pitches. I managed to do it by modifying the sample rate in the AudioStreamBasicDescription structure but in order to actually make the stream playback at the new rate it seems you have to create a new output, reload the audio file into the buffers and re-enqueue the output queue before starting playback again, otherwise the sample rate change has no effect.
    There is a method to set queue properties; AudoQueueSetProperty() but unfortunately the sample rate Property (kAudioQueueDeviceProperty_SampleRate) is read-only
    Can anyone suggest a way to achieve this with AudioQueue or do I need to move over to OpenAL?
    Thanks,
    Neil

    Dan,
    there is one point in your understanding, which i am not sure what you think about when talking about it: I understand E-series devices do not support this property change while the VI is running.
    infact, you cannot change the sample clock rate during acquisition. but
    this does not mean that you cannot change it while the VI is running.
    you have only to interrupt the acquisition. since you want to acquire
    continuous, this would have the same effect as stopping the vi, i asume.
    so the best way to accomplish this task is to use an external clock.
    this is e.g. often used for acquistion on rotating shafts. the
    acquistionrate is always e.g. 24 points per revolution regardless of
    the rotational speed of the shaft, except for a maximum frequency of
    course.
    Norbert B.
    NI - Germany
    Message Edited by Norbert B on 09-14-2005 04:16 AM
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How can I change the sample rate (delta X)?

    Hi, I create vi which can measure resistance, it will record the data and write to a file.
    however, I want to change the sample rate which is delta x. is that anyway I can do?
    I have try to put a clock inside the loop, it does slow down the speed but not the sampling rate.
    Please help me!!
    Thank you!

    Hello Shan405,
    Adjusting the Reading Rate of a DMM
    As noted in the above DeveloperZone article, there are a lot of factors contributing to a reading rate of a DMM. 'Sampling rate' can only be configured in digitizer mode, which can only be achieved on the flex DMMs
    Using the NI PXI-407x DMM as an Isolated Digitizer
    Regards,
    Glenn

  • The sample rate in my code is too low. Is there a way to make it run faster?

    Dear Sir,
        I am a LabVIEW customer, and just have a question about LabVIEW.
        We are running a code of "Wirebonder Project", but find the sample rate is too low. I'm wondering if there is a way to make it run faster. (I have
    attached the code here.)
        Thank you very much!
    Yours Sincerely,
    Xian Zhang
    Attachments:
    Wirebonder_Project_Code.zip ‏169 KB

    Hi Xian,
    What system are you running this code on and are you using the LabVIEW Real-Time Module? There is a presentation online on Optimizing and Benchmarking Real-Time code with useful related links as well as other articles in the DevZone on things like Benchmarking an Application Using LabVIW Real-Time and DAQmx.
    As you can see, this is not a simple question, so take a look at the information in these links and see if you can narrow down what in your code is running slowly and how much you might be able to improve the speed.
    Regards,Stephen S.
    National Instruments
    Applications Engineering

  • File compression in Mavericks: can you control the compression rate?

    Hi all,
    Is there anyway a user can control the commpression rate in Mavericks. I previously used Stuffit Expander and the built in compression in Entourage 2008. As Mavericks has its own compression utility I cannot find where you can control the rate etc.
    I have removed Stuffit  Expander 2010.
    Regards
    Bob

    Not via the GUI. However, the Terminal command compress does have a compression ratio setting. Launch the Terminal app in /Utilities and type this into the window that pops up:
    man compress

Maybe you are looking for