With the kindhearted and skilled man’s help , I create a small model about storing parts and moving parts. The storage strategy is random while the moving rule is FIFO, you can see in the methods. I post the model in the attachmen.
Well, I have an additional requirement: All the parts should be held for a certain time or longer( here, I defined a variable “interval”of data type time),when the part(s) meets the condition ,it will be moved to the object “line1”.
Now , I run the model, there is a special and interesting problem happening:
1.Setting the “interval” time is shorter than the time that the stores are filled with the parts, the model can be run smoothly. Namely, everything is OK.
2.Resetting the “interval “time is much longer than the time that the stores are filled with the parts. Then, run it. After the stores can be filled with parts, the model stops, it’s strange! My target is the model is still running until the stayingtime of the parts in the stores is longer than the condition(here, I set it as 50000 seconds.). As is shown in the following picture with marks.
As for the situation, I try to find the reasons and resolve it. In my opinion, when the stores are full, the object ”line” which moves parts to stores will stop, and no parts exit. so the method”Doorder” will not be executed, no parts are moved from the stores. At last , the model stops.
I try to program the “move the parts to stores “,”move the parts to line1 from the stores “separately, unfortunately, it failed.
What should I do? Looking forward to your directions, it’ll be much better if you can modify the model with method I posted.
Any help is great appreciated!
Solved! Go to Solution.
first, the model you provided does not contain the method doOrder which can be seen in the screenshot.
I'm not quite sure if I understand correctly what you want to do:
In my understanding all parts should stay 50000 second in the store before they will be removed. Is this correct?
So after the last part will enter the warehouse just make a methcall after 50000 seconds and strat removing the products.
Or should each product individually stay 50000 second in the warehouse, so enter the arrivingTime+50000 seconds to a table like randomly_position and also make a methcall for the point in time when the part should leave. In this method look for the next part which should leave the store and again make a methcall.
On the other hand side: did you know the HBW library of Plant Simulation? there a lot of functions are already provided and the methods are not encrypted.
What you understand is right!
I feel strange that you can't see the "doOrder"method.I have review the attached model and i'm sure that you will find it in the 2D -"stayingtime"frame.
then ,all the parts will stay for 50000 seconds or more ,once the stores have vacant position ,the parts will enter into them.therefore the stores always contain parts ,the "methcall" seems not suitable.
what's more ,I have tried the "methcall" syntax,but i find it not suitable .Besides,the software's version I use is 13.1,so the function of HBW is limited (such as defined storage rule) and the method is encrypt, I can't open it.
Thanks for your answers!
Firstly ,thanks for your attention to this topic. I'm sorry that the first model I attached contains so many frames that you meet troubles when you review it.Now I post another model "Newstore" instead of it in the attachment.
Well,I describe it:
For the "stayingtime" frame, the "interval" time is "28800",and it runs smoothly.
For the "stayingtime02" frame,the "interval" time is "50000" seconds,which is longer than the first time that the stores is filled with parts . When you run it ,you'll find it will stop at nealy 13:00:00 ,at which the stores are full for the first time,that's my problem.I wanna it runs all the time .
If you can spare some time to review ,to give suggestions ,to modify and to post it ,it'' will be much better .
Give my best regards to you!
I think your advice twice.with the condition that every parts shoul be stayed for no less than 50000 seconds.Aslo, in order to running the model smoothly,I add another condition,which decide whether the stores are full.
Then I use "methcall" and reprogram it, basing on this condition the "methcall" will move the parts to the "line1" or not.Fortunately,it succeeds at last.
Now the model can run smoothly!
Thank you very much!