Coupling Plecs Simulation to a Python script | Pausing/Resuming Simulation?

I have a Python-FEM Simulation that i want to couple with a Plecs Simulation over xml-rpc.
It should go like FEM->Plecs(1 time step)->FEM->Plecs(1 time step)

Is there any way to pause the Plecs Simulation at a given time, compute my FEM Simulation, update Variables for plecs and then continue the Plecs-Sim and so on?

server.plecs.simulate(“model”, opts) seems to start a new Simulation (Coils unmagnetized etc.) every time, even when setting Start- and StopTime correctly.

System States would do the trick, but can they be stored, loaded and erased via xml-rpc?

The XML-RPC interface currently does not support saving or loading the system state at the end resp. beginning of a simulation. Besides, it would be rather inefficient to let PLECS recompile and initialize the simulation model in every single simulation step.

To run PLECS and your FEM simulator side-by-side you can use the DLL block. You need to create a DLL that reads signal inputs from PLECS, sends them to your simulator, reads back the results and writes them to the output of the DLL block.