Which Numeric Data Types are Supported by the LabVIEW DSP Module for Speedy33, DSK6711, or DSK6713?Primary Software: LabVIEW Modules>>DSP ModulePrimary Software Version: 1.0 Primary Software Fixed Version: N/A Secondary Software: N/A
Problem: I am having problems with my data values changing when I target them to my DSP module. If I select the show warnings box in the LabVIEW DSP Module Status Monitor I receive one or more of the following warnings: WARNING: Data type not supported. Mapped to single-precision floating-point (SGL). < DBL >Which data types does the LabVIEW DSP Module support and how will using the wrong data type affect my VI? Solution: The LabVIEW DSP Module allows the use of the data types below... Double (DBL)However, the SPEEDY-33, the DSK6711, and the DSK6713 only support the following two data types: Single (SGL)When the LabVIEW DSP Module downloads the application to the target DSP device, it coerces/maps the data to the proper data type. Mapping/coercing the data from one type to another can lead to loss of data or misinterpretation of data. Note that LabVIEW DSP produces warnings and not errors when the wrong data types are used. The application will still compile and run on the DSP target. Doubles (DBL) are 64 bit floating values and Singles (SGL) are 32 bit floating values. If you are using the DBL data type and your number is large enough, the number will be coerced to infinity (INF). For example, the Double 1.11111E+49 will be interpreted as infinity (INF) on the DSP boards. A signed 32 bit integer (I32) can be a decimal number from -2147483648 to 2147483647. Since the I32 is signed, it is really a 31 bit integer with the last bit denoting whether or not the number is positive or negative. When an unsigned 32 bit integer (U32) is coerced to an I32, the number might be converted from a large positive number to a negative number. This improper conversion will happen if the U32's value is high enough so that the left most bit is a 1. For example, an Unsigned 32 bit Integer (U32) of value 4294967294 will be interpreted as a -1 on all three of the currently supported DSP boards. These misinterpretations become more evident when they are fed into math functions. For example, multiplying 4294967294 by 5 will result in -5 instead of 21474836470. Also, be aware that LabVIEW embedded will produce no errors indicating that your math exceeded the bounds of your data type. If you multiply two large I32 numerics together, for example 2000000000 and 2000000000, the result will be -1651507200. Not only is this the wrong value, but LabVIEW DSP will not report an error or give any indication that an improper multiplication has occurred. Any time two numbers are mathematically combined to create a number which exceeds the bounds of the data type being used, the result will be wrong and the LabVIEW DSP Module will give no indication of the error. To avoid these coercion/mapping problems, only use singles and signed 32 bit integers. The data type of constants, controls, and indicators can be changed by right clicking the object and selecting the proper data type from the representation menu. Related Links: KnowlegeBase 4AJBQCJV: Does the SPEEDY-33 Support File I/O? Attachments:
Report Date: 05/17/2005 Last Updated: 03/06/2009 Document ID: 3LGEDHAJ |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
