01-19-2012 08:42 PM
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! 🙂
01-20-2012 08:08 AM
What version of LabVIEW are you using?
01-20-2012 08:15 AM - edited 01-20-2012 08:16 AM
LabVIEW 2011 Windows 7 32-bit 🙂
01-20-2012 11:20 AM
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
01-20-2012 06:35 PM
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. :]
01-21-2012 09:37 PM
Hi! 😄 It's now okay, I've already fixed it 😄 Thank you anyway! 😄