ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Inverse Tangent Function Problems

Solved!
Go to solution

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

0 Kudos
Message 1 of 6
(7,723 Views)
Solution
Accepted by MadScientist

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 

Message 2 of 6
(7,722 Views)

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!

0 Kudos
Message 3 of 6
(7,717 Views)

 

You are welcome.

0 Kudos
Message 4 of 6
(7,710 Views)

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.

0 Kudos
Message 5 of 6
(7,708 Views)

Fair enough. I didn't manage to find their VI, but the conversion is a simple multiplication and division. radians*(180/pi) = degrees

0 Kudos
Message 6 of 6
(7,700 Views)