LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

bitstream into decimal values

Hi,
 
 
I have read a sound file and  converted the mono 8-bit content (The data is an array of decimal values 125,126,124,126,129.........)
(in the sound file read.vi) into binary stream and used the data for modulation(PSK). Now after demodulation I've to convert the bit stream back into original decimal values to compare the original (baseband) power spectrum.
 
 
How to convert the output bitstream into decimal values(like 125,126,124........).
 
How to do this?
Scan/Format string will not work here.
 
I've done the decimal to binary conversion like this
 
 
Thanks
Celia
0 Kudos
Message 1 of 16
(5,335 Views)
Hello celia,

maybe this could help you...

Btw. I would not call it a binary stream. It's a stream of I16 values in your case!


Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 16
(5,328 Views)

Hello  Gerd,

 

Thanks for the code It served the purpose.

Celia

0 Kudos
Message 3 of 16
(5,316 Views)

I am trying to run your file (decimal to bitstream conversion_and_back.vi) but it is not working with labview 2013 version. It seems like there some old VIs which are not supported by labview any more. Can you guide me how to make it work with labview 2013 or can you please post the new version of the file which is compatible wth labview 2013.

 

Thanks 

0 Kudos
Message 4 of 16
(4,848 Views)

Hi Joseph,

 

just delete the missing subVI.

It's part of an old toolkit (Modulation toolkit?) and not needed for the purpose of that VI!

 

Wow, this thread is ancient…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 16
(4,815 Views)

I made the changes as per your suggestion but the design is not working. It is not giving any error but not producing any result. Kindly guide me how to make it work,

 

I am attaching the new file please have a look at it.

 

Thanks

0 Kudos
Message 6 of 16
(4,809 Views)

Hi Joseph,

 

the design is not working

Why not?

 

At first it loads a *.wav file, which is expected to be in 8bit PCM format (as you remember this VI is very old!). Then the waveform data is converted to a bitstream and displayed in the "Array" array indicator.

In the last part that array is converted back to the (hopefully) original waveform data.

 

So again: what is not working here?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 16
(4,802 Views)

When I run this file following values appear at sound output.

 

Sound Quality: Stereo

 

Rate: 44100

 

Bits per sample: 16 bits.

 

Other than sound output paramter it does not show anything.

0 Kudos
Message 8 of 16
(4,792 Views)

If you're working with 16 bits, wouldn't that be contrary to the 8 bits the VI is expecting?

0 Kudos
Message 9 of 16
(4,789 Views)

Hi Joseph,

 

I already mentioned the VI expects 8bit PCM data. So why do you choose a 16bit WAV file?

 

And what's the problem in reading the help for the WAVEFileLoad function? What's the problem in checking the used output of that function?

Are you even trying to understand what that VI does?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 16
(4,785 Views)