How to adjust sample rate of data?

I have some data collected at 1683 Hz (yes, that was what I had!) and would like to reduce the sampling rate to some meaningful number, say 1024, 500, 400, or similar.
What should I do?

Well, the calculation is the approximation of your channel (variables with index 0) to a new one (index 1).
The freq(0) and freq(1) are the sampling frequencies for the channels for the case you have waveform channels.
The n(0) and n(1) are the numbers of the data points inside the channels. The new created channel should have the number n(1), calculated from n(0) with regard to different sampling ratios.
The real code is the line Call ChnSplineXYCalc(..... The properties swapping can be commented out, but then the new channel would have a "system name", something like "Approximated XY", and the same for description and units... Probably one can avoid it by changing of settings, but I use to do it by code.
In short, here you copy the properties from the "old" channel and paste them to the new one.

Similar Messages

  • How to adjust sample rate in "capture preset"?

    I'm having to recapture footage shot some years ago on my old Sony VX1000 using my Sony Z5U. I'm working on FCE 4.0 (OS 10.4), Easy Setup at DV-NTSC and capturing by "capture now." I'm getting a warning saying that my sample rate of capture does not match sample rate of source tape and advises me to ensure that my audio sample rate of the "capture preset" matches the sample rate of [my] source tape. Browser tells me that my sequence and my clips audio rate are both at 48 KHz, but my sequence audio format is 32 bit floating point, and my clips are at 16 bit integer. How do I access capture preset and synch capture rate?
    Thanks

    48KHz = 16bit
    32KHz = 12bit
    Can't be both at the same time.
    Most cameras come set to 12bit as the factory default. On the Canon miniDV cams like your ZR500, go into the menus for *Camera Setup > Audio Setup > Audio Mode* and you should be able to toggle between 16 bit and 12 bit audio.
    You want to film your videos using 16bit audio if at all possible. If you have done so, then you should use the DV-NTSC easy setup in Final Cut Express (not the DV-NTSC 32KHz easy setup).
    If you inadvertently filmed your video using 12-bit audio then you will need to use the DV-NTSC 32KHz easy setup in FCE.

  • Adjusting Sampling Rate to write continuous data to excel?

    Dear colleagues,
     I am reading data from a DAQ from 4 channels and am wanting to write the data continuously to an excel sheet.  Problem is, I cannot get the sampling rate and # of samples to appear "constant".  instead, labview is only sampling x number of samples in a row and storing those to excel.  What I want is this:
    Beginning at time t=0, and every 0.2 seconds after that (5 Hz), read the values from all 4 channels and append them to an excel file.  What I am using is a 1D to 2D array converter and the Write-to-Spreadsheet function outside my while loop.  If I set it to only do 1 sample every 0.2 seconds, then it just stays at t=0, just refreshing the value and thus overwriting my excel data.  How can I make it sample continuously from t=0 to t=when STOP button is pressed, and then log all samples into excel?  I have attached my sample vi below.  Thank you.
    Attachments:
    working_final.vi ‏547 KB

    Hi Mike, Thanks for replying.
    The latter of the two methods you mentioned, " you write your values every iteration to the file, therefore you have to place the "Write vi" inside the while loop.", this would be ideal.  What sort of conversions need to be done in the while loop before the data is written? In my file, you can see that I am trying to use a converter to go from Dynamic Data to a 1D array.  Would this be the appropriate method for doing this?  What I am trying to accomplish can't possibly be this complex, I'm sure lots of people require the use of a similar write-to-spreadsheet function.

  • Sample rate and data recording rate on NI Elvis

    I am currently working on a project that requires me to record my data at 1ms intervals or less. Currently the lowest timing interval I can record is at 10ms. If I change my wait timer to anything below 10 the recorded data in excel will skip time. For example instead of it starting at 1 ms and counting 2,3,4,5,6...,etc. It is skipping from 2,5,12,19,....,etc. So my question is if it is a limitation that I have reached on the NI Elvis or if it is possibly a problem with how I've created my LabVIEW code. My program from an operational stand point is working great, but it is my data recording that is causing me to not be able to move to my testing phase. Any help on this matter would be greatly appreciated.
    Other information that might be relevant:
    Operating System: Windows 7
    Processor: Intel(R) Xeon(R) CPU E31245 @ 3.00 GHz
    Memory: 12GB
    DirectX Version: 11
    Attachments:
    Count Digital(mod12).vi ‏76 KB

    Hi crashdx,
    So my immediate thought on this issue is that the code inside your primary while loop might be taking too long to process to achieve such a high sample rate. Especially when making calls into external applications (such as Excel) which can take a large amount of itme. 
    There is a very useful debugging tool called the Performance and Memory tool. If you aren't familiar with this tool, it will allow you to see how much memory the various chunks of your code are using and, more importantly here, how much time each subVI is taking to execute. Does the code inside your while loop take longer than 1ms to run? If so, then you will definitely see unwanted logging behavior and will need to change your approach. Would it be possible to collect more than a single sample at a time and perform calculations on a large number of samples at once before writing them to Excel in bigger chunks?
    I've included a link to the LabVIEW helpful detailing the Profile Performance and Memory tool.
    http://zone.ni.com/reference/en-XX/help/371361H-01/lvdialog/profile/
    I would first try and figure out how long it's taking your loop code to execute and go from there.
    I hope this helps!
    Andy C.
    Applications Engineer
    National Instruments

  • Adjusting Sample Rates

    I just got Audition CC 2014 and when I try to record it says the sample rates of the input and output devices don't match. How do I adjust those rates in Windows 8.1?

    Okay.  You need to go to the Windows Sound control panel and select the Playback tab.  Highlight your output device (if you have no external card there may well only be the one) and select Properties.  Then click the Advanced tab and there'll be a drop down menu for bit depth and sample rate.  I'd suggest 16 bit/44100Hz (CD Quality) for pure audio that will end up on CD or MP3 or 16 bit/48000Hz if it's going to end up on video.
    Next, go back to the Windows Sound control panel, click the Recording tab, and follow the same procedure (highlight, Properties, Advanced) and select the same settings in the drop down menu there,
    This should sort you out.  In the longer term, consider an external USB audio interface--it'll be hugely better quality and, if it has ASIO drivers, it'll stop Windows applications from changing audio settings without telling you.

  • How to improve sampling rates in mega samples spartan 3e board

     I am trying to acquire data in spartan 3e board in mega samples rate can you post me any examples for this purpose
    Solved!
    Go to Solution.

    If you're trying to get analog samples in that range, the issue that you're going to run into is that that sort of sampling rate is right at the bleeding edge of what you're asking for (it's a 2-channel @ 1.5Msps chip, the LTC1407A-1). If you actually want to capture at these rates, you're going to need to pull some interesting LV-foo using single-cycle timed loops in the FPGA diagram or drop some code down into an IPNode/CLIP Node, with outputs from those IP blocks hooked to the IO in a SCTL.
    Please let us know a bit more about your specific design.
    -Brad

  • 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

  • How to know the sampling rate for NI6624?

    Dears,
    I am trying to measure a transient signal that is a time-vary counter train.  The target frequency is increased from 0 Hz to 50 Hz when the measurement time rises to 1 s from 0 s.  The NI 6624 card and the LabVIEW DAQmx have been adopted.  In the block diagram, the terminal of measurement method “Low Frequency with 1 Counter” is set in “DAQmx Create Channel (CI-Frequency).vi”, and the “Finite Samples” mode is chosen in “DAQmx Timing (Implicit).vi”.  Then the transient signal points (increasing-frequency points) will be got successfully within 1 s.  Now I have a question: how do I estimate the time step “dt” between these data points?  Knowing the default sampling rate of the card seems a better way to help me to define the "dt", and calculates the time stamp at each data point.  If the foregoing concept is true, how the internal sampling rate in NI6624 obtains?  Beside, for the transient counter signal, any way to get the time stamp of data points is also welcome.
    Thanks for anyone comment,
    Adan

    Adan,
    When selecting "Implicit" as the DAQmx Timing type, you are indicating
    that a data point will be taken for every measurement the counter
    performs. When you create a task of type "Low Frequency with 1
    Counter," the counter simply uses the card's internal timebase to
    measure the period between edges of your signal. It then takes this
    period measurement and converts it to a frequency. Therefore, the
    spacing between the samples you read out is simply the inverse of the
    subsequent frequency measurement sample.
    Hope this helps,
    Ryan Verret
    Product Marketing Engineer
    Signal Generators
    National Instruments

  • Converting Units in LabView and specifying sampling rate with Universal Library functions

    Hi,
    I am having trouble converting units in LabView 7.0 and having it write to a file / output on a chart in Nm instead of in volts.  I can't seem to find any straightforward instructions, eventhough it seems like a simple task. 
    Another task that would seem rather simple is changing the sampling rate with the XAIn program from the Universal Library for LabView (this is version 5.40).
    If anyone could help me out, I would greatly appreciate it - I have tried other sources without much luck!
    Thanks
    Jenna

    Are you really needing to change units or do you need to scale the voltages read from your sensors? If it's scaling, it would be trivial to set this up in mAX or with the DAQ Assistant if you were using an NI board. Since you are not, then you could use the Scaling and Mapping Express VI. The y axis of a chart is just a label. You can use the text tool to change it to anything you want.
    I have no idea how to change sample rate for your board. Have you asked the vendor?

  • Set sampling rate and bits on Audigy 2 Va

    Hi guys, I really need your help:
    I dont know how to set sampling rate from 6bit 48KHz, which the audigy 2 can be set upto 24 bit 92 KHz.
    Please help me
    thank you

    Can you check the rear output on the soundcard with a set of headphones, to check if that works? As long as the speaker selection is set correctly (5.), then it should work.
    Cat

  • Drop the sample rate

    I'm trying to drop the hardware sample rate. It's at 44800Hz. When I want to capture audio through my Audigy 2 soundcard at 44100Hz I get the message "We do not support recording when your file does noyt match your hardware sample rate. Your current hardware sample rate is: 48000Hz."
    Edit -> Adjust Sample Rate does nothing.
    Edit -> Hardware Audio Setup shows a 48000Hz sample rate but I can't change it.
    Oh. Is there a "global" reset on settings?
    Thanks
    Gis

    >I'm trying to drop the hardware sample rate. It's at 44800Hz. When I want to capture audio through my
    Audigy 2 soundcard at 44100Hz...
    My very strong advice to you is not even to try. Audigy soundcards work internally at 48k, regardless of what you tell them - the internal architecture is fixed. If you tell them to work at 44.1k, then all they do is 'spoof' the output by doing an internal sample rate conversion on the fly. The problem with this is that it's not a very good conversion - and Audition can do it rather better. So the way to go is to record at 48k, and then do the conversion rather more transparently in Audition. Doesn't take long, and won't degrade the sound even more than the card already has. So...
    ...a better way to go would be to ditch that pile of Creative rubbish and get a proper soundcard!

  • How to create a wav file from 24bit 96Khz sampling rate data

    Hi
    I am trying to make an VI which will play sound while acquiring data from PXI 4472 DAQ card.
    My sampling rate is 96Khz and PXI 4472 card is a 24bit card.
    Wave files are in 8 or 16 bit and the sampling rate is 8000, 11025, 22050 and 44100. How will I be able to play the data which I am acquiring.
    How would i normalize the data into the required format needed for most of the sound cards to play.
    Or are there any codec available in Windows XP which i call to play a 96KHz 24 bit sample
    Does anybody ever encountered this type of problem.
    Thanks in advance
    Nitin

    Whilst the 'standard' RIFF format specification usually accomodates 16 bit data, there is of course no reason that you can not create your own extension. It just won't be playable by Media player using the 'standard' installed drivers or codec. This may not be a problem....
    WAV files can and do support other formats, you just need to know how to handle them......
    There is howerver a 4GB limit (related to the pointer size in the WAV specification) which with higher bit depths on the sampling does start to become a bit of a problem.
    To give you a few samples of other types of wav files check out the following site here
    http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Samples.html
    The following definitions for WAV audio formats may also be of interest here
    http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html
    Good luck with 24 bits.

  • How to store the sampling rate into the header of the data file?

    I want to store the data parameters such as sampling rate to the data file. Now I am using the Write Labview Measurement File VI, the data is saved, but like the sampling rate this kind of parameter is not in the file. How can I store this parameter?

    If you want the sampling rate to appear in a different location of the header, then it and it's subVIs can be modified to write anyway you want. Right click on the Express VI and slect Open Front Panel. Then you have a VI that can be modified. If you want to use an unmodified Write LabVIEW Measurement File, you could use that, read the whole file back in with one of the file read functions, insert a string with the sampling rate and then write the whole thing back out again. It might be simpler though, to use Write Characters to File to create your own header and then use Write to Spreadsheet File to write the data. There is also the function Export Waveforms to Spreadsheet File on the Waveform>Waveform File I/O. This uses a slightly different format than a .lvm file. It too can be modified if you don't like the default header.

  • How can I continuous​ly streaming data to disk with 1MHz sampling rate with PCI 6110?

    I can only save 3 seconds data with 1MHz sampling rate using PCI 6110. Is it possible to continuously save longer time data (say 1 minute)?
    Many thanks

    if the binary file is big the ASCII file is very very very big.
    1 measurement is coded in a I16 => 2Bytes ( 4bit is not used 611X is 12bit
    card)
    if you use +/-1V range the quantum is (2 * 1V) / 4096 = 0.0004883V or 0.4883
    mV you need to use 8 digits minimum.
    And If your binary file is 1 Mo your ASCII file is 4 Mo.
    You can use this VI for inpiration you need to add the translate I16 to DBl
    to make a real value before saving.
    For Help you can mail inthe newsGroup.
    I'am a french user and my english is not good Sorry..
    Fabien Palencia
    Ingenieur d'etude ICMCB CNRS
    "StephenZhou" a ?crit dans le message de news:
    506500000005000000A5AF0000-1031838699000@exchange.​ni.com...
    > Hi, Fabien Palencia
    >
    > The program is great.
    Do you happen to know how to convert the big
    > binary file to ascii file? Thanks
    [Attachment recup data I16.vi, see below]
    Attachments:
    recup_data_I16.vi ‏57 KB

  • How to acquire data from 2 chs of the same DAQ card at different sampling rate

    I am using single DAQ card (either 6013 or 6014) in my system i want to acquire data from 2 (or more) channels with following requirements
    1. sampling rate of each channel should be independant of each other (say one is 20 Hz and other is 15 kHz)
    2. data from all the channels should be acquired simultaneously.
    3. coding must be done using DAQmx VIs
    I have tried out following things
    1. I created separate task for each channel: i found out that two tasks can not run simultaneously even though the channels are different
    2. I tried out single task with two channels included in it. and i used 'channels to Read' property to determine from which ch. i want to acquire data: this method works fine if the sampling rates are same. but if i change the sampling rate of one channel it gets reflected in other channels as well.
    can somebody help me out to solve this problem.
    i will appreciate if somebody can post the sample code as my deadline is approaching
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog

    Hi Dennis Knutson
    Thanks for your suggestion.
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog

Maybe you are looking for