02-24-2009 05:24 AM
hi all plz look at the vi that i have attached ...... in the vi i am converting an audio signal that i am getting from mic converting it to bitstream ,applying qpsk modulation/demodulation then back to bitsteam and getting audio out on speakers but it keeps givin me the error "Cannot locate Synchronization Sequence as specified in Synchronization Parameters - no possible sync location (e.g. Sync Indent + Sync Sequence size > buffer size)". my sampling rate is 22050 and i am taking 2500 samples /ch for the audio input . For the sound input read.vi I have selected the type U8 so that i should have minimum data array (which comes out to be 20000 bits). But when i play the vi it gives the above error . First i thought that it was due to large number of array elements (20000) but i also gave the same number to the shiping example mt offset qpsk tranciver.vi but it is working fine can anybody take a look at the vi and tell me what i am doing wrong.
thnx
02-24-2009 05:25 AM
02-25-2009 06:55 PM
Hi nolsqn,
There were some VIs missing in your application, however, after spending some time, I managed to reproduce the error and narrowed it down to the qpsk_mod_demod.vi. It looks like this error only occurs when the input bitstream is empty or simply not long enough. I would try and verify your code to make sure that there is indeed data being passed to the qpsk_mod_demod.vi input bitstream terminal. If you are still getting the error, could you tell me what is the length of your input bitstream, number of guard bits, number of sync bits and your modulation parameters (i.e. Symbol rate, modulation type, etc...)
Regards,
S_Hong
Applications Engineer
National Instruments
02-26-2009 01:05 AM
hi S_Hong
sorry for the inconvinence..plz find a attached more simplifed version of the code.....it also contains a allign array.vi which is the same vi as that provided by the examples in the modulation toolkit chech the mt offsetqpsk transciver.vi......once again sry for the trouble..
if you now run the example it gives the same error cannot locate sync seq.
02-26-2009 06:32 PM - edited 02-26-2009 06:32 PM
Hi nolsqn,
I finally managed to run the code and I noticed that the demodulation portion of the code worked without any errors, but was getting an error from the Sound Input Read.vi which might be a totally different issue. I also noticed that whenever I tried running the VI again after the first run, I was getting the error you described with the demodulation VI. It looked like the error was actually coming from the fact you were not reinitializing the error shift register in your application, which was causing the error from the previous run to affect any subsequent runs. Once I initialized the error, I was no longer getting the error due to the modulation VI, but I was still getting an error from the Sound Input Read.vi.
I hope this helps.
02-26-2009 10:41 PM
02-27-2009 04:12 PM
Hi nolsqn,
The reason why this error is occurring is because you are attempting to read samples from the sound input device when there are no more samples to read. You will notice that you write 7000 sound samples only once at the beginning of the loop and are reading the data in chunks of 2000 samples at every iteration. Therefore, you will notice that the application only runs 3 iterations before causing this error.
The solution to this problem is to keep refilling the sound device with data or simply stop the application once you read all the sample from the sound device.
03-01-2009 11:11 AM
hi
keep reffiling?? i didnt get it ?? i am using a while loop to keep filling the data samples....?? i didnt quiet get ur point.sry.
thnx
03-02-2009 11:34 AM
Hi nolsqn,
If you try running your code in highlight execution mode, you will notice that even though it may seem like you are refilling the samples in the sound buffer, there are instances where you are reading out more samples than you are writing in. In some instances, I have noticed that 0 samples were being written to the sound buffer. Therefore, this is a memory underflow problem that needs to be corrected. Please have a look at how you are generating the samples to write.
03-04-2009 07:01 AM
thnx i found the problem..i wil try to solve it ...wil let you know if i got any more errors....thnx