Check for Included Angle VI

Owning Palette: Angle VIs

Requires: Full Development System

Checks whether one or multiple input angles are within the counterclockwise range.

Wire data to any of the angle inputs to determine the polymorphic instance to use or manually select the instance.

Details  

Use the pull-down menu to select an instance of this VI.

 Add to the block diagram  Find on the palette

Check for Included Angle (scalar)

angle units specifies the units of the input and output angles of the VI.

0radian in, radian out (default)
1radian in, degree out
2degree in, degree out
3degree in, radian out
angle in specifies the input angle the VI checks.
start angle specifies the angle at the beginning of the range. The range continues in the counterclockwise direction.
end angle specifies the angle at the end of the range. end angle must have the same unit as the start angle.
output angle range specifies the range of the output angle. When the angle exceeds one side of the range, the angle continues on the opposite side of the range.

0none—The range is [–Inf, Inf].
1–180 to 180 (–pi to pi) (default)—The range is [–180, 180] in degrees or [–pi, pi] in radians.
20 to 360 (0 to 2pi)—The range is [0, 360] in degrees or [0, 2pi] in radians.
coerce angle determines whether angle out is in the range when angle in is not in range. If FALSE, angle out returns the same value as angle in. If TRUE, angle out returns the value of the angle that is nearest to the beginning or end of the range.

coerce angle does not do anything when angle in is in the range.
angle out returns angle in if coerce angle is FALSE. If coerce angle is TRUE and angle in is between the range of start angle and end angle, angle out also returns angle in.

If coerce angle is TRUE and angle in is out of the range, the VI coerces angle out to the nearest angle in the range.
in range? returns whether angle in is between start angle and end angle.
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

Check for Included Angle (array)

angle units specifies the units of the input and output angles of the VI.

0radian in, radian out (default)
1radian in, degree out
2degree in, degree out
3degree in, radian out
Angle In specifies a set of input angles the VI checks. The elements in Angle In correspond to the elements in Start Angle and End Angle.
Start Angle specifies the set of angles at the beginning of the ranges. The ranges continue in the counterclockwise direction.
End Angle specifies the set of angles at the end of the ranges. The elements in End Angle must have the same units as the elements in Start Angle.

Angle In, Start Angle, and End Angle must have the same number of elements or the VI returns error code –20002.
output angle range specifies the range of the output angle. When the angle exceeds one side of the range, the angle continues on the opposite side of the range.

0none—The range is [–Inf, Inf].
1–180 to 180 (–pi to pi) (default)—The range is [–180, 180] in degrees or [–pi, pi] in radians.
20 to 360 (0 to 2pi)—The range is [0, 360] in degrees or [0, 2pi] in radians.
coerce angle determines whether angle out is in the range when angle in is not in range. If FALSE, angle out returns the same value as angle in. If TRUE, angle out returns the value of the angle that is nearest to the beginning or end of the range.

coerce angle does not do anything when angle in is in the range.
Angle Out returns the elements in Angle In if coerce angle is FALSE. If coerce angle is TRUE and corresponding elements of Angle In are between the ranges of Start Angle and End Angle, Angle Out also returns Angle In.

If coerce angle is TRUE and the corresponding elements of Angle In are out of range, the VI coerces the elements of Angle Out to the nearest angle of each range.
In Range? returns whether Angle In is within the range between Start Angle and End Angle.
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

Check for Included Angle Details

The following image shows an example of the input angle within the range from the start angle to the end angle.

The following image shows an example of the input angle out of the range from the start angle to the end angle.

If you use this VI to check whether a range includes the angle in the previous image, the VI coerces angle out to start angle if coerce angle is TRUE.