USRP gain changing in runtime: the codes

#1

Dear all,
I am a beginner and I am searching to find a way to change the gain of rx block in USRP1, but in the run time. I want to put a loop and change the gain step by step. I am working on a tweaked software and I cannot use “Slider” block. Is there any body to help me?