LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

continuous degrees measurement

Solved!
Go to solution

Hi,

I have an arrow which is rotating around constant point. I measure angle of rotation this arrow. When arrow cross 90 degrees in place of 91 degrees is -89, in place of 180 is 0. How to make continuous measure, from 0 to 360 degrees?

 

Thx 

0 Kudos
Message 1 of 10
(3,791 Views)

To get an answer which is helpful or meaningful, you need to provide more information.

 

What method are you using to measure the angle? What kind of hardware is used? What kinds of calculations are you doing on the data you collect?

 

Lynn

0 Kudos
Message 2 of 10
(3,783 Views)

How are you measuring the angle?

 

If it goes back to zero at 180 degrees, maybe your instrument cannot tell the difference of vectorial direction and just measures the angle of a line?

 

If you really could measure a full circle (It seems you cannot) and you want to e.g. change the reading from [-180..180] to [0..360], you can use the following code:

 

 

 

0 Kudos
Message 3 of 10
(3,781 Views)

It's a simple program which draw curve on XY graph from points which are insert by myself  (the end of an arrow draw this curve). From coordinates of end of an arrow i calculate tangens then arctan and i have an angle.  

0 Kudos
Message 4 of 10
(3,770 Views)

Use the arctan with two inputs and you'll get 360 deg resolution. Check the help. If you cannot figure it out, attach your VI

0 Kudos
Message 5 of 10
(3,765 Views)

Here's a quick draft, showing one method using complex numbers (easier) and one with the two input inverse tangent.

 

 

0 Kudos
Message 6 of 10
(3,761 Views)

To altenbach, can you do it on my VI.

0 Kudos
Message 7 of 10
(3,727 Views)
Solution
Accepted by topic author dafca

Here's a quick draft. Most likely you need to tweak it a little bit depending on how you define the angle.

 

(A lot of your code could be simplified significantly....)

Message 8 of 10
(3,718 Views)

Big thanks altenbach.

Maybe you know how to do an arrowhead to this red arrow, some triangle or two short lines on the end at constant angle to the arrow?

0 Kudos
Message 9 of 10
(3,710 Views)

Well, you could just do something like the attached quick draft.

 

Of course if you autoscale the axes, the arrow will distort. You need to make sure that the grid is square. A better idea would be to use the "plot images" property of the graph so the arrow keeps the correct look. Try it!

 

 

Message 10 of 10
(3,698 Views)