LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I prevent labview from offsetting my data output by a fixed amount for 0.125 seconds of every 1 second iteration?

Solved!
Go to solution
How do I prevent labview from offsetting my data output by a fixed amount for 0.125 seconds of every 1 second iteration? (I have my DAQ Assistant contained within a while loop so that i can control the number of iterations and thus the sampling time).
0 Kudos
Message 1 of 6
(2,917 Views)

Can you please elaborate on the problem?

You have the loop running every second, but there is a lag in LabVIEW?

So your data file's time column reads :
1

2.125

3.25

4.375

5.5


Is that correct?

Cory K
0 Kudos
Message 2 of 6
(2,904 Views)

Cory K wrote:

Can you please elaborate on the problem?

You have the loop running every second, but there is a lag in LabVIEW?

So your data file's time column reads :
1

2.125

3.25

4.375

5.5


Is that correct?


I don't think the original poster used the word "file" anywhere in their post but.....

 

I'll bet hmmm.... 5-Kudos (to be paid off over time) that there is a file being opened, written, and closed for every iteration (well at least written).

 

Anyone want to take me up on that one?

 

If that is the case the final solution is switch over to producer/Consumer.

 

Have fun!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 6
(2,896 Views)

Are you using a while loop or a timed loop?  How are you controlling loop time (wait, wait on next ms multiple, etc)?  If you're using one of LabVIEW's wait functions, realize that that's only a minimum wait time, not an exact time, so if you put a 1000ms wait in a loop your loop will execute slightly slower than that.  Is your data acquisition hardware or software timed?  If you have the option (which hardware are you using?), you'll get more precise timing if you let the hardware control it.

 

Can you post your code, or a screenshot of it?

0 Kudos
Message 4 of 6
(2,890 Views)

Ben wrote:

I don't think the original poster used the word "file" anywhere in their post but.....

 

Ben


Well he said 'data output' so I assumed.... but everyone knows what happens when you assume Smiley Very Happy

Cory K
0 Kudos
Message 5 of 6
(2,855 Views)
Solution
Accepted by topic author McMaster Student

My appologies for such a poorly worded problem statement. The issue that I was facing was that the signal that i was obtaining from a pair of accelerometers and run through an amp. into my DAQ board was experiencing an offset in voltage for a short period each 1 second iteration. It turns out that the problem was that both my laptop and the amp were connected to earth ground. Once I disconnected the earth ground from the signal ground in the amp the signal offset went away.

 

Thank you for your posts.

 

Kevin

 

0 Kudos
Message 6 of 6
(2,735 Views)