When the integral function is placed inside a wait until next ms multiple is it reset at the beginning of each loop?

When the integral function x(t) is placed inside a wait until next ms multiple while loop is the Integrator reset to zero every time the loop executes?

Hi,
the function works on a discrete amount of data. Hence every call to it replaces the values used first time around.
I've attached an example in LabVIEW 7.0 that uses a pulse generation vi to allow the manipulation of the array sent into the integral object, and then it's easy to calculate what the integral of the data would be.
Hope that helps
Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer
Attachments:
integral.vi ‏39 KB

Similar Messages

  • What is going on "under the hood" of the 'Wait Until Next ms Multiple' vi?

    Hi,
    This question is really for the developers of LabVIEW, and I don't know if they are willing to divulge what might be considered "trade secrets". Anyway, I just thought there's no harm in asking.
    I use the Wait Until Next ms Multiple vi and it works great. For example, if I set my program to output a character on the serial port every 20 millisecond (mS), and check the output on an oscilloscope, I see the output at 20 +/-2 mS (that is, 18 to 22 mS). That's quite good and is all that can be expected on a PC running a non-real-time OS such as Windows.
    My question is this: Since the default Windows timer has a tick rate of 15.625 (1/64th of a second) (some PC's may default to 10 mS), how does LabVIEW attain roughly 1 mS accuracy? If the same thing is coded in any .NET framework program, such as C# or Visual Basic using any of the available timers (the System.Windows.Forms timer or the .System timer), the timer interval may be set in 1 mS increments, but if you time it you will see it actually has a granularity of 15.625 mS. So instead of getting 20 mS I get 2 ticks, or about 31 mS. So I can get an output every 15.6, 31, 47, 62.5, etc. but nothing in between.
    The System.Diagnostics.Stopwatch timer can be use to time code with very high resolution, or to create a high-CPU usage delay loop, but I haven't been able to find an easy way of generating an interrupt (timer tick) at say 1 mS. There are Win API functions that can set the timer to 1 mS on XP and 0.5 mS on Windows 7 and 8 Microsoft, but I have not tried them. (They come with the caveat that another program or process can come along and reset your timer!) There is the "multi-media" timer (now the HPET or High Performance Event Timer"), but it is meant for sound and video at the driver/kernel level, and not for the UI level, as LabVIEW or C# are.
    So how does the 'Wait Until Next ms Multiple work? It obviously is timer interrupt-driven because it yields to other processes (which is a primary reason for putting it in your overall While loop). And is it guaranteed on all recent OS versions (mine was timed on an dual core XP OS)?
    Thanks for any insight.
    Your typical curious engineer,
    Ed

    Ian,
    Thanks for your reply. Yes, I'm sure LabVIEW uses the (default) Windows timer. And yes, 1 mS is not guaranteed due to the preemptive nature of Windows (and even "RTOSs" to varying degrees), which is why I see about plus or minus 2 mS. 
    Apparently the Windows timer can be set by API calls. See: http://www.lucashale.com/timer-resolution/. Here's a screen shot of his TimerResolution.exe on a Windows 7 PC:
    Here it is on my Windows XP PC after I set it to "Maximum" (initially it was 15.625 mS):
    Notice that it sets the Maximum to less than 1 mS, which is supposed to be the max, so there are some bugs. Plus the Default button does not reset it in XP, but does work on Windows 7 or 8. (I know this is not the place to "debug" non-LabVIEW applications!)
    I'll bet LabVIEW sets it, too. The only caveat, as I said, is it looks like another application can change it, since the hardware timer is a "global" timer. I have not seen this issue in my LabVIEW applications, have you?
    I guess I need to do some more digging to see the code to set the timer, but it looks like the developers of LabVIEW have it figured it out.
    (FYI, I did notice that running my LabVIEW app (which gives about 2 mS resolution) or a C# app, which gives 15.625 mS resolution, does not affect what TimerResolution.exe reports, so I'm not sure if it's really working correctly. If I figure it out I'll post the results.)
    Ed

  • Question about the Wait Until Next ms Function

    Hello,
    I met a problem when I tried to use wait until next ms function to control the period of the loop.
    I use Labview2009 now. I wrote a VI to sample the current values at 100Hz and then store the samples in a text file. The currents are sampled once in a loop and then wait for next 10ms to begin the next loop. After 360,000 loops (should be an hour), it will creat a new file to store the new samples in the following an hour.
    I left the VI runs on CompactRio for the whole weekend. The result I got is shown in the picture below:
    24 files should be created in one day. While there were only 3 files created in the firest 24 hours ( from Fri 16:00 - Sat 16:00). And after that it worked very well.
    When I checked the first three files (created from Fri 16:00 - Sat 16:00), I found that it didn't sample at 10Hz. It sampled at the frequency of about 20Hz (sometimes 18Hz, sometimes 19Hz).
    I am confused by the problem a lot. What may cause it didn't work in the first 24 hours and worked after 24 hours? And How could I fix this problem?
    Thank you very much!

    You need to show us some code!
    This cannot happen in a single loop, but can easily happen if you have e.g. stacked loops or sequences containing multiple wait statements.
    Also have a look at these old threads:
    Synchronization problems during measurements (using while loop)
    accurate timing between events
    If accurate timing is important, use a timed loop. Your incorrect times are faster, so I don't think there is a problem with the inner code taking too long.
    LabVIEW Champion . Do more with less code and in less time .

  • Simplest way to display a title or caption at the beginning of each scene?

    I am editing a video to make an instructional dvd covering 23 separate lessons. Without some kind of text in the first few seconds of each scene, there is no way for the viewer to quickly and efficiently distinguish one scene from another as they jump forward or backward from scene to scene. They would have to go back to the main menu between each scene to find the one they're looking for, and that's cumbersome.
    I would like to add a caption/title (not sure what the technical Adobe term is -- I'm obviously an amateur) to the screen at the beginning of each scene. It can be a text overlay on top of the video, or it can be a blacked out screen (or whatever) with text that lasts a few seconds before each scene begins. I just need something to let the viewer know which lesson they are about to see.
    I went through the footage and added scene markers at appropriate places, and the menu is functional. Now I'm looking for the most efficient (least time-consuming) way to accomplish my goal. It looks like one alternative is to manually split the clips at each scene change, then go to sceneline and insert a title between each scene, then manually type in the text that corresponds to my description of each scene. I hope this isn't the only, or the most efficient way.
    Anyone know a simpler alternative? The simpler the better, as only a few people will be using the dvd so I don't want the cost (measured in editing time and effort) to outweigh the benefit of viewer convenience. Thanks in advance.

    I agree with Steve G. on adding the Titles from the PrE Titler function. Also, being new to PrE, this article on Titler might be useful, before you get tripped up by a few aspects of a New Title: http://forums.adobe.com/message/4976998#4976998
    Good luck,
    Hunt

  • Building iDVD project - white flashes at the beginning of each scene during playback?

    I am building a DVD project with multiple movies.  I used the Bronze Wedding in the "old themes" menu, which was less problematic than the 7.0 themes.  When I click on the segment to play, there is a moment (probably just 1 frame) of white that flashes before the segment starts playing.  This is not in my original Final Cut Express movie, and it happens in every segment, not just at the beginning of each movie.
    I used Final Cut Express v.4.0.1, iDVD v.7.0.4 and the entire amount of footage on the project (3 separate movies) lasts a total of 1 hour and 17 minutes.
    Any ideas what this flashing white screen is?

    Hi
    How did You go from FCE/P to iDVD ?
    I do
    FCE/P to iDVD
    Several things
    • How to go from FCE/P to iDVD
    • Free space on Start-up hard disk
    • Encoding
    • Brand and type of DVDs used
    • Burn speed set
    • iDVD BUG
    • Chapters
    How to go from FCE/P to iDVD I do
    • Disable Screen and Energy saver
    • IMPORTANT --> FIRST in FinalCut - Mix Down Audio under Sequence Menu / Render Only / Mixdown
    • Export out as a QuickTime .mov file
    • Select with Mark - Chapter Mark
    • Not as Self-Contained (not important but saves time and space)
    • NO QUICKTIME CONVERSION (IMPORTANT)
    This QT.mov file I import into iDVD from within iDVD.
    Free space on Start-up hard disk
    I set a minimum of 25GB (for Mac OS and iDVDs temp files)
    Encoding
    • I use Pro Quality encoding
    Brand and type of DVDs used
    • I use Verbatim
    • I use DVD-R
    Burn speed set
    • I set down this to x4 (or x1)
    iDVD BUG
    • One can not go back to movie-project for any alterations and then go back to
    the iDVD project. It will notice and ask You to either Up-date or Cancel. Neither
    of them will work.
    Medicine - Start a brand new iDVD project.
    Use of Chapters
    • I only use a to z and 0 to 9 in naming them. NO other symbol/letter !
    • NO Chapter-mark at very beginning - iDVD NEEDS TO set this by it stlf
    • No Chapter marks in or within two seconds from a transition
    (Way around this last one - Export movie as QT full quality and NO Chapter marks
    Import this into a new Movie-project and now You are free to set C-Ms where You want
    them except at very beginning - still)
    Material used to build movie
    • video - I use streamingDV (or convert all other to this eg .mp4, .avi, .wmv etc)
    • audio - I use .aiff 16-bit 48kHz or from Audio-CD (44.1kHz) - no .mp3 or direct from iTunes
    • photos - I use .jpg - no .bmp etc
    Trash iDVD pref file and run Repair Permissions - and have a re-try.
    from post ??
    May not be relevant, but I had the same problem with iDVD, where burned DVDs showed a green screen. It was cured by quitting Quicksilver and Quickeys as well as disabling sleep and screensaving
    Yours Bengt W

  • One second of black appearing at the beginning of each clip in timeline.

    I just got FCP and I'm having an issue.  Every time I put a clip from the event brower into the timeline, there's a second of black at the beginning of each clip.  This is only between clips, not the first one.  If I move a clip to the front, there's no second of blackness before it, but now the one that was put second has the blackness that wasn't there before. 
    I see in preferences, there's a transition setting, but it won't let me set it lower than one.  I figured this had to do w/ transistion effects, but could this be doing it?
    Both video and project are 720p HD 30p Stereo.
    I've googled all kinds of word combinations, but can't seem to find a solution.
    Any help?

    Complete mystery to me as well, and when I have something odd like this, I trot out the following suggestion:-
    Corrupt preferences can create a vast range of different symptoms, so whenever FCP X stops working properly in any way, trashing the preferences should be the first thing you do using this free app.
    http://www.digitalrebellion.com/prefman/
    Shut down FCP X, open PreferenceManager and in the window that appears:-
    1. Ensure that  FCP X  is selected.
    2. Click Trash
    The job is done instantly and you can re-open FCP X.

  • While recording in captivate 4 I get a pop at the beginning of each recording

    While recording narration over a PP conversion in captivate 4 I get a pop at the beginning of each recording,  It doesn't seem to matter if I use keyboard shortcut or the mouse. Any thoughts?
    Paul

    Welcome to our community
    Is the unwanted bit part of the countdown?
    If so, there are a couple of ways to avoid it.
    1. Don't record your narration at the same time you record the actions. Record it separately. No narration means no countdown.
    2. After the countdown stops, consider that first slide to be a throwaway and ensure you don't begin recording in earnest until after you hear the first camera shutter sound.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • My iBook has a blank page at the beginning of each chapter. How do I delete?

    I have a blank page offset to the left at the beginning of each chapter. How do I delete them?

    The first selectable template is "Basic"...  the  template - and any others have placeholder text and images excepting pages "Default" and Blank.  The "Default" page accepts flowing text. "Blank" is just that with only any BG image and page numbering decided in the template.
    Nothing  you describe seems to be part of just opening a standard template.
    Below are screen shots from the  book tree and  the layouts - these are the "Basic" template pages without any modifications.
    Any of the pages  shown in the tree can be deleted. Chapter and Sections will also delete any pages added under them.

  • How do I automatically capitalize the beginning of each sentence in Pages?

    Hello there!
    Please help...
    How do I automatically capitalize the beginning of each sentence in Pages version 5.2?
    The old version of Pages (Pages '09) automatically capitalizes the first word of each sentence. But in Pages 5.2, I have to manually capitalize the first word of every sentence. How can I make this automatic?
    The options in Menu > Format > Font > Capitalization, do not show an option for sentence capitalization. Please help. Thank you!

    Feature removed from Pages 5 along with over 100 others,
    Pages '09 should still be in your Applications/iWork folder.
    Pages 5 is a disastrous beta pushed onto users, and misrepresented by Apple as an "Upgrade".
    Peter

  • Given a multi-line string I want to append a string constant to the beginning of each line.

    Thankyou.

    You could just use "search and replace" with the search string being "\n" (in \codes display) and the replace string as "constant\n". (See attached image).
    If the string you want at the beginning of each line is variable (e.g. line number), you should use e.g. "pick line" or "scan strings for tokens" in a loop, then rebuild the new string.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    AppendConstant.gif ‏9 KB

  • How to use CreateInsert in inseting new row at the beginning of each page

    I would like to insert new row in an editable table bu using CreateInsert. How to insert that at the beginning of every pagination. Let us say, if my pagination is 10, when I insert the record in pagination 21-30, the new record will be inserted and will be the new 21st record. In pagination 1-10, the new inserted row will be the 1st record, and so on.
    The default behavior is the newly inserted record will be at the top of the record where the focus is located. I want the behavior to be always at the top of every pagination. Pls help

    Probably you have to create your own createAndInsert method in view object implementation class and expose it to the client. Then use this method instead of default create and insert action.
    In your new method use createRow() and insertRowAtRangeIndex() methods to insert record exactly where you want.
    Rado

  • Separate clip flashing at the beginning of each clip

    Each clip I insert into my sequence has a brief flash of another clip at the beginning of it.
    When I select the clip and trim the unwanted piece away, the unwanted piece simply shifts to the the next available point on the clip.
    This repeats for every new clip I insert into my sequence.
    What feature is causing this, and how to I turn it off.
    I am new to Premiere, and I am unsure as to whether this is related to the problem, but the attached picture shows a piece extending right from the marker.
    I don't know if this has any significance, but it seem's relatively close to the length of the unwanted piece, and it's all I can find out of place.

    the Micro photo (not sure about the micro) has what your referring to as long as the screen is on. It's a sad known bug. Just set your screen to turn off ASAP and basicly deal with it. Noone on the Head-Fi forums can find a fix for it either

  • Stuttering Sound at the Beginning of Each Imported Track

    I'm using the internal DVD drive on my PowerBook G4 to import songs from CD to my iTunes library (located on my internal hard disk). Often times, the tracks I import will have a half-second stutter at the beginning when I play them back. I'm importing in AAC format at a high bit rate (320 kbps). I've tried this at lower bit rates with no luck. I've also tried using error correction, but that doesn't seem to make a difference.
    What's interesting is that this doesn't happen *every time* I import a CD. For example, I recently bought the Beatles stereo remasters and imported four of the disks the other day. No skips, no problems. The next day, I imported four more disks, and *all four* disks had skips on just about every track (except the first track—the first track is always OK).
    I thought it might be that I was running too many applications at once, and maybe that's what was interfering with the import process. Restarted the machine and opened up iTunes only—nothing else—but the stuttering problem persisted.
    (For the record, I don't think it's a problem with the disks either. I have no problem importing tracks using my iMac.)
    Any idea what's causing this or, more importantly, how to stop it from happening?
    - Keith

    Re-import one of the of the problem CDs in a lossless format, such as AIFF or Apple Lossless. Play a little to verify that the tracks are good. Then use iTunes to convert them to AAC.
    Verify that those new tracks are good, and if so, you can then discard the lossless versions and keep the AACs.

  • How can I add a two second pause to the beginning of each slide?

    Hello,
    I have a project with TTS and perfectly aligned CC notes - 64 slides.  Now the customer would like for there be a two-second pause before the audio begins on each slide in order to allow the user to first become oriented with the slide.  Is there a way I can do this without moving the audio down the timeline two seconds, and then having to adjust the appearance of each of the CC notes accordingly? 
    I was thinking of something like pause two seconds On Enter -- Is this possible?
    Thanks for any help!!
    Ryan

    VTML (VoiceText Markup Language) – This Powerful hidden gem in Text to Speech helps you control the generated speech by adding pause, changing the pitch etc !
    Please use the document linked below to get the more information on VTML tags and its usage.
    https://ondemand.neospeech.com/vt_eng-Engine-VTML-v3.9.0-3.pdf
    Regards,
    Rajeev.

  • Song pause/skip at the beginning of each song

    I've recently been experiencing my music pausing for a second when a new song starts playing. The music will just stop playing for a short time after the song has begun. Sometimes when I quit iTunes and open it back up, the issue is resolved temporarily... But eventually the songs start skipping again. I have the latest version of iTunes, but I'm not sure if that's the reason why this is happening.
    Any suggestions?

    This sounds just like what happens on my Rio Karma and my 5G iPod when I play certain albums containing tracks over 10 or 15 minutes long. Gapless playback isn't quite perfect in these cases, because I think the devices simply don't have enough memory capacity to buffer ahead when they're dealing with such long files.
    I really don't know how to solve your particular problem, and I don't think I've ever experienced this in any version of iTunes since 7.0. It sounds vaguely like a memory/buffer handling problem to me, though. Do the playback problems coincide with anything obvious, such as a large amount of Internet activity with media file caching and so on? If so, I might start by checking your browser, QuickTime, and other application preferences to keep them from caching or at least set some minimal limits. I have been using Cache Out X for years and setting it to run at login and clear Internet-related caches, and I believe this has helped at least to some extent in improving overall application responsiveness and performance.

Maybe you are looking for

  • Screen Sharing and Hot Corners/expose bug?

    I tried searching but I came up with nothing. I have an iMac and a Macbook. On the iMac I have hot corners set up to use expose. On the bottom left I have it show the desktop and on the bottom right I have it show all windows. Now when I use my macbo

  • How to make chat column text wider

    I'm using 7.2 on Mac OS X Yosemite. The chat window shows message text in a thin newspaper style column and I can't find away to resize it to a sensible width. I've disabled compact chat view in the preferences. Is there anything else I can do?   

  • SALES ORDER TIME

    Hi All, where can we see the time at which the sales order is created. (Date can be seen at header of sales order in sales tab.) Points will rewarded. Regards

  • Lumia 730 review

    Hi there,           Its been 15days i have used my lumia 730. I had found some minor issues that can been resolved. Lumia 730 rocks.... 1. Amazing camera quality (front and rear). 2. After installing 86apps (76 in my SD card) in my lumia 730, it just

  • ORA-20001: Rem Unable to generate DDL

    Hi, I am getting the following message ORA-20001: Rem Unable to generate DDL for ORA-20001: WWV_FLOW_GENERATE_DDL.SAVE_DDL_ERROR . when I try to spawn DDL scripts for selected triggers. Thanks, Flavio