LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graphing a table row by row with multiple data points

Hi! I am currently working on a project to find joint angles on a motion capture system. I am fairly new to LabView and cannot seem to find a solution to my current problem online anywhere. As of now, I am working to loop through a spreadsheet that has 151 rows (each row is a time stamp)  and plot 3D data points by row. Each row has 41 body sensors that contain and XYZ coordinate. The final result (of this step) is to have a moving picture of the whole spreadsheet. Currently I have an array of all of the rows entering a for loop that splits the array up row by row and changes row based on iteration. I then split this again into X Y and Z vectors in order to plot using another iteration for loop. The X Y and Z vectors I am making are currently not plotting, and are not the correct size. I have the size set as 1 for now, but whenever increased it only repeats the same number rather then moving forward. Nothing is currently plotting even though the arrays have values. Please let me know if you have any ideas or solutions. Once again I am very new to the program. Thank you!

mbel_0-1657562016395.png

 

Download All
0 Kudos
Message 1 of 5
(903 Views)

Hi mbel,

 


@mbel wrote:

Hi! I am currently working on a project to find joint angles on a motion capture system. I am fairly new to LabView and cannot seem to find a solution to my current problem online anywhere. As of now, I am working to loop through a spreadsheet that has 151 rows (each row is a time stamp)  and plot 3D data points by row. Each row has 41 body sensors that contain and XYZ coordinate.


So which columns/rows do you want to plot? Can you provide an example like "in the first iteration I want to plot column 0,1,2, but in the 2nd iteration I want to plot column 3,4,5"?

I don't see any "timestamps" in your data…

 

Then simplify your VI (or start over from scratch)!

Like this:

Atleast there is a "moving plot", but just use it as a suggestion…

Best regards,
GerdW


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

Here's what I would probably do:

(with each iteration, you get a 1D array x1, y1, z1, x2, y3, z3, ... xN, yN, zN) and decimate will give you the three arrays [x1, x2, x3, ... xN], [y1, y2, y3, .. yN], [z1, z2, z3, ... zN])

 

altenbach_0-1657565285872.png

 

 

(Note: I would probably disable auto-scaling of the xyz axes. Not shown)

0 Kudos
Message 3 of 5
(880 Views)

The data I posted should have a column with time. An example would be in frame 1 (time is 0) I want to plot Rasis XYZ, Lasis xyz, V Sacaral XYZ, and continue down the row of motion sensor points. The resultant graph should be a video of a person walking, as seen below in a matlab graph. Thank you for the help!

mbel_0-1657566526659.png

 

0 Kudos
Message 4 of 5
(869 Views)

Yes, you can use the second column (that I removed) if you want to simulate real timing (would need a bit of extra code unless the time is equally spaced). You can change the rotation of the 3D graph to get the desired view.

0 Kudos
Message 5 of 5
(851 Views)