linear and rotary motor

is it possible to put a motor within a simulation, lets say im trying to do a linear motor and a certain part of that timeline, i will add a rotary motor then stop and continue with linear and then stop again to add rotary motor and then again and again?

Thank you!

SolidworksMotion Studies