LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get (X,Y,Z)?

I would like to get the End Point (X,Y,Z) of a certain line (Line A) with vertex at (0,0,0). I placed an inclinometer to give me angle when the line moves either up or down. I also placed a angular meter to give me angle when the line moves 360 deg. either clockwise or counterclockwise along the X-axis. Please see the attached. Is there a function in LabVIEW to determine the true end point when either movement happens?
 
I would greatly appreciate for any advise. Thank you very much.
0 Kudos
Message 1 of 9
(4,061 Views)
Hi,

I am not quite sure what it is you want to do, but from your description, you want to obtain 3 coordinates (x,y,z), but you only have two coordinates (thetha, and r the radius in spherical coordinates or the length of your line). You need to introduce another parameter say phi that describes the angle between the z axis with the the x y plane as well to get three coordinates to get the point x, y and z. I am not sure what you want to do with labview. Is this an instrument that interfaces with labview or something.
0 Kudos
Message 2 of 9
(4,054 Views)
Hi Timothy,
 
Thank you for your reply and i am sorry for the poor explanation.
 
Kindly see the attached revised sketch. I am a user of LabVIEW. We are planning to use a cRIO with analog input cards to get the sensors data (inclinometer and angular meter sensor). Given only the sensors data, fixed length of Line, I would like to find the end point (x,y,z).
I would appreciate your kind advice. Thanks a lot.
 
0 Kudos
Message 3 of 9
(4,044 Views)
Hi,

Your sketch helps a lot. I have not used a crio before, but what I would do is assign each sensor to a channel on the crio. (is this a multi-channel or single channel device). I am pretty sure from there that you can read the data from the crio into labview (using some labview drives) and process it appropriately . From there you would just need to perform some mathematics in labview to get the x, y, and z from the spherical coordinates, but the coordinates that you are using seem to be nonstandard. Refer to the website http://mathworld.wolfram.com/SphericalCoordinates.html for a standard set of spherical coordinates. Here the thetha coordinate goes from the positive x axis to the projection of your line onto the x-y plane, and the phi coordinate goes from the positive z axis to your line. I hope this helps somewhat.
0 Kudos
Message 4 of 9
(4,041 Views)

Hi Timothy,

Thank you for giving me advise and for the http. It does help me a lot to start. That is what i am looking for, Spherical Coordinates. I tried to make a simple VI, please find the attached (LabVIEW 8.0). I have one problem; The inclinometer control have a range from 15 degree to 90 degrees, which means at 15 deg. it is slightly on the top of 'y' axis, and at 90 deg. it is on the same position vertical position of 'z' axis. Running this VI will not demonstrate what i wanted to do. I dont know which part i am missing. Any advise I would greatly appreciate.

Thanks a lot.

0 Kudos
Message 5 of 9
(4,019 Views)
Hi Bong,

I found a couple things that may help you. The first one is that LV ships with a function called "3D Coordinate Conversion" that should do the trick for you (I know this function exists in LV 8.2 in the Professional Package; I believe the Base Package does not include it and it is in LabVIEW since 8.0). You can find this VI in the Mathematics>>Geometry palette. Although the function it is not that well documented, it shouldn't be hard to figure out how to use it (from what you will be doing, you want to use the scalar version of it):

http://zone.ni.com/reference/en-XX/help/371361A-01/gmath/3d_coordinate_conversion/

If you don't have access to that function or it doesn't fit your needs, I found some information on how to do the conversion at this site:

http://fermi.jhuapl.edu/s1r/idl/s1rlib/vectors/v_conv.html

Hope this helps,

JMota
National Instruments
0 Kudos
Message 6 of 9
(3,985 Views)
Hi,

I ran your program, but could not find the problem you are referring to. Could you elaborate a little more on what the problem is.
0 Kudos
Message 7 of 9
(3,959 Views)
Hi JMota,
 
Thank you very much. I found that function and it will be very helpful for me as i go through with my algorithm. Thanks a lot.Smiley Happy
 
regards,
bong
0 Kudos
Message 8 of 9
(3,951 Views)

Hi Timothy,

Thanks for the reply. I guess i misunderstood my own sample program. Anyway, thanks a lot. You have been very helpful.

 

regards,

bong

0 Kudos
Message 9 of 9
(3,950 Views)