07-22-2013 10:01 AM
How does one configure the output of the "to-fixed point" using the fixed-point type input to the block?
For example, let us say the following configuration is the desired output mode - Rouding: truncate, Overflow: saturate, Encoding: signed, Word length: 16-bits, Integer word length: 1-bit. How would this get passed into the "to-fixed point" function using the fixed-point type input?
07-22-2013 10:04 AM - edited 07-22-2013 10:06 AM
Hi john,
you need to connect a FXP constant of correct type. This has been told to you before...
You set the properties of the FXP constant in their properties dialog. I'm sure you have noticed that one too...
07-22-2013 10:41 AM
I understand that if I connect an input of a ceratin data type to the 'fixed-point type' terminal that this sets the data type of the ouput terminal. However, this is quite inconvienient and makes analyzing system performance under thaousands of differet bit configurations virtually impossible since you must manually set the 'Output Configuration' of the input to 'fixed-point type' every time you want to change the data type.
This block should offer an alternative way to set the configuration parameters in addition to simply taking on the data type of that which is connected to 'fixed-point type'. Perhaps a string input to define each parameter in the 'Output Configuration' or possibly an integer value input to set each parameter.
Any thoughts or suggestions to get around this dilemma are welcome.
07-22-2013 11:59 AM - edited 07-22-2013 12:02 PM
07-22-2013 12:28 PM - edited 07-22-2013 12:30 PM
@jcarmody wrote:
... never mind.
I'm back.
This will find all Fixed-Point constants and let you edit the representation:bits.
Set it to run when opened and put it in your <LabVIEW>/Projects folder and it'll be available from the Tools menu. This can be modified to fit a scheme as you described in your last post.
07-22-2013 01:35 PM
You can use a typedef to define the constant that is configuring the "to fixed point" function.
07-22-2013 01:52 PM
What you're asking for is very useful, but changing at run-time would involve a whole new data type, which might be called "Dynamic FXP". It would behave a lot like floating-point, but would have a way to pass type parameters to each node to do quantization and overflow handling at run-time.
Although this is a well-known feature request, I don't see anything on the Idea Exchange about it with a quick search. I would love to get a feel for the level of interest in such a feature. I'll post something if it's not already there (or you're welcome to!).
Jim
07-22-2013 02:10 PM
Thank you Jim,
I'm not quite sure what the functionality of each block is in the figure. Are these from a special design palette? Is this something you developed?
07-22-2013
02:23 PM
- last edited on
05-06-2025
05:07 PM
by
Content Cleaner
JLewis mentioned changing them at run-time; my solution changes them at design-time. What are you trying to do?
I developed that with functions mostly from the Application Control palette. What version of LabVIEW are you using. If you're using 2009 or later, you should be able to drag the png image from the post to an empty block diagram. It's a snippet.
07-22-2013 02:36 PM
Thank you Jim, I did'nt realize I could just drop the png into the block diagram.
I am also trying to define the changes at design time. Let me see what I can do with this.