LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in updating value at different time interval

Hello,

 

Can anyonce suggest me how to update different value at different time interval.

 

I want to use only one while loop but I should be able to send data at different rate.

 

Eg:- I have 3 input ,10,20,30

 

I need to give output 10 at every 5 ms

20 at every 10th sec

30th at every 13th sec.

 

so my output should be

 

 

10 at 5th sec

10 at 10 sec

20 at 10th sec

30th at 13th sec.

 

 

Please let me know if anyone has solution for it.

0 Kudos
Message 1 of 8
(2,607 Views)

Is it one output, or different outputs?

 

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 2 of 8
(2,606 Views)

The output should be only one at a time..

As explained earlier.

I need to send every 5th,7th,10th seconds the corresponding output.

like when it is 5th second i should output 10, then at 10th ms i should output 2 output like wise

0 Kudos
Message 3 of 8
(2,600 Views)

Cant you put the time you started in a shift register and then check how much time has elapsed.  If the desired time has elapsed, execute a certain case (with in this case a certain value).

If you want to reset the timer, just put the new time in the shift register.

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 4 of 8
(2,597 Views)

I have already used shift register. My problem is how to keep track of my previous output.

I have problem keeping track

consider i reached 10th sec. At this point i should able to send 2 output. one as a result of 2nd 5th sec and other as a result of 10th sec.

at 10th sec

the output should be

5

5

10

0 Kudos
Message 5 of 8
(2,593 Views)

you can add a second shift register which holds track of the sequence you were in the last time.

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 6 of 8
(2,591 Views)

Is this under windows on in a realtime system?

 

In the varous posts, you are sometimes talking about milliseconds, sometimes about seconds

 

You could run a timed loop at 5ms time and use quotient and remainder for each multiple with three parallel case structures.

 

Here's a possible solution for the case:

 

  • output 10 at every 5 ms
  • 20 at every 10th sec
  • 30th at every 13th sec.
as in the original post...

 

0 Kudos
Message 7 of 8
(2,584 Views)

I did almost the same thing.  I basically created a timed loop that "ticks" once per second, wired in an array of intervals (I used 3, 4, and 5 seconds, as they have interesting patterns of when they are coincident and when they are separate), and an array of values to be output at each of these intervals.  I chose to simply sum the outputs -- you could easily direct them to multiple output channels (hmm, maybe I'll add that before I paste it in here!).

 

Bob Schor

 

Multi-Timer Demo.png.

0 Kudos
Message 8 of 8
(2,576 Views)