SR Flip Flop Error - Input signal 2 has not been initialized

Sorry I don’t have 4.1.2 installed. With the current version I don’t get this error. However, the integrator generates an infinite loop, which you should fix anyway by using the state port output of the integrator.

Maybe you can adapt the Peak Current Controller in Control->Modulation->Peak Current Controller for one cycle control.