Jump to content

UINT16 to FXP


Recommended Posts

Hi all,

 

i try to generate a sinewave in FPGA (NI cRIO Platform), to do that I use the specific VI (Sine Wave Generator) for fpga  to produce a sinewave in UINT16 data type.

Unfortunatelly my AO module works with FXP data type  (see attach) and I need to adaptd the UINT16 to AO module.

A simple cast is not sufficent because I loss information, any suggestion ?

FXP.JPG

Link to comment

Thanks at all, both solution works.

My question is an academic question. If I connect the sine wave generator to AO port or to Multiply operator a "cast" (red dot) is used by LV. Now, I must certificated my project and the assessor could be ask something about the red dot so how I can demonstrate that I don't not loss the information ? One solution is the test as decribed by "infinitenothing" or logical approach as suggest by Jordan. Does exist the way to avoid the cast without change the HW settings?

 

Regards

 

Link to comment

The red dot just indicates that LabVIEW will be coercing the data for you so whether there is a loss of information depends on what the data is being coerced from and to. For instance, if a U8 is being coerced into a U16 there isn't any loss of data but if we instead coerce the U16 into a U8 we are losing the top 8 bits of data (depending on what we know about this data this may or may not be an issue for us). FXP conversion will likely lose information because LabVIEW tries to preserver the value rather than keeping the bit value and changing the interpretation of those bits.

If you attach the project you are working out of we should be able help explain what would happen for your particular case. 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.