20_Limit_180_Degrees
20 Limit 180 Degrees VI takes an angle from an NI-DAQmx and outputs a new angle between 0 and 180 degrees.
The Limit 180 Degrees starts with an angle received by the NI-DAQmx. The value of the angle in is divided by 180/π, to convert from degrees to radians. Simultaneously, the sine and cosine of the angle in radians are calculated. After the sine calculation, the sign of said calculation is sent forward. After the cosine calculation, the inverse cosine of that value is found, which is converted back to degrees. The value of the sign of the sine calculation is then multiplied by the newly converted inverse cosine value to find the angle, which is sent to the Front Panel.