From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data in waveform doesn't match data in excel file

Using a potentiometer to measure angle rotation. All was working well until we discovered we had to change up the way we were doing things for various reasons. We also got new pots. The pots we got are 10 turn, so they don't have as much variation in resistance from say 90 degrees to 45 degrees, but they are very linear and that makes me happy. Before I was calibrating using a loop that I made, it worked well for what I was doing before but now that things have changed, I started using the calibration on the DAQ Assistant. 

I have the output from the DAQ Assistant going to a waveform so we can monitor it, then to an exported file. It should be the same data. However, the waveform is beautiful and shows us exactly what it should, and the excel file is just garbage. Random numbers with lots of 90s thrown in there for no apparent reason. I really don't understand what's going on. 

 

Can someone look at this for me and tell me what I'm doing wrong? 

 

(Oh, and I added that image to the excel file to show what the waveform looked like. The data in the red box should be what is in the chart during the time I was recording data to the excel file)

Download All
0 Kudos
Message 1 of 3
(2,007 Views)

Why is the Data Collected Indicator a 2-D Array?  Your DAQ assistant is returning a single scalar.  Shouldn't it be a 1-D array?

Similarly why are you writing a 2-D array into your spreadsheet file when you're really just inserting a single point in each iteration?

0 Kudos
Message 2 of 3
(1,989 Views)

OH NO! In addition to Taki's absolutely spot on analisys.

The data is in the excel file.

RECURSIVELY!

Untitled.png

 

What are you thinking!!! just right-click on your chart>> Export Plot data to Excel.  You can even do it porgramatically. with an invoke node.  Look ma no write required.

E2XL.png

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 3
(1,984 Views)