Sim. arb. signal within Timed Loop?

Hi there,
Is there any inherent reason I couldn't/shouldn't put a Sim Arb Signal VI within a timed loop? I have a scenario in which i need to modulate an arbitrary signal as the experiment is being run. I've placed the express vi inside a timed loop set to execute every millisecond. The express VI is setup to generate a single point of a arb signal with a dt=1. It seems however that it generates the whole signal each time the loop is called. Is there an appropriate example or tutorial somewhere out there in cyberspace?
Apologize for not posting an example, but I am working from home tonight.
Regards,
Matthew Pausley
NC State University
Raleigh,NC

Matthew,
I have tried making the simulate arbitrary signal vi output a singal point using your suggestions and it worked.  Perhaps you need to compare the VI you are using with this one. 
I hope this helps.
Steven T.
Message Edited by Steven T on 10-16-2006 11:46 AM
Attachments:
example2.vi ‏110 KB

Similar Messages

  • Using timer/counter with PCI-6221/USB-6210 to control timed-loop VI

    Dear all,
    I need to ask about two devices and one of their functionalities, PCI-6221 and USB-6210. For our NI-based system, we need to control some timings in a Timed-Loop vi, for that currently we are using PCI-6221 and we give external TTL signal (at 1 kHz) to it,
    recenntly we need to make some changes and for that we found USB 6210 DAQ to be more suitable, but we need to clear ourselves on some specific things.
    Can the counter/timers functions available in the either PCI 6221 or USB 6210 can be used to control the Timed-loop VI by giving external clock or by using their own internal clock source?
    Although we are using external clock with the PCI 6221 but we want to know about the usage of their internal clock, also are controlling timed-loop also possible for USB-6210
    Also... What if we use the RTOS, are they still able to control the timed-loop VI  without giving any 'EXTERNAL CLOCK' and using the internal clock sources of the DAQs
    Waiting for reply,
    Bests,
    RaJaf
    Solved!
    Go to Solution.

    Ben,
    I having read previous email which I send earlier with general overview, we discussed in more detail within our team and I am giviing the specific answers.
    Please check in RED the most recent answers. Blue are the questions/suggestions by your side.
    1.    Using Internal hardware clock of PCI-6221 would enable us get rid of external clock, but how to divert the internal hardware clock to the current settings. Any idea  (can you provide us with some reference manul for otherwise). I mean is there some flag-bit etc. or VI
    2.       Is it also meant that with the installation of RTOS the timed-loop can directly get the timing source from the internal hardware clock PCI-6221? --- How???
    3.       In order to make desktop to work as RT system, what is the hardware (motherboard, processor, etc..) requirement? What are the LabVIEW modules (specific name) that needed to be installed? Our platform is LabVIEW 8.6. (Currently we have windows-7 with i7 core processor)
    What kind of application are you intending for this system? ---- high-speed laser scanning system.
    Are you most concerned about accuracy, speed, or responsiveness? To control the laser mirror scanner to move at 1 kHz or 2 kHz speed. On the other hands, using PCI-5105 (128 MB memory) as a DAQ for real-time/on-the-fly data processing.
    Bests,
    RAJAF

  • 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

  • Unable to run Timed Loops

    Bit of an odd one that had me scratching my head.
    I have a development system consisting of a PC running a 7842R, acquiring analogue and digital data from the FPGA, loading it into a shared variable, and reading it out within a timed loop on the host as one parallel loop in a producer-consumer architecture.
    All's well until one day last week when I noticed my host VI becoming unresponsive.
    After a bit of digging, I find that the timed loop doesn't run at all. Replacing with a while loop with a wait at least allows me to show that the error is timed loop related, but it's not a viable long term option for me. Creating a new project and a new VI with a simple timed loop showed the same behaviour.
    A restart of the system, and rerunning the same VIs, and no problems since.
    So, questions:
    1) Has anyone else seen this behaviour?
    2) Any idea what causes it? A service crashing, for example?
    3) Is there a way of recovering without a reboot? If it's a service crash, I'm hopeful.
    The system will eventually form part of a production test environment, hence the query.
    Edit - also, wiring error terminals of a timed loop is a good way of highlighting errors of course.
    FWIW, LV2012 SP1 32bit, Win7 64bit, Core2 Duo, 4GB RAM, tassels from the handlebars etc.
    CLD

    The timed loop is used to read all elements from a DMA FIFO and load them into a buffer FGV, which spits out packets of N samples long once they've assembled within the FGV. Ordinarily, I'd do this with a timed while loop and be perfectly happy to do so. However, the elements are actually an interleaved array, meaning that I have to demux them in the correct order that they were loaded.
    I use timed loops for a number of reasons: on my current Windows host, I've found that using a while loop has caused me more problems with respect to disordered packets, and that at least with using multiple timed loops (two, at most), I can assign priority to the acquire loop. Finally, it's also a development platform, and will be deployed onto an sbRIO once the electronics integration is finished in a week or two!
    W.r.t. system resources, there's very little else running on that system, but that doesn't normally stop Windows
    I recognise it's not ideal to run a software timed loop under Windows, but when you cannot run a blank project with Optimizing timed loop rate.vi from the shipped examples with nothing else running, it makes me curious to know why!
    CLD

  • Producer consummer loop and timing loop

    Hi,
    I have to acquire 32 signals and record each signals. I would like to acquire my signals at a sample rate of 100kHz. But I tried with a different sample read and I have always an error of overwritten.
    In my producer loop I read and display all signals and in my consumer loop I record and resample my signal.
    But I thought It was maybe I haven t a timing loop in my producer and consumer loop and it slow my read in the buffer.
    So do you think my error due to I haven t timing loop? And if it s yes, where do I put my timing ? in the consumer or in the producer loop.
    Thank you very much for your response
    Romaric GIBERT

    Why did you start a new message thread?
    You were already being helped here.

  • Unrecoverable Error w/ Timed Loop

    When I use a timed loop I get an "Unrecoverable Error" (status light on FP-20xx blinks four times) after compile and run - although not immediately. When I replace the timed loops with regular while loops everything is o.k.
    TommyH

    Hi TommyH,
    Thanks for the information. I understand that all this stuff can be a little overwhelming. That's OK. We'll get through it.
    Sounds like this is a case of the code not being able to execute within the allowed amount of time. So, in this case I would suggest not using the timed loop because the code will not be able to execute within 1ms. I would suggest using the regular while loop and using a wait until next millisecond multiple timer. You will need to experiment with the code to determine how long to wait. Give this a try and let me know how it goes.
    Best Regards,
    Brooks W.
    National Instruments

  • Problem programming Timed Loop period

    I was trying to use the Time Loop in a FPGA target. I lost all day trying to figure out why the Time-Loop worked at a fixed period instead of the period I programmed. Finally I found out in this website that the time-loop works different in a FPGA target than in a normal VI. National Instruments should add a hint on the "Context Help" about this.
    Isaac

    Dear
    Issac,
    When you code VI for the
    FPGA target you should always thing that you are very close of the hardware.
    As mentioned in the context help and the help of LabVIEW, If you use the Timed Loop in an FPGA VI, the loop
    executes one subdiagram at the same period as an FPGA clock.
    The SCTL provides faster
    execution of the LV FPGA diagram, allowing each cycle of the loop to execute in
    one clock cycle. This enables up to update a signal line at the FPGA base clock
    frequency. The SCTL also optimizes the code generation so that the code on
    the FPGA is more efficient and uses less FPGA real estate. However, there are
    several restrictions on the code implemented inside of a SCTL
    To have more details
    about the timed loop (SCTL) you can have a look at the following link :
    Chapter 7 of LabVIEW 8 FPGA Module Training
    help:Timed Loop (FPGA Module)
    Using Single-Cycle Timed Loops to Optimize FPGA VIs (FPGA Module)
    Best regards,
    Nick_CH

  • Who know the difference between the two Timed Loop structures in NI's examples named PAC Simulation.vi?

    My LabVIEW version is LabVIEW 8.0.
    When I look up the help document about Timed Loop, I find two examples about Timed Loop with the same file name and different file path.
    One is "labview\examples\general\plat-timedloopframes.llb\PAC Simulation.vi",
    and the other is "labview\examples\general\timedloop.llb\PAC Simulation.vi".
    The function of these two examples is almost the same. But they display different results when running. I debug them and find that the value of Actual Start [f] of these two timed loop is different. Its value is constand in one vi and increasing in another vi. But the configuration of these two timed loops is the same.
    Can anyone tell me the diffrence between these two timed loops?
    Thanks!

    After I posted this, I realized there was one more "Time" clock, namely the Time node on the Event structure.  How is this clock (which I will call ET, for Event Time) related to the Global Start Time (or GST) and the TimeStamp (TS)?
    ET represents time in milliseconds, using a U32.  The largest value that can be represented is roughly 4 billion, but there are more than 30 billion milliseconds per year.  Hence this "clock" cannot directly keep the same time as the GST or TS.
    However, on the PC, if you multiply the ET value by a million (thereby converting the time to nanoseconds) and compare this value to GST, you'll see they are basically the same.  Thus, on the PC, ET and GST are "in sync", but not in sync with TS.
    On a real-time PXI system, we already established that TS and GST are "in sync" -- what about ET?  Curiously, this does not seem to be synchronized with anything.
    A Word to the Wise -- when I originally added the Event structure, I synchronized it with the Timed Loop using a Value(Signalling) property node, which worked fine on the PC, but failed to fire on the PXI.  I'd forgotten that you can't use this trick on real-time systems, as they have no Front Panel objects, hence the implementation using Dynamic Events. 
    Attachments:
    TS GST ET VI.png ‏16 KB

  • Timing Loop won't Execute

    I think this is a labVIEW bug, but I'm looking for a work around or a 'gotcha'.
    I was attempting to create a timing loop for the purposes of sychronizing two sections of code within a VI.  The timing loops would not execute and so as part of the debugging process I created a simple empty timing loop with a 'stop button' in it.  Put a probe on the wire between the stop button and the stop terminal of the timing loop and executed my VI.  The Timing loop never executed.
    I then created a new VI to continue debugging the timing loop: I created a new VI and a new timing loop with only a stop button, placed the probe in the same place, (between the button and the stop terminal) and ran the 'untitled vi'.  In the new vi the timing loop ran as intended.
    All I can think is that there is some VI property in my rather complicated VI that prohibits timing loops but is not producing an error or warning.  I did check the VI properties and though they are not default there isn't anything that should be interfering with running a timing loop (e.g. critical execution).
    I'm looking for solutions and work arounds.  
    Using LabVIEW 2014 SP1 32 bit.
    -Regards
    eximo
    UofL Bioengineering M.S.
    Neuronetrix
    "I had rather be right than be president" -Henry Clay
    Attachments:
    timing loop.PNG ‏9 KB

    The attached image of the first post is the disfunctional version, Attached to this is a segment of the VI with the example disfuctional timing loop at the bottom right.  
    -Regards
    eximo
    UofL Bioengineering M.S.
    Neuronetrix
    "I had rather be right than be president" -Henry Clay
    Attachments:
    Timing loop not working.PNG ‏68 KB

  • Priority limits on a timed loop

    Hi,
    With reference to the value of priority in a timed loop, the help says that this value must be between 1 and 65,535.
    Anyone know what these limits are referred?
    Thanks for your time...
    Solved!
    Go to Solution.

    amflores wrote:
    Hi,
    With reference to the value of priority in a timed loop, the help says that this value must be between 1 and 65,535.
    Anyone know what these limits are referred?
    Thanks for your time...
    Timed loops run in a dedicated execution system at a priority above high priority but below "Time Critical"  if there is more than one timed loop running the timed loops priority value is used to signal the OS which loop should get the larger amount of processor time. The lower the number the higher the priority requested.  Some OS's even respect that number.  Some do their own scheduling anyway. 
    Jeff

  • Timed loop works not well

    Hi,
    how can I get a digital signal shorter than 25 microseconds? I am using
    a RT-system, and I am using a timed loop with the internal clock, but I
    can't get it faster than 25 microsecs.
    Thanks
    Tim

    Tim,
    Sorry I don't know much about RT but you may find a better response to your questions if you post in the real time forum.
    http://forums.ni.com/ni/board?board.id=280
    Brian

  • Timed loop and CPU usage

    Platform is WIN_XP Pro and machine is a P4 at 2.5Ghz with 512 Mb ram.
    LV7.1 + PCI 6229
    I am using  50ms Timed loop for running a state machine inside it
    and also a  whole lot of other things like reading / writing
    DAQMx  functions;  file I/O functions and such. As the
    project involves a  main and sub-panlel set up local variables
    could not be elimnated fully and there should be something like 150 of
    them. But not all are accessed always - maybe about 15 of them at any
    given time depending on the SM staus.
    Problem :
    Once started the "Finished late"  indication  is off and
    the  actual timing  alternates between 49 to 52 ms. The CPU
    usage is around 25%.
    But as time goes by,  the system gets unstable : After 15 minutes
    or so, the Finished Late indication is always ON and the CPU usage is
    gradually tending towards or exceeds 100%. 
    Obviously the machine control timing now gets affected and things slow
    down badly. Closing the application ands restarting repeats the above
    cycle.
    I am at a loss  to understand what is happening ?  WIll
    breaking down the single Timed Loop to multiple ones help  ? WIll
    that be an efficient way of parallel threading ?
    I can post the code but its quite large and will do it as a last resort.
    thanks
    Raghunathan
    Raghunathan
    LV2012 to Automate Hydraulic Test rigs.

    Hello,
    It sounds like an interesting problem.  It would be worth some experimentation to figure out what's going wrong - attempting to decouple major "pieces" of the code would be helpful.  For example, you could try breaking your code into multiple loops if that makes sense in your architecture, but perhaps you could even eliminate all but one of the loops to begin with, and see if you can correlate the problem to the code in just one of your loops.
    Another concern is that you mention using many local variables.  Variable read operations cause new buffer allocations, so if you're passing arrays around that way, you could be hitting a problem of forcing your machine to perform many allocations and deallocations of memory.  As arrays grow, this can be a bigger and bigger problem.  You can use other techniques for passing data around your block diagram, such as dataflow if possible (just simple wires), or queues where dataflow can't dicatate program flow completely.
    Hopefully looking into your code with the above considerations will lead you in the right direction.  In your case, removing code so that you can identify which elements are causing the problem should help significantly.
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • Student lost ability to audition loops within the loop browser

    Colleagues,
    My students were composing songs using GarageBand 3.0.4 in our Mac Lab.
    Two of my students showed me that, after they'd laid down three or four tracks by dragging loops into the main window, they could no longer get loops to play inside the loop browser. They would click on a loop, and nothing would happen.
    The loop would play once it was clicked and dragged into the window, but it would not play from inside the loop browser.
    Does anyone have any idea what my students might have done that could cause them to be unable to audition loops from within the loop browser?
    Thanks in advance for any insight you might be able to provide.
    Paul Daniels
    Pennridge Central MS
    144 North Walnut Street
    Perkasie, PA 18944

    Just drop them on the Loop Browser and the rest should be taken care of.

  • Questions about parallel and series sturcture in SCTL (single clock timed loop) in FPGA VI

      I am using LV 8.2.
      I have wriiten a FPGA VI, in this VI, there are 3 filters inside the SCTL (single clock timed loop) (I use the shift register to be the effect of unit delay). Would I save the resources of the FPGA used (such as slices and LUT) in the compliation report if I use 3 SCTL ( 1 SCTL contain 1 filter)  and cascade them in series?
      Thank you! 

    Sorry, I am afraid that you have misunderstood my meaning.
    Here is the method you suggested before:
      I mean I use the shift registers attached in the while loop, not in the SCTL. The number of shift registers used will not be decreased when we increase the number of SCTL in the second plate of the flat sequence structure.  Totally , there are 6 pairs shift registers for 3 filters (1 filter needs 2 pairs). I mean I put the calculation parts, such as b0*x[n]+b1*x[n-1]+b2*x[n-2] inside the SCTL ( the operations of multiplication and add). Instead of putting 3 filters numeric operation part in one SCTL. will we reduce the resources used if we use 1 SCTL to do the operation parts of 1 filter? As the code inside each SCTL will be reduced.
      Maybe you tell me if such approach will reduce the reosources used? Or there is no difference?
      Thank you!

  • LabVIEW RT, Timed loop, finished late, Call by reference

    I have a timed loop triggered by the sample clock of a DAQ-Card. The sample Clock is 8 kHz and the loop will run with dt = 4. Normally the loop is running without finished late[i-1]. But from time to time it happens that the loop is running extremly longer which means instead of 0.5 millisec it needs 4 - 5 millisec. It seems this doesn't never occur while accessing DAQmx.
    The application uses plugin technologies and some of the VIs in the timed loop are preloaded and called by Call by Reference.
    Does those VIs inherit the priority, execution system and CPU of the timed loop?
    The application is running on LV RT 2009 on a Dual core PXI-Controller. The timed loop is bound to CPU 1. There is no  difference runinng the application from the development environment or as a startup application.
    For the measuring test  I modified the application in a way that I don't have:
    disk access for storing the result file
    TCP/IP communication
    Controls on the front panel of the top level VI
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

    To keep you informed:
    I stripped the application and have left only the measurement storing module and the timed loop. The loop was using the microsecond timer running each 500 µsec. Additional all Non-Real-Time modules were loaded and only one module creates a XML string and sends it to the communication layer which will drop it because no TCP/IP port is open. The creation of the XML string is done each 300 ms.
    In this case I don't have any finished late iterations
    Next I added the DAQ Module. Now I get finished late again but with a lesser frequency as original.
    I removed all unnesseccary tasks from the DAQ moulde leaving one task for a PXI-4204 for using as the clock source for the timed loop. No I get finished late seldom.
     I removed the module which will send the XML string and I don't get finished late.
    Next I was adding code to see memory allocation. I can when memory allocation is changing but it is not related to the finished late iterations.
    Next time I have the chance to do more tests I will see which DAQ task triggers the finished late iterations. I have one AI task on a PXI-4204,  4 Counter tasks on a PXI-6602, 1 DI task on a PXI-6514, 1 DO task on a PXI-6514, 1 DI task on a PXI-6259, 1 DO task on a PXI-6259, 1 AO task on a PXI-6259 and 1 AO task on a PXI-6711.
    The AI task on the PXI-4204 is running in Continous Sampling (Single Point HW Timed is not supported), all other tasks exept the DI and DO are Single Point HW Timed.
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

Maybe you are looking for