Cancel
Showing results for
Did you mean:

# How to Change the Capacity of a buffer Dynamically during the running of the model?

Genius

Hello,everyone

I create a model ,in which i wanna change  the capacity of a buffer Dynamically during of running of the model.

However ,I have no idea about it.I dont  know how to program  the method .when and how to trigger the method.

I will explain it in detail:

Step1:At the start of the model,the capacity of the buffer is 8:when it is full , in which all parts will move out at a time. then the another 8 parts will enter. it works like this  for 6 times.

Step2:Then the capacity of the buffer will change to 4,it works the same as above.after it works this for 5 times.

Step3:Then the capacity of the buffer will change to 8. The value of the buffer will repeat this cycle.

2 REPLIES 2

# Re: How to Change the Capacity of a buffer Dynamically during the running of the model?

Siemens Phenom

Hi Mark,

in an Init method you can set the capacity by infinite loop. When you want to reduce the capacity you must ensure that the number of MUs on the buffer is sufficiently small. In the attached example the capacity is reduced when the buffer is empty.

Regards,

Peter

`while true Buffer.Capacity := 8 for var j := 1 to 6   Buffer.ExitLocked := true   Buffer.entranceLocked := false   Waituntil Buffer.full prio 1   Buffer.ExitLocked := false   Buffer.entranceLocked := true   Waituntil Buffer.empty prio 1 next Buffer.Capacity := 4 for var j := 1 to 5   Buffer.ExitLocked := true   Buffer.entranceLocked := false   Waituntil Buffer.full prio 1   Buffer.ExitLocked := false   Buffer.entranceLocked := true   Waituntil Buffer.empty prio 1 nextend`

# Re: How to Change the Capacity of a buffer Dynamically during the running of the model?

Genius

Hi,Peter

Thanks for your patience and concerns , your answer is so quick ,I will study the model you post  carefully.

What's more ,could you spare some time to  look at the problem i post  to be sovled?

Give my best regards to you!

the thread is shown in the following :

https://community.plm.automation.siemens.com/t5/Plant-Simulation-Forum/How-to-deal-with-the-LOGIC-of...