Wrap Angle VI

Owning Palette: Angle VIs

Requires: Full Development System

Wraps the input angle to a value within the range you specify with angle 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

Wrap 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 wraps.
angle range specifies the range of angle out.

0none—The VI does not wrap the input angle. The range is [—Inf, Inf].
1–180 to 180 (–pi to pi) (default)—The VI wraps the input angle to a range of [–180, 180] in degrees or [–pi, pi] in radians.
20 to 360 (0 to 2pi)—The VI wraps the input angle to a range of [0, 360] in degrees or [0, 2pi] in radians.
angle out returns the angle within angle range.
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.

Wrap 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 the input angles the VI wraps.
angle range specifies the range of the elements in Angle Out.

0none—The VI does not wrap the input angle. The range is [-Inf, Inf].
1-180 to 180 (-pi to pi) (default)—The VI wraps the input angle to a range of [-180, 180] in degrees or [-pi, pi] in radians.
20 to 360 (0 to 2pi)—The VI wraps the input angle to a range of [0, 360] in degrees or [0, 2pi] in radians.
Angle Out returns the angles within angle range. The elements in Angle Out correspond to the elements in Angle In.
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.

Wrap Angle Details

This VI wraps an angle to a value within the angle range you specify.

For example, if angle units is degree in, degree out and angle range is 0 to 360, the VI wraps the angle according to the following formula.

y = x – 360 * floor(x/360)

where x is angle in and y is angle out.