LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FXPtoSGL_EncodeU32.vi

Hi, 

I want to send data from FPGA to host by using DMA and I want to use conversion FXP to SGL before sending. I want to use standard vi FXPtoSGL_EncodeU32.vi http://www.ni.com/white-paper/9221/en where data are transformed to FXP 64/24 at first. However I want to send FXP data 40/32. Is it possible to use this for this data type representation ? 

0 Kudos
Message 1 of 9
(2,634 Views)

you can use the concept but the FXP2SGL routine needs to be tweaked to insure that you do not overflow your 32 range.

Stu
0 Kudos
Message 2 of 9
(2,631 Views)
0 Kudos
Message 3 of 9
(2,629 Views)

Hey that cool....

 

is it possible to change it to send data 64/38 ????????

0 Kudos
Message 4 of 9
(2,627 Views)

yes, if you look at the code, it shows where you have to make the changes for different data types.  however, you have to remember that SGL only has 24 bits of resolution (7.2 significant digits).  if you are using a number like that, you may want to use a DBL which has 53 bits of resolution (16 significant digits).  if you need the range, and not the resolution, SGL will work fine.

Stu
0 Kudos
Message 5 of 9
(2,623 Views)

Just curious, since I've seen your FPGA code in the other thread... is there some reason that you're concerned about doing the conversion on the FPGA?  Letting the host processor do automatically is certainly easier, and unlikely to cost you much in processing time.

0 Kudos
Message 6 of 9
(2,618 Views)

the more you use the fpga as a co-processor, the higher the performance of your application.  we have always been underwhelmed by the cRIO processor performace and look for ways to get higher performance.  avoiding conversions is an easy way of increasing performance.  if you are streaming data to disk or over TCP or UDP, why NOT use the fpga to preprocess the data.

we always look for ways to make the FPGA the limiting factor of performance and not the processor meaning trying to support maximum FPGA rates for analog and digital.

Stu
0 Kudos
Message 7 of 9
(2,616 Views)

Stu - sorry, my question should have been more clearly asked of Charlie, not of you, based on VIs and questions he has posted in other threads.  I'm trying to discourage him from adding unneccessary complexity until he has a working program and a need for more speed.

0 Kudos
Message 8 of 9
(2,611 Views)

I read some examples for waveform acq. and this conversion was recommended in the vi.

I am computing variance and RMS^2 of input signal FXP 32/19 so I get FXP 40/64 number which I want to send to host.

 

I changed the code what nathan is writing about. Check it, if possible, and suggest your opinion,please

http://forums.ni.com/t5/LabVIEW/How-can-I-do-it-better/m-p/2040912/highlight/false#M666736

0 Kudos
Message 9 of 9
(2,605 Views)