LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Printing 4D Data out of a 2D array

Hello,

At the moment I have a 2D array with four columns: 1. position X, 2. position Y, 3. position Z, 4. value at this position. I want to print the values at their actual position. I tried it with the 3D parametric surface, but it needs a 3D array and I do not manage to get it. If anyone could give me advise how to find a solution, it would be very appreciated.
Thanks for your help.
0 Kudos
Message 1 of 8
(3,833 Views)
I'm not sure how you're proposing to display 4D data in a 3D space. It's the same as wanting to display 3D data on a 2D graph - all that you can display is a slice of the 3D data. Perhaps using a different color for the point to indicate value at the XYZ coordinate?
0 Kudos
Message 2 of 8
(3,818 Views)
Ok, at first I could start with slices of XY and the value at a certain height. The values could then be the 3rd dimension in the prints. But still I have problems in "feeding" the 3D surface.vi.  Can you tell me in a simple way how to manage it? I was quite confused with the examples from NI.
0 Kudos
Message 3 of 8
(3,814 Views)
Which part are you having trouble with? The extraction of your data in order to provide it to the 3D graph, or which inputs to use? Which 3D graph are you trying to use. Do you have a VI with some data that you can post?
0 Kudos
Message 4 of 8
(3,811 Views)
My problem is, that the range and step-size of X and Y can differ. So I have to give different input to the x-vector and y-vector gates. I tried a lot but didn't figure out how to do it. The way I have it in the posted VI is wrong, I know that. Additionally I would like to see both the negative ranges in the front area. OK, of course I can turn it arround, but then the grid hides the plot from a clear view.

PS: I cannot upload a *.lvm file, but I am working with it. To be able to upload it I just changed the suffix into *.txt. To load it with my programme you should change it first back into *.lvm, but I am sure I don't need to tell you. Smiley Wink Maybe a different filetype would be better and you have some advise for me.

Download All
0 Kudos
Message 5 of 8
(3,791 Views)

I posted an example showing how to plot 4-D data in this thread. This image illustrates the results.

The quad (X,Y,Z,W) uses the triplet (X,Y,Z) to dicate the location in 3-Space and the W-vlaue dictates the color. THat example uses multiple plots with parametric plots used for the surfaces and line plots are used to illustrate each of the "scans". The code is provided in that thread along with comments explaining the techniques.

"ALL" you have to do is format your data correctly before presnting it the graph.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 8
(3,773 Views)
Thank you very much for posting this thread. It should be what I am looking for.I think I can handle it, but still didn't figure out yet how to convert the data of the 2D array into a 3D array, which is suitable for a 3d plot. Does someone have any idea?
0 Kudos
Message 7 of 8
(3,754 Views)
Did you take a look at Ben's code, as it was posted in the thread he linked to?
Message 8 of 8
(3,733 Views)