LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does a digital 0,1,1,0 convert to a -1, 0, 0, -1?

Solved!
Go to solution

Using Digital to Analog waveform function why does the following:

0

1

1

0

 

convert to:

 

-1

0

0

-1

 

Code:

Image 10.png

 

Result:

Image 11.png

 

I was expecting:

0

1

1

0

0 Kudos
Message 1 of 4
(1,030 Views)
Solution
Accepted by topic author flycast

The data format defaults to offset binary, you want unsigned binary. 

Message 2 of 4
(999 Views)

That was indeed it. Now, what is signed binary and why would it be used? I've honestly never heard of that before.

Actually a better question. If a waveform has been saved in signed binary in a TDMS file is there a way to detect that when loading and reading the TDMS file?

0 Kudos
Message 3 of 4
(962 Views)

The waveform datatype will be in the waveform attributes. 

 

You may have to play detective on the exact attribute name but, "NI_Datatype" might be close.  The TDMS import addon for Excel should help you find out.


"Should be" isn't "Is" -Jay
Message 4 of 4
(957 Views)