Independen​t Sample and log rates

I would like to log data at 0.5 second intervals while the daq assistant acquires data at 1KHz,
I tried using the write to measurement file express vi but couldn't separate the sampling and logging rates.
Any suggestions with code is always appreciated.
Thanks !!
Attachments:
logger rates.vi ‏87 KB

Your VI is saved in LabvIEW 2013, hence I can't open, either save it in previous version and upload or share the snapshot of block diagram.
Well, have you tried running two parallel loops one for acquisition and other for data logging.
Refer to these:
1. Application Design Patterns: Producer/Consumer
2. Data Acquisition Reference Design for LabVIEW
I am not allergic to Kudos, in fact I love Kudos.
 Make your LabVIEW experience more CONVENIENT.

Similar Messages

  • How to resolve audio sampling and bit rate differences before sound mix

    I'm editing a project where an additional recorder (Zoom H4n) was used and synched to the camcorder track with Plural Eyes.  Some of the sampling and bit rates don't match within the Plural Eyes synchronized clips and I need to send this out for a sound mix.  Could I use Compressor to transcode the audio? Would I have to go back to my original separate tracks, transcode in Compressor and then re-synch using Plural Eyes?  Next time ProRes from the beginning -
    but if there's an easier fix for my current problem it would be much appreciated.

    Thanks Michael -- you've helped me with the project before (back in May of this year). 
    I started this project  as a newby back in 2010 and was a bit overwhelmed (i.e. just happy to get everything into FCP and be able to edit.)
    I'll try the media manage solution, but if that doesn't work I think I'll live with the one-frame drift.  I'm assuming
    the only other alternative would be to go back to all the original video and audio files; transcode using Compressor, and then re-synch with Plural Eyes and go back in to match up the edits?
    Thanks to your continuing help, I should know how to set things up correctly from the get go for the next one!

  • Best way to acquire and log N number of samples at a specific repetition rate and write to file

    Hello,
    I am interested in acquiring N number of samples (e.g., 10000) at a specific acquistion rate (e.g., 1MHz), and writing this data to file - and repeating this acquisition/logging at a specific repetition rate (e.g., 50Hz).  Pretty straightforward I think, but I am unsure of how to go about doing this in order to maximize the repetition rate.     
    Any insight is appreciated!
    Thanks,
    Vic

    First thing's first: get the acquire and log working.
    Look in the example finder for a simple Analog Input (don't remember the exact name right now).  You will want to configure the task to be Finite Samples.  So you acquire N samples at Fs rate, read the data, and log it to a TDMS file.
    Once you have that working, put it inside of a While loop.  Use a wait inside of the loop to regulate how often you run this task.  You can actually setup the task before this close and close it out after the loop.  Same for the TDMS file.

  • What are supported sampling frequency and digitization rates for Zen Micropho

    Some MP3's are playing back slowly. It is inconsistent, though, since files with the same digitization rate and sampling frequency will behave differently - some right speed, some slow.
    The bulletin board says:
    "My tracks don't play at the correct speed e.g. they play too slowly, why?
    Chances are they are encoded in an unsupported sampling frequency..."
    How do I find out what the supported sampling fequencies and digitization rates are?

    Thanks for the info. I guess I was looking for something more specific - the exact bitrates and sample rates that Creative claims to support. Would you know where official and comprehensi've data can be had? There must be a tech spec somewhere.
    It is common these days in business to see a recording of, say, a conference call or seminar presentation at 32k bitrate/025Hz, or even 24k bitrate/8000Hz, posted to a company's website for download by those who could not be there, and MP3 players are increasingly used for their replay. Companies use low digitization rates because there is no need for hifi and the files are much smaller: less storage, faster download.
    I'd be surprized to think that Creative don't have compatibility with the standard range of rates offered by ubiquitous programs like Audacity and dBpower, the latter being one they themselves recommend!

  • Video Playback Problem with Developer Walkthrough of the Continuous Measurement and Logging Sample Project

    Hi!
    I have serious problems playing the video Developer Walkthrough of the Continuous Measurement and Logging Sample Project.
    As the video pauses every few seconds for buffering. I am not able to watch it. Just wanted to check if you can playback the video:
    http://zone.ni.com/wv/app/doc/p/id/wv-3401
    This happens on any browser (chrome, ie, firefox). I am using Win XP and the latest Adobe Flash Player. About 2 weeks ago NI Germany confirmed the problem and promised to contact NI USA as they are responsible for these videos. So far nothing happened. In the meantime I received an e-mail that the problem could not be confirmed although they had confirmed it before...
    Thank you for any feedback.
    Regards,
    Anguel

    Hello ctVolFan,
    As indicated in the "support" section of the SPOT, you should get in touch with self-paced-training(at)ni(dot)com.  I don't believe that team monitors these forums directly.
    Regards,
    Tom L.

  • How to measure and log frequency with fieldpoint CTR

    Hi,
    I am developing a data acquistion and control system for an engine dynamometer using the fieldpoint modules and Labview.  One of the most important signals is the engine speed, measured in RPM.  The RPM signal is a 0-12V pulse where one pulse equals one revolution of the engine.  As well as being an important piece of data for later analysis, engine RPM will also be in the input into a PID controller, so the signal must be both accurate and have a high measurement frequency. 
    Currently I am using the FP-CTR500 modules to measure the frequency of the signal.  I am already aware of the included frequency measurement VI example, as well as the one posted before for low frequency measurements, and I have gotten both to work with my setup.  I would be using the low frequency VI becuase the max frequency measurement would be in the 200Hz range. 
    The first problem I am having is with the structure of the VI and how the data is output.  The case structure in the VI activates when the counter is read and resets the counter, then switches to the next case.  I would like the RPM number to output out of the case structure into a write_to_file VI and PID controller input.  The problem is that when the case switches, the counter is reset to 0, which will be recorded in the written file. 
    This is some example output data (RPM):
    1232
    0
    2321
    0
    2400
    0
    2521
    0
    The data is being written correctly, but of course I can't have 0 readings when the case structure changes.  This would be especially problematic when input into a controller VI. 
    The next problem I am having is with sampling rate.  If I were to use the low frequency measurement VI, the sampling rate of RPM would be variable based upon the the speed of the signal.  Or, the original frequency measurement VI has an adjustable sampling rate.  Of course, in my system there are a number of other signals that need to be recorded at the same time.  I have found that as I am collecting data, the "write to file frequency" is entirely dependent on the read frequency of the frequency measurement.  Therefore, if I had set the read frequency VI to read at 1 Hz, data will be recorded only every 2Hz.  Ideally I would like an overall measurement frequency of all channels (mix of analog and digital) to read between 20-50Hz, but if I am limited by the frequency measurement. 
    Any ideas on how to solve this problem, either through Fieldpoint or Labview?
    I can post my VI if this help.
    Thanks,
    Huang

    Thanks for your reply. 
    I should probably describe my current setup before I go into anymore details with the problem.  As for my specific setup, I am using an FP-1000 connected with an AIO600, AI110, CTR500, and TC120 all running through the RS232 line to a desktop running labview 8.  The actual counter module is reading a tachometer signal output from a separate engine controller.  THe output is a 0-12V ON 50% duty cycle signal.  As for data logging, i am simply using a "write to measurement file"  Express VI.  I have a while structure which holds all of the express VIs which access the fieldpoint IO, and these are all routed to the "write to" VI. 
    As for the specifics of the data logging problem, as I said, when I set the count frequency of the "Fieldpoint Frequency Measurement" VI to 1Hz, (which means the VI calls the case structure at 2Hz), the "write to measurment file" VI is called at the same rate (2Hz).  Which means that the overall logging rate of the VI is only 2Hz.  Is there someway to decouple this? 
    I was able to solve the problem of calling the frequency variable from the case structure by using a local variable which is called outside the case structure. 
    And now I have been having a lot of problems with reading the actual frequency from my engine controller.  THe actual signal will only range from 0 to around 200Hz.  I noticed, by comparing the actual signal to what was being read in my labview program, that after around 80Hz the signal increases by around 1.5times more than the actual signal.  ie.  Actual signal = 100hz, Read Signal = 150Hz.  After trying to figure out what was the problem, I decided to change the Noise Filter settings to 200Hz.  It actually worked for all the frequency ranges up to around 150Hz but after that the filter attenuates the signal to the point where the actual signal is 160Hz, but is being read at 100Hz.  My question is if there is a way to change the actual filter setting outside of the 2 given setpoints (200hz and 40khz) or if you have any other suggestions on how to fix this problem?  I was thinking of creating a noise filter input in MAX so that i could play with the values in Labview, but am i only limited to those two filters? 
    Thanks again for your help,
    Huang

  • Add multiple simultaneo​us data sources to Continuous Measuremen​t and Logging Template

    I am looking at using the  Continuous Measurement and Logging sample project as a starting point for my project.  The template shows the use of a single data source at a single rate.  In my case I have multiple data sources that will arrive at different rates and need to come together and be logged to the same file with the fastest arrival dictating the log entry and the slower data would be their last values.  It is a slow data collecton process ranging from 1 second to around 10 second sample rate.  More of a monitoring application with logging than a data aquisition application. Since the waveform data type is base-t  plus delta-t and my data arrives at varying rates, my first task would be to remove the use of it and define a typedef for my data. I would use a single logging message loop, but what approach can anyone recommend for the aquisition?  I imagine separate aquisition message loop vis for each data source but what about placement?  Placing them all at the top level vs placing them within a the existing aquisition message loop vi? Any other thoughts or recommendation are appreciated.  Thanks in advance!

    if you want to sample one channel at 10/s and an other one at 1/second....  How is your file going to look like?  Does this mean that for the slower channel you just want to keep the same value for the other 9 values?
    The sampling speeds that you are talking about are really slow.  It would certainly not hurt your hardware to sample eacht channel with the same speed.  And it you really just need one sample every 10 second, you can always decimate you array of values.
    For instance :
    channel 1 : 1 point per second (sample ratio) => 10 points in 10 seconds
    Channel 2 : 1 point per 10 seconds => 10 points per 10 seconds (same sample speed) => decimate array (keep 1+/10 values) => 1 point per 10 seconds
    This is going to be the easy way, or you want to start with parallel loops running, but that's "not that simple" anymore
    Kind regards,
    - Bjorn -
    Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's
    LabVIEW 5.1 - LabVIEW 2012

  • Slow Log Rate Needed using cDAQ-9174

    All,
    I am logging strain data for a thermal sweep we are doing on one of our products.  The sweep occurs over a long period of time (48 hours) so I realistically want to log one signal per second.  I tried using a continuous sample and then subsetting it, but I can't get it to 1 sample per minute which is where I want it to be.  Does anyone have any suggestions on using the subset (or another method) to slow down the capturing of data for the log?
    Thanks,
    Adam

    Nice, sounds like you've figured it out.
    The 9235 does indeed have a minimum sample rate of 794 S/s when using the internal timebase.
    For future knowledge, here's what I would do to simplify things a little:
    Set your "Samples to Read" to match your "Sample Rate".
    -Since we have a limitation of nothing less than 794 S/s just set them both to 1k for simplicity.
    Create an Amplitudes and Levels step and select your strain channels as the "Export to DC Value"
    -This is a step I use for almost every test, strain especially. It will take your raw Waveform signal and turn it into a Scalar signal. Honestly not sure whats going on behind the scenes here but there's some averaging it does between the samples to read and the sample rate. Basically it works out to be a smoothing filter which yields a much cleaner signal for your final output signal.
    To determine your actual sample RATE when recording scalar signals, divide the samples to read into the sample rate.
    In our case 1000 samples to read divided by 1000 Hz is 1 S/s. Try it, I think it'll be inline with what you're looking for. I just ran a test file to be sure and with the above settings I recorded for 10 seconds and got 10 data points in my data file.
    I never save my data to log file either, I save to ASCII exclusively but the results should be the same whether you use the "Record" option or "Save to ASCII" step.
    Hope that helps!

  • LOGGING RATE IN LABVIEW 7.0

    is there an easy way to set a a different logging rate than the scan rate when moving data from DAQ assistant VI to Write Labview Measr. File VI.

    Hi Saridi,
    From what I understand you�re trying to acquire data at a certain rate say X Samples/s and then you only want to record a subset of the data. For example if your logging rate is X/2 Samples/s you would only record every other data point returned by the board.
    The data is returned by the DAQ Assistant as the dynamic datatype. What you�ll need to do is manipulate this data to eliminate the samples you don�t want to write before you pass this data to the Write LabVIEW Measurment File VI. You can convert the dynamic data type to a waveform which you can then manipulate using the Convert from Dynamic Data VI. If you double click on this VI you can choose the type of data you want to convert the dynamic data to. Once you have the data in th
    e waveform type you can then extract the data from the waveform using the Get Waveform Components function. You will then have the data in the form of an array and you can use the Decimate 1D Array function to pick out every other (or every third etc) element. You then need to rebuild the waveform so that you can pass it into the Write to LabVIEW Measurement File VI. One thing to remember is the dt for this new waveform is different from the original because you only have half as many samples. Please take a look at the attached screen shot for an example of the method I just described.
    I hope this helps!
    Sarah Miracle
    National Instruments
    Attachments:
    df_5_24_04.bmp ‏252 KB

  • Help required for sample and Hold

    Hello,
    I am working on a project Cerebral Oxygenation Monitoring. The concept is similar to pulse oximetry. I help already developed the hardware that includes the timing circuit , led driver for driving Red and IR Led, Amplifier and Filter Stage. I am getting the pulse signal but it is multiplexed signal corresponding to effect of both Red/IR Led. Now to separate it I need to use sample and hold circuit, whihc I can achieve with and IC LF398 but I want to minimise this part and directly take this multiplexed signal through DAQ Card in to LabVIEW and further create sample and hold in LabVIEW.
    The sampling needs to be in synchronus with the Timing signal given to Red and IR. How I can achieve this in LabVIEW.
    For eg: the Red Led is triggered with a pulse of 1 ms with a repeatation rate after 10 ms. So this timing pulse should trigger the sampling part.
    Please Help.

    CoastalMaineBird wrote:
    Not sure what you need the HOLD part for.
    Correct me if I'm wrong:
    You have a 1 mSec pulse, every 10 mSec.
    Each pulse triggers two LEDs:  RED and IR
    You have a single signal which contains the processed (through the body, or whatever) responses to BOTH of those signals.
    So, how does a S&H, hardware or otherwise, separate the two responses?
    Is one delayed in time, relative to the other?
    YES you are right, 1 mSec pulse, every 10 mSec. 
    Above figure shows the trigger pulses generated using standard hardware. One triggers IR and other triggers RED. In above case  I had kept repetation rate 4msec
    This is the signal which I may get
    Now how do I separate both of these signals in LabVIEW

  • Play audio samples in different rates

    I need to play samples from differents rate, I'm working about speech and most of the time, the rate of the file is 16000Hz, the sound VI from National instrument don't allow a rate different from 8000, 11025, 22050 and 44100...
    Maybe, It could be possible to change the DLL "lvsound.dll" include by National instrument but I haven't the source code.
    I also have the same problem for recording speech.
    Thanks for your help

    Under windows 98 or 2000, you can do the following to play the rates not supported by the NI lvsound.dll. Use activX container, select Windows Media Player (v 6.4 and above). Pass the complete path of the wavefile you want to play to the property node and enable the play action. Oh, you can not only play sound files but also media files supported by the WMP. The NI's write to sound vi can be modified to write wave files with any rates.
    I haven't tried the recording side so I don't know it works or not.
    Hope this helps you.
    Joe
    Roush Industries, Inc

  • [svn:osmf:] 12641: Improvements to the DFXP parser, captioning sample, and a bug fix for the TemporalFacet ( duration timers were not taking account of the media being paused).

    Revision: 12641
    Revision: 12641
    Author:   [email protected]
    Date:     2009-12-07 21:10:00 -0800 (Mon, 07 Dec 2009)
    Log Message:
    Improvements to the DFXP parser, captioning sample, and a bug fix for the TemporalFacet (duration timers were not taking account of the media being paused).
    Modified Paths:
        osmf/trunk/apps/samples/plugins/CaptioningSample/src/CaptioningSample.css
        osmf/trunk/framework/MediaFramework/org/osmf/metadata/TemporalFacet.as
        osmf/trunk/plugins/CaptioningPlugin/org/osmf/captioning/parsers/DFXPParser.as

  • Are there any PC cards which have sample and hold capability

    Are there any PC A/D cards which have sample and hold capabilities up to a 10 Khz sampling rate which we are interested in for modal testing of engine structures. Also if this type of card is available what would be the maximum input channel count of this card. We would be interested in the highest count available up to 64 channels.
    A second question: We currently have a 64 channel PCI 6071 capable of 1.25 MS/s throughput. If we are using all 64 channels what would be the interchannel delay between the first and last recorded channel and at what frequency would we have to be sampling to even be able to see the affect of the interchannel delay of this specific card.
    This issue has been debated wi
    th in our group and your insight would be appreciated as you are the experts in this field.

    Dear Sir,
    Thank you for using NI Developer Zone.
    National Instruments has a product line designed specifically for acquisition of dynamic signals, it is called DSA - Dynamic Signal Analyzers. In according to the description of your application the card that best fits your needs is the NI-4472 that is available in PCI and PXI format. This card is able to acquire 8 channels simultaneously, as opposed to the regular DAQ cards that have a single A/D converter and a multiplexer. The NI-4472 has 8 Delta-Sigma A/D converters one per channel, what results in a better performance than having a single A/D converter in combination with a sample and hold and a multiplexer. To Acquire 64 channels you would have to have 8 boards and synchronize all 64 channels. The Synchronization process is very simple and with a couple of software calls we can synchronize as many as 112 channels for simultaneous acquisition at 102.4K samples per second per channel.
    Regarding your second question, the PCI-6071 will sample between channels in a single scan at the maximum sample rate of the board (1.25 MS/s) but the
    scan rate, i.e. the rate in which the same channel is sampled is defined by the user. Being that said, we can conclude that the interchannel delay will be the inverse of the 1.25 MS/s clock, or 0.8 micro seconds.
    For a 1 KHz sine waveform, this represent a phase delay of 0.288 degrees between consecutive channels. For a channel list of 64 channels each one having the same 1 kHz sine waveform, the phase delay between the first and the last waveform will be 18.432 degrees.
    I really recommend the NI-4472 as a very good solution for your application, besides that the combination of the NI-4472 with LabVIEW and the sound and vibration toolset will give you a tremendous tool to solve not only your immediate need but also provide you a system that will be easily modified and adapted for future needs.
    If you need more info, feel free to contact me and I can give you more details about this product.
    Call 1 800 IEEE488 and ask to speak with the Computer Based Instruments (CBI) support team.
    Best Regards.
    Omar De Andrade
    Applications Engineer - Computer Based Instruments
    http://www.ni.com/support/

  • Separate drives for samples and audio files..?

    Hello all
    I am moving to Macbook Pro (previous gen) with Logic Studio after years of PC (feel like I’m standing on the edge of a precipice staring anxiously down!). Will be looking to use it live in our 3-piece band to run existing MIDI Files and live triggered BFD drum samples
    Have decided on getting an Echo AudioFire 8 to handle the necessary Audio outs and MIDI connections and will be replacing our rather dated Korg 05R/W General MIDI module with virtual instruments / samples libraries
    I am thinking that once the Bass (probably Orange Tree CoreBass samples through Kontakt 3) and Orchestration (still wide open to suggestions on that!) are done, they’ll be exported as Audio files or perhaps ‘frozen’ in Logic to ease the load on real-time processing
    Here’s the query then:
    *Assuming that the internal drive will be for OS and programs only, will having the sample libraries and exported audio song files on separate physical drives from each other pay dividends – particularly when considering that the audio tracks (probably no more than two or three stereo files) will be streaming whilst BFD is triggering live samples via MIDI input..? I’m wondering if the samples and audio separate drives situation will be considerable beneficial, or given the intended application, would this approach be merely over-speccing things?*
    If that is thought to be the best approach, what do you believe to be the best way of hooking these up? I plan on using the FW400 port for the Echo AudioFire 8 and have ordered a Sonnet Express eSATA Card to hook up an external drive. Should any additional drive look to use the FW800 port or should I simply tag into the spare eSATA port on the Sonnet Express Card..? My concern with the latter is that a bottleneck would occur in the Express port and defeat the whole object
    I would really appreciate any thoughts on this
    Many thanks
    Clive

    My opinions:
    If you're really only talking about 2-3 audio tracks per song, having them on a separate drive is not going to make that much difference. I'd recommend just using one drive for both audio and samples for now, you can always add another hard drive later if you're getting disk errors, or if you start using more audio tracks.
    If you're looking for a good orchestral library, I recommend Vienna Symphonic Library Special Edition (about $500). VSL sounds great, and this particular set is much cheaper and still gives you a good amount of instruments/articulations.
    If you do go with a third drive, use both eSATA ports. Even with a little bottlenecking, you should see substantially faster performance than with FW800. The data transfer rate of eSATA is over 3 times that of FW800.
    Message was edited by: jdredge

  • Developer walkthrough fails on Continuous MEasurment and Logging

    I am having problems watching these two videos:
    Developer Walkthrough of the Continuous Measurement and Logging Sample Project
    http://www.ni.com/video/2741/en/
    Developer Walkthrough of the Continuous Measurement and Logging Sample Project
    Queued Message Handler Template Documentation
    http://www.ni.com/video/2728/en/
    It gets stuck at the start saying Slide 1/1: Buffering.
    I have downloaded the latest Adobe flash.  A guy from NI support rang in response to my question to them and said that it worked on Chrome for him.  I tried that and they don't work for me.
    Can anyone help?

    OK, one update from my side:
    On my machine (Win7, 64bit) it is working when running Firefox 29.
    Using IE9, the link to the video seems to lead back to its page, no popup, nothing.
    Point is, that my IE (since IE8) is obviously not 100% compatibel with Adobe Flash player. For instance, i have issues to play videos from YouTube on the machine using IE (error messages like Flash not installed or simply a blank screen instead of the video) but not for all videos there. With Firefox, i can view all videos from YouTube except the ones which are prohibited from YouTube due to national restrictions ("This video is forbidden in your country" or something like that).
    So all in all, it seems to me that the issues you all observe are issues between the browsers and Flash, invalid settings for popup-blockers and specific "error handling" of specific browsers (which create the "loop-link-behavior").
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

Maybe you are looking for