LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Leaping x value in lvm file

Hello everyone,

 

I have a strange case of jumping time in my LabVIEW data acquisition code.

 

As a background, I am doing data acquisition both through the NI cDAQ (using DAQ Assistant) and through the serial ports (RS-232 and USB with a RS-232 module, accessing them through LabVIEW with the VISA functions). All this is incorporated into a single vi. I am logging data from both the DAQ and serial port to a measurement lvm file. I noticed strange behavior in the X_value column. The values in the column (which I always thought corresponded to "time" since data collection start) tend to ascend linearly, then leap down (also into the negative values) and then leap up. This trend continues.

 

When graphing the X_Value vs. DAQ signal the trend seems to make sense (ignoring the leap downward and breaks). In my attached example, the trend looks linear (as it should)

When graphing the X_Value vs. RS-232 signal, the trend is choppy and does step jumps (as it should NOT)

 

I also tried graphing with respect to the row number in excel - since this is the order the data comes in.

Graphing with respect to the row has the OPPOSITE effect than graphing vs. X_Value

 

When graphing the Row vs. DAQ signal the trend is choppy and leaps.

When graphing the Row vs. RS-232 signal, the trend is smooth as expected.

 

 

I am attaching the excel file with my data and graphs. I also highlighted the leaping downward time values in yellow.

 

 

 

Does anyone out there have an idea of why this is happening? Which time should I trust? Are the DAQ and RS 232 interfering with one another in some way? Thank you in advance for all your help!

 

 

0 Kudos
Message 1 of 2
(1,992 Views)

It may help to see your code.

Anyhow, looking at your raw X values, it appears that your data is acquired every 62 ms. Then about every 8 seconds, you get an additional point which appears to be the first one of the past 8 seconds. Then nothing is collected for about 8 seconds, and the pattern repeats. Since that represents bunches of ~128 data points, it seems that something odd is going on in your code. I don't quite see what on your PC/cDAQ could take 8 s during which your code would become irresponsive (and miss data), but maybe you do...

0 Kudos
Message 2 of 2
(1,985 Views)