08-02-2014 12:58 PM
So I modified the Voltage –Continuous Input Example VI to work with two single axis accelerometers
(ADXL193 and USB6210). I am able to get live data (voltage of accelerometer, 8 mv/g sensitivity) as seen
in the chart below. However, I am trying to do a couple of things. I would like to convert the graph’s y-
axes (amplitude (voltage)) into number of g’s as it is running. Then I want to get the max values. I would
finally like to save all the data acquired to a spreadsheet, where I have time vs amplitude. My question
is: how do I accomplish this? Attached is my VI depicting what I tried to do?
Thanks
08-03-2014 07:32 AM
Post you code. All you attached is a MS Word document.
Mike...
08-03-2014 09:55 AM
@mikeporter wrote:
Post you code. All you attached is a MS Word document.
Mike...
He wants us to modify an example VI for him hence no code.
08-03-2014 10:42 AM
Sorry guys I forgot to add the code.
08-03-2014 07:00 PM
You have most of what you want to do is already included in your code.
Scaling of the Waveforms is possible simply by passing the waveform through a divide, or using NI-MAX you could create a custom scale that would do the scaling for you and apply the units.
http://digital.ni.com/public.nsf/allkb/3F6558112FD2C776862575B5004F7F87
When you say write to a spreadsheet are you talking about writing the Waveform or just the peaks?
You already have the set-up to generate an array of the peaks as well, is this an updated version of your code since you posed the question or what?
08-03-2014 07:53 PM
Ogk.nz,
Yes this is the updated version of my code but I'm basically I'm trying to send all the data gathered from testing to excel. Ultimately converting the data to acceleration which in turn would be outputted to excel. Thanks for your help ogk.nz!!!
08-03-2014 08:19 PM
If you set up a custom scale in MAX as indicated in my above link, then apply it by wiring up the "custom scale name" input on the DAQmx Create channel it should take care of all the scaling and factors for you. For logging you can use your current method, I would recommend appending the waveforms and moving the write outside of the while loop to improve performance.
08-03-2014 08:30 PM
THanks Ogk.nz Ill try this out and let you know how it turns out!