Check if motion task is running in RAPID?

Is there a RAPID command I can use within a non-motion task to see if a Motion task is currently running?

Hello,
You can use

IF RunMode(\Main)=RUN_CONT_CYCLE THEN

You can set up and monitor a system output TaskExecuting with an argument specifying the task name.

TaskExecuting is the ticket! Thank you lemster68!