LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fractional String To Number and vice versa for FPGA

Hi Hayk,

 

but it isn't good for my project.

Well, your display should not need more than 15Hz update rate.

What's so wrong and "bad" for your project you can afford to send data from FPGA to RT, process the data easily, and send them back to FPGA?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 15
(1,181 Views)

@GerdW wrote:

What's so wrong and "bad" for your project you can afford to send data from FPGA to RT, process the data easily, and send them back to FPGA?


I'm not even seeing a reason to send it back to the FPGA.  Just have the FPGA process the raw data and pass it to the RT using the front panel access.  The RT can do the conversion purely for the display (a simple Format String will do the job).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 12 of 15
(1,173 Views)

Hi crossrulz,

 

I think Hayk talks about a hardware display taking this U8 array as input…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 15
(1,170 Views)

@GerdW wrote:

I think Hayk talks about a hardware display taking this U8 array as input…


Now that would make more sense, and a key bit of information.  Then the question becomes "how is the data written to the display?"  Serial port?  Digital Outputs?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 14 of 15
(1,162 Views)

Interesting problem! A few more ideas:

 

  1. You might consider a look-up table to translate the U8 values to digits (ie, an array constant indexed by the element of the byte array).
  2. Instead of storing the powers of 10, look at multiplying the running total by 10 on each iteration to build up the proper digit weights as you go.
  3. Consider using a multiplier for the output scaling, with the reciprocal constants stored in a look-up table.
  4. I believe this is the easier of the two conversions, since there are log10 operations involved the other way. Look-up tables will come in handy there.
  5. Depending on what kind of math you're doing, another approach would be to bypass these conversions by implementing decimal arithmetic operators for what you need.

Jim

0 Kudos
Message 15 of 15
(1,160 Views)