02-01-2012 05:58 AM
Hi,
I am trying to use the trigonometric function "inverse tangent", but it doesn't work as I think it should. I want to change a gradient into an angle, normally on a calculator I use height divided by length, and press the tan^-1 (inverse tan) function and get the angle. For example, the inverse tangent of 1 is 45 (degrees). If I use the inverse tangent function in Labview 2010, I get a completely different result = 0.7853.. Either I am using it incorrectly or the function isn't working properly.
I've attached an example so you can reproduce the result. I also had a similar problem with sin and cos in the formula node structures.
Thanks for any help you can give,
James
Solved! Go to Solution.
02-01-2012 06:11 AM
Hi James
I haven't seen your VI. From what I know, output given by the trignometric functions in Labview is in radians. You will have to perform radian to degree conversion to get the answer as 45.
Regards
Javed
02-01-2012 06:57 AM
Hi Javed,
I had no idea, thanks for the tip. I just had a look for radian to degree conversion and Labview doesn't seem to have one built in, but made my own and it works now. Thanks!
02-01-2012 07:12 AM
You are welcome.
02-01-2012 07:23 AM
LabVIEW has a VI (code drop) for converting radian to degree. Only I would never use it because it uses the expression node, which is not as efficient as normal LabVIEW code.
02-01-2012 09:47 AM
Fair enough. I didn't manage to find their VI, but the conversion is a simple multiplication and division. radians*(180/pi) = degrees