Communicating Back and Forth Between Computer and Robot

Hello, very new user to the UR10e here! I am currently working on a student project involving the robot arm moving a measuring device across a surface and taking readings as it goes. What I want to do is send a signal from the UR to my computer which will then trigger the measurement device. Then the computer will send an “all clear” signal to the UR which will resume its pathing until it reaches the next scanning point. What I want to know is: how do I program the UR to send an output signal of some kind and how would I tell the UR to wait at a specific command until it receives an input signal? Terribly sorry if this is a really basic question.