10-18-2016 09:09 AM
Hi there,
I am controlling two serial VISA in one loop. it makes it more convinient as I am recording data into an aray, which is then sent into a excel file.
My problem is that my loop is looping every 500ms... over two weeks of acquisition I would get over 2 500 000 collums. So I would sample every, say 20s. Would you have a way to do it ?
here is my VI.
Flo
10-18-2016 09:45 AM
I can't open your VI as I only have LV2014, but there are a couple of possible ways to do this:
1) Create a timer (e.g. FGV or the Elapsed Time Express VI) and then only write the data if the time has elapsed (with the auto-reset set to True so it happens every 20s)
2) Use the iteration counter or a count on a shift register and log the data after every n-th iteration of the loop
10-19-2016 03:34 AM
Hi, I'm Nick, Applications Engineer at NI.
You should follow Sam_Sharp's advice on that. To illustrate his second point better, I have put together a simple VI demonstrating the functionality. Have a look at it, you should be able to incorporate something similar in your code.
10-19-2016 04:21 AM
that solution doesn't work for my application. Instead I share my variable with a third VI which collect every data and builds arrays in a loop timed at 5000ms. That works fine 🙂
Flo
03-07-2017 09:40 PM
Flow-w, how do you collect the data and put it into array.?
Can you share that part of your vi.