Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Large Binary Values From Analog FPGA Reading

Hardware: CompactRIO

Problem:
Why am I seeing raw binary data that is outside of the range of my analog device?

Solution:
It is possible to see raw binary data (for example, 4.29E+9 coming) from a 24 bit analog module or values that seem very high compared to expected values. These values can occur if the value being read from the module is negative. The FPGA I/O node output for an analog reading is an I32. If this I32 value is passed from a module I/O read node to a function such as a DMA Write function and then read on a host VI, the resulting output will be a U32, and an unexpectedly large number will be read. This is normally corrected by the Binary to Nominal VI found in many cRIO examples. However, you can also use the To Long Integer function to correct this problem.



Note: If you have installed the NI-RIO 2.4 driver or later, you should consider using the fixed-point datatype which embeds the calibration data within the data type and does not require the above mentioned conversions.

Related Links:
KnowledgeBase 4JGA2HLX: Using Fixed-Point Data Types with Integer Based IP in LabVIEW FPGA 8.5.x
KnowledgeBase 4L5B754H: Switching Between Calibrated Fixed-Point and Raw Integer Modes for CompactRIO I/O
KnowledgeBase 4SSHTLKG: Where Can I Find The Binary to Nominal VI?

Attachments:





Report Date: 01/31/2008
Last Updated: 02/06/2009
Document ID: 4HUDE84H

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