LabVIEW

cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

High throughput inverse tangent (2 input)

Hello! ๐Ÿ˜„ I would just like to ask what is the effect of having a 'negative x' on the high throughput inverse tangent (2 input)? It's because when I have 'negative y' (and 'positive x'), the answer is correct. However, whenever I have 'negative x' (regardless of the sign of y), the answer would always be wrong. Thank you for your time! ๐Ÿ™‚

0 Kudos
Message 1 of 6
(3,093 Views)

What version of LabVIEW are you using?

0 Kudos
Message 2 of 6
(3,064 Views)

LabVIEW 2011 Windows 7 32-bit ๐Ÿ™‚

0 Kudos
Message 3 of 6
(3,060 Views)

Betty - 

 

This function only takes fixed-point data. When you say the answer is "wrong", I'm not sure if it's off a few significant digits or returning a completely unexpected value.  If you need to get more accurate data you will have to change both the word length and the integer word length. This document from LabVIEW Help explains in more detail of what that means. 


http://zone.ni.com/reference/en-XX/help/371361G-01/lvhowto/configure_fxp/ 

The best way to see how you should set up your fixed-point data is to place down a fixed-point constant. Right-click and select Properties. Click on the Data Type tab, and uncheck the adapt to entered data check box. From here you will be able to change the word and integer word length and see what your max and min values, as well as what your accuracy will be. I hope that you find this helpful. Feel free to let me know if you have any additional questions. 

 

The best way to figure out what you would like with fixed point data is through some trial and error. The great thing about fixed point data is that it is much smaller on the FPGA than floating point data.  The down side to fixed point is that you are limited in range as well as your delta. Below are two links to some DevZones that could be helpful to you. 

http://zone.ni.com/devzone/cda/pub/p/id/303 
http://zone.ni.com/devzone/cda/pub/p/id/363 

Regards,

Ben N.
Applications Engineering
ni.com/support
0 Kudos
Message 4 of 6
(3,050 Views)

Thank you for your respnse, Sir! ๐Ÿ˜„ I already did that. I tried manipulating the details under data type tab. However, I still get the "wrong" answer whenever I have a "negative x". But when I have a "negative y" (as long as x is positive), I get the "right" answer. :]

0 Kudos
Message 5 of 6
(3,038 Views)

Hi! ๐Ÿ˜„ It's now okay, I've already fixed it ๐Ÿ˜„ Thank you anyway! ๐Ÿ˜„

0 Kudos
Message 6 of 6
(3,015 Views)