AnsweredAssumed Answered

AEL Batch Simulation

Question asked by slepkow on Jan 28, 2016

I'm trying to write an AEL script and being overwhelmed. I am trying to run a series of simulations with swept variables and appending the values to a text file when the certain criteria are met. I've had intermittent success with
but cannot get them to function reliably.

Looking at this post:
run de_analyze() back to back 
I though waiting until +desim_foreground_simulation_running()+ returned +FALSE+ could prevent a second simulation from starting. However, even long after the simulation finishes it returns +TRUE+. The only way I can stop the simulation is manually clicking the +Stop and Release Simulator+ command from the schematic window. Recoding this macro and adding it to the AEL script did not help either.

Here is simple snippet where it would get stuck for eternity.
fputs(stderr,sprintf("desim_foreground_simulation_running: %d", desim_foreground_simulation_running()));

Is there a concrete way to determine if a simulator is running, and how to release it?