how can I use function analogWrite() to write voltage to in certain times/s

PaulRB:
Your statement is full of contradictions. The DAC pin does not output pwm, so you would not see pwm. If you are not using the DAC pin, only a pwm pin without a filter, you would see only pwm and would not see a sine wave.

I think you should post a schematic showing what is attached to the Arduino and where the 'scope probes are attached. Also the test code that is running, in code tags. Some screen grabs from the 'scope or pictures of the 'scope screen would also be helpful, showing the signals you mentioned.

Thank you for pointing my wrong statement out. I wrongly understand the DAC.