11-21-2017 09:21 AM
Dear colleagues:
I would like to know some details about the way LabVIEW (in particular, its FPGA module) performs some data type conversions.
For example, if you have a negative-valued INT32 variable, and make its wire pass through that "To Unsigned Long Integer" bullet-like box, what's the result? What happens to the MSb?
Thank you and regards.
Biscay.
Solved! Go to Solution.
11-21-2017 09:26 AM
biscay wrote:What happens to the MSb?
Why don't you just try it? Would seem much faster than asking here. 😄
11-21-2017 09:29 AM
Good point. The thing is that I expect these things to be explained in the otherwise very complete Labview's Help menu.
11-21-2017 01:48 PM
I bet if you looked at the very complete Microsoft Visual Studio help system for the same question, you don't find it explained there either.
11-21-2017 02:10 PM
@biscay wrote:
For example, if you have a negative-valued INT32 variable, and make its wire pass through that "To Unsigned Long Integer" bullet-like box, what's the result? What happens to the MSb?
In this case, nothing happens the the MSb. The data is literally just reinterpreted (the binary values are exactly the same).
11-22-2017 02:20 AM
Thank you, Crossrulz, for your quick answer.
Other related question is, does anyone know how time- and resource-consuming is the conversion from SGL to whatever FXP, on an FPGA target?
There are plenty of examples suggesting to turn your ADC-acquired FXP values to SGL, which I see as very handy (given that, for example, the official PDI vi no longer makes use of I16s: it now uses SGL values). In fact, for me, it is reasonable to think that that FXP->SGL conversion is pretty straightforward. However, if you need to get back to the FXP world, I see that things are blurrier. And, again, LabVIEW's help is of little help here!
Biscay.