From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I16 U16 FPGA

Hi all,

 I confused myself with the I16 and U16 data representation. Here is how I think about those representations.
 Both the representation use the binary-complement storage. When I convert and I16 to U16, no change is made to the actual storage. Therefore, it does not matter what type I use in the vi as long as I use either U16 or I16.
 Now take an example.  Say, I had a -300 stored in I16 in the host VI. I converted it to U16, and then passed the converted value into a Control of a FPGA vi with type I16. Then I passed the value to the DAC output. I could still get a analog output corresponding to -300/8192. (ignore those upconversion...)
  Am I right? I would really appreciate your comments.

David

SORRY.  I just realized I did not post it in the appropriate board but I can not delete it.


Message Edited by david uang on 04-11-2007 09:22 PM

0 Kudos
Message 1 of 2
(4,378 Views)

Hi David,

I hope you are doing well today! I don't understand your question over here. There is a difference between the signed 16 (I16) and unsigned 16 (U16) integers. Only the signed integer uses two’s-complement for representation. So, when you convert an integer from I16 to U16, a change IS made. In the example cited above, -300 becomes 65236. Please do let me know if I have not replied to your question well.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 2
(4,350 Views)