From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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
(5,322 Views)
Solution
Accepted by topic author 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
(5,321 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
(5,316 Views)

 

You are welcome.

0 Kudos
Message 4 of 6
(5,309 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
(5,307 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
(5,299 Views)