Main Content

stopCapture

Stop capture running in background using baseband receiver

Since R2024a

Add-On Required: This feature requires the Wireless Testbench™ Support Package for NI™ USRP™ Radios add-on.

Description

stopCapture(bbrx) stops any capture in the background using the specified baseband receiver bbrx.

example

Examples

collapse all

Create a baseband receiver object, specifying a radio setup configuration previously saved in the Radio Setup wizard.

bbrx = basebandReceiver("MyRadio")
bbrx = 
  basebandReceiver with properties:

               RadioGain: 10
         CenterFrequency: 2.4000e+09
              SampleRate: 250000000
                Antennas: "RF0:RX2"
    DroppedSamplesAction: "error"
         CaptureDataType: "int16"

Request 5 s of IQ data in the background and save it to a file in the basebandData folder called capture1.mat.

mkdir('basebandData');
[dataPath,~] = capture(bbrx,seconds(5),SaveLocation='basebandData/capture1.mat',Background=true);

Check if the capture is in progress.

isCapturing(bbrx)
ans = logical
   1

Stop the capture after 1s.

pause(1);
stopCapture(bbrx);

Check that the capture is no longer in progress.

isCapturing(bbrx)
ans = logical
   0

Input Arguments

collapse all

Baseband receiver, specified as a basebandReceiver object.

Tips

Check the status of the capture by using the isCapturing function before using the stopCapture function:

isCapturing(bbrx)
This function returns 1 (true) if a capture is in progress in the background.

Version History

Introduced in R2024a

See Also

Functions

Objects