if i understand correctly, you may want to run a timer in background, read the value of it and do action with x,y or z value... or use the Darrel Taylor Multi_SSPWM routine.
http://www.pbpgroup.com/modules/wfse...p?articleid=12