Cancel
Showing results for 
Search instead for 
Did you mean: 

move parts from buffer with an observer

Pioneer
Pioneer

Hi community

 

I have a little problem

 

I have a parallel process (OP_70), and I've created two observers for verify its state, as you can see in the programming, every three parts in buffer BF5, the sensor activates and move them to OP_70, but, if the number of Mu's is less than Capacity_OP70, BF5 don't move the parts, this happens when almost the totality of my production  has finished and two parts stay there. I have attached an image

 

I hope you can help me...

 

Regards

6 REPLIES

Betreff: move parts from buffer with an observer

Gears Phenom Gears Phenom
Gears Phenom

Hi Charly,

when you say "observers", it might be good to tell us what attribute on which object they are observing, since you didn't upload the model. Also, there is no "sensor" in your model, because you have only place-oriented objects (there are "sensors" in Plant Simulation as well, but they are something else).

Regarding your problem, of course there will remain some parts on BF5 if your production quantity is no integer-multiple of 3. If you only have 1 MU-class, you may use getNo to get the MU-ID and compare it to the total-production quantity, which must be stored in e.g. a global variable-object, say v_totalNumMUs.

Then you could use something like

if (BF5.numMU = Capacity_OP70 OR BF5.cont.getNo >= v_totalNumMUs - (v_totalNumMUs mod Capacity_OP70) + 1) and ...

in your method.

Let me know if it helps, Alex

____________________________________________________________
Alex Dilg, Consultant at SimPlan AG (www.SimPlan.de)
This post was good and/or helpful to you? Please provide some Kudos, thank you!

Betreff: move parts from buffer with an observer

Pioneer
Pioneer

Hi Alex 

Thanks for your reply

 

Sorry I forgot to tell you some details, I was wrong when I said that I have added two observers, I created one more, numMU in BF5,  an empty and operational state in OP_70. I attached a little model with a similar arrangement I'm working. I have a similar problem in a couple of stations, but I think if I can solve this problem, maybe is possible apply the same approach to other stations.

 

 

Before asking for help my idea was as you say, create a global variable with the total number of Mu's of a specific type and then compare it with the "StatNumIn" of BF5 when was equal move the parts to OP_70. I have four type Mu's if I use a table with a sequence the problem partially disappear because next parts make the programmed cycle works. 

 

Regards, Charly

Betreff: move parts from buffer with an observer

Gears Phenom Gears Phenom
Gears Phenom

Hi Charly,

I have a professional license so I cannot open your model. But I expect that basically your problem will still remain, unless you use "Sequence Cyclical" in your source, because then you (probably) have an infinite amount of MU's and there won't be any "leftover" MU's.

Another frequent option would be a timeout:

  • remember the timestamp "myLastMU" of the last MU entering the buffer in an attribute (use an EntranceControl-method, which would btw be better than an observer on BF5.numMU)
  • use a methcall to call a "load_timeout" method e.g. 5min after a new MU has entered the buffer: &load_timeout.methcall(300)
  • if in the load_timeout method the timestamp myLastMU is >= 5min past, then call the load-method
  • in the load-method, allow loading if you have enough parts or the parts are "too old"
(BF5.numMU >= CapacityX OR EventController.SimTime - BF5.myLastMU >= 300)

With such an approach, there will never be MU's that get stuck permanently.

Cheers, Alex

____________________________________________________________
Alex Dilg, Consultant at SimPlan AG (www.SimPlan.de)
This post was good and/or helpful to you? Please provide some Kudos, thank you!

Betreff: move parts from buffer with an observer

Pioneer
Pioneer

Hi Alex

 

 

 

Thank you so much for your reply, don't worry about the model...

 

I use a sequence of parts in the source but not cyclical, so I have a defined number of Mu's, and I already have a solution for the problem, I use the StatNumIn attribute of the buffer to compare the number of parts to have entered with respect to plan production.

 

Anyway I appreciate your help and your comments, with your reply I have learned another way to solve a problem

 

Regards, Charly

 

Betreff: move parts from buffer with an observer

Gears Phenom Gears Phenom
Gears Phenom

Great Smiley Happy

One note: if you use the statistics-reset after a warmup phase, StatNumIn will be reset, too, and no longer match the total production quantity. But since you are probably not using this feature, your approach should be safe.

Regards,
Alex

____________________________________________________________
Alex Dilg, Consultant at SimPlan AG (www.SimPlan.de)
This post was good and/or helpful to you? Please provide some Kudos, thank you!

Betreff: move parts from buffer with an observer

Pioneer
Pioneer
Hi again Alex

I have another problem but I would like to create another discussion in case someone else has the same or a similar problem

Regards,
Charly