LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Abort Simulation Loop through user event.

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

 

 

0 Kudos
Message 1 of 2
(3,045 Views)

can you share the code /snippet which you have tried?

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 2
(2,969 Views)