![]() |
|
|
This block of code computes a full, four-quadrant inverse sine. It is designed to use in a control application to compute an angle, theta, based on the current and previous value of a sine wave. Dependent on the slope of the sine wave, the output can be within the full range of -pi to pi instead of the -pi/2 to pi/2 range given by the typical asin(theta) function.
The block takes a U16 value of sin(theta) from the current iteration as well as the value of sine(theta) from the previous iteration (both between 0 and 1023) and outputs a value for theta between -1023 and 1024 corresponding to -pi to pi. The VI pictured below shows a grah of the output as well as a graph of the input. A sample VI illustrates how to use the block.
There are no comments on this document