While time loop clock pc

Hi guys

I have a code that uses a while (currently) loop to open a file and read from time to time (in its simplest form... and... the details are not German to this post)

The requirements are now tight and the loop (While or Timed?) should play the file once every two minutes based on the computer's clock (accuracy is not too important, certainly not milliseconds)

for example, time is 11:35... Read file

time is 11:36... .. do nothing

time is 11:37... read the file

time is 11:38... do nothing

etc.   etc.

In simpler terms (if possible)... have the loop to execute code inside every two minutes with the coming of the pc clock time sequence.

I watched call loops (but never used them) and they seem to be a possibility

Then, someone could show me an example of how best to do so.

Thanks for your help and best regards

Ray

You forgot to update both get into the shift register.

Tags: NI Software

Similar Questions

  • Use of LabView delay in a while loop instead of use the inherent instrument of time loop.

    I have a lmg500 sez I use. It has the possibility of continuous measurement of data, with a cycle of user control loop (always using a while loop but the delay comes from the instrument). The problem is that the time of the loop is not constant. Can I use a very short time (100ms) as the cycle of the instrument of the time, but use a longer period in time loop collect data?

    I know that many instrument offers the same capabilities, so the issue is relevant to each of them.

    Thanks for any help

    You're not going to be accurate with Windows. The time between samples should be that you have programmed the instrument (i.e. the time between each value in the table 1 d) but the rate of the iteration of a while loop always will be the subject of a jig on a bone not real-time.

  • Time-loop at 1 MHz

    Hello everyone,

    After if you are looking for something already post on the subject, I found a lot of interesting information but no directly who can answer my question.

    I have LabView with time real extension.

    So far, I managed to do a time loop at 1 kHz, but the timer, MHz 1 option is gray, so I can't choose, even with the module in real time.

    Issues related to the:

    -J' heard that MS windows is limited to approtimatly 55 ms of precision. Is this true? I don't understand really because in this case, why NEITHER made a 1 MHz if it is not possible for MS windows to do?

    D ' other hand, how can I do the timer of 1 MHz for my time loop? Is there any process to do with the real time module to do?

    Thanks in advance for your help.

    Vivien

    What you did shows no need to have a while loop clocked at 1 MHz.  Value your ongoing samples DAQ assistant and collect many or all that is available.  Analyze and and for the file.

    A few tips.

    Signals of fusion is extensible by dragging the border down, so you can merge all the signals in a single step instead of having several signals fusion.

    You have the risk of rapid growth of the paintings that fill your memory using the concatenation of tunnels.

    You'd be better off using an architecture of producer/consumer to obtain data in a loop, then go to another loop for analysis and writing in a file.

  • By dividing the time base clock sample by N, we're the first sample on pulse 1 or pulse N?

    I use an external source for the time base a task of analog input sample clock. I'm dividing down by 100 to get my sample clock. Is could someone please tell me if my first sample clock pulse will be generated on the first impulse of the source of the base of external time, or about the 100th?

    I use a M Series device, but can't see a time diagram in the manual that answers my question.

    Thank you.

    CASE NO.

    CERTIFICATION AUTHORITIES,

    I don't think it's possible to use the sample clock of 3 kHz on the fast map as the time base clock sample on the slow map and get the first sample to align.  The fast card can enjoy on each pulse signal 3 kHz, while the slow card will have to meet the requirement of the initial delay before he can deliver a sample clock.  If you turn this initial delay a minimum of two ticks of the time base, the slow card eventually picking around the edges of the clock 2, 102, 202, etc..  You can set the initial delay for 100, which means that the slow card would taste on the edges, 100, 200, 300... but you wouldn't get a card reading slow on the first edge of your sample clock.

    Hope that helps,

    Dan

  • problems with timing in a time loop in a structure of the event

    Hello

    I'm using labview to control three motors stepper, running the three stages of different translation in different axes (X, Y and Z). Please see the attached VI, focusing on the structure of the event on the RIGHT side.

    In the Z axis, I am trying to run the engine for 5 seconds, after clicking on a button. I have attampted to do by adding a sub of elapsed time VI within a while loop, located in the tab 'Mouse before Z down' the structure of the event. A similar "elapsed time while loop" is also included in tab 'Z reverse the mouse down' the structure of the event.

    Separately these "elapsed time loops" work very well, BUT when I run a Z direction after another, say 'Z Reverse' and then 'Before Z' then they annoyingly interact. The calendar is gone, with the moment where we add, rather than rebooting.

    No idea how I can reset the time elapsed while loops? Or is there another method better do?

    Thank you very much

    Charlie

    charlieryan wrote:

    I take a wire from the 'i' of the while loop at the entrance of the Sub autoreset - VI of tiem will blink?

    No, connect you to the "reset", not "autoreset".

  • USB6009 limitation in time loop

    LabVIEW dear colleagues,

    Hello
    I have some problems with the hardware device USB6009 and the width of an analog voltage output time.

    The algorithm (see picture) are included in a while loop and can generate a pulse for about 50ms without problem. My problem is when I chose to reduce the time (duration) of the pulse)<50ms). in="" this="" case="" the="" number="" of="" peaks="" (voltage="" pulse)="" become="" episodic="" and="" no="" pulse="" appear="" if="" i="" select="">

    If I remove all other additional calculations in the while loop (for example the algorithm of the pulse is used only for calculation) of 4ms impulses can be observed.

    I think that the problem is due to the time to calculate every while loop. I mean that the examination to check if the elapsed time is carried out at each loop itteration. If the impulse may not appear if the pulse duration is less than the iteration of a loop.

    My question is how to create a pulse controlled length less than one, while the loop iteration (50ms)?

    I tried using the structure of the event, but the result is currently not good.

    Please, if you have an idea feel free to write a comment or a suggestion.

    Thanks in advance for your help,
    Best regards

    Just for other users,

    I tried the solution that proposed to johnsold. Gain in speed is very low and is about 1 ms.
    If the frequency is not the most important parameter, add module of simple material cut to the width of the signals send after the USB6009 could solve the problem partially.

  • Windows 1 kHz time loop limit reason

    I use a loop timed in Labview2011. I'm not able to exploit the time loop above 1 kHz or less 1 msec .i read in a reply on the forum which, due to windows, it is not possible to operate above 1 kHz, but the reason no didn't to .i want to know why windows cannot function the time loop above 1 kHz?

    Yours sincerely

    Ali211 wrote:

    I work with Labview RT and I know targeting the PC configuration, but I don't know the reason behind windows limitaion of 1 kHz at max?

    Yours sincerely

    The question is the clock source.

    I used a hardware clock (a NI DAQ device with a built-in clock) to drive a loop timed at 2 kHz, but which is possible using a hardware clock.

    For cycle rates MHz, you mentioned above, you will need to move to an FPGA to get this type of perfromance.

    As to WHY?

    Enter the "way back machine" and setting the target date to about 1979, we find that PC came equipped with keyboards but a mouse is an add-on. If you have added a mouse, you have found that 50% of your CPU is used each time that you moved the mouse. Since all what we had were at the time not big thing BACK. Go forward in time to Windows 3.1 we always run on top of BACK, but we could now use a mouse.

    Now to give the impression that the mouse cursor has keep in touch with the mouse moves, interputs were firing repeatedly and put necessary screen to update as quickly as possible. THEN it turned out that using a clock SO that trigger a 1 KHz has been fast enough to deal with the mouse.

    Windows has been designed to use a 1 kHz clock and until MS decides to use a faster clock, we need lieve in this environment... unless you give up Windows and switch to another OS.

    Ben

  • delay in reading the data when you are using multiple loops clocked on target RT

    Hello

    I have five loops clocked on a target of RT and I communicate to and from the host vi. All the loops of the value of the different priorities however when all running at the same time I found windows vi take up to 1 minute before reading the data. Four disabling loops to fix the problem. It is possible to start the app right after start windows vi?

    Kind regards

    Solved the problem by disabling variable autodeploy

    Thank you

  • Treatment in time loop with microseconds.

    Hello

    I am make only one application in Labview where I capture the image of a camera and image processing. The camera is communicate with the Board of Directors NI PCIe-1433 in the PC with the camera link. This device can operate with a rate of 2000 frames per second. For the treatment of each image in the pc I need a time loop that work with microseconds. The problem is that this time loop only works with MS Windows. If I use the real time module, can I configure this time looping with microsecond or is there another solution?

    Thank you

    Hi xisco,.

    with LabVIEW Realtime, you could create a loop with the order of a microsecond wait States.

    BUT:

    Why do you think you have need of these wait States? What is the purpose of these expectations?

  • Order to internal model with cRIO, synchronization of time loop

    Hello

    I work with control design Simulation & toolkit and I want to implement an internal model control to a real-time target. I want to implement my simulation (as an attachment) to the real target (cRIO-9024 OR cRIO-9112). I removed the transfer function of the process, I broke the line and I added my input/output of the cRIO modules. I put a 1ms, Euler ode solver step size and synchronize the time loop. Unfortunately it does not work properly. The loop decreased the speed a lot and I can't get 1 ms response time and, finally, a good answer for my system. This means that I can not 1ms response for loop? What is the problem of the computer, windows or hardware real-time or software? Simple or I did something wrong? All the advice you will enjoy.

    Kind regards

    Kamil


  • While the loop does not stop until 2 more clicks

    I must say that I'm really not familiar with LV, but Im learning.

    So why is that after I clicked on low stop, I had to click my OK button twice, then my program stopped. Why can't it stop immediately?

    Furthermore, if I want to do some of the dice to table, which wire do I missed?

    Thank you!

    Hi RawtoLV,

    You have a while loop in loop a while. When you run the other while the loop stops when you press the stop button, the inner circle while loop always executes. Since your OK button use latch release, what I noticed is that when you pressed the OK button, it quickly into position from true to false, which never stopped during the operation of loop (maybe because of the wait). Can I ask what are you actually doing with the structure of sequence?

    I would suggest using the event structure in place (http://zone.ni.com/reference/en-XX/help/371361K-01/glang/event_structure/):

    Here are some information about the structure of the event:

    http://www.NI.com/white-paper/3331/en/

    http://www.YouTube.com/watch?v=8eO64fo3Pho

    Warm greetings,

    Lennard.C

  • Impossible to change "first frame" and play a time/loop/Single Frame

    I work is CS3 and problems by changing the first picture on a graphic symbol. When I type in a new number, it jumps back to the former. When I try to change, play a time/loop/single frame layout jumps to the previous setting. I'm trying to simply change this option on a keyframe in the layer of the symbol on the main stage. I have experienced several times, but failed to get the workaround for the moment. I know I can do what I want. In fact, I do a couple of points earlier in the instance of that symbol without problems. Any suggestions?

    Thank you.

    Tyler

    My guess is that somewhere, you have the box checked synchronization. It sometimes seems to do your graphics to synchronize their animation so that it is always the same and other times that he seems to have no effect at all. So I don't really know what it is supposed to do.

  • While/loop and reset the value i in time loop

    Hello!

    I have a question about the use of while/loop for.

    I read the data of 5 devices.

    Starting with the 0 position when I = 0, I read the data at position 0.

    And when I click on NextPosition, then I = 1 and stop when I = 5.

    But in the meantime, if I want to break the system of position 3 for now. I click on the BREAK.

    I chose the position back to 0, it will go to this post.

    But if I click on NextPosition, the value is always my 0 and not 1, which is the next position upward.

    In addition, whenever I click NextPosition, it will count up to i = 5 and to stop the program.

    Is there a way I can address the issue?

    Thanks for trying!

    I don't know what your needs are, so I guess you want to keep hitting the same device until you press the button of the next device and you want to be able to specify that one then.

    In the attached code, I changed your mechanical action of the pause button and renamed position Reset.

    I also changed the code suchthat conditionally, we increment the device number (only when the next button is hit).

    I have alos moved local so that us do not draft times and put it in the case of the rest the structure so it is written or read but not both.

    If this does not meet your needs;

    1) look in bulb mode and see where I went wrong

    (2) If you are unable to set up a truth table of all combinations buttn and doc what steps should occur for each condition.

    Always trying to help,

    Ben

  • Time loop writing file of Rio - please help

    Hello world

    I'm writing the data collected on the 32 channels of a module 9205 to memory on board a Rio-9074.  This isn't the final requirement of the application, but this is the first simple step.  Both the FPGA Vi and Vi of the host are attached to this post.

    Writing to the file produced inside the while loop, so that the outside while segments of loop files from time to time (this segmentation is a requirement of our application).  I have attached a sample file of release in this post as well (the output file opens in wordpad).

    In the output file, the second and the third column is a timestamp with fractional seconds.  The lead time is 5 Hz, but if you see the first lines in the output file, you will notice that it sometimes jumps an iteration of the loop - the timestamp, from 0.6 s to 1 s instead of s 0.6 to 0.8 s.  This occurs regularly throughout the file.  No idea if this due to a physical limitation of the hardware, or the clock, or if it's because of something in my program?  If you could please take a look at my program and help me optimize my screws or give me suggestions on why this delay occurs, I would really appreciate it.  Please let me know if you have other questions too, and I will answer them immediately.  Thank you!

    P.S - Writing on an SD card on a 9802 using these programs also causes the same problem.

    Good afternoon Derrick.

    The following link describes the RT FIFO that I mentioned in my previous post.  It is the method you want to follow to get the data from your host RT to your PC so that you can save data to the PC.  It is a method of choice (when it is an option) because of the increased storage capacity of a PC (in general) and the requirement of transformation to write in the file on the host of the RT.

    FIFO in real-time for deterministic data transfer screws

    http://zone.NI.com/DevZone/CDA/tut/p/ID/3934

    Alternatively, you can use something more similar to the example of "RT FIFO Communication.lvproj", found by searching FIFO in the Finder for example of NOR, to log on to the host of the RT.  Remember that you want to change this example; you don't want to write to the file in a timed loop because your hard drive / memory flash access is not deterministic.

  • How to increase the resolution of the timer loop?

    Hi all

    I use myRIO 1900 for my project of Active noise cancellation. I need to process the audio signal @44. rate of 1 kHz sampling and 50 samples per image. So, I use myRIO personality of broadband.

    Now my problem is simple, I want to measure the time each iteration (loop). I went for the number of cycles normal (msec). Used as a standard [https://decibel.ni.com/content/docs/DOC-11078].

    But my value of the indicator oscillates between 1 and 2. It is supposed to be 1.13msec, but how to find the exact value of timer?

    I think, I can't increase the resolution of tick count (msec) as it is by default is 1 ms resolution and I can't use the clock source external I use myRIO.

    Help me calculate the precise time of loop.

    Thank you.

    RT has express VIs for timers.  You can use this: http://zone.ni.com/reference/en-XX/help/371361J-01/lvexpress/tick_count/

Maybe you are looking for

  • Finder crashing on macOS Sierra

    I have a late 2009 iMac Core2 3.33 GHz, 8 GB RAM processor. After the installation of macOS Sierra, Finder crashes constantly on me. I have to restart about five times a day. Get beach balls when you click on an external drive or a folder. Get beach

  • Question "enter the password administrator or power on password"

    Forgive the redundancy.  I posted this in another thread, but noticed it was 780 deep posts...  DOH! in any case, I recently bought a HP Pavilion used 14-n218us where the system's boot locked up. After 3 tries, I get a SYSTEM DISABLED [82350691] Any

  • Debugging on the issue of the device!

    Beginner again. My Java application with my new Plugin Eclipse 1.5.2 on win7/64 and loving debug so far and I have used a simulator 9330. I've implemented a new program feature that works fine on the Simulator, but when I Pack the app and deploy on a

  • Beneficiaries of blackBerry Q10 suggested during the composition of e-mail message

    BlackBerry Q-10, running the version of the 10.1.0.2011 software When I select the icon of a new e-mail message, I get a new message menu, and between the sections 'To' and 'Cc', there are what look like suggested recipients that seem to rely on the

  • How clear Cookies WebView

    Hi, I want to clear cookies on WebView. What I'm tryin to do, it is something like user to sign out and then sign in again with a different user name. And I need to clear cookies. I try like this but cookies not clearly. WebView { id: myWebView url: