Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Highlighted

02-07-2018 06:51 AM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Labels:

Hi all

I converted double float points to fixed points as shown in the attachments but the get fixed points which are similar to double float points and wondering if there is something wrong.

Download All

Virus scan in progress. Please wait to download attachments.

Highlighted
Options

02-07-2018 07:24 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi Sattam,

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!)

Best regards,

GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO

GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO

Highlighted
Options

There are only two ways to tell somebody thanks: Kudos and Marked Solutions

Unofficial Forum Rules and Guidelines

02-07-2018 07:29 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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.

There are only two ways to tell somebody thanks: Kudos and Marked Solutions

Unofficial Forum Rules and Guidelines

Highlighted
Options

02-07-2018 11:00 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi GerdW

Thanks for your help.I have attached the VI , if you have any comments please feel free.

Thanks

Sattam

Highlighted
Options

02-07-2018 11:01 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Thanks for your comments. I need Fixed Point for FPGA.

02-07-2018 11:21 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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.

Highlighted
Options

** LabVIEW Champion. It all comes together in GCentral **

**What does "Engineering Redefined" mean??**

02-07-2018 11:34 AM - edited 02-07-2018 12:00 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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?

Highlighted
Options

02-07-2018 12:37 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Thanks Both

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.

Highlighted
Options

06-25-2019 01:42 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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

Highlighted
Options

06-25-2019 01:45 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi aht,

it's (mainly) the ToFXP function:

Best regards,

GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO

GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO