02-25-2009 12:37 PM
nolsqn wrote:hey hi t06afre...can you tell me any way to incease the buffer size ? ..and what do you mean that it is strange code do you know any better way to convert an audio signal to bitstream??
thnx
The number of samples/ch input value on the Sound Input Configure.vi sets the buffer size

02-26-2009 01:00 AM
hi ...thnx for the help ....but still by increasing or decreasing the buffer siz still the error is ther...i am attaching the vi...plz have a look at it ...thnx for all the help..Error is "a task must be running to perform the operation"..also plz find a sub vi in the code allign array........it is the same vi which comes with the shipping examples of modulation toolkit check the MT OFFSET QPSK TRANSCIVER.vi example .
02-26-2009 04:55 AM - edited 02-26-2009 04:59 AM
As I mentioned in my first posting. Your I32_to_bitstream.vi and the rest of the bit stream code was quite "bad" and very time consuming. It gave you some output but the output was wired. Your use of the cast function was not correct at all. The result was buffer overflow for the "sound input.vi" because the data input was faster than the read rate. In the future I strongly recommend that you brush up your debugging skills. The profile toolbox under tools in the toolbar is also something you should learn to use. If your code is free of errors, it does not mean that it works as expected ;).
Well anyway Take a look at my solution. I hope my understanding of the term bitstream is correct. As an example the 8 bit 0xb11000010 value translated to a bitstream will give an array equal to 1,1,0,0,0,0,1,0
The bitstream VIs has default values for the input so you can do some standalone testing
Tip By right clicking the sound input/output functions you can select the type for the output

02-26-2009 09:45 AM
Well I am not quite perfect as a programmer myself :smileyvery-happy: Then I was working with this last night I selected the "insert into array function" instead of the "replace array subset function" and things started to run very slow. So I had to do some modifications to my plans. Well the result worked but did not executed as fast as I hoped. After looking into the problem once more I spotted the error. And the execution time for the program was as I wanted. The time saving is drastic because the load on the memory manager is reduced. I have attached a PNG showing the result for the profile tool, and the modifications. The "bit stream to 16 bit audio.vi" is unchanged

02-26-2009 10:35 AM
02-26-2009 05:50 PM
Hey nolsqn,
Your latest post is a bit unclear. Did you get the examples t06afre provided to work before making any modifications? How did you try on incorporate mod/demod blk into your code? Did you get any particular errors when you attempted to do this and it 'didn't work?' Also, what errors were you getting when you ran the code you provided in your latest post? Was it the original error you mentioned in your first post?
Hope some of these questions help clear some things up.
-Ben
02-26-2009 10:46 PM
02-27-2009 04:09 AM - edited 02-27-2009 04:12 AM
Hi your problem is timing again. It take 3.3 seconds to complete one loop of your latest program example, and it takes the sound input buffer 1 second to overflow. I think I can't give you any more help. Because I have zero knowledge in the topic modulation. I think someone else has help you. I guess this is a school project, and your teacher is the nearest person to ask for help. Before you ask him for help you should compile a list. This list should contain topics like what you have done so far, things that are working, things that not work as expected. Also document your debugging results so far. Teachers hate questions like "this program is not working, and I have no idea why. Please help me"

02-27-2009 07:43 AM
02-27-2009 09:18 AM
Ok the bottom line is as follows. You want to do some calculations in "real time" every .5 second. But as your program is now each calculation takes about 3.3 seconds to finish. It is like a dog chasing its own tail. You can not win this one
