LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

run a for loop for specified time period

Hello to everyone,

I am trying to create a data acquisition system for a NI 9162 board. I need to acquire a certain quantity of data (for example 10 minutes) each half an hour for example and repeat this process a lot of times. I am trying to do this with a loop execution but this is not working well. The first data acquired  is ok but in the rest there are a lot of problems. The times are not being respected and the board is not acquiring anything. Does anyone can help me? I am attaching the VI that I am using.

Thanks,

0 Kudos
Message 1 of 6
(2,897 Views)

You can either use an System.Timer event OR a timed loop in the Structures pallete.

Use the NI Example finder and search for timer to get an example of timed loops.

Or use a .NET constructor, go to System in the drop down, the select System timer for the timer control, register the event callback.

 

________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 2 of 6
(2,891 Views)
Hi Rafo,

atleast for the timing I may help:
you have to respect dataflow, so put your wait statement in a second frame of the sequence to really "wait between events"!

To get a stable timing you should use a timed loop instead...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 6
(2,886 Views)
Hi GerdW and TWGomez,

GerdW the VI is still not working properly. I don't know what happen but since the second cicle the data get crazy, it is like I am waiting the time but after that the 75% of the initial acquired signal is just nothing like the time is not being respected (It is acquired very quickly).

TWGomez could you please convert your VI for Labview 8.0. Do you know a simple tutorial to learn timed loops because the example in labview is quite confusing.

Thank you very much for yoo both guys.
0 Kudos
Message 4 of 6
(2,868 Views)
Here is a zip witht the 8.0 version
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 5 of 6
(2,863 Views)
Sorry, forgot to respond to the tutorial question.
I don't know of any good tutorials, the LabVIEW help files are pretty useful though.
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 6 of 6
(2,860 Views)