What have you tried? Then we can give some guidance and direction.
Generally, the hardest, yet most important, part of an automation project is defining what you want to do. Every step -- how things start and stop, what causes a fault, how the system responds to faults, operator interaction, etc.
Put this all on paper before you ever start programming -- use a flow chart or a process narrative or an outline or pseudocode... anything to document it before you start programming.
Identify your I/O -- how are you going to interface with the "real world"? Do you have the right I/O to be able to do what you've decided above that you need to do?
THEN you can start programming... It doesn't matter what PLC or PLC software you're using. This process is ALWAYS the same. After you've acquired some experience, you might start doing some of these steps in your head, but you're still doing them. Until then, do it on paper.
So... What is your condition to start the motor? What are your conditions for it to stop? When do you want it to restart?