LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CVS Export help

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

Download All
0 Kudos
Message 1 of 8
(2,679 Views)

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?)

0 Kudos
Message 2 of 8
(2,678 Views)

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.

0 Kudos
Message 3 of 8
(2,668 Views)

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

0 Kudos
Message 4 of 8
(2,664 Views)

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.

 

 

0 Kudos
Message 5 of 8
(2,659 Views)
What's the significance of .02 second? Since your wait is outside the loop, you have no idea of the time between samples. Put it inside and use a shift register to increment the dt.
0 Kudos
Message 6 of 8
(2,658 Views)

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?

Download All
0 Kudos
Message 7 of 8
(2,624 Views)

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.

0 Kudos
Message 8 of 8
(2,607 Views)