IR sensor, programming question

I am on an FTC competition team. On the game field the is an IR sensor output in the front and back of the field. I am trying to learn how to use while loops for autonomous and am having problems. I was also hoping to use while loop to guide or robot during autonomous based on the positioning of the IR outputs. If anyone knows how to program using the IR sensor, while loops, or has a better way, can you please post. If there is a link to a site that is useful to learn Labview further that would be of use also.