Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
3 ratings:
 5 out of 5     Rate this Document

Which Numeric Data Types are Supported by the LabVIEW DSP Module for Speedy33, DSK6711, or DSK6713?

Primary Software: LabVIEW Modules>>DSP Module
Primary 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 >
WARNING: Data type not supported. Mapped to 32-bit integer (I32). < I16 >
WARNING: Data type not supported. Mapped to 32-bit integer (I32). < I8 >
WARNING: Data type not supported. Mapped to 32-bit integer (I32). < U32 >
WARNING: Data type not supported. Mapped to 32-bit integer (I32). < U16 >
WARNING: Data type not supported. Mapped to 32-bit integer (I32). < U8 >


I realize this probably has something to do with the DSP module only supporting certain data types. Which data types does the LabVIEW DSP Module support and how will using the wrong data type effect my VI?

Solution: The LabVIEW DSP Module allows the use of the data types below...

Double (DBL)
Single (SGL)
Signed 32 Bit Integer (I32)
Signed 16 Bit Integer (I16)
Signed 8 Bit Integer (I8)
Unsigned 32 Bit Integer (U32)
Unsigned 16 Bit Integer (U16)
Unsigned 8 Bit Integer (U8)
But, the SPEEDY-33, the DSK6711, and the DSK6713 only support the following two data types...

Single (SGL)
Signed 32 Bit Integer (I32)
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 feed 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. Basically, anytime 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.

The only way to avoid exceeding the range of a data type is to be a vigilant and careful LabVIEW programmer.

Related Links:

Attachments:





Report Date: 05/17/2005
Last Updated: 06/27/2005
Document ID: 3LGEDHAJ

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit