# Controlling the number of samples

In the below simple qpsk_tx_uhd flowgraph I am trying to create a slider to control the number of samples but got a bit confused with which parameter I should be looking at: the Num samples in the Random source block, the Samples/symbol in the PSK block, or the Number of points in the Constellation Sink block!

Any help with this issue would be highly appreciated.

Flowgraph image:

A digital modulator block takes symbols (discrete digital values) and produces samples (of an RF signal). Therefore, if you want to transmit, say, 1000 samples, and you have 2 samples/symbol set in your modulator, you must feed 1000/2 = 500 values into the modulator.

Change your Random Source block so that its number of samples (values) is the number of samples you want divided by the modulator's samples/symbol setting. You will also need to change the random source's “Repeat” option to "No", otherwise it will repeat those samples forever.