Cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger methods at defined time

Pioneer
Pioneer

Hello dear community,

 

I'm currently looking for a way to trigger methods at certain times, which will be computed during the simulation.

Is there a tool in Plant Simulation, which can "watch" the simulation time and trigger methods at a previously given time? It would be essential to be able to add times and methods during the simulation.

 

Best regards

 

Tim

2 REPLIES 2

Re: Trigger methods at defined time

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

Hi Tim,

 

You could use methCall to do what you want to do. You would type:

 

ref(MethodName).methCall(180);

 

MethodName would then be called 3 minutes later. You can also put DateTimes in to say an exact time in the future rather just how many seconds/minutes later.

 

Lastly there is also DeleteMethCall if you want to change when the Method is called.

 

Regards

 

Ollie

Oliver MacFarlane
Simulation Engineer
web: www.simsol.co.uk
e-mail: oliver.macfarlane@simsol.co.uk

Re: Trigger methods at defined time

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

you can also observe the simulation time of the eventcontroller.

 

So you can wait in a "mastercontrol" for certain times in the simulation and start methods at this times e.g.

 

waituntil eventController.simTime >= yourTime prio 1;
startYourMethod;

 

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net