LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a time delay in Labview

Solved!
Go to solution

Hi, I am very new to Labview and I was assigned a task in school. I am supposed to produce an array with a given range and interval (which I had attached), however a time delay is needed such that the elements in the array would appear consecutively. How should I add this time delay into the loop? Would really appreciate someone's help, Thanks!

 

0 Kudos
Message 1 of 4
(2,338 Views)
Solution
Accepted by topic author shuling

If you want to watch the elements be added to the array, then you need to use a shift register to hold the array, a Build Array to add elements to the array, and move the terminal inside of the FOR loop.  As far as timing, just put a Wait (ms) function inside of the loop (look in the Timing palette).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(2,326 Views)

Hi, does that means I will need another for loop to add shift register in order to put an array in? 

0 Kudos
Message 3 of 4
(2,263 Views)
Solution
Accepted by topic author shuling

No - you can read about Shift Registers here, but essentially they are attached to any For or While loop you'd like.

They are used to store data between iterations of the loop on which they are added/placed. (Edit: An additional relevant point that might not have been obvious - you can add as many as you want to the same loop).

 

If the outside-left edge is not wired, then you have an "uninitialized shift register", described in more detail in the linked post. You don't want this here (but you can try it and see what it does). You'll probably instead want to wire an empty array to the left edge node (from the outside - the inside provides the updated value each iteration).


GCentral
0 Kudos
Message 4 of 4
(2,255 Views)