LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple Angle Conversion

Solved!
Go to solution

@altenbach wrote:

(I am pretty sure there is a loop-free solution ;))


That is what I was looking for, a loop-free way of doing it.

 

Sebastian, thanks. Your solution works nicely. Kudos 😁

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 11 of 13
(727 Views)

Here's Sebastian's code slightly simplified... (Please validate!)

 

(Note that I swapped the comparison so an exact translation would use "less or equal". Not sure what's correct. If the remainder is exactly 180, both directions are equally close).

 

altenbach_0-1594921284634.png

 

Message 12 of 13
(719 Views)

@altenbach wrote:

Here's Sebastian's code slightly simplified... (Please validate!)

 

(Note that I swapped the comparison so an exact translation would use "less or equal". Not sure what's correct. If the remainder is exactly 180, both directions are equally close).


Looks like that does work, thanks altenbach!

 

If anyone is wondering what I'm doing, I'm building a routine for operators to perform an encoder verification test on a unit (the unit is a slip ring that has a built-in encoder). And I needed this as part of the algorithm telling the SmartMotor (another thing we make at a different facility) where to travel to next.

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 13 of 13
(709 Views)