Loop Timing at alternating speeds

I am having difficulty finding a solution to having i.e. controlling a lamp to remain OFF for longer periods than ON. There is Timer that allows no wait states if signal is False but it requires Front Panel action if the signal is True. Is there a VI or function that allows two different delays depending on the Boolean comparison done in the loop?

Lamp ON/OFF timed loop
(Beware of loop delay which might affect the actual time lapsed)
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010
依恩与LabVIEW
LVVILIB.blogspot.com
Attachments:
LampOnOffTimedLoop.vi ‏44 KB

Similar Messages

  • Simulation loop timing

    I am having trouble runnnig my simulation in real time.  I am using LabVIEW version 10.0F2 and acquiring signals using a PCI-6230. In the simulation loop parameters, I am using the solver: Runga-Kutta 1 (Euler) with a step size of 0.005, and in the timing parameters I have it syncronized with the timing source, source type: 1 KHz clock with a period of 5.For a relatively simple VI these settings seem to work just fine. In a slightly more complicated VI, which happens to be saved as a Simulation SubVI for another VI, I see that the loop timing is completely off. Also by removing components of the subvi the timing changes drastically. Please advise.

    duplicate
    LabVIEW Champion . Do more with less code and in less time .

  • Timed Loop timing source - Control Loop From Task is too slow

    I'm trying to make a Timed Loop run at a period of 2 ms, with an analog input task running at 50 kHz as timing source. The input analog signal is scaled and fed into a synchronised analog output task on the same multifunction DAQ board. Using the built-in 1 kHz or 1 MHz clock as timing source for the Timed Loop works great, except for a slight time lag between the loop and my AI/AO tasks which over time becomes unacceptable because my task will be running for up to an hour. However, when I use the DAQmx Create Timing Source: Control Loop From Task vi to create a timing source, everything slows down and the fastest loop time I can get is around 20 ms. Any suggestions to get around this would be highly appreciated!
    System: LabVIEW RT 8.0 with DAQmx 8.0 running on an NI PXI-8186; NI PXI-6251 used for analog input.

    You're welcome!
    You can build an array, and if your data is not hugh (100's of MB) this may be the easiest solution. However, we aways suggest implementing the Producer/Consumer Architecture. Keep the PID in the Producer loop, but move the File IO to the Consumer. Also, it  appears that your instrument uses some form of serial communication, so that could cause lags in your system....
    What is your application about in general, what performance are you hoping for, etc?
    Joshua B.
    National Instruments
    NI Services
    NI Support Resources
    NI Training Resources

  • Match loop timing to existing non-MIDI project?

    Here's the deal: I've recorded a song with a band, using a live drummer. I want to add a tambourine track, using Apple Loops. I assume that, as with GB, the loop plays at whatever BPM the song is. Well, since we did everything "live," I'm not sure how to get the LE7 session to reflect the actual BPM of what we recorded.
    Plus, good though my drummer is, I imagine that he's not robotically consistent - he is, after all, human.
    As the section I need to loop is relatively short (12 bars), is there a way to get LE7 to figure out the BPM of that section, so I can then lay a loop over it?
    Thanks!

    Cut the 12 bars as precise as you can then copy that part into another track with the beginning of the region placed at the beginning of a measure.
    Construct a cycle (dragging the green thick bar on the ruler) over the 12 bars that you created.
    Press T key (if you have not changed default key commands!).
    Now the tempo of Logic should match exactly the tempo of your audio.
    But this depends on how precise is your cut!
    cheers
    rob
    Power Mac G4/533 PowerBook 12   Mac OS X (10.4.6)  

  • Loop timing

    Hi there,
    i try now for Weeks to record a Soundbite and Loop it, as far everything is fine, but how to make it, that the Begin and End fit´s together, i ever have a Gap or it dont fir by Rythm.
    Does someone knows that Problem and how to solve it, s there a Trick or does i need another Software to do that? (It cant be that tricky i gues, or?)
    Best wishes
    Andreas

    I don't think you need seperate loops and local variables.
    Run your FP acq always at 10ms. (what if 100ms later a condition exists to log every 10ms? You would not want to wait 10 seconds!)
    Place the file write only in the TRUE case and also add a tick count to the TRUE case that you feed into a shift register.
    At the next iteration, see if either: (1) The triggger condition is met OR (2) 10 seconds have elapsed Get a tick count and subtract the shift register value, see if it is >10000.
    If the logical OR is TRUE, switch to the case that reset the tick count and appends to the log file.
    If the logical OR is FALSE, execute an empty case that simply wires the old tick count across.
    Let me know if this is clear!
    Message Edited by altenbach on 08-09-2005 08:37 AM
    LabVIEW Champion . Do more with less code and in less time .

  • 9.03 leads to hopeless loop with frightening alternatives

    9.03 seems to want safari 4.0.3 to connect to store but my 3.1.1 safari won't upgrade with OS-X 10.5.2 and upgrading operating system as suggested upgrades safari only to 4.02 so..........
    Can't I just download an older itunes that will still sync with my new iphone, keep my old safari 3.1.1 so I don't have to do some frightening operating system upgrade?

    For that latest version of Safari you need :-
    Leopard System Requirements - Mac OS X Leopard 10.5.8, so that should be your first upgrade.
    iTunes will then be happy.

  • Can I run a fast timed loop?

    It appears that a timed loop cannot run faster than 100 hz. In other words, the "period" input for a timed loop cannot be less than 10. Is this true? I am using the Elapsed Time VI to measure time increments. The time increments output from this VI are at least 0.01 secs regardless of how fast I attempt to run the time loop. Perhaps the limitation lies in the Elapsed Time VI, not in the Timed Loop. Should I try a different approach to measuring the delta time between iterations of a time loop? TIA.
    -jlivermore

    Here's the simple way to measure loop timing:
    Actually, what else is running in your loop (e.g. property nodes, DAQ, etc.)? Can you show us your code? What is your LabVIEW version?
    Message Edited by altenbach on 09-29-2008 11:22 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    MeasureLoopTiming.PNG ‏7 KB

  • What determines Finished Late? flag in timed loop?

    I've monitored the Global Start Time (and Iteration Start) from iteration to iteration in a real-time loop.  These delta time between iteration starts varies beyond my loop rate (e.g. 1680 usec between iteration starts with a 1666 usec period), yet the Finished Late? flag does not indicate true.  Maintain Phase is TRUE, Discard Missed Periods is FALSE, Deadline and Timeout are default (-1).  So why does Finished Late? not fire when all clocks tell me the loop was late?

    A (very) rough example is below and some results (run on an RT controller).  I guess the loop didn't "finish late" but it appears that they can (and usually do) start (significantly) late or early so am I missing something?  This jitter is there even when the Chart and Stop button are removed from the timed loop (e.g. using RT FIFOs to send the data to a chart loop).  To some extent I answered my own question - my loops are not "finishing late" so the flag isn't set, but apparently the jitter here is significant.  In this simplistic example, I saw jitter of +/- 4 ticks (usec) when the CPU usage is at barely 1% per core (dual core) - so is the RT jitter just bad in general or is it the 1Mhz clock or ???
    Attachments:
    RT Loop Timing.png ‏8 KB
    RT Loop Timing Graph.png ‏14 KB

  • Optimum servo pid loop rate

    Hi,
    I want some confirmation on the optimum pid loop rate and the fastest servo motor operation that we can acheive with Pxi-7352 running on Window.
    The manual of 7352 says "62 μs PID loop update rate for up to 2 axes". The requirment is to acheive periodic equi sized straight line and rotary motion ( using yaskawa servo motors in torque mode and 7352 to close position loop ) Both motion are independant and not operating simultaneous i.e rotary completes one full rotation in small steps and then linear moves by one small step then rotary completes next rotation in small steps and again linear motor moves this continues till end of test.
    you can observe here that both rotary and liner motion are periodic and move equi spaced distance for each step with small stoppage/dwell time of 500 u sec , The catch is in addition to positional accuracy in terms of 50 -100 microns the time for complete each step is also very crucial and very small (many peridoc steps together consitute complete linear and rotary motion). Find expected velocity profile attached for more details on desired timing.
    As the motors have simple and periodic straight line and rotary motion i suppose buffered contour moves are not needed which have limitation of 10 msec between two points, then can the time to acheive each step be as low as 2.5 to 5 msec considering best loop rate of 62.5 u sec and highest/worst pid loop rate of 500 usec.
    1. Is the expected timing of 2.5 - 5 m sec feasible assuming that the motor is capable of reaching 5000 rpm which is well above desired speed.
    2. 735x series being high performance motion controller what is the order of closed loop timing that we can expect for simple and periodic moves (say in order of 1000 usec or 10 msec)
    3. Can i interface one stepper motor and another servo motor where both the motors and drives are in position mode on single 7352 and UMI 7772.
    4. Are there any limitation if NI motion is not used for code development and NI motion Assistant along with LabVIEW is used instead.
    This is precision application and the component is very small ,the weight of the component would be less than 400 grams so i hope we do not have to consider inertial affect on motion significantly.
    Appriciate if some one with similar experience can provide more details.
    Regards,
    Bipin
    Solved!
    Go to Solution.
    Attachments:
    Velocity Profile.png ‏21 KB

    Hi Bipin,
    thank you for your comprehensive post. I had a close look at your timing specs and I strongly doubt, that these specs can be met with a 7352 board. Even though the PID loop rate of 62.5µs might be enough, both trajectory generator and the supervisory control (host communication, move command sequencing,...) are too slow to meet your requirements. Please note, that the trajectory generator always works with a timing interval of 10 ms, regardless of the operation mode (linear move, contouring, blending,...), so there is no way to reach your timing specs with this product. In general contouring is the fastest way to run a quick succession of moves, as it doesn't require host communication (by the way: onboard programs don't execute much faster, than programs that are running on the host).
    I don't want to make negative mareketing for our 735x boards, but your timing requirements are just way beyond the requirements of typical motion control applications and it's probably quite hard to find any COTS product in the market, that can meet these specs. 
    With this said, I would like to offer you an alternative solution, that is based on NI's FPGA technology. Additionally to a faster trajectory generator a faster control loop is probably also very desireable for your application. Even with the lowest price Virtex-II based R-Series multifunction board (PCI-7830R) you can run PID loops with 5µs cycle time and the trajectory generator at the same rate. You even can use a different type of control algorithm if required. This technology is leveraged very successfull in a lot of applications with very high performance and accuracy requirements (here are some examples).
    So these are the pros, but where are the cons? Well, the R-Series boards are general purpose FPGA boards and not ready to run motion control boards, so you need to develop the low-level control application by yourself. The good news here is, that it can all be done graphically in LabVIEW and that there are many ready to run examples for motion control, that can be used as a base for your development. Additionally you may want to have a look at the NI SoftMotion Development Module for LabVIEW, that simplifies the development of motion control applications, but it is not a mandatory tool and the benefits of this module might not be as high for your application, as ithey are for more standard motion control applications.
    I hope that helps.
    Kind regards,
    Jochen Klier
    National Instruments

  • Labview timing problem

    I'm kind of stuck with a bit a problem in Labview 7 (base ed.). I've got a PCI-6036E that can sample at 200KS/s with a 24bit onboard timer.
    I've got to set up an experiment that monitors a current indirectly through a potentiostat (1A = 1V scale). The program needs to integrate the current/voltage with respect to time until it reaches a specific value and then tells the program to generate an analogue signal output (this will over and over)
    Surely it should be quite straight forward to read a voltage on one of the inputs, summing this value in a loop until this limit is reached, then outputting a voltage.
    The problem is I'm not quite sure how to approach this considering that I need a time interval of the loop to be ~1-10 microseconds.
    Many thanks,
    Paul

    The only way you're going to get microsecond loop speeds is to move up to the new FPGA board, currently only available for PXI.
    Under Windows, or any GUI OS for that matter, loop speeds and determinism get shaky in the double digit milli-second rates, and anything less than 10 mS is really not reliable. LabVIEW Real Time can get much better loop timing, but you're still limited to the milli-second rate as the CPU can't process any faster than that.
    Anything running on the FPGA is running in hardware and extremely fast and deterministic loop times are possible. I�ve run them in the nano-second range just doing some testing. Data from applications running on the FPGA can be accessed from La
    bVIEW Real Time, LabVIEW or both so you can control what�s going on.
    Your best bet would be to either call NI or your local NI rep and have them get you some more info.
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.

  • Loop Particles to starting point.

    Hello All,
    I am trying to put together a small 2 second clip that will loop forever - WITH LOOKING LIKE IT'S STARTING OVER. I am wondering if there is anyway to Loop the particle generators so that the end point on the clip is the same one that the starting point is, I just can't stand that JARRING JUMP at the end of the clip when it loops - it's totally obvious that it's starting over and I'd like it to look like a never ending background! Thanks to anyone who's got a solution!
    Been at this for hours...
    I've already tried reversing the clip in FCP and while the start and endpoints do match up - the direction changes, AGAIN making that jarring thing happen!
    Thanks again!

    I looped a simple particle system like this- cloned the emitter, then changed the timing to variable speed of the clone, and used Ease in and out on the keyframes.
    Video and project file here-
    http://drop.io/pao9tiv

  • CRIO-9073 scan mode speed

    I am testing scan mode speed of a cRIO module.
    It seems I cannot make it operate reliable under 4 ms loops.
    I'm just reading 6 parameters and writing 7 digital outputs within the timed loop.
    Is this to be expected from this hardware ?
    Martin

    Hi Martin
    There are many factors that we need to consider programmatically, for example if you are using a while loop, timed loop, a timing VI inside of the loop (wait, wait until next ms multiple, etc). also we need to keep in mind how is reading the parameter and writing the digital output if there is any dependency or code that need or is being executed in the middle.
    Last but not the least as you said there might also be hardware limitations in order to confirm this we might need to know which modules you are using.
    One way to determine which is the function that is taking longer to execute, or is delaying your application, is to benchmark a part of your code or the whole code. Take a look to this forum and keep in mind that in order to disable a part of the code without deleting the code is to use the diagram disable structure.
    Regards
    Esteban R.

  • Speeding up Quadrature Encoder Implementation in cRIO FPGA

    Hi All,
    I've got a bit of FPGA code here that I've been running on the cRIO 9073. We've been using 250/500 count quadrature encoders just fine with it, but have recently moved up to a 2000 count encoder and it seems to be missing counts. I'm not using a machine to rotate the encoder, just my hands. Is there anything I can do to speed up the operation of this loop in the FPGA?
    Regards,
    Ken
    Attachments:
    quad_encoder.png ‏51 KB

    Ken,
    What if you tried using a single-cycle timed loop instead of a while loop and set the speed of the loop with an FPGA derived clock? Also, have you tried using the FPGA wizard to generate Quad Encoder code? To do this, right-click on the FPGA target in your project and select "Start FPGA Wizard". You can select a timing engine for Single Point Continuous and then a functions for Quadrature Counter. 
    Hope that helps!

  • Problem with queue timing out?

    Hi all,
    I am using a queue to send a cluster between parallel while loops (producer-consumer); however sometimes, but not on all occasions, the enqueue in the producer seems to "freeze" or maybe timesout for no reason (no timeout value is wired to the enqueue or any other element related to that queue process; so I assume it never timesout)...
    I have checked this and there is data in the cluster that is being enqueued, but the dequeue in the consumer loop is empty... This does not happen on every execution, just occassionally... If I stop and save the vi, it works fine again but the next occurence of this problem.... If I wire 0ms to the enqueue timeout it also works properly again...
    Any suggestions?
    Thanks,
    Jack

    Hi Yamaeda,
    Thanks for the input... Please see code attached (a number of subvis are a missing, but these only help with reading the data file and doing basic analysis on the data after the dequeue).... In a nutshell, there are 3 parallel while loops;  Loop 1: User Interface; Loop2 : Read, Convert, Plot; and Loop 3: Analyse and Write to File.
    The enqueue with the problem is in loop 2 (inside the "Plot" state, then inside the "False" case)... The loop is a rough state machine.
    There are no timeouts on the enqueue in loop 2 or corresponding dequeue in loop 3.... The dequeue does not timeout based on a constant "false" from an indicator when the problem occurs.
    When the dequeue does not work, memory usuage keep increasing until a "Memory Full Error" and the vi aborts.... This does not happen when it runs properly.
    The data being queued can be quite large (upto 1M rows x 7 columns of data and does occur quickly (basically, data in the top graph is min-max decimated based on graph pixel width as I read on the NI white paper for displatying large data sets; the data between the start and stop cursors is then sent as a subarray to the enqueue for a fully display on the bottom graph for closer analysis)... Perhaps the queue is filling? I did not know this was possible (I am using a100ms wait for loop timing).
    Any suggestions greatly appreciated.
    Thanks,
    Jack
    Attachments:
    Neuro Analysis 2.vi ‏461 KB

  • Timing for Data Acquisition Using Notifiers

    I'm trying to use notifiers to transfer data from an acquisition (master) loop to the slave loop. I want data to be transferred for analysis only when the VI is in a certain state - not in all states. That's why I'm preferring to use notifiers instead of queues (I want all data collected during the other states to be disregarded). I have attached a simplified version of what I'm trying.
    The master loop generates a data point every second. The slave loop is in a "delay" state for 5 seconds and then in "acquire" state for 3 seconds. Given this architecture I would expect no data for 5 seconds and then 3 data points to be plotted during "acquire" state because only one data point is generated per second. But for some reason I get 5 or 6 data points during every acquire cycle. I haven't figured out why I get 5-6 data points instead of 3. It probably has to do with the timing functions I'm using.  
    Thanks!
    -Arnie 
    Attachments:
    Notifier Data Transfer Template.vi ‏62 KB

    Here is an example of a race condition without the use of local or global variables.  What is happening is that the notifier is already queued up with a value even before the Elapsed Timer has even started.  So one extra value will be in the output array.  Also, depending on how the parallel loops perform (which goes first), there may be an extra value queued up before the Time Elapsed event could fire.  Typically, when I ran it, I got an array size of 6 at first, and then it went down to 5.  Clearly the architecture is not right for what you want to do.  Instead of depending on timers and parallel loop timing, you could receive all the values queued and just discard the ones you don't want.
    - tbob
    Inventor of the WORM Global

Maybe you are looking for

  • ITunes will not open, please help

    the instruction at "0x0079f791" referenced memory at "0x7ffe0304." the memory could not be "written" This is the error received by my friend when she tries to start her iTunes, and I was wondering if anyone else had seen this; It sounds more like a m

  • Displaying a column in report which returns null value

    Hi I have a simple report with two column. The query is as below. SELECT decode(caste,1,'SC/ST',2,'General','3','PWD') fcastepi, nvl(count(*),0) fcapi FROM applicationformdtl WHERE year = :p_year AND selected = 1 AND PROGCD = 'PRM' GROUP BY caste Thi

  • The panel with White Balance, contrast, exposure, whites, blacks, etc. has disappeared from my Develop screen

    The panel with White Balance, Exposure, Contrast, Tone, Whites, Blacks, etc has disappeared from my Develop screen.  The control panel on the right side now starts with Tone Curve and I can't find a way to revert back to the screen with the other adj

  • Cannot transcode to Flash Video from Encore 3

    I have recently purchased the Adobe Production Premium package and successfully prepared several Blu-ray and standard definition DVD's. However, whenever I attempt to output any of these DVD's to Flash Video by selecting Build>Output to Flash from wi

  • Reg. User Exit for TCode FCH5

    Hi All,            Is there any user exit for Manual Check Entry Program (Tcode FCH5) that will not allow user to make any modifications in existing check's. Thks Shailesh