Wait function waiting double the normal time

When using either the "Wait (ms)" or "Wait Until Next ms Multiple" functions on most machines with the interval set to 1 ms, the function actually waits 2 ms. However, when using our simulator system (which was set up by my predessessor), both functions only wait 1 ms. The simulator PC is 4-5 years old and work correctly, but all the newer PCs take twice as long.
I suspect that there is some kind of configuration setting somewhere within Windows that he set in order to get the time to work correctly, but I have no idea what it could be, and neither does anyone else that I have talked to.
Does anyone have any ideas?

This is a known limitation on certain processors (and maybe LabVIEW versions?).
See the answer by Robert M. here for an explanation and workaround:
http://forums.ni.com/ni/board/message?board.id=170&message.id=99877#M99877
(Also have a look at the entire thread linked above).
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Wait cursor appears only the first time... unless I don't move the mouse!

    Ah yes, another cursor problem:
    I am setting a wait cursor in my main JFrame when a key-release or a menu item click is detected (the time-consuming action is then triggered in a child JInternalFrame), and so far, it's been working great.
    Then I noticed that the wait cursor only appears the first time the time-consuming action is called (or more precisely, if I never move the mouse, it happens every time as it should, but if I move the mouse, it only happens the first time! Ah, and I noticed I CAN move the mouse but ONLY when it is in the form of the wait cursor!).
    Strangely, I can see the cursor blink briefly when the action is done, precisely when it should be changing back to the default cursor... what gives? If I close the child internal frame and re-open it, I can get the wait cursor again the first time only (again, unless I keep the mouse still, in which case it works great - argh).
    Any ideas would be deeply appreciated!
    Cheers!
    PS - Here's a snippet of how we set the cursor, this is code in our main JFrame, called via either a keypress event or clicking on a menu item - mostly it's stuff that is unrelated, and we simply set the wait cursor as the very first line, so why in the world would it skip that line???? (the rest of the lines do in fact get executed):
    private void refreshMenuItemActionPerformed(java.awt.event.ActionEvent evt) {     doRefreshMenuItemAction(); }
    private void doRefreshMenuItemAction() {
    this.setCursor(new Cursor(Cursor.WAIT_CURSOR));
    JDesktopPane desktop = (JDesktopPane)this.getContentPane().getComponent(0);
    JInternalFrame activeFrame = desktop.getSelectedFrame();
    try {
    if ( activeFrame instanceof IDataDrivenForm ) {
    ((IDataDrivenForm)activeFrame).refresh();
    } catch (Exception ex) {
    ex.printStackTrace();
    this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));

    almost...
    I now see that glasspanes are an answer to that question. I got it to work (almost) using a glasspane (see code snippet below). But what I can't quite grasp now is why this code does not work when I call it from a child (contained) dialog (and possibly internal frames as well)??? When I do so, the dialog freezes (the button I pressed doesn't even release) and the cursor does not change to waiting. This time I'm really not sure where to go next....
    I appreciate anyone who has read this far, and would really be indebted to you for some good advice!
    PS - Here's the nifty code, placed in my main JFrame class. I just substituted "this.setBusy(true);" for every place I was manually setting the WAIT_CURSOR in the past (and of course with matching setBusy(false)):
    public final void setBusy(boolean isBusy)
    Component glassPane = this.getGlassPane();
    Cursor theCursor = isBusy ? Cursor.getPredefinedCursor( Cursor.WAIT_CURSOR ) : Cursor.getPredefinedCursor( Cursor.DEFAULT_CURSOR );
    this.setCursor( theCursor );
    glassPane.setCursor( theCursor );
    glassPane.setVisible( isBusy );

  • HT4085 So does this mean that I cannot have rotation lock off and the mute function off at the same time? In other words, can I have my screen rotate automatically as I hold my iPad in either portrait or landscape AND hear sounds from my apps at the same

    So does this mean that I cannot have rotation lock off and the mute function off at the same time? In other words, can I have my screen rotate automatically as I hold my iPad in either portrait or landscape AND hear sounds from my apps at the same time?

    In other words, can I have my screen rotate automatically as I hold my iPad in either portrait or landscape AND hear sounds from my apps at the same time?
    Yes, you can. You can configure the Side Switch (above the volume button) either as Mute switch or Rotation lock.
    Settings > General > Use Side Switch to: choose what you like the Side Switch to function as.

  • Function that returns the date/time ?

    We would like to make a validation in the Activity status based on the activity End Time.
    Pls... is there a function that returns something that I could compare with: "8/6/2009 01:00 PM" ?
    I know of Today but I understand that today() returns just the day (no time).
    Txs.
    Antonio

    Hi Antonio,
    You can try using the function -: Timestamp()
    To quote the CRM On Demand help files...
    "+The Timestamp function in Expression Builder returns the server date and time converted to the current user's time zone setting. For example, if the current user's time zone setting is set to Eastern Daylight Time (EDT) -0400 UTC, the Timestamp function converts the server time to EDT. The TimeStamp function performs UTC (universal time code) conversion. NOTE: Arithmetic operations (for example, add or subtract) are not supported with the Timestamp() function.+"
    Hope this helps.
    Regards,
    Cameron

  • Why are my header tracks double the normal height?

    I'm running the most recent Garageband (10.0.3) on MacBook Pro 2012 with Mavericks.  All OSX and app software updates are installed.  System is running fine...
    Somehow when working in Garageband last night, the height of my tracks became double the height as they normally are.  I have no idea how or why this happened.  This now being the case, far fewer tracks can fit on my screen when working and it's quite annoying.
    I've tried some fixes that I found in these forums about deleting the display preferences files for individual songs, turning automation on and off, opening and closing Smart Controls, etc and nothing has worked yet.  Many others seem to have experienced this same problem suddenly showing up.
    The only thing that I did different last night that I've never done before is work with an external monitor.  Garageband was open on the MacBook screen, and I was taking notes in an app on the external monitor.  Other than that, I was doing things as normal.
    Has anyone found a definitive solution to this to get the tracks back to normal height?  Would re-installing Garageband from the App Store be a possible solution?
    Any help would be much appreciated.
    Thanks,
    John

    Thanks for the reply leonie.  You're absolutely right.  How embarrassing that I didn't see that in the new version of GB!  I had not added enough tracks to my new song at that point to see them start to shrink on their own.

  • How to call more then one Function modules at the same time

    HI ,
    How to call more then one FM at the same time .
    Modertor Message: Interview-type Questions are not allowed.
    Edited by: kishan P on Jan 2, 2012 2:22 PM

    They are a few different models of the MacBook Pro ranging from 15.4" i7's to 17" i7's. I would use the same models together though when imaging them just like I do with PC's. For example I would Ghost 5 Lenovo T420 Thinkpads at the same time which all share the same exact specs and config. Looking to do the same with the MBP. I have .dmg image of OSX 10.8.1 on a firewire drive which I'm using. I image all my MBP's with this drive, the only downside is I have to do each MBP one at a time.
    Thanks

  • Wait function problem

    Hi everyone,
    I am confused by wait function in LabVIEW. I have a while loop and the calculation time duration for each iteration is about 0.1ms without using wait funtion inside of the loop. However when I tried to add wait function and set the wait time to be 1ms, the average iteration duration became 5ms. Does it mean the iteration took 5ms to run each time? If it is the case, how did I get 0.1ms before using wait function? I also tried to add the wait time from 1 to10 and before 5 it gave me similar answer 5ms after 5 it give me the number I specified to it, so I think it works fine. I also attached my VI to it, I am using cRIO to run this VI so it wont work on the computer but the idea should be clear.
    Attachments:
    Untitled 4.vi ‏55 KB

    Hi Jeff,
    Thanks for your reply, basically this attached vi is only part of my code, and I would like to track the change of different variables on FP so I would like to have local variables inside of the loop instead of using shift register. The index constant is not necessary for sure, thanks for that info.
    However even I have made all the indicators to the outside and changed the array stuff into shift register it still gives me the same result, which is about 5 ms when applying wait function but about 0.1 ms without using it. This is quite unusual, and similar to the speed when i was using timed loop (5ms). 
    Also I am calling the objective function instead of using laview is because I would like to have easy maintenance for ppl not quite familiar with labview could understand the algorithm later on.
    Thanks again for the reply and hope to hear from u again.
    Best Regards
    Jeff·Þ·Bohrer wrote:
    OK First off lets introduce you to the concepts of arrays and a Shift Register:
    First, those index constants are not required-  Hit Ctrl+h- hover over the array index and hit detailed help the default is for each element you grow to increments so, with no index contstants, you get elements 0, 1, 2, ...n.
    Next, you only index them to feed them to indicator's local variables only to read them on the next iteration  a feedback node or shift register of type array of dbl would work so much better!  and, not require the UI Thread at all!  Really none of those controls or indicators are wired to the connector pane-  for debug use a probe!
    Most of the rest of your indicators can go away too, replaced by Shift registers.  (If I infer correctly you might need to show two elements on "Target Disp" but I have no idea what that library function call is)
    Essentially, you appear to trying to "C" your way into LabVIEW.  LabVIEW is a dataflow language-  hit the getting started material and online courses.

  • WAIT function

    I'm trying to get the wait function to work for a simple notification. I have the relative time set really small to test the WAIT function works, but the procedures never get pas the wait function. Can anyone help me with this?
    wf_engine.setitemattrtext
              (itemtype => l_item_type
              ,itemkey => l_item_key
              ,aname => 'WAIT_MODE'
              ,avalue => 'RELATIVE');
    wf_engine.setitemattrnumber
              (itemtype => l_item_type
              ,itemkey => l_item_key
              ,aname => 'WAIT_RELATIVE_TIME'
    ,avalue => 0.0001);

    How are you using the activity?
    You have to do this:
    1. Drag and drop the standard WAIT into your process
    2. From the "Node Attributes" tab of the activity choose:
    "Wait Mode" to be "Relative Time"
    "Relative Time" to be from an "Item Attribute" and select your item attribute.
    You can set this item attribute anywhere in your workflow
    3. When the engine hits the wait activity the workflow will wait for that amount of time.
    Remember to run the background engine to process the workflow when the wait returns.
    Hope this helps
    Raja

  • User exit or Badi for changing the lead time in ATP check in VA01/VA02

    Hi All,
    Currently, SAP standard functionality takes up the lead times maintained in material master to create the schedule lines in the sales order in VA01. I am looking for some user exiit/Badi/Enhancement point where I can change the lead time. This is somewhat urgent so any help in this regard is appreciated.
    Regards,
    Sandeep
    Edited by: Sandeep Gaitonde on Sep 1, 2011 9:16 PM

    Hi Sandeep,
    These are the user exits will trigger in va01 .
    SDTRM001 Reschedule schedule lines without a new ATP check
    V45A0001 Determine alternative materials for product selection
    V45A0002 Predefine sold-to party in sales document
    V45A0003 Collector for customer function modulpool MV45A
    V45A0004 Copy packing proposal
    V45E0001 Update the purchase order from the sales order
    V45E0002 Data transfer in procurement elements (PRreq., assembly)
    V45L0001 SD component supplier processing (customer enhancements)
    V45P0001 SD customer function for cross-company code sales
    V45S0001 Update sales document from configuration
    V45S0003 MRP-relevance for incomplete configuration
    V45S0004 Effectivity type in sales order
    V45W0001 SD Service Management: Forward Contract Data to Item
    V46H0001 SD Customer functions for resource-related billing
    V60F0001 SD Billing plan (customer enhancement) diff. to billing plan
    Please check this and post .
    Regards,
    Madhu.

  • Can anyone help me determine why iCloud changes the calendar time of appointments.

    Here's my situation: i use an iphone registered/acquired in spain. the phone is unlocked and now carries a t-mobile card, as i am currently in nyc, but all my calendar appointments have a 6 hour time difference from those entered on my mac and vice versa. there are several threads about this issue, all of which point to the various hardware and software settings (time zone support on or off on the iphone as well as on the app on mac and phone). another user mentioned the setting provided for in the icloud calendar function itself, where the proper time zone can be modified. all to no avail, i stil get my 6 hour time difference.
    anyone please?
    thanksamillion!

    Thank you fromsouth, for your interest, but it didn't help.
    I have 3 scenarios: Entering an appointment on the mac's calendar, on the phone's, and on iCloud's calendar. If I enter an appointment on the mac, it shows up correctly on iCloud, but is off by 6 hours on my phone's app. If I enter it on the phone's app, it will be off on iCloud and therefore off too on the mac. I've deleted the app (I use WeekCal, but see the same discrepancies on the iCal app) and reset it all new, but the problem prevails. Unlike my earlier assumption that the problem lies with iCloud, I now believe it is in the phone, although wouldn't know where. I see that the iCal app on OS has the ability to adjust for the time zone. When entering the event on the phone, it gets syncronized on the Mac at the phone's time zone, which for some reason appears to be set at my original Spanish setting (GMT+1), even after I reset the time zone to NY. I can manually adjust the calendar time zone setting on my Mac to EST to correct the time for the appointment.
    Quite frustrating!

  • HT204406 Hello,  I have songs that show they are "Waiting" for download from the cloud but they are greyed out.  Some songs in one album are done others in the same album will not download. It is not a time function because i have been working on this for

    Hello,  I have songs that show they are "Waiting" for download from the cloud but they are greyed out.  Some songs in one album are done others in the same album will not download. It is not a time function because i have been working on this for weeks. I have allowed my compter to run for days and the songs are still not accessible.  I have a Match subscription and Match is working.  If I click on the "Genre" link the greyed out songs show that they are ready for download from the cloud but I cannot download them.  I have downloaded over 1500 other songs, so I am trying to understand what is going on here. I would appreciate any help anyone can give me.
    Thanks

    I did think about that and if I have to I will do that, however there are about 50 songs. I have closed and reopened iTunes several times and I am sure that I have the latest version. It fails right away but I can click on the cloud download icon and download the song that it failed on ... therefore it is not that song "or any one song" causing the issue. Any ideas?

  • Why does that entire thread goes to sleep when we put a wait function in time critical loop?

    why does that entire thread goes to sleep when we put a wait function in time critical loop but not when it is not time critical

    Norbert B wrote:
    Ujjval,
    in a RT system, priorities have (in general) increased effect on the execution of the application.
    It is recommended that you only have a single task in your RT program at "time critical". If you have two task "time critical" (that means you are running into issues caused by your quoted "feature"), you have a flaw in your application architecture.
    Since LV 7.1, it is recommended to work with Timed Loops in order to prioritize tasks on a RT system. Timed Loops are executed on priorities between "time critical" and "above normal". Each Timed Loop will execute its content in a single thread in order to keep a good overview of the timing (like finished late [i-1]). Using those structures (and according settings) in a reasoned manner will prevent your RT system to run into priority issues.
    Ujjval Shah wrote:
    [...]also i would really appreciate if i can get more documentations regarding how LV creates threads and assigns subvis to them[...]
    You will have a real hard time to go into this very deep. This is the feature of LV: you can just use multithreading (multicores) without the needed knowledge of scheduling and load balancing. This makes LV programming in general very easy in comparison to e.g. ANSI C (in regard of multithreading). So creation of threads, distribution of tasks to the threads are abstracted and most often not visible to the programmer.
    There are some switches and levers you can "play around" in order to make LV to behave differently in this matter. But this most often requires  deep LV knowledge and cannot be explained in a simple posting.....
    hope this helps,
    Norbert 
    Amen to that!
    The question can not be fully answered without digging into the internals of the OS LV is run on because LV works with the OS and lets it do the scheduling.
    Yes that note applies to pre- LV 7 RT. When run under RT the ONE Time Critical loop was guarenteed to stay determinisitic.
    Since then the Timed Loop was introduced that allowed multiple levels of priority and later allowed us to assign which CPU the code would run on.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • After syncing a replacement iPad for the first time, my apps have a "waiting " on the screen I can access them but not on opening screen

    After syncing a replacement iPad for the first time, my apps now have a"waiting" message . I can still access from settings but not on the opening app page

    Try this  - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    Check your settings. The iPads have a small switch on the right edge. It can be used as a rotation lock to keep the screen from automatically reorienting itself as you move around, but you need to have the tablet’s settings configured properly. That same switch, right above the volume buttons, can also be set to function instead as a mute button to silence certain types of audio.
    If the switch is set to work as a mute button, you can change its purpose to “screen-rotation lock” by tapping the Settings icon on the home screen. On the Settings screen, tap General on the left side, and on the right side of the screen flick down to “Use Side Switch to.” Tap to select Lock Rotation or Mute to set the button’s function. Even if you set the side switch for your preferred use, you can still mute the Mini or lock the screen. Just double-click the Home button, and when the panel of apps appears along the bottom edge of the screen, flick the row from left to right with your finger. Tap the icon on the far left side of the row to either lock the iPad’s screen or mute the iPad’s alerts, notifications and sound effects. Music, podcasts and video are not muted unless you turn the volume all the way down.
    iPhone: Can't hear through the receiver or speakers
    http://support.apple.com/kb/ts1630http://support.apple.com/kb/ts1630
    http://www.atreks.com/app-no-sound-on-ipad-4-%E2%80%93-what-to-do/http://www.atreks.com/app-no-sound-on-ipad-4-%E2%80%93-what-to-do/
    To solve some sound problems, just follow these simple steps
    1. Go to Settings
    2. Tap on General
    3. Tap on Reset
    4. Tap on Reset All Settings
    You may need to delete the game app and redownload (you won't be charged).
     Cheers, Tom

  • Wait() function - just trying to understand the reasons behind

    Why the function wait() in Java requires the caller own the object�s monitor of the calling object
    thnx

    but why should only one thread at a time can own an
    object's monitor.Because otherwise how would you prevent concurrent access to shared resources? Every Object has a wait set, I think if concurrent access was allowed to this wait set you could get into all sorts of problems.

  • How to isolate the wait function to one part of the code

    I'm buildling an ecg montoring system along with programming an external stimulator using TTL pulses to work along side the information obtained from the ECG.The most important of  these features is the heart rate. However, whenever I activate my pulse trains in the code, the DAQmx Wait Until Done.vi function pauses everything in the code, including the part of my code that monitors the heart rate, which uses time to measure it. What I would like, is the wait function to only affect the pulse train generators without pausing anything else in the code. Is this possible? And if so how can I make it happen?
    I will attach my vi
    Solved!
    Go to Solution.
    Attachments:
    simulatejed.vi ‏130 KB

    Your problem is that everything is in the same loop.  So the longest operation is going to determine the loop rate (and therefore processing rate).  What you really need to do is separate your tasks into separate loops.  Use queues and/or notifiers to communicate your data and commands between loops.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

Maybe you are looking for