Archived: Using FixedPoint Data Types with IntegerBased IP in LabVIEW FPGA 8.5.x and 8.6.xThis document has been archived and is no longer updated by National InstrumentsPrimary Software: Primary Software Version: 8.5 Primary Software Fixed Version: N/A Secondary Software: N/A
Problem: How can I use fixedpoint data with LabVIEW FPGA Math and Analysis functions that support only integer data in Labview FPGA Module 8.5.x and 8.6.x? Solution: In LabVIEW 8.5.x and 8.6.x, the LabVIEW FPGA Math and Analysis functions support only integer data types. If a fixedpoint number is passed directly to a function, LabVIEW truncates the fractional portion when the number is coerced to an integer. To use fixedpoint data with integer IP, you must sign extend the fixedpoint data by increasing the integer word length to the size of the integer used. The steps below detail the method to pass a fixedpoint number as an integer to the DC and RMS Measurements Express VI, which uses an I16 data type. Note: To ensure the Number to Boolean Array function uses arrays of fixed dimensions you must select VI Properties, select Execution and place a checkmark in the Autopreallocate arrays and strings checkbox. FixedPoint to Integer Conversion
Integer to FixedPoint Conversion
Additionally, in newer versions of LabVIEW FPGA Module, the Math and Analysis functions directly support fixed point data.
Related Links: KnowledgeBase 4DPGKPKO: How Can I Transfer My FixedPoint Data Using a FIFO or Memory in LabVIEW 8.5.x? KnowledgeBase 4FSHBMLX: Using FixedPoint Data with CompactRIO and LabVIEW FPGA Attachments: FXP to Legacy IP_85.zip FXP to Legacy IP 2009.zip FXP to Legacy IP.png
Report Date: 03/17/2008 Last Updated: 04/22/2015 Document ID: 4JGA2HLX
