LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert unsigned to signed bytes

Hi,

My oscilloscope sends a 2500 signed bytes in a string, and i want to plot these points. labview has a string to unsigned array converter, but i want to convert it to an array of signed integers.

is there an easy way to convert an unsigned array into a signed array (with 2500 elements)?
0 Kudos
Message 1 of 4
(4,688 Views)
You should be able to use the typecast function with a signed array as the type input.
Message 2 of 4
(4,684 Views)
Hmmm... I can't figure out that type-casting thing. But just in case anyone else runs into this same problem (I can't be the first guy to take data from an oscilloscope), here's how I converted my unsigned bytes into signed (and scaled) floating poing voltages.

The conversion takes place in a for loop.
The scaling takes place in a formula node.

(this program may not be optimized for speed).
0 Kudos
Message 3 of 4
(4,661 Views)
Message 4 of 4
(4,649 Views)