LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extracting 6DOF tracker coordinates, angles from array and graphically mapping them in an STL file

Hi, 

I have a 6DOF sensor which gives x,y,z,alpha,beta,gamma values in an array. I have 4 sensors positioned on a spine. The goal is to map the spine visually in labview. I have the STL file of the spine. If the physical model of the spine moves, the virtual cad model in labview should also move.

I am fairly new to labview. So firstly, I am trying to extract x,y values from the array and plotting all the 4 points in an xy graph. 

How can I do this.? (I am able to extract individual values from the array by "index array")

If you have any ideas on mapping the values into the stl file for graphics, it'd be great. Thanks in advance. 

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

Hi siril04,

 

Thanks for reaching out. You've got a pretty cool application!

 

I think what you are looking to do requires just making a waveform graph on front panel, and then build an array of your values and output the array into the input of your waveform graph. The same

 

Keddy C.
Staff Software Engineer
National Instruments
0 Kudos
Message 2 of 8
(2,236 Views)

Am I correct that your 6DOF sensors are all accelerometers?  I assume that X, Y, and Z are linear accelerometers (with Z being vertical and X and Y being horizontal, probably Fore-Aft and Left-Right) and alpha, beta, gamma being rotational accelerometers (or possibly angular velocity) about three perpendicular axes (but which is which?).

 

Have you thought about what the signals would mean in relationship to your model spine?

 

I recommend that you take a LabVIEW course and learn LabVIEW.  If a course is not readily available, look over the tutorial material listed on the first page of this Forum.  Spend as much time with the material as you need, do examples, write code, test it out, be sure you understand how it works and what it does.  You can "test yourself" by making changes and predicting what will happen (and then run the code and see if you were right).

 

You will eventually encounter Graphs and Charts.  I recommend that you not "jump ahead", but master the preceding material before venturing into producing plots.

 

Bob Schor

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

Hi Keddy,

I have managed to bring all the sensors into xy graph and join them by a line (turns out it's pretty easy). So if the sensors move, the graph gets updated in real time. I am attaching the xy graph for reference. 

Now, the task is to map all the 4 position sensors to a virtual CAD model, so that one can visually see the deflection in the spine. That's where I am struck.

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

Hi Bob,

The sensors are position sensors. the output is (x,y,z,alpha,beta,gamma). It works on electromagnetic waves. Awesome sensor but expensive (It's Polhemus Fastrak 3 with Micro Sensor 1.8) 

As you said, I have look up examples and tutorials, learned about them. 

Turns out graphs and charts are very easy.

As I have said in the earlier reply, I have the position data in the graph. Now, I would like to put this data into a virtual model so that the CAD model also moves as the real spine moves (position sensors are attached on the real spine).

How can I do that?

0 Kudos
Message 5 of 8
(2,228 Views)

You should have said it was a Polhemus -- I've used one mounted to a helmet to tell me the position of the subject's head!  They are fine instruments.  You are correct that all are "positions", and you do need all six to tell the difference between whether the subject is standing upright or on her head ...

 

Now I understand the question better, so I'll ask a related question -- you've gone from a "position" question to a "position-as-a-function-of-time" question.  LabVIEW is quite good at this, as "Time" is an important variable in LabVIEW.  So let's talk about time -- what kind of "visualization" do you want?  Here are some suggestions:

  • An X-Y plot that changes as an implicit function of time (i.e. the points "move while you watch them").
  • A plot of X vs t, and Y vs t, on the same or different axes.
  • A 3-D plot of X and Y as a function of t.
  • Something else.

Obviously, if we are talking about "as a function of t" plots, you need to think about such things as sampling rates, how the samples are stored, how you want to plot it, etc.  The Good News is this is definitely possible.

 

Bob Schor

0 Kudos
Message 6 of 8
(2,223 Views)

Hi Bob,

I understand your answer. It makes more sense to me right now. 

But, what if I want to put the sensor data into a virtual cad model? I am basically trying to create a user friendly GUI with the spine model in it. It's more of graphic based.

0 Kudos
Message 7 of 8
(2,210 Views)

LabVIEW is great at being a Laboratory Virtual Instrument Engineering Workbench (pay attention to the capitalized letters back there) -- as such, it can easily be used to acquire the 6DOF data at a reasonable sampling rate and deliver it to another program optimized for displaying graphical 3D objects (e.g. vertebral segments) and subjecting them to 6DOF orientation changes.

 

LabVIEW does have some ability to plot data graphs to allow you to visualize the data you are acquiring, but for "fancy" image manipulation, it can be a little painful.  One thing you could do is to produce a 3D plot of the X, Y, Z coordinates of your 4 sensors and update the plot at some reasonably slow rate, like 1-4 Hz ...

 

Bob Schor

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