LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

msk demodulation

Hi waciuri,

 

Can you specify how you're defining recoverdBitStream initially?  The ModGetRecoveredBitStream function should update the memory location that the recoverdBitStream pointer points to.  After running the function, can you print the contents of recoverdBitStream?  It should contain updated output values from the function.  Can you clarify exactly what you're seeing when you run the function currently?

 

Thanks,

 

Myriam D.

 

 

 

0 Kudos
Message 11 of 17
(2,206 Views)

Hi Myriam,

 

I modified the recoverdBitStream variable with hMskDemodulatedData. My initialization and usage is as follows:-

ArrayHandle hMskDemodulatedData             = NULL; 

nullChk (hMskDemodulatedData             = allocateArrayData (0, sizeof(unsigned char))); 

errChk (SetArray_Size (hMskDemodulatedData, mskDemodulatedDataLength));   

 checkWarn (ModtGetRecoveredBitStream (
                mtSession, 
                GetArray_Size (hMskDemodulatedData),
                GetArray_pData (hMskDemodulatedData)));  

fprintf(filehandler,"%u\n",  GetArray_pData (hMskDemodulatedData));  

 My fprintf gives me a result that is a repetetive "33839040
33839040
33839040
33839040
33839040"

 

Also recoverdBitStream was unsigned char.

 

How do i save the returned result  GetArray_pData (hMskDemodulatedData) in binary so that i can translate it to ordinary string data to view the contents of the signal?

When it returns such repetetive data, can it be valid cause what am hoping to get as its content is diverse content?

 

Thanks.

0 Kudos
Message 12 of 17
(2,197 Views)

Hi waciuri,

 

As I mentioned before, I'm not familiar with the Modulation Toolkit, so it's difficult for me to know whether or not the ModGetRecoveredBitStream function should be returning repetitive data.  Is GetArray_pData a function you've defined yourself?  Should it be returning an array of unsigned characters?  Just to clarify, are you looking for a function that will convert an unsigned char array to a binary array?

 

Myriam

0 Kudos
Message 13 of 17
(2,179 Views)

Hi Myriam,

 

GetArray_pData is defined in CVI file exampleMemAlloc.h.

 

Yes am looking for this function that converts an unsigned char array to a binary array.

 

Thanks.

 

 

0 Kudos
Message 14 of 17
(2,167 Views)

Hi waciuri,

 

There doesn't seem to be a CVI function that converts unsigned char arrays to binary arrays directly.  However, you should look into the two links below for more information about converting a char to a binary value in C.

 

http://stackoverflow.com/questions/7863499/conversion-of-char-to-binary-in-c

http://stackoverflow.com/questions/4892579/how-to-convert-a-char-to-binary

 

Let me know if you have any questions about this!

 

Myriam

0 Kudos
Message 15 of 17
(2,156 Views)

Hi Myriam,

 

Thanks for the reference although they have not given me the right results yet, but another question is; if i want to make a continous acquisition of my signal, i know i need to use a loop like while

but my loop should depend on trigger which is described in a function "checkWarn(niRFSA_ConfigureIQPowerEdgeRefTrigger(rfsaSession, "0", triggerLevel, NIRFSA_VAL_RISING_SLOPE, 0)); "

 

How do i use this trigger in my loop?

 

Thanks,

Waciuri.

0 Kudos
Message 16 of 17
(2,149 Views)

Hi Waciuri,

 

Again, it's difficult for me to answer this question because I do not work with NI-RFSA and don't have any background knowledge about this trigger.  That being said, if you have the DAQmx driver installed, I would suggest looking into some of the DAQmx examples for more information about how to use triggers in CVI.  Typically, they are configured before the data acquisition is started.  Try navigating to Start>>Program Files>>National Instruments>>NI-DAQmx>>Text-Based Code Support>>NI-DAQmx ANSI C Examples and checking out the Continuously Acquire Voltage Samples - Internal Clock - Analog Start example for more information (I've also attached it).

 

If you would like more specific information about the function itself, I would strongly suggest posting on the RF boards so that people with more experience using this trigger might see your question.

 

Please let me know if you have any other questions.

 

Thanks,

 

Myriam

0 Kudos
Message 17 of 17
(2,139 Views)