10-01-2019 02:59 PM
Hello!
I want to convert a decimal number (from -32768 to 32767) into a 16 bits Binary two's complement.
Any suggestion?
Thank you in advance!
Solved! Go to Solution.
10-01-2019 03:05 PM
What is the datatype of the "decimal number"? A I16 numeric integer? A decimal string?
What output do you want? (binary string? I16 numeric?) What is the byte order?
It always helps to attach a small VI containing your input in a diagram constant to avoid ambiguities. Thanks!
10-01-2019 03:28 PM
Hi,
I have a dac714 which is designed to accept binary two’s complement input codes with the MSB first. The output voltage range I want to obtain is ±5 V. What I am doing is to convert voltage values (DBL control, so that the user can select the desired voltage) into decimal values from -32768 to 32767 (DBL). What i want to get is a 1D array of boolean that goes in a digital output of my usb 6211 and then into the dac.
I hope I was clear.
(I don't attach my VI because this is a small part of a very crowded one, I try to simplify it and attach later a simpler version)
Thank you
10-01-2019 03:43 PM
Here is a simpler version of what I did so far. The conversion here is from digital to binary, what I wish is from digital to binary two's complement.
10-01-2019 03:57 PM
10-01-2019 04:10 PM
Thank you.
10-02-2019 07:13 AM
@Giulia30 wrote:
What i want to get is a 1D array of boolean that goes in a digital output of my usb 6211 and then into the dac.
Stupid question: Why not just use an Analog Output on the USB-6211? Or is the DAC714 the UUT?