LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Outputting Accelerations to Excel and and Troubleshooting an Increasing Signal

Howdy, 

 

To preface this post, I am an undergraduate student that is very new to learning LabView and am here to learn. 

 

I am trying to build a LabView program to process the signal from a 3 axis accelerometer and output the values to an excel file. (it should be noted that this current program is set up for only one axis) The current problems I am having are the following:

 

1.  When running my current program and viewing the acceleration in a waveform chart, the signal seems to be exponentially increasing as time goes on. You are able to see the acceleration changes when the sensor is moved, but the signal itself is constantly increasing. This can be seen in the attached PDF file.

 

2. When outputting my accelerations to an Excel file, the worksheet shows numerous rows and columns showing different times on corresponding to every row and column. I haven't been able to make any sense out of what it is actually outputting, but my intent is to simply have a worksheet that contains 4 columns for time, x axis acceleration, y axis acceleration, and z axis acceleration. 

 

Any advice or tips someone can provide will be a lot of help to my project. Thanks!

0 Kudos
Message 1 of 5
(2,510 Views)

Your code makes very little sense, but nobody here is willing to squint at a pdf document containing pictures, so:

 

  • it is spelled LabVIEW (note the correct lettercase)
  • What's the purpose of the FOR loop and why are you creating a 1D array of dynamic data?
  • You file IO has nothing to do with excel in any shape or form.
  • Attach your actual VI!

 


@AaronJ21 wrote:

To preface this post, I am an undergraduate student that is very new to learning LabView and am here to learn. 


... and it shows. Maybe start with a few tutorials, look at shipping examples, etc.

0 Kudos
Message 2 of 5
(2,455 Views)

Hi Aaron (from Midwest?),

 

I am trying to build a LabView program to process the signal from a 3 axis accelerometer

Ok - and all we get is a PDF containing an image of the block diagram of that VI?

How should we debug it?

When you want help with your VI you should attach that VI!

 

Before attaching the VI:

- use AutoCleanup

- use the example finder to learn how to use basic DAQmx functions. Get rid of the DAQAssistent ExpressVI.

- after getting rid of that ExpressVI you can use "standard" datatypes instead of those DDT wires: DDT wires hide their underlying data making it hard wo understand a VI from a pure image…

- do you really want to create waveform files? Why not use a plain CSV file, using WriteDelimitedSpreadsheet?

 

the worksheet shows numerous rows and columns

You create an array of DDTs at the loop border. What do you think would happen when saving that array?

(See my comment on not using DDT wires…)

 

my intent is to simply have a worksheet that contains 4 columns for time, x axis acceleration, y axis acceleration, and z axis acceleration.

Then you need to create exactly those data in the loop…

(It really helps to not use DDT wires!)

 

You are able to see the acceleration changes when the sensor is moved, but the signal itself is constantly increasing.

Which sensor type do you use?

Which DAQ hardware do you use?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 5
(2,409 Views)

AaronJ21,

Perhaps we could have this conversation in a single thread?

For others, see also here: Outputting Accelerations to Excel...

Posting there next.

 


GCentral
0 Kudos
Message 4 of 5
(2,385 Views)

Hi Aaron,

 


@AaronJ21 wrote:

it should be noted that this current program is set up for only one axis)


Can you clarify what you're actually getting? You make it sound like it was/is working for one axis and then just fails when attempting 3, but from the later points I'm not sure this is true.


@AaronJ21 wrote:

You are able to see the acceleration changes when the sensor is moved, but the signal itself is constantly increasing.


Do you mean that in the Graph there is that sort of dip, followed by rise? And if so, is 1mV the expected variation over that sort of acceleration? The DDT is really hiding a lot of information here (maybe it's not truly hidden, but I can't understand it and don't care to explore at length on my own PC to try recreate your VI).

 

Regarding 2., you'll probably find it easier to use a CSV or TSV (tab separated variable) file as suggested by GerdW already. A simple example might be something like the following:

snippet.png


GCentral
0 Kudos
Message 5 of 5
(2,387 Views)