How to get exactly the same number of samples every trial

Hi,
Here is what I want to do.I would like to show using an numeric indicator the expired time increase from 0 to 2 seconds. At the end of this two second period, I want a second numeric indicator to start incrementing from 0 to 3 seconds. I am using a USB 9237 DAQ. Sampling frequency of 2k Hz, and samples read of 500. So far, here is what I have put together.
The first problem I have is that the first indicator does not start at 0, it starts at .25. The only data I care about is the data during the 3 seconds of "Full force". For this reason, I multiply my signal by 0 except for during the "Full force" period. The problem I am having is that I am not consistently getting 6000 samples. Sometimes I get 5500. If however, there isn't exactly 4000 frames before the "full force" data, then my average will be off. I only start to write to .tdms when the "Start Trial" button is pressed
Is there a better way for me to get this 2 seconds then 3 seconds time setup?
Any help will greatly be appreciated.
Regards,
Johan
Attachments:
Timing Section.vi ‏40 KB

JHendrik,
That increments you are seeing are due to DAQ code for sure. If ou are sampling at 2khz and want 500 samples, then it'll take .25 seconds to retrieve those samples. While that retreive is happening, your other code may not execute (depending on data flow) becaue it's waiting for the DAQ samples to be returned. By your description, I would guess that the Elapsed time VI is being read after you get your samples, which would be why you don't start at 0 seconds. Try fixing your data flow so that the elapsed time is read first.
Ben Sisney
FlexRIO V&V Engineer
National Instruments

Similar Messages

  • How do we maintain the same number?

    We are in the process of signing up for another year and are concerned the number we've used will expire and we will be forced to get a new number.  How can we maintain the same skype number with the new year's subscription?  Is this automatic?  Are we on the panic button for no good reason?  Please advise...
    M & P @ DVillage

    the subscription will automatically renew with the same number, but even if it were to expire, the number is held for you for 90 days
    Regards,
    Neil

  • How to apply exactly the same black band, to exactly the same part of the page, to 100 pages?

    Hi there,
    The more I refine my project, the more I tweak elements that, when I first created a Master Page, I didn't worry about enough.  So now, for example, I've created just the right size black band to be the background for each and every page (in the recipe part of my book), and I'd like to put it on each of these pages just like this:
    X:  8.4399
    Y:  -0.125
    W:  17.7198
    H:  1.5306
    As I've been working on my book, it usually seems that when I copy something from one page to another, I have to shift its positionthis way and that.  Is there a technique I can use so that when I apply this new/improved black band to each page, it will be placed in exactly the same place everywhere?
    I realize that I can go to each page and paste in the black band and then enter the X, Y, W and H listed above... but that's going to take me such a long time (and give me carpal tunnel).  This app is so smart, I'm thinking there must be a better way.
    If someone knows it, I'd really appreciate learning it.
    Thanks,
    Malcolm

    Get it positioned as desired on one page.
    With it still selected > Edit > Cut.
    Go to your master page.
    Edit > Paste in Place.
    You may have to reapply your master, depending on what else has transpired since it was set up. Then it will appear on every page to which the master is applied.
    If it is best positioned "in the back" (it sounds as though that might be the case), you can paste it on a new layer and drag that layer to the bottom of the stack.

  • How to get only the whole number omitting the decimals

    Hi Experts,
    I want to get only the whole number of a output field. For example  i am getting an output as 8.766 , i need only the value 8 .
    I checked by moving the values to integer field but i am getting the rounding value 9 .
    I want only the whole value 8.
    Please help me out..
    thanks & Regards.
    Reena..

    Hi Reena,
    Unfortunately when you assign a packed number to a character, numeric or even a packed no without a decimal value SAP does a internal conversion of rounding these value. So direct assignment would won't work for your case.
    You can use the following logic instead for getting the whole number.
    DATA : LV_VAR1 TYPE STRING,
                LV_VAR2 type p DECIMALS 3 value '8.766'.
    LV_VAR1 = lV_VAR2.   " LV_VAR1 would contain 8.766 without rounding.
    write  : LV_VAR1(1).   " LV_VAR1(1) contains 8 which you can assign to any target variable.
    I think there is no addition so as to avoid this internal rounding.
    Try and let me know if it works for you..
    Cheers
    Ajay

  • How do you apply the same password policy to every PDF document you create with inDesign?

    All,
    Adobe peeps!,
    I don't know if this is really supported with inDesign 5.5, but here is my my use case:
    I constantly create more than 10 PDFs a day using inDesign
    On  all PDF's I create, i want to apply password security to protect them
    But in order to do so, within inDesign, I am   always forced to go to the "security dialogue" pane to set up the same permission  and passwords over and over again
    This gets tiring :/
    So what I am hoping to do is  the following:
    Like acrobat, I want to create a password policy within inDesign
    I want all PDFs created to have such a password policy  be automatically applied
    I know acrobat supports something like this (http://help.adobe.com/en_US/acrobat/pro/using/WS58a04a822e3e50102bd615109794195ff-7d68.w.h tml), but, unless I may have missed something, the Acrobat feature is limited. That is, the help link  does not tell me how to automatically do this with Acrobat either (the link does not explain to me how to "automatically apply the same password security policy to every PDF document I save within the application). I think the only way to do so is via "Adobe LiveCycle Rights Management ES", but for non server users, I am hoping there is another way.
    So my questions are:
    Is it possible to create password security policies in inDesign?
    Is it possible to apply the same password security policy to every PDF i create in inDesign?
    If not, can I change default settings within Acrobat ProX to automatically apply a password security policy everytime I save a PDF?
    If all fails, do you guys know of any extensions that can support this?
    Any help would be great. Thanks!

    Steve,
    Thanks for your notes. To follow up on your response.
    Bummer. I kinda had a hunch at this inDesign limitation.
    I have been aware of the method for setting up of a security policy within Acrobat. While this feature does cut down some of the work involved in creating and applying password policies to pdfs, what I am looking for with Acrobat is to apply the same password policy to every document I save from the app. Automatically. Without having to manualy select a policy.
    I think my solution will have to lie in me creating some sort of script to help support this need. I don't think Acrobat Pro X has the capabilities to allow me to tinker with, say, creating a save PDF preset that will allow me to automatically apply a password policy.
    PS. I am using acrobat pro x.

  • Combining PDFs, how to get them the same size?

    When I combine a scanned document with a typed word document into a single PDF, the scanned document saves as twice the size of the word document. How do I get them to combine and be the same size? (Length and width not file size). Thanks.

    What are the sizes of the pages in the two files? You can check this by hovering the mouse at the bottom left of the PDF.

  • I am getting EXACTLY the same "you don't have the required permissions" message that I see all over the net.  64 bit windows 7 ultimate. Many uninstalls and reinstalls.  Yes, Itunes is in the program files x64 directory.  Yes I get the same error there.

    I'm getting the same error message as many other when I try to start Itunes.  It was working correctly until I got an ipad 3 and installed some of the associated tools.  Have uninstalled and reinstalled many times.  Yes it's in the program files x64 directory.  Yes I get the same error when I try to start direct from that folder instead of menus or desktop shortcuts.  Did some registry cleaning.  Nothing helps.  Windows 7 ultimate, 64 bit.  Please help.

    The install fails with the error: "installer has insufficient privileges to access the directory >c:\ProgramData\Microsoft\Windows\StartMenu\Programs\itunes. The installation cannot continue". My user account is an admin account. I then retried the install by right-clicking and running the install with Admin Privileges. Same error results.
    I don't have a Windows 7 box in front of me, so can you check something for me?
    Navigate to that location on the PC look at the itunes item you see there. Is it a shortcut to your iTunes program file?
    If it's just a shortcut, try dragging it out onto the desktop and doing another (64-bit) install. (With a 32-bit already in place, it may just offer to do a "repair install" instead of a full install.
    Do you still get the error message or does the install go through smoothly this time?

  • Can anyone help with facetime? im getting missed calls but it doesnt actually tell me i have an incoming call....and the person im trying to contact gets exactly the same.....just missed calls?

    can anyone help with facetime? im getting missed calls but it doesnt actually come up with an incoming call.....the person im trying to contact just gets missed calls also?

    I've noticed that once you miss a call on FaceTime on a desktop Mac, it won't work properly again until you restart the machine.
    I sent in Feedback so we'll see how that goes.

  • My iphone is broken and i am getting a new one sent out. How do i get everything from my old phone copied to the new one so its exactly the same??

    My iphone is broken and i am getting a new one sent out. How do i get everything from my old phone copied to the new one so its exactly the same??

    As long as they are already ticked in your iTunes then yes. Just to check do a sync and as long as everything stays the same you are good to go.

  • I'm using same icloud and same apple ID on two iphones. Now i get calls from same number on both iphones at the same time. How to turn off that?

    I'm using same icloud and same apple ID on two iphones. Now i get calls from same number on both iphones at the same time. How to turn off that?

    Apple ID's are not device specific, so when you changed it on the iPad 2 it changed it on the iPhone 4 as well, since it's the same account still. What you need to do is create a second Apple ID (so you'll have two accounts, one for iPhone 4 and a seperate one for iPad 2).
    To create a new Apple ID on your iPad 2:
    1) Go into Settings > Store.
    2) If you are already signed in, tap your Apple ID on the screen and you will be given a few options, one of which is to sign out of your account.
    3) After you sign out, now click the "Sign in" button.
    4) Tap "Create New Apple ID" and follow the instructions on-screen.

  • I keep getting calls from non existing area codes and phone numbers.  They are never the same number twice.  How do I stop this?

    About a week ago I started getting phone calls on my cell phone from numbers that do not exist, including the area codes.  I can not report these to the Do Not Call list because the area code is non existent.  I'm getting these calls all the time now and never from the same number twice so there's no point in blocking them.  If I answer I may or may not get a person who has an accent from India so heavy that I can't understand what they are saying.  This is getting to the point where I just want to cry I'm so frustrated.  Anyone else having this issue or does anyone know how to stop it?
    Thank you

    I'm sorry that you are having all these troubles. I have sent you a private message.
    Anthony_VZ
    **If someones post has helped you, please acknowledge their assistance by clicking the red thumbs up button to give them Kudos. If you are the original poster and any response gave you your answer, please mark the post that had the answer as the solution**
    Notice: Content posted by Verizon employees is meant to be informational and does not supersede or change the Verizon Forums User Guidelines or Terms or Service, or your Customer Agreement Terms and Conditions or plan

  • I have lost my blue applications folder from dock the one with the A on  how do i get it back exactly the same as it was

    I have an Imac with snow leopard 10.6.8 and have lost the blue applications folder with an A from my dock please how do i get this bck in exactly the same format?

    To make the icon look like this:
    Right click and select this option.

  • Help.  My daughter backed up her iPod but copied all the info from my iPhone.  So now the iPod and iPhone have exactly the same things.  How do I get all her stuff back on her iPod?

    Help.  My daughter backed up her iPod but copied all the info from my iPhone.  So now the iPod and iPhone have exactly the same things.  How do I get all her stuff back on her iPod?

    Restore her iPod for the the backup of her iPod on the computer that she syncs with. For how to restore from backup see the restore topic of:
    iOS: How to back up

  • HT5622 My husband and I share the same apple id for our iphones, how do we change the phone number associated with our apple id to his phone number? He is getting my messages because the ipod has my number in it not his?

    My husband and I have iphones that use the ame apple ID, but different numbers and email addresses, how do we change the phone number that is associated with his ipod to his phone number?

    Use his ID for Settings>Messages>Send And Recieve and for Settings>FaceTime.
    If he does not have an ID then
    Create a NEW account using these instructions. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before.
    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card

  • I keep getting an error code that my billing info doesnt match my card info.  I verified with my bank, the bank card, and my itunes account and all are exactly the same.  I need this crap fixed, how?

    I keep getting an error that my billing info for my card doesnt match my bank info, but it does.  Nothing has ever been changed.  I called my bank, the card company, and all are exactly the same, word for word as my billing info in iTunes.
    In fact, every time I get the error code that billing doesnt match, my card gets charged a $1.00 authorization fee.  It later falls off, but it shows my card is being billed when they say they cant verify billing info.
    I called Apple support and they want to charge me to get their crap together.
    I need to do some updates and by a couple apps for work and am about ready to go to ANdroid if I cant get it fixed.
    $##@@$%%$##$%%$$%$!!!!!!!!!!!

    If you're in the US, this is usually caused by the simple fact that what the Postal Service shows as your address does not match what you're entering. Go here & see:
    https://tools.usps.com/go/ZipLookupAction!input.action

Maybe you are looking for