please attach a VI next time instead of images of an VI…
So you convert numbers from a representation allowing fine resolution to a different representation with less resolution and now you wonder about small differences?
Btw. what is the exact FXP format you are using? (Which is NOT visible from your images, but would have been easy to check with a VI!)
I see nothing wrong from the results. Fixed Point will be less accurate than a DBL for a number of reasons, but use fewer bits making Fixed Point useful for FPGA. Any other system, I would just stick with DBL representation.
Thanks for your help.I have attached the VI , if you have any comments please feel free.
There's a couple of things I'd point out Sattam.
If you look at DBL, your resolution is (from Wikipedia): 2−53 ≈ 1.11 × 10−16
With your settings for the FXP, your resolution is 1.52879 × 10−5
That's quite a difference in decimal places. You should expect to see a difference if you're making this conversion. You're losing precision.
The second thing I'd question is "need" for FPGA. In many cases, there is a clear need for FXP on FPGA applications. In others, the SGL datatype is sufficient for your requirements. Again, it'll lose some resolution from DBL. But, it's quicker for most to develop with. If you're not meeting benchmarks, then it might be time to look at moving towards the FXP implementation.
When attaching code, please put some interesting default data into the controls so we see what you are trying to show us.
What are your requirements for range, resolution and precision? If the values are typically small, maybe you can allocate more for the fractions and less for the integer portion. You also seem to take the absolute value later. Why not take the absolute value first and then use a unsigned FXP representation, giving you one more bit for data.
Your original post was completely pointless, because we cannot compare numbers between two arrays from an image, especially if they are truncated. Also, you seem to convert "to DBL" on the left of your code? Why? What was the representation before that? Why convert twice in a row?
Thanks for your comments. My VI is complex (Envelope tracking)which requires some hardware to run.Thus, I attached the photos only.I need fixed points for FPGA but I'm not sure about the required resolution and precision yet.
kindly upload Above Vi for conversion from Dbl Floating point to fixed point conversion in labVIEW 2015 version.or upload a screen shot
thanks in advance
it's (mainly) the ToFXP function: