USRP Software Radio

cancel
Showing results for 
Search instead for 
Did you mean: 

conditional write USRP IQ data to TDMS file

I am capturing RF signals by USRP device. I want to write IQ data to TDMS file under condition, if either of their absulot values (I or Q) is greater than some threshold value.

I use the case structure. It works for “True” case. But for the “False” case, when condition is not satisfied I do not want to write any data to the TDMS file (now in my code I am feeding zero for output of "false" case, i need to modify it to stop writing any data for "false" case). So my question is I do not know how to complete the "false" case. Or may be I need to use different structure.

I attached the code.

0 Kudos
Message 1 of 4
(2,811 Views)

Hi Jeff100, 

It sounds like you will want your TDMS write function in a case structure where in the false case you don't write anything. Right now, with your false case, there is no change in what happens with the TDMS write function. 

Shalini M.
Partner Development Engineer
Alliance Partner Network
National Instruments
0 Kudos
Message 2 of 4
(2,779 Views)

Hello Shalini,

 

Yes, I want to write to the TDMS file just during "true" case. But for "false" case I do not want write to TDMS file.

In my code, right now, for the "true" case it passes data to write to TDMS file. but for "false" case it writes zero to TDMS.

How I can stop to writing to file during "false" case. In other words, instead of passing/writing zero (that is what I did) how I can pass nothing during "false" case.

 

Thank you

0 Kudos
Message 3 of 4
(2,776 Views)

If you add a case structure around the TDMS write function and only write data in the true case and pass the TDMS reference without the write function in the false case, that should accomplish what you described. 

Shalini M.
Partner Development Engineer
Alliance Partner Network
National Instruments
0 Kudos
Message 4 of 4
(2,746 Views)