RobotStudio event

Two simultaneous functions

Hello,
I am trying to define a running tempo on a machine under robotstudio: with tempo => Closed door / finished tempo => open door
to know when the robot can interact with the machine during its operating cycle. I want to point out that the tempo is in the background and does not prevent the robot from continuing its own cycle.
 How should I go about assigning this feature?
I am not expert in the use of the software i discover it, all help is welcome
Thanks