Moving bases on conveyors

This tutorial is great but i can not implement it when the pallet is moving on a conveyor and stopped by a sensor.
https://academy.visualcomponents.com/lessons/teach-a-define-base-statement/?course=853
Does anyone know how to do it?