08-30-2011 12:15 AM
How to convert a Timed while loop to normal while loop with exact same properties and execution?
I donot need to worry about the exact timing. But it need the While loop to be executed similar to timed loop.
And also, is there any issue faced when we use Timed loop? problems like crashing of exe??
Solved! Go to Solution.
08-30-2011 12:51 AM
Hi,
You can just right click on timed loop and select the option Replace with while loop and the timed loop executes at the period you specify, you can assign priorities and it is used for time critical applications read context help for more details. And in while loop you can put wait ms timer to specify the delay.
And what are the properties you have set in timed loop?
Using Timed Loop will not crash your exe or code.
08-30-2011 12:54 AM
Hi Karthikeyan,
Follow the below mention step to switch Time loop to normal loop.
You are going to design system with time loop or while loop for your Data Acquisition. It's upto you how you want to design the system or you feel more comfortable in your coding. Check this data Acquisition Link for more detail of while loop data acquisition.
08-30-2011 01:06 AM
This is the timed loop that i want to convert.
I put a "Wait until next ms muliple" block with constant wired as 10 (10 ms).
Will that be sufficient?
Does Loop timing source 1KHz relevent in normal while loop? if so, how to attain that property in while loop?
08-30-2011 01:27 AM
08-30-2011 01:34 AM
Check the data acquisition link in my above post. No need for delay in while loop. You have to configure your sampling rate and number of samples to read to decide your acquisition rate.
08-30-2011 01:57 AM
in My timed loop, dt is wired to constant 10.
I am using Ni USB Scope 5132. I need to aquire samples in regular intervals.
In configure time loop window, it is choosen as 1 KHz.
It is confusing. Which is actual time of the loop????
08-30-2011 02:24 AM
Hi,
1kHz is the base clock used. Then, you decide to use 10 as period (dt) wich is 10ms.
The clock is selectable because in Real-Time systems you can use the 1MHz clock, giving µs resolution.
But for your needs, using 1kHz clock with dt=10 and using a wait ms with 10 wired to it is exactly the same.
Olivier L. | Certified LabVIEW Developer
08-30-2011 02:30 AM
Thanks a Lot..