LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using LSB Weight and Offset vs. Fixed Point when reading or writing analog data with a cRIO

I am piecing together details about reading and writing analog data in a cRIO and I am coming up with a question of best practices.

 

It is my understanding that prior to the NI-RIO version 2.4 the analog data read from a C series module was returned in a binary (uncalibrated) form and need LSB weight and offset (a property of the specific C series card) to convert that binary data to engineering units, Volts or Amps for example.  In NI-RIO version 2.4 and later NI introduced a new data type called a Fixed Point number.  The C series modules now return their data in that format which directly represents their engineering units, Volts or Amps for example, and the Fixed Point numbers need no LSB weight or offset properties to convert their data.   However, the LSB weight and offset properties are still present and readable from the C series modules using NI-RIO version 2.4 and you can still read data from the C series modules in binary form.

 

I am venturing a guess that NI left the LSB weight and offset properties in NI-RIO version 2.4 in order to be backwards compatible with software written prior to v2.4 and that going forward the Fixed Point numbers should be used on all new software designs, but I am missing a firm confirmation of that guess.

 

Can anyone confirm my guess and point me firmly in the direction of using Fixed Point numbers on my new software design?  Or if that is not the case, what are the best practices when applying the read/write analog data using the Fixed Point method versus reading the data as binary (uncalibrated) and using the LSB weight  and offset to convert to the desired engineering units method.

Message 1 of 3
(3,608 Views)

Additionally, with respect to my current project I am working on:

I am using a cRIO-9012 with a 4 slot chassis, a 9802 CD card module, 9237 strain module(s), 9215 0-10V in module(s), and a 9211 TC module(s).  The application will always have the 9802 module in slot 1, but any combination of the other 3 modules individually or in multiple incarnations.  For example one day the the chassis could be populated 9802, 9237, 9215, 9211 and a different day the chassis could be populated 9802, 9237, 9237, 9215 etc.  Also in the future my customer will undoubtedly want to add to the list if possible modules that can populate the chassis.

 

With this in mind, does a particular practice described in my previous post apply better to my project?  Is the use of the binary data from the module, LSB weight and offset properties a general use approach to reading data from a C series module and all data can be derived using that method, and the use of the Fixed Point data is a more specific mode of use and does not fit use across all C series modules, OR are both methods equally applicable across all C series modules?

0 Kudos
Message 2 of 3
(3,582 Views)

Hello,

 

For most cases you will want to use the fixed point calibrated data coming from the module inputs. However this causes more space on the fpga (due to the logic it takes to do the calibration) and it might take more bits to represent this data.

 

I would recommend using this kb to learn more about using the Fixed point data.

 

 

After RIO 2.4 you will be fine using Fixed point with all modules. However for some specific modules they return different calibrated data. This can be seen here.

 

Regards,

Andrew Eddleman

National Instruments

National Instruments
RIO Embedded Hardware PSE

CompactRIO Developers Guide
0 Kudos
Message 3 of 3
(3,566 Views)