NI Home
Cart Cart | Help
Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Currently Being Moderated

Four-Quadrant Inverse Sine - asin2(theta(n), theta(n-1))

VERSION 1

Created on: Oct 14, 2008 3:36 PM by Ben_B - Last Modified:  Oct 14, 2008 3:54 PM by Ben_B

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.

 

 

4-quad asin(theta).JPG

 

Downloads:
Average User Rating
(0 ratings)




There are no comments on this document

More Like This

  • Retrieving data ...