Hi Haneetha,
Thanks for posting on a more appropriate message board.
It may help if you were to explain the overall objectives of your code, i.e. what are you wanting to do with it?
From what I gather you move Ports A&B for your motors forward and if the distance is more or less than 20, you turn by a certail angle & send a message to the computer.
Then within your other while loop, you're trying to read the rotation of port A or port B, yet this loop will run continuously & not receive a value from the Drive Distance VI.
I've adapted the code to give you a better idea of how your VIs should be used:
Please give this a go and let me know how you get along!
Kind regards,
Tori
Student