LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert sine wave to bit stream

Hi,

I need to convert a sine wave (I am using the Simulate signal.vi) to bit stream (1D array of numeric (byte [8 bit integer (-128 to 127)]).
This bit stream will go to a vi (specifically the Modulate PAM) so it will be modulated.


Greetings


0 Kudos
Message 1 of 5
(3,084 Views)
Couldn't you do something as simple as this:


The scale factor is based on the peak-peak of the sine wave you're generating. In my case I had an amplitude of 1 so I scaled it to make my amplitude 128.

Message Edited by smercurio_fc on 02-23-2006 05:23 PM

Message 2 of 5
(3,073 Views)
Oops. That should be a conversion to I8, not U8. Too fast on the clicking there.
0 Kudos
Message 3 of 5
(3,066 Views)

It helped a lot, but i need 1´s and 0´s in the output. (Numeric(byte[8-bit integer (-128 to 127)])).

Greetings

0 Kudos
Message 4 of 5
(3,051 Views)
I guess I must be a little thick this morning, but I don't understand what you're asking. You says you want 1s and 0s, but you say you want an array of 8-bit integers? Forgive me, but I don't understand what you're asking for. I also don't understand what this -> (Numeric(byte[8-bit integer (-128 to 127)])) is supposed to mean. You original post said you wanted a bit stream. Does this mean you want an array of zeros and ones or an array of booleans indicating high/low? If so, what order should the bits be in?
0 Kudos
Message 5 of 5
(3,034 Views)