LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using of degrees in Tangent vi

Hi, Good day! May I know how I can calculate base on degrees by using Tangent vi in LabVIEW 7.1? The tangent vi default input is in radians. For example: (tan -0.0680 * 27000 + (-36.6))= -68.644 when using degrees to calculate. How I can use the vi provided in LabVIEW 7.1 to achieve same result? Thank you in advance for the advice! Best Regards, Norman
0 Kudos
Message 1 of 10
(4,913 Views)
Just convert your input ro radians before using the tangent function.
 
(you could even wrap the conversion and function in a new subVI that does what you want).
0 Kudos
Message 2 of 10
(4,904 Views)
If I m right, you ve do a pi/180 to convert deg to rad.
 
Feed this value to the Tangent.vi, thats it.
- Partha ( CLD until Oct 2024 🙂 )
Message 3 of 10
(4,889 Views)
(top of image) Easies to convert would be a compound node.
 
(bottom image) If the angle comes from a FP control, you can set the units of the control to "deg" and the wire will be automatically be in radians! 🙂
 
If you set the units right in the bottom case, both will give the same result.

Message Edited by altenbach on 09-04-2007 01:00 AM

0 Kudos
Message 4 of 10
(4,887 Views)
One more option without using the Unit label. Smiley Happy
 
Use Convert Unit instead.
- Partha ( CLD until Oct 2024 🙂 )
Message 5 of 10
(4,876 Views)


@parthabe wrote:
One more option without using the Unit label. Smiley Happy
 
Use Convert Unit instead.

Actually, all you need is the "deg" node to tell it's an angle. Internally, it will be in radians. Try it! 😄


 

Message Edited by altenbach on 09-04-2007 08:14 AM

Message 6 of 10
(4,859 Views)

You re right, Sir, as usual as always ! Smiley Happy

But, please explain me that internal behaviour of the wire value in radians...

- Partha ( CLD until Oct 2024 🙂 )
Message 7 of 10
(4,839 Views)
In this case, the third paragraph if the section "Convert Unit Details" applies:
 
 
Quote: "If the input is a pure number, LabVIEW assigns the unit you specify in the Convert Unit function to the number and returns that physical number in the base unit (or a combination of base units) for that class of measurement, as indicated in the following table."
 
The "base unit" of an angle is rad. Yes, it's a bit confusing but at least documented. 😄
 

For some fun, look at the attached VI diagram and front panel. Don't run it yet!!!!
 
Can you tell what all the indicators will show without running it?
 
Now run it! Were you right? 😄
 
 

Message Edited by altenbach on 09-04-2007 10:47 PM

Download All
Message 8 of 10
(4,833 Views)
Thank you, Sir !
- Partha ( CLD until Oct 2024 🙂 )
Message 9 of 10
(4,816 Views)

A related discussion...

http://forums.ni.com/ni/board/message?board.id=170&message.id=272020

- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 10 of 10
(4,759 Views)