So this is a continuation of the thread in this link:
I've made some progress (I think) and I now have this:
The output in scope1 is obviously incorrect, but I'm not sure what i have to edit to make it correct. The signal in the sign wave is 10pi. Anyone have any suggestions?