OpAmp clamping circuit not working for a Pulse voltage reference in PSpice
Your waveform is the sum of a sine (period 100ms, amplitude 8V) and a square (100ms at -40V, then 100ms at 0V).

Since the question is to generate this waveform in spice, I'd just put these two sources in series to sum the voltages and be done with it... no need for any opamp.