I'd like to change data type for FPGA I/O node on my 7841R FPGA card (simulation). So far i have raw data (I16). I want to test something with calibrated data (FXP).
On cRIO you usually go to module properties to change the calibration mode...
I have searched 7841R documentation and couldn't get any information wether this calibration mode was also available on this card.
Any hints ?
Solved! Go to Solution.
It looks like the "Calibrated Mode" is not available on the R series. It is available on some of the CompactRIO modules. The 16 bit value you get is actually calibrated already, but you have to do the (X/32768)*10V to get the measured voltage. The calibration that corrects the raw count value is stored on the device and is programmable when the device gets recalibrated.
The best practice is to work with the raw data as the I16 while inside the FPGA, and do the formula conversion on the host.
The new R-Series boards do offer fixed point IO nodes (such as the PXIe-7858R), but as mentioned all the older PXI based R-series boards only offer I16 measurement modes.
Page 22 of the R-Series manual talks about how to do this conversion: http://www.ni.com/pdf/manuals/370489g.pdf#page=22
Specifically, it notes that you can calculate the voltage by doing (Output Code I16)*10.0V / (32,768).
Even though this can use FPGA resources, it does save the host from doing the same conversions. On older RT targets with slow CPUs doing the conversion from I16 or FXP to SGL on the FPGA saved lots of CPU time