Cancel
Showing results for 
Search instead for 
Did you mean: 

Schedule the exit of buffer

Experimenter
Experimenter

Hi ! I m struggling a little bit on a problem ...

I want to simulate a process in which i have a buffer which is sending the products at specified times. So i would like to programm a schedule which will enable my buffer (fifo) to send the products downstream. I tried a with the function ...if .... MyTable.find(EventController.simTime) ..., and i put the times in MyTable, but i couldnt make it work ... So basically, i need a file (Table or Timesequence) which will control the exit of my buffer. The sequence is not regular and depends on days. 

Does someone have a solution ?

Thank you

 

Pierre

10 REPLIES

Re: Schedule the exit of buffer

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Pierro,

 

please have a look at the attached model.

 

The buffer has a custom attribute of type method named 'MovePart'.

 

This method is called at the time values defined in the custom attribute 'TimeTable' of the buffer and transfers a MU if one is available.

 

Hopefully you can use this as a starting point for your solution.

 

Regards,

Ralf

Regards,

Ralf
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: Schedule the exit of buffer

Experimenter
Experimenter

Working perfectly, thanks !

Re: Schedule the exit of buffer

Pioneer
Pioneer

Is it possible to upload the model, such that I can see it in version 10.1?

 

Many thanks in advance,

 

Eelco

Re: Schedule the exit of buffer

Experimenter
Experimenter

Hello !

 

I have the same problem and I tried the code that you gave in the file, but I have a bug message "Unknown identifier MU".

 

is
noLine : integer;
do

local mu := self.~.mu;

if mu /= void then
mu.move;
end;

if @.noObservationActual = 0 then
inspect @.Name
when "PatientBedsYellow" then
noLine := 1;
when "PatientBedsGreen" then
noLine := 2;
when "PatientBedsBlue" then
noLine := 3;
end;

self.~.ObservationWaitingMethod.methcall(.InformationFlow.ObservationWaitingTime[1,noLine]);
end;

end;

 

 

 

I thank you a lot for your answer. Smiley Happy

 

Maxime

Re: Schedule the exit of buffer

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Can't you use "@" instead of "mu"?


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: Schedule the exit of buffer

Experimenter
Experimenter

Actually, in the debbuger, it says when I put my mouse on "mu" :  "The local variable 'mu' is not visible in the current scope" if that can help :/

Re: Schedule the exit of buffer

Experimenter
Experimenter

Thank you for your quick answer Nomden !

 

I tried to change from "mu" to @, but now I have an other error message : "The maximum depth of calls was exceeded".

 

My code is now :

 

is
noLine : integer;
do

if @ /= void then
@.move;
end;

if @.noObservationActual = 0 then
inspect @.Name
when "PatientBedsYellow" then
noLine := 1;
when "PatientBedsGreen" then
noLine := 2;
when "PatientBedsBlue" then
noLine := 3;
end;

self.~.ObservationWaitingMethod.methcall(.InformationFlow.ObservationWaitingTime[1,noLine]);
end;

end;

Re: Schedule the exit of buffer

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Hm, what is it that you want to achieve? Not with this specific code, but what is the context of it?

 

My gut feeling is that you make something more complicated than it has to be.

 


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: Schedule the exit of buffer

Experimenter
Experimenter

Hey Nomden, you were exactly right !

 

Actually, I only needed to make my MU wait at the buffer for a specific time... So I dropped the code and just used the fonction "dwell time" of the buffers Smiley Happy

 

I have used the code given by Ralf before for another project and I was so focused on this that I forgot to look for a simpler way.

 

Thank you for your attention and answers, quick but efficient haha Smiley Happy