inaccurate time using ProsesSystemEvents

Hello

I suffer incorrect delay function when using ProcessSystemEvents. I have no need of 1 second precision, rather 10 seconds precision would be sufficient. But I need ProcessSystemEvents because I need to wait a long time and do so using only Delay() locks the user interface. Below the function, I'm curretly help and 300 seconds for example delay will be 467 seconds without the use of user interface. Is there a better solution to improve accuracy by using ProcessSystemEvents? Or any other method to wait without blocking the user interface?

Kind regards

Petri

There is no delay (double seconds)
{
long int max = 0;
long int index = 0;
 
Max = (long int) seconds/0,1;
 
for (index = 0; index)<>
{
ProcessSystemEvents();
Delay (0.1);
}
}

A delay loop long duration can be implemented in this way:

void LongDelay (double seconds)

{

tini double;

tini = Timer ();

While (timer() - tini)< seconds)="">

ProcessSystemEvents ();

}

}

However, this is not the optimal solution if this function is called in a reminder of the command, because reminders must be designed to be as large as possible.

A possible solution is to design a state machine built around a timer of the UI standard or better an asynchronous timer: in this way, the level of the user interface is free and your program can perform well (depending on the amount of operations in a loop, you can run the machine at 5 or 10 lines/sec). If you want to run this way, you will find in this document a tutorial on State machines; Don't let all these quotes from LabVIEW scare you (): state machine concepts are universal and you can develop fully functional machines in ICB as well as in LV

Tags: NI Software

Similar Questions

  • How can I have 2 email accounts open at the same time using the apple mail icon?

    How to open 2 e-mail accounts at the same time?

    Hello carroll12,

    Thank you for using communities of Apple Support.

    I see that you do not want to open two e-mail accounts at the same time using the Mail application. I understand perfectly. I have multiple e-mail accounts set up in my Mail application. I'm happy to help you with this.

    You can have more than one e-mail account set up in the Mail application. The first time you open Mail, it may prompt you to add an e-mail account (if you have not already done). Select an account type, and then enter your account information. To add another account, choose Mail > add an account, select an account type, and then enter your account information. Make sure that the Mail check box is selected for the account.

    If you have already both set in place, and I just want to be able to view both on the screen at the same time, open Mail, and then click file at the top.  From there, select the option for the new window of the observer.  This will open a new window where you can see each of the individual mailboxes on the same screen.

    Have an amazing day!

  • When logging in to my email account, I get a red message that I tried to sign in too many times using an incorrect id or password

    After signing several times in & control my mail today, suddenly when signing once again, I get a red message that I tried to sign in too many times using an incorrect id or the password. WHAT? I have NOT changed or the other lately... and have certainly not today! I don't like having my daily work routine interrupted by this measure obviously fake message/security, when I don't do anything different from what I have already done many times today! Please correct this problem immediately... Without that I have to change anything or even interrupt my schedule. Thank you. By the way... I grow increasingly wary of any company of which the customer has as much bad contacting help with their product. And grow more and more suspicious with this incident. What is happening with your safety that I can't just leave my settings as is? Please take the time to look at this before decide me that your company's products just aren't worth the headache.

    Hello

    · What email client you use to access your emails?

    If you work on Hotmail or Windows Live then it would be better suited in the Windows Live forum. Please visit the link below to find a community that will provide the support you want. http://windowslivehelp.com/

    You can also access: Microsoft's strategy concerning lost or forgotten passwords: http://support.microsoft.com/kb/189126

  • How to extract the same song, several times using different bit rates or formats and store all the digital music files in WMP 12 default on the same HDD music library

    Using Windows Media Player 12 (w/under Windows 7), "can I ripping the same song, several times, using different bitrates & and/or formats and store all the digital music files in the music library by default WMP - 12, on the same hard drive?

    1.) #1 goal: tear up the same song repeatedly, w / "different rates" as a WMA file.

    2.) #2 goal: tear up the same song repeatedly, w / "different rates" as an mp3 file.

    3.) #3 objective: NOT to each subsequent copy (version) of the song, deleted & and/or replaced by the previous version of the song [even].

    4.) question Bottom Line Up Front--> is Windows Media Player 12 (included with the Windows 7 operating system) are able to achieve '#1 objectives; #2; & #3 above?

    5.) details/example: I want to tear the piece "Maria Maria by Carlos Santana" to my laptop as a Windows Media Audio [WMA] file.  In addition, I would like to rip the song 'Maria Maria' three several times with 3 different bitrates in format WMA; and, as an MP3 file.  Therefore, my final result wished (after the extraction process), will take place the four 4 audio files split up as follows: (a) 'Maria Maria by Carlos Santana'--> Format: file WMA; Ripped @128 Kbps bitrate.  (b) ' Maria Maria by Carlos Santana'--> Format: file WMA; Ripped to the "Variable bit rate; (c) ' Maria Maria by Carlos Santana'--> Format: file WMA; Ripped commissioning "Lossless." and (d). 'Maria Maria by Carlos Santana'--> Format: MP3 file. Ripped @256 Kbps bitrate.

    6.) my preference: I do NOT want to rename the file (s). {for example, 'Maria Maria by Carlos Santana' renamed/changed for--> "Maria_Maria_by_Carlos_Santana_128kbps.wma",...} 'Maria_Maria_by_Carlos_Santana_256kbps.mp3 '; etc.}.  In addition, I am not concerned about the additional disk space that will be consumed after multiple copies of the same song with different speeds of transmission and different formats.

    7.) my experience w / Windows Media Player 10 (w / the operating system of Windows XP): using WMP - 10, my goal (s) described above is not a problem at all.  Simply insert the CD purchased by Carlos Santana, containing the song "Maria Maria"... Select the desired Format (WMA; WMA VBR; WMA Lossless; or mp3)... Select the desired flow rate (WMA... 128/160/192kbps_mp3: 128/192/256/320 kbit / s; etc.) ; and click on the "RIP" button to start the copy process on the hard disk of of Carlos Santana's "Maria Maria".  This process (w / WMP-10) would result in having the same song, copied on the hard disk, with levels of quality different "audio" (via the different bit rate settings); regardless of the format (MP3/WMA) which was chosen.

    8.) my experience w / Windows Media Player 11 (w / the operating system of Windows XP): using WMP 11, to described above of my objective (s) could not be reached e-a-s-i-l-y.  The problem with WMP - 11 - in short - which was after the desired selection "Rip settings" tab 'Options' of WMP - 11 (i.e., Format & Bit Rate) and heart-wrenching piece wanted to {'Maria Maria by Carlos Santana'} a moment later/second, WMP11 remove / would crush the previous version of the song [even].  Therefore, the program would NOT allow the user to have multiple copies of the same song on the hard drive of the PC; which obviously restricts a user to have the freedom to choose what level of quality digital audio, they prefer to listen to.

    9.) the ability to have multiple copies [at my descretion] of the same song (on my hard drive) with different bitrates and formats in my music library, is important for me because it has a direct impact on "how I enjoy MY music ', and in what form (audio quality), I choose to listen to my music.  {For example, when I exercise and listening to my camera, digital audio player (Zune), a song ('Maria Maria by Carlos Santana'), will usually be torn off at a lower rate due to the unit of capacity reduction of storage - compared to the storage capacity of notebook PCs/desktop/external hard drives PC.}  However, when I listen to my music through my home cinema or entertainment system (which contains a hard disk dedicated with a large storage capacity), I prefer to load the entertainment system with digital music files that have been ripped to WMA... with the bit being rate-setting is for the: settings "WMA Variable Bit Rate" or "WMA Lossless.

    10.) there you have it.  This is my first post in this forum.  I hope that [detailed] explanations, will be sufficient to encourage these "with knowledge & the hands on experience" using Windows Media Player 12 (as well as with WMP-10/WMP-11 respectively), by providing a [step] "How-to"... "solution to my situation.  It would be highly appreciated.  I'm looking forward-'the solution' - and relevant suggestions & and/or community feedback regarding my request for assistance.

    * Thank 'All' (that would) in advance... For your time & Assistance *.

    Certainly, you can, but I would say that they be in different folders, for your convenience as well as Windows.  You can create one for each debit/format, then you will know who is who.

    In Windows Media Player, on the toolbar, select Tools, Options, Rip, and then select the flow you want first, rip music, then change the folder (higher on the same tab) and rip again... and so on and so forth.

    When you are at home on your home theater, you can use the 320 bitrate folder, when you transfer to the Zune, you can use one of the lower bitrate files (although I personally tear it up to 320 and let the Zune reduce as he wants, even with the iPhone via iTunes, hard drive space is not really a problem here) my server has several hard drives, and I can always add more if and when space is low!

  • I try to add an image map for the first time using Dreamweaver CC

    I am trying to add an image map for the first time using Dreamweaver CC in an html site.

    I can get map controls is displayed when I select the image in the code, and I can select the rectangle tool.

    However, when I try to select the area of the image disappears from the section of the map of the properties viewer and I can't select the area for my hyperlink.

    What I am I missing videos online are it seems so simple, but something with my page is not allowing me to withdraw this.

    This is the code section and the image that I'm trying to add the link.

    < side class = "sidebar" >

    < img src = "images/flowchart.jpg" alt ="product dev. Flowchart">

    < / side >

    Please help or give me any advice... There might be something to do with the fact that my site is "sensitive"?

    Hello

    You could just add links to each box, but a better solution would be to use svg for this. Unfortunately, it is easier for me to write for someone who does not know svg to do.

    If you have Adobe Illustrator create your svg using this program, then it would be a case to add links manually to each box created in the svg code. SVG is an xml-based language and not a real image, even if this is how a browser will display the it.

    PZ

  • I tried several times using IE, Chrome and Firefox browsers (win) to download the files for Indesign CS6 - all of these attempts have failed to extract the files. Other parts of the plant extract successfully, so I don't think I have

    I tried several times using IE, Chrome and Firefox browsers (win) to download the files for Indesign CS6 - all of these attempts have failed to extract the files. Other parts of the plant extract successfully, so I don't think that's my machine or OS (Win 7 Pro). I have been fighting for three days and am losing patience fast. Advice or assistance will be appreciated.

    I finally got it to work using a different machine and copy the files on a USB stick for transfer to the machine I need installed on!

  • for the first time using the do not know how to insert video to start editing

    for the first time using the do not know how to insert video to start editing

    First thing you need to know is that After Effects is not a video editor. First is to put some shots together to tell stories (that is changing), After Effects for creating those shots (compositing and Visual effects) and to create animated graphics.

    To use AE, start here: starting After Effects

  • Time used, curfew and deadlines not respected

    I put in place restrictions to the use of son of the computer for deadlines and curfews.  Periodically, the system will limit him, but not always.  In addition, the period of daily use is does not record.  When I look at the last few days, the system reflects the 'no', but I know that's not the case.  Help, please.  Thank you.

    Hello

    To resolve this problem, you must delete all corrupted files and re-download your settings from the Family Safety website.

    The steps described here.

    Method 1:

    Family safety is based on the information shared between a PC and the web site. When this connection stops, changes in the controls do not work and reports may be inaccurate.

    We will try to start solving the problems of family security and check the results.

    Method 2:


    I suggest you perform the steps mentioned by "Madeni K N responded on April 3, 2013" in the article.

    Problems with delays of parental control and activity reports in Windows 8 PC

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_other-security/problems-with-family-safety-time-limits-and-PC/8c3a52b6-2193-4F0D-9B2E-a378a6286f63

    You can also view the steps mentioned by 'MSFT Rudi R responded seeking 13, 2012' in the article.

    How to work the allocation of time and curfew?

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_other-security/how-do-time-allowance-and-curfew-work/6e3ef20b-7d4c-471B-8277-1d79563cfc87

    Hope this information helps. Response with status so that we can help you.

  • An application that has a timer use of blocking?

    Y at - it an app that has a timer to block the use of your whole computer?

    Exactly how you want to implement this and on what device? If it's for your MacBook Air, and if you do not have El Capitan, there are parental controls that might meet your needs. (OS X El Capitan: set up parental controls)

  • first time using flash in private browsing content opens the non-private

    I already asked this question (using firefox, 20 at the time) about 1 year. I leave a link to this thread for reference https://support.mozilla.org/pt-PT/questions/955788#answer-425110.

    2 computers (a desktop and a computer laptop operating system: windows 7 and firefox 29.0.1 in both).

    Basically what is going to happen, it's that if you open a private window and then use a flash content, first time you do this, the non-private window opens. You can easily return to the overing private window right-click the firefox icon and choosing the private window. A work about already presented by jscher2000 is to have a tab with flash content before opening the private browsig.
    I raised this issue once again just to ask if there is any chance to fix this in the near future?
    Thanks a lot for any input and please accept my greetings.

    HI JoaoNT,
    Please check back with your question. It is a pleasure to help again. I understand that when you view flash content, the new window the opens the private window is no longer a private window. (forgive the verbosity)

    I'll try to replicate this >

    1. A private window open a youtube.com page
    2. Right-click on one of the videos suggested to open in a new tab.

    Results: It is opened in a new private window.

    An other stepsbased in the stages of the adobe bug
    (note I have updated to 12 and will also try that in 13)

    1. Open the test page
    2. Right click on the first result
    3. Choose the option "open in a new window of private".

    Results: see private window to the top.

    It seems good, what version of Flash are you using? I don't have a Netscape or other plugins, if these are disabled if the issue persists. (Most likely it will not make a difference)

  • How can I view 2 sites at the same time (using the ms ms ctrl button to split the screen)

    I can't open a second secession of ff if I can use the split screen feature offered by windows. I want to see 2 things at the same time I cannot compare etc.

    Try this: https://addons.mozilla.org/en-US/firefox/addon/fox-splitter/?src=ss

    Alternatively, open a second window of Firefox (Firefox button > new tab > new window or Ctrl + N), the second loading site, resize the windows side by side.

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

    Not related to your question, but...

    You may need to update some plug-ins. Check your plug-ins and update if necessary:

  • Can not find the Favorites of IE in bookmarks by using "import an another database" or "import html file." Default profile only in use. First time using Firefox

    HTML file (also tried htm) is exportd by IE 9 and can be opened. When imported by Firefox, it can be seen in the unsorted bookmarks bookmarks library or view all of the bookmarks.
    All read that the properties have been removed from the favorite files.
    Firefox displays a profile in APPSDATA.
    This is the first time I used Firefox and wish away IE. Can you help me please? Thank you.

    One possible cause is a problem with the places.sqlite file that stores the bookmarks and history.

  • Equium M50-164: Question about timer use & battery fan

    Hello!!

    Just put your hands on my laptop equium m50-164 today and I wanted to clarify a few issues

    first of all,

    I flashed my bios with the latest version and after restarting, fan kicks at full power and has not extinguished until I put the laptop in standby mode, this seemed to fix the problem but fan seems suddenly in much more than compared to before, fortunately the fan isn't the one 100% , but more like 15-20% every 30 seconds or one minute then goes into silent mode the fan does not reach 100%, unless I have do a reboot :),.

    I know the fan will accelerate faster based on the use of the processor (thermal) etc. but is this normal? I talked to support and they wanted me to have an immediate replacement, but I said that I would wait a few days to see if she could calm :)

    and finally looking at the electricity meter and other software tools there seems to be no calibration of the battery, with previous laptops, I noticed that numeric calculations are made based on the use of the battery and time [i.e. a timer] but with this laptop that I kind find a timer - I would of thought tha any computer laptop has this facility today!

    any advice would help

    see you soon

    Ephid0r UK

    Hi ephid0r

    If the Toshiba service makes an instant replacement if you should take it.
    Maybe there's something wrong with the hardware or software.

    But as Feliks has suggested, you must first reinstall the Toshiba Power Manager.
    This utility is responsible for the CPU and the cooling module activations.

    PS: The time of battery life indication occurs if you move the cursor over the icon of standby power.

  • change of the indicator with time using the structure of the event

    Hi all

    I use a structure within the meaning of the event to change the State of an indicator. At this point, I was wondering is there a way I can monitor this change of State in a time interval?

    Which means that how I can raise the event only when the state change is long enough (for example 5 seconds), if there is a change of State, but the State eventually back to normal (less than 5 seconds), the event is not triggered.

    Thank you and hope someone can give me some advice on how to do this?

    Sorry for this reading does not completely. Here's a version that works and not stuck to wait.

  • make a graph in real time of 1 DBL value at a time, using a loop for

    I have a somewhat interesting programming task where I have the following situation: (I have attached a mac version of vi Labview 2013)

    -Using a patented (pre-made and uneditable) sub - vi, who receives a value of 0 or 1 as input and reads off a single measure, whenever he receives 1 while a value of 0 is necessary to 'reset' of the vi to rehearse a new measure.

    -I would like to run this sub - vi repeatedly in a loop For each value of "measure" are sent to a curve of waveform to give a direct value (real time) for the graphic to display.

    -As it is, I have a vi file that simulates action in a loop but built in a 1 d array to get exuent values sent a waveform curve.

    -I don't know how to make a real-time graph which receives 1 value double both.

    -In addition, I want only every 2nd value sent to the loop for, but I already have several ideas on how to do it.  First of all, I am concerned about the target in real time.

    Kyle Shiel

    A graphic, not a graphic, allows you to update a point at a time. It would be inside the loop for. update the chart or not, you can use a select statement or the structure of the case.

    These are pretty basic functions in LabVIEW. Please see the free tutorials.

Maybe you are looking for