LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fixed Point Data

Solved!
Go to solution

Is it possible to specify the word and integer length for the fixed point data format and if so where is this done?

 

The module that I am using  is a NI 9205 in a cRIO-9074 and appears to have a default fixed point data format of <+-, 26, 5>, which I interpret to mean that the data is signed, has a word length of 26 and an integer length of 5. This gives a maximum value of 16, a minimum of -16 and a minimum step size of ~4.768 x 10^-7, ie 1/2^2.

 

Could somebody please confirm that this is the correct interpretation and also explain how it is possible to get a word length of 26 when the basic analogue to digital converter is only 16 bits.

 

Best regards,

nos

0 Kudos
Message 1 of 18
(5,628 Views)

Hi nos,

your interpretation is correct and you can also check it in the numeric properties.


nos wrote:

explain how it is possible to get a word length of 26 when the basic analogue to digital converter is only 16 bits.



What do you mean with it? Can you explain a bit more please?

 

Mike

 

0 Kudos
Message 2 of 18
(5,615 Views)

Mike,

Thank you for your response of yesterday.

 

The aspect that I do not understand is, how after each 16 bit analogue to digital conversion a 26 bit fixed point number can result.

 

The further question then is on the resolution of the two numbers, assuming that any digitization errors can be ignored, the resolution of the 16 bit number is  one bit which is 1/2^16 of the maximum but with the 26 bit fixed point number the resolution is 1/2^21. How can the minimum step size of the fixed point number be far smaller than the minimum step size of the 16 bit number that it is based on?

 

Also, are the numeric properties that you mentioned settings that the user can change or are you referring to the context help where the data type of any wire can be displayed?

 

Best regards,

nos

0 Kudos
Message 3 of 18
(5,595 Views)

Hi Nos,

 

I think the confusion may be in the way LabVIEW handles the data once it has come in from the ADC.  The information you see in the fixed point value should be a scaled voltage, not the raw signal as seen by the ADC.  If you were to view the raw data in its integer form I would expect this to be the 16 bit value that you are expecting to see.

 

I hope this answers your question,

 

Regards,

 

Thomas Clark

Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 4 of 18
(5,573 Views)

Thomas,

Thank you for your response.

 

However, it seems to me that it does not answer my query as I had already realised that fixed point data represents scaled voltage rather than the basic digital number generated by the ADC.

 

Please see my previous post for the details of my query.

 

Best regards,

nos

 

 

0 Kudos
Message 5 of 18
(5,571 Views)

Hi Nos,

 

Sorry it's taken so long for me to get back to you.  The translation between the raw data and the fixed point value is not direct. The range and resolution of a 16 bit binary number is not necessarily the same as a 16 bit fixed point number, it all depends on the configuration of the fixed point number.  If you are concerned about the accuracy of your application and this conversion all you need to do is make sure the resolution and range of the fixed point number is equal too or greater than that of the ADC.

 

 

Regards,

 

Thomas Clark

Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 6 of 18
(5,539 Views)

Thomas,

Thank you for your message.

 

It seems to me that if the data is left as raw, ie I16, with a voltage range of +/- 10V then the LSB will have a value of 20V divided by (32767 + 32768), which gives ~ 305.2 microVolts.

 

Alternatively, changing the data to fixed point, at its current setting of <+-, 26, 5>, will result in an integer length of 5 and 21 decimal places; with the twenty first decimal place having a value of 1/2^21, which gives ~0.477 microVolts. This is equivalent to saying that all of the decimal places beyond approximately the eleventh decimal place have no meaning as those decimal places are smaller than the LSB of the original 16 bit number, ie 305.2 microVolts ~ 1/2^11.678.

 

Please confirm that this interpretation is correct and indicate if the fixed point configuration can be changed from its current setting of <+-, 26, 5>.

 

Best regards,

nos

0 Kudos
Message 7 of 18
(5,531 Views)
 

With regard to my  previous post of Wednesday 18 March last, I neglected to emphasise the point that the fixed point format of <+-, 26, 5> when used with a 16 bit DAC seems to be particularly wasteful as approximately 10 of the 21 decimal places do not have any real value, see my previous post  for details.

 

 

Confirmation that this interpretation is correct would be appreciated, along with an indication whether or not the fixed point configuration can be changed from its current setting of <+-, 26, 5>.

 

Best regards,

nos

0 Kudos
Message 8 of 18
(5,477 Views)

Hi Nos,

 

I believe that your interpretation is correct and it does appear that the default settings alow a much greater degree of accuracy than may be necessary in this situation, you can configure the fixed point by right clicking then going into the data type tab.  Here you can reduce the desired degree of accuracy to that of your hardware.

 

 

Regards,

 

Thomas Clark

Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 9 of 18
(5,474 Views)

Thomas,

Thank you for your response of yesterday.

 

The calibration mode has been set to "Calibrated" but unfortunately I have not been able to discover how to configure the word and integer word lengths of the fixed point data produced by the FPGA I/O Node itself, see the attached file for an image of the very simple vi that I am using.

 

Please indicate what I should right click to allow me to make these configuration changes.

 

Best regards,

nos

 

 

0 Kudos
Message 10 of 18
(5,455 Views)