09-25-2016 02:43 PM
Hi everybody, i'm on nasty trouble and i need some advice.
I'm using the Control and Simulation Toolkit to run a medium-sized model to compute some battery data for power balance. The loop give me 11 different data and have some stiff problems (I'm using Radau 5 or BDF solver). The simulation is fine and provides the right response, but....
I have a requirement to create a way to stop the simulation through a button. The simulation have dozens of settings and it can "fail" by some user selection (The step size could be minimum and turn the simulation irresponsive). Anyway...
I've tried some approaches (For exemple, drop a random "stop" notifier inside the simulation loop with the "halt simulation node", but it didn't work), but none of them give me the expected and acceptable result. My current "code" setup is:
Another problem here is that i can't "close the reference" because it would release the resources associated with the toolkit itself. I've noticed a bit of workload and some time if i want recreate the open reference call in order to "reset the VI" to another simulation. That's another trade-off because the simulation loop retain some data from previous stopped simulation (like time).
Well...
All answers will be appreciated
09-27-2016 11:54 PM
can you share the code /snippet which you have tried?