11-30-2008 08:18 PM
Hello All,
I am sampling two 9219 modules (24-bit universal module) into a I32 FIFO on the FPGA target (9072). I want to convert this sample into a current value for scaling in my host vi. The module reads a +/- 25 mA input 24-bit into a 32-bit memory location. I was originally performing the conversion on the host like so,
1. INPUT converted to I32, then to DBL
2. (INPUT* 25)/ ((2^24)/2 - 1)=CURRENT (mA)
3. CURRENT (mA) * SCALE = VALUE
My values seem very high. Any help is appreciated. Thanks.
Gaussy
Solved! Go to Solution.
12-01-2008 06:03 PM
Hi Gaussy,
I'm a bit confused as to why you would need to scale the current values. The NI 9219 should be able to read in current measurements without the need of any manual conversion as the drivers will take care of this. To find examples on how to do this, you can take a look at some of our shipping examples in the NI Example Finder under the Help menu in LabVIEW. The example I would like to point you to is under Hardware Input and Output » DAQmx » Analog Measurements » Current » Cont Acq 0-20mA Current Samples-Int Clk.vi.
Please let me know if I am misunderstanding your question.
12-01-2008 06:21 PM
Hi Gaussy,
Please disregard that last post, I just realized that you were using a cRIO chassis (NI 9072) instead of a cDAQ chassis (NI-9172).
12-03-2008 10:24 AM
Hello Gaussy,
Thank you for contacting National Instruments! There were a few questions that I had for you in order to continue troubleshooting this issue. My first question is what version of LabVIEW are you using? If you are using LabVIEW 8.5 then do you mean U32 instead of I32? If you are using LabVIEW 8.6 have you thought about trying to use Fixed-Point so you do not have to worry about the conversion? Here is a knowledgebase article that talks a little bit more about this topic.
After looking through your conversion algorithm I did not see any specific flaws. I was wondering if you could post the values that you are receiving from the FPGA Target and then the values after your conversion. Also, it would be good to know what values you are expecting and why. This will help us determine if the actual signal from the module is off or if the conversion is incorrect. I hope this helps! Have a great day!
12-05-2008 09:20 PM
Hi Bob,
Thanks for the information. I was originally trying to limit the amount of scaling activities on the FPGA, and perform some of them on the RT target, and on the host computer after transferring the data. After trying both methods, the collection of data in FXP point is the most efficient way to collect it for the 6 channels I am reading.
Much appreciated.
Gaussy