Hi PLM Community,
My group and I are struggling with a problem with the store. Our production line concerns bicycles and the portion of the system is about the purchased parts.
The source is deliverying 10 kinds of product according to a delivery table. Further the different parts are sorted and stored in 10 different stores. Our method that is common to all the stores is supposed to make all the store wait for each store to have at least one part stored and then send all the 10 parts out to a line. Further, one of the ten parts (Wheels) is supposed to be sent twice everytime.
Currently, the program is running fine (the wheels are sent twice with a trick in the code) until one day and 2 hours. The reason is that the number of outriggers (the 10th part) is set much lower than it supposed to be and the program stops running since there are no more parts stored in the Outriggers' store.
However, if we increase the number of outriggers (the actual number should be around 7000 parts) sent by the delivery table, the program stops with the error: The max number of suspended method (2000) has been reached.
Is there anyway to solve this problem or arrange things differently so the number of suspended methods is kept lower.
Thank you in advance,
default wise the max count of susp. methods is set to 2000.
you can of course increase the number(s.pic.) if that will be of any ( temporary) help.
In the English version of Plant Simulation 12 and higher you find the setting here:
File > Model Settings > Simulation
Hello, have had a look at your model and can say that the reason for there to be so many calls is due to how you are starting your method. As you are aware if you use the entrance control you will trigger your method multiple times, so you tried to put in place something to check for this and end the methods that are not needed to clean up the call stack but this check did not work.
Below is some new code that I recommend using.
is do -- wait 60; -- Processing time if (NOT StoreSaddle.emptying) AND (NOT StoreWheel.emptying) AND (NOT StoreSaddle.emptying) AND (NOT StoreGear.emptying) AND (NOT StoreBrake.emptying) AND (NOT StorePedal.emptying) AND (NOT StoreChain.emptying) AND (NOT StoreLight.emptying) AND (NOT StoreBarGrip.emptying) AND (NOT StoreCrank.emptying) AND (NOT StoreOutrigger.emptying) then StoreSaddle.emptying := true; StoreWheel.emptying := true; StoreGear.emptying := true; StoreBrake.emptying := true; StorePedal.emptying := true; StoreChain.emptying := true; StoreLight.emptying := true; StoreBarGrip.emptying := true; StoreCrank.emptying := true; StoreOutrigger.emptying := true; while StoreSaddle.occupied AND StoreWheel.occupied AND StoreGear.occupied AND StoreBrake.occupied AND StorePedal.occupied AND StoreChain.occupied AND StoreLight.occupied AND StoreBarGrip.occupied AND StoreCrank.occupied AND StoreOutrigger.occupied loop waituntil Line.empty prio 20; StoreSaddle.cont.move(Line); StoreWheel.cont.move(Line); StoreGear.cont.move(Line); StoreBrake.cont.move(Line); StorePedal.cont.move(Line); StoreChain.cont.move(Line); StoreLight.cont.move(Line); StoreBarGrip.cont.move(Line); StoreCrank.cont.move(Line); StoreOutrigger.cont.move(Line); if StoreWheel.occupied then waituntil Line.empty prio 20; StoreWheel.cont.move(Line); end; end; StoreSaddle.emptying := false; StoreWheel.emptying := false; StoreGear.emptying := false; StoreBrake.emptying := false; StorePedal.emptying := false; StoreChain.emptying := false; StoreLight.emptying := false; StoreBarGrip.emptying := false; StoreCrank.emptying := false; StoreOutrigger.emptying := false; end; end;
In addition to this, using the emptying flag to lockout the method means that the flag needs to be reset or else after running it once and not letting the method finish then it will not run again, so add a method and rename it to 'reset' and put into it the following code.
is do StoreSaddle.emptying := false; StoreWheel.emptying := false; StoreGear.emptying := false; StoreBrake.emptying := false; StorePedal.emptying := false; StoreChain.emptying := false; StoreLight.emptying := false; StoreBarGrip.emptying := false; StoreCrank.emptying := false; StoreOutrigger.emptying := false; end;
You might see I have changed your trickery with creating 2 wheels, an if statement could be used instead meaning you do not need to exit the loop to get it to work, also personally all you care about is a wheel being present and not all of the other parts so have cut it back to just be a wheel that is checked.
When checking, there is only 1 method in the call stack and 0 suspended methods so this should do what you want.
Why so difficult and those hard-coded methods?
I have attached a screenshot of a model using the Assembly object that does everything you need without any SimTalk! In my example a part called "Jar" is the main MU and attached to it are two units of marmelade and a lid.
I hope this gives you an idea for an alternative way to assemble your bicycles is a very simple way.