08-05-2019 04:37 PM - edited 08-05-2019 04:39 PM
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!
08-05-2019 05:39 PM
Your code makes very little sense, but nobody here is willing to squint at a pdf document containing pictures, so:
@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.
08-06-2019 01:39 AM - edited 08-06-2019 01:43 AM
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?
08-06-2019 04:25 AM
AaronJ21,
Perhaps we could have this conversation in a single thread?
For others, see also here: Outputting Accelerations to Excel...
Posting there next.
08-06-2019 04:36 AM
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: