Does anyone know if this is good?

I'm 24 weeks and I have been having contractions which is very scary and I want to listen to my baby's heartbeat to make sure he is ok. Is this good? 
By the way I did go to my doctor and she put me on bedrest and gave me a medicine to help stop them. I just want to make sure he is not getting stressed out from the contractions.