What architecture is best for accurate data logging

Hello,
I'm desiging some LabVIEW code for a standard DAQ application that is required to plot about 100 variables onto the screen on several different graphs and numeric indicators, as well as perform some simple feedback control and log data into a file once a second.
I've done this before, and used a simple state machine architecture, where one state takes care of my logging, and I have a timer vi in there that countsdown 1 second and then writes to file.  However, this method makes me miss a second every once in a while.
I started looking into the producer/consumer architecture as a possible remedy for this.  Because I hear it's good for running two things at different times, so I"ll have my quicker loop handling data acquistion, plots and feedback control, and my slower logging loop, executing once a second.  But I don't see how to implement this
questions:
1. is a simple producer consumer the right topology for my application?
2. when I create my queue do I create it a 100 element array (my data for logging) and then enqueue that in my producer loop from my data acquistion, then pass that to the logging VI.... this seems wrong to me, cause I'm going to be enqueing alot of 100 element arrays... and will be de-queing them slowly at once a second..
3. How do I trigger my consumer loop to execute every second, should I set it up as a timed while loop? or should something from the producer loop tell it to?
I'm sure this is a pretty standard thing to do, I'm jus tnot sure how to implment the correct architecture.
much thanks! 

Ok, let's try this.  I've put together an example that should do what you need.  I put notes in the block diagram, but essentially it runs data in a while loop at whatever execution rate you specify, then sends the data to another graph (or in your case, a log) every one second.  Basically, I've used a 100ms execution rate for the while loop, then every 10th time (you can change this if you want), it sends a boolean 'true' to a case structure within the while loop that contains the enqueue element.  The graphs that I included show that it does indeed add a new point to the second graph once a second while the first one is adding a point every 100ms.
The actual wiring of this Vi could be cleaner for sure, but it was a quick and dirty example I put together.  Hopefully this will help you accomplish what you're trying to do.
Regards,
Austin S.
National Instruments
Academic Field Engineer
Attachments:
Enqueue array 2.vi ‏28 KB

Similar Messages

  • HT1423 what memory is best for mac

    what memory is best for mac

    crucial.com and macsales.com test RAM for compatibility.  Go to that site, select your system and follow their recommendations.  Both are highly regarded as suppliers for Mac-compatible RAM.

  • What are the settings for apn data and mms for iphone 4 on straight talk?

    what are the settings for cellular data network APN DATA and MMS for Straighttalk sims on IPhone 4?I cant send or recieve pictures.My service keeps losin signal constantly saying no service then 1 bar,2 bars,3 bars...then back down to no service.It drops calls.Iv been trying to find out the answer to this problem for 2 weeks!I have no Profile selection in my settings either to do wat its showing online on one website.and have entered numerous diffrent APNs and none have worked!!!!PLEASE HELP!!!

    They're asking a question about carrier settings for their iPhone. I think that has everything to do with Apple.
    Maybe they did already ask Straight Talk. I've called Straight Talk before... they're not too helpful.
    You know, this forum would be much friendlier if people in this forum would quit squabbling, & posting comedic replies, not too mention name calling (like I did), when people are just needing some help.
    It's also frustrating that people stick up for the guy who doesn't help, but rather takes the time to post some smart alec reply. Granted, I shouldn't have name-called... some people just frustrate me when they act like that.
    Admittedly, there ARE some grey areas when it comes to carrier questions... but let the moderators do their job when someone is asking innappropriate stuff. And if the mods aren't chiming in, then that's a good indication that what the thread is about IS in fact Apple related.

  • What is the best for me ? ?

    Hello,
    I'll buy a Mac soon and i'm confused as to macbook pro or macbook air ... i'm in college now and work with Photoshop and 3D max .. make some short movie .. So what's the best for me ?

    You should also ask this in the MacBook Pro and MacBook Air forums. This is the forum for the white and black plastic MacBooks that were discontinued in 2010. You should also post this question there to increase your chances of getting an answer.
    https://discussions.apple.com/community/notebooks/macbook_pro
    https://discussions.apple.com/community/notebooks/macbook_air

  • What is the format for the DATE date type in SQL

    I just wanted to know what the format is for the Date type in Oracle 10g SQL. I need to be able to specify to the second, but not further than that. Thanks in advance.

    Hi,
    DATE format is configurable and can be easily changed. I suggest the function TO_DATE. For example:
    to_date('10-20-2008', 'MM-DD-YYYY')
    to_date('20/12/08 20:15', 'dd/mm/yyyy hh24:mi')Regards,
    Miguel

  • HT5282 What security is best for my MacBookPro and iMac? I have had some company asking me to join them to 'clean' and get rid of some unused files. Is this ok, the cost if around $40. I don't mind paying but I am a bit worried they might not be approved

    Hi,
    Am new at this. What security is best for my MacBookPro and iMac? I have had some company asking me to join them to 'clean' and get rid of some unused files. Is this ok, the cost if around $40. I don't mind paying but I am a bit worried they might not be approved by Apple.

    I have had some company asking me to join them to 'clean' and get rid of some unused files.
    Does this company know you use Mac OS X? If so this is a worrysome trend.
    For a couple of years now there have been several scam artists that call you, claiming to be from 'tech support', or your ISP or even Microsoft, reporting that your machine has been idenfitied as being infected and that you need to give them access to your machine to 'clean it up'. In the process of this 'clean up' they thoroughly hose the system by trashing important files and then demand more money in 'recovery fees' to restore the system.
    I've laughed in their face whenever they've called me since they have no clue of how to compromise a Mac system, but if they've started to target Mac users then more vigilence is required.
    http://www.informationweek.com/security/management/microsoft-windows-support-cal l-scams-7-f/240005023
    Just Google 'microsoft support scam' for more reports/variations.

  • What is the best up-to-date, reliablely accurate book for learning PowerShell?

    Hi,
    In my previous thread, I asked why "get-disk" gave me an exception.  Thanks to this forum, I found out that WIN 7, doesn't support the cmdlet.  The book I'm using did not mention this information.  In fact, he distinctly lists
    Windows 7, SP 1 as a viable OS for the commands he wants the reader to perform.  I lost hours on this error. 
    Se la vie. 
    However, I now doubt the book and don't have time to ferret out additional errata.  So, if anyone has a suggestion for a trustworthy book for beginners, please share your knowledge.
    Many thanks!

    This is a duplicate.  This system is gebnerating hundreds of dupes because of constant server errors.
    https://social.technet.microsoft.com/Forums/en-US/861dd4e7-f199-4c8c-ac72-3ffeeeee674f/what-is-the-best-uptodate-reliablely-accurate-book-for-learning-powershell?forum=ITCG
    ¯\_(ツ)_/¯

  • Need help deciding what computer is best for me?

    I am 14 years old and going into high school. I am debating whether to buy the new macbook or take my grandpa's original macbook air. I want to take programing/coding and graphic design classes, so I wanted to know which computer would be best for me?  I like the macbook air for how like and easy it is to carry with me to and from school, but I'm not sure if it would be more beneficial to have the newer technology of the macbook?  Any help or input would be great!  Thanks

    Can the money you don't spend now on a new computer be put aside to buy you a new computer at a later date? That is the key question. The trick with the Air is to avoid using up the harddrive, so the less stuff you have to put on it (games, movies), the better. Other than that, it should be able to do all you want it to do...for now. And given how much you poor students have to haul around in your backpacks , I think it's smart to go for Grandpa's Air and save yourself from hauling around nearly three extra pounds.
    The Air is there and, I assume, it's going to be given to you at a good price ? Use it and see if it does all you need and want it to do. If you find it's too limiting, the Macbook Pros will still be there for you to get. What's more, if you hold off now, then as you near college--or where ever you're going after high school, you can use the money you didn't spend now for something that might be really excellent for your future in coding and graphics.
    If it's feasible, I'd try out the Air for the summer and see if it's for you. The school specials on computers will be going for a while if you find it's not enough and you need more.

  • What format is best for an external hard drive for video editing on a mac?

    What's the best format for an external hard drive for video editing to be use with a mac only? I need to format my new hard drive and want to be sure I choose the right format.

    I concur with Kappy. His suggestion is correct.
    Allan

  • I save my Excel file as .PDF then send it out by email. What program is best for my use?

    I want to send my Excel files as .pdf by email.  I need to know if Acrobat program is best for me.  I purchased a PDF file this morning and I don't think I need that.  From what I have seen, The Acrobat file is more what I need.  If so, then I would like to cancel the PDF file I ordered this morning and replace it with the Acrobat program.  I already have the Adobe Reader XI installed.

    Fay it isn't clear what you are referencing by "PDF file" and "Acrobat file".
    Yes there is the file format "PDF".
    No there's no file format "Acrobat file".
    Anyway, there are a number of ways to create a PDF file from an Excel file.
    From Adobe -
    You can purchase ("perpetual" license or subscription) Acrobat (Standard or Pro).
    After install of Acrobat you will have the Adobe PDF virtual printer which you can use to print to PDF (instead of print to paper).
    After install of Acrobat you will have the PDFMaker which integrates with Office applications.
    You can create a PDF from Excel using the PDFMaker.
    Or
    You can subscribe to Adobe's online service "PDF Pack".
    As a subscriber you go online, point the browser to the service's site, sign in, upload the Excel file and then save the output PDF to your computer.
    With the PDF in hand you originate the email and attach the PDF.
    Be well...

  • What interface works best for GB? NO delay, latency issues please!!!

    What is the best way to record electric guitar or a microphone (for acoustic & vocals) into Garage Band? I tried plugging directly in to the mic input and selected low latency but there still is a bit of delay. I assume I need a USB or firewire interface. What are some good ones that are ultra portable? This is for the road. Thanks for reading.

    Zadamanim wrote:
    wouldnt getting a super CPU fix latency issues? even if it did have to be routed through a thousand places, a fast processor could get it done without latency issues, no?
    Yes and no!
    First, Garageband gives you limited ability to change the size of its buffer, which impacts latency. So even if your CPU were fast enough, I'm not sure if GB would allow you to dial down the buffer size in order to fully take advantage of it.
    Second, latency isn't only a function of CPU speed. There are other places where the audio can get bottlenecked as it makes its way in and out and through the computer. That's why some of the systems that market themselves as ultra-low latency for professional work use PCIe cards in order to shovel audio back and forth faster than is possible via USB or Firewire. For example, Apogee's Symphony System connects via a proprietary PCIe card in order to offer phenomenally low latency rivaling dedicated systems that use the computer only as a host (Garageband is a native system that uses the computer for everything).
    So while a fast CPU is at the heart of the latency issue, there are a number of surrounding issues that also influence it. The workaround of having an interface with its own routing system - so you can listen to your audio as you record before it has a chance to go through the computer and get delayed - is a cheap and elegant, if imperfect solution.

  • What are my options for a data plan + upgrade?

    So my old phone (Samsung Intensity) broke today, and I'm looking to upgrade to a smartphone. I would prefer an iPhone, but really it's not that big of a deal if I get a Droid. I'm eligible for an upgrade currently. What are my options for a smartphone and a data plan? I'm looking for what's the cheapest option as far as this goes. People tell me an iPhone is free with an upgrade, and that the cost is $20 a month, but I just want to be sure.

    Unless you have an old calling plan, you should be able to add a tiered data plan for your new smartphone (i.e., $30 for 2 GB).  If you switched to the Share Everything plan, your monthly cost would be $40 line access + at least $50 for 1 GB data (includes unlimited minutes/texts and mobile hotspot, although the hotspot data usage comes out of your data plan), plus, of course, taxes/fees (and insurance, if applicable).
    You can check pricing for phones via your on-line MyVerizon account if you click on the Upgrade button.  If you are mainly interested in free phones (keep in mind that there's a $30 upgrade fee), there's the Nokia Lumia 822, Spectrum 2, Droid Razr M, iPhone 4, Galaxy Stellar, Marauder, Rhyme, and the Lucid.  Several of those are 3G phones.

  • What would be best for me?

    So I'm heading off to college next year to become a teacher, and I'm trying to figure out what would be the best for me:
    A Macbook or a Macbook Air?
    Obviously, it's going to be used for school work mostly.
    I want it to be a very fast computer, but still have a nice display. I don't actually care if the laptop is bulky or awkward to carry.
    Recommendations please!
    Thank You!

    Get a MacBook Pro 15". Neither a MacBook nor an Air have the power, speed, quality, display of a MBP 15". They are only 2 pounds heavier than a MB. And, don't waste your time on a 13" MBP.

  • What's the best for green screen filter  Color Key or Chroma key?

    What is the difference, and what is the best choice for a person standing in front of a green screen.
    Color Key or Choma key?
    Which offers the most solutions for dealing with variations in the green background, such as occasional wrinkles/seams in the fabric.
    Thanks
    Rowby

    I did mean Adobe Ultra or previously Serious Magic Ultra. I have no personal experience with Primatte, but have heard very positive reports. For relatively simple work with a good green/blue screen, which is properly lighted and not too much wrinkles, Ultra is easy, fast and effective, but it pays to have a look at the tutorials on how to setup a proper key. When you have rather bad lighting on the screen, Keylight is better and adds more flexibility, but is harder to master than Ultra. It also lacks the MSL (Master Set Libraries) capabilities of Ultra, but if you have never used Ultra before, you may be hard pressed to find any of the MSL's from the Serious Magic era around. Adobe has apparently stopped selling those, apart from the basic one which is included with Ultra. Maybe Karl Soule or Mark Mapes, previous Serious Magicians, can shed some light on the future of Ultra in the Adobe portfolio.

  • JPEG, TIFF(8bit), TIFF(16bit) - what's the best for a FCP timeline?

    I use Aperture to organize all my photos. When I export to use in my FCP timeline what is the best settings to use for photos? JPEG, TIFF, PSD, 8bit, 16bit,etc?
    Thanks,
    Brian

    Also read this: http://documentation.apple.com/en/finalcutpro/usermanual/#chapter=26%26section=1 %26hash=apple_ref:doc:uid:TempBookID-ReplacedWhenAssociatingWithMessierRevision- 44032IMP-1008859
    -DH

Maybe you are looking for

  • Upgrade Path 8.1.6 to 8.1.7.4

    Hi, I have to upgrade Oracle 8.1.6 to Oracle 8.1.7.4. In the Oracle8i Migration Release 3 (8.1.7) PDF documentation, I don't find a upgrade path. So I think I can directly uprade to 8.1.7.4. But somebody told me that I have first upgrade to 8.1.7.0?

  • Upgrading from an iPod Video to an iPod Touch

    I was just wondering if there is a way to possibly trade in my ipod video and so that I get a bit of a discount on the ipod touch? Do I have to do this through the apple store or the best buy where i originally bought my video?

  • Cost Center in actual assessment

    Hi all, I am trying to get a report which shows for a specific cost center the actual assesment cycle in whic it is assigned in a massive way. I know I can find it via KS03 but only for a specific cost center, does anyone know a massive way to do thi

  • Web module generator: conditional formatting

    Hi, I'm trying to generate the following behaviour in a web module. There is a status code in the table and I want it to be colored red when status = 'error' and green when status = 'running' else standard color. The item property "Formatting" can't

  • Skype for Windows 8.1 doesn´t allow me to logout +...

    I have two problems here which started after I got installed Windows 8.1: 1) I seem to appearing online when I´m closing the Skype window (by dragging it down). 2) I can´t logout from Skype for Windows 8.1 app I already unlinked my Microsoft account