cobot is in running state whether it is executing a program or not.
Is it possible to find out if the program is running or not?
There a a few ways to achieve this. Check out these threads:
I’d recommend using the RTDE interface, but you are not limited to solely this method.