12-20-2011 04:04 PM
I am using a wiimote to get X,Y,Z acceleration data from it and have it displayed on a graph showing all three datas on the single graph from a cluster. I am able to export the acceleration values for X,Yand Z but i am unable to get the time data which is the x-axis in the graph to be exported. What could i do? The images show the section of the block diagram used to export the XYZ and the second shows the graph from which i want to get the time data shown on the x-axis
12-20-2011 04:20 PM
You need to use a Get Time function and build that into your array that you are passing out of your inner For Loop as well.
(Why are you bundling the 3 values into a cluster, then converting the cluster to an array, rather than just building the 3 values into an array?)
12-20-2011 06:22 PM
sorry but i am really new to this how would i build this into the array to get seconds from the graph on my csv file.
12-20-2011 06:51 PM
Let me say exactly what i need this to do. The exported csv, i want it to show the XYZ data for every 0.02 seconds since it started and i want the 0.02 times shown. When i right click the graph and select export to excel, it exports the time but of all the value not of the values every 0.02 second is there a way i could do this in the block diagram section. Thanks
12-20-2011 07:10 PM
Build Array is one of the more commonly used functions. I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
Right now you don't have anything truly controlling your timing. You have a wait statement in the outer while loop. But your inner For Loop is going to run 10 times as fast as it can.
Do you actually have a graph or a waveform chart? Your picture looks more like a chart to me. In addition, your chart doesn't show any .02sec spacing, but looks like the increment is 1, which is very likely if you didn't change the properties of the X-scale. But your block diagram screenshot doesn't show either a graph or chart in it at all.
12-20-2011 07:11 PM
12-22-2011 07:24 AM
Ive got the time working now. But now i have another issue. At the moment i have a limit to how many entries per csv file before the while loop stops but if i remove the limit and change it so the while loop stops when a button is pressed the csv only shows one record. Why is this?
12-22-2011 08:11 AM
You'll have to show us the version of the code with the stop button in it. If you can, please attach a VI rather than just showing a screenshot. It allows us to see all of the code and gives us a chance to poke around in it a little bit.