Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot locate Synchronization Sequence

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

Regards
Download All
0 Kudos
Message 1 of 11
(3,940 Views)
plz find the 4th sub vi attached for the above code. sry
Regards
0 Kudos
Message 2 of 11
(3,939 Views)

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

S_Hong
National Instruments
Applications Engineer
0 Kudos
Message 3 of 11
(3,912 Views)

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.

Regards
Download All
0 Kudos
Message 4 of 11
(3,906 Views)

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.

Message Edited by S_Hong on 02-26-2009 06:32 PM
S_Hong
National Instruments
Applications Engineer
0 Kudos
Message 5 of 11
(3,892 Views)
hi ....this error with the sound input read.vi ....can you say anything why it is coming ..what causes the error???
Regards
0 Kudos
Message 6 of 11
(3,886 Views)

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.

S_Hong
National Instruments
Applications Engineer
0 Kudos
Message 7 of 11
(3,872 Views)

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

Regards
0 Kudos
Message 8 of 11
(3,858 Views)

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.

S_Hong
National Instruments
Applications Engineer
0 Kudos
Message 9 of 11
(3,846 Views)

thnx i found the problem..i wil try to solve it ...wil let you know if i got any more errors....thnx

Regards
0 Kudos
Message 10 of 11
(3,827 Views)