Cancel
Showing results for 
Search instead for 
Did you mean: 

first in last machine

Pioneer
Pioneer

I want to formulate a model in which the mu move to singleproc4 first if singleproc4 is occupied then the mu is moved to singleproc3 and so on till the last machine is filled, such that when singleproc is occupied the mu wait unitl all the stations are empty and the loop re runs

5 REPLIES

Re: first in last machine

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello San,

 

your model does not match to the task about SimTalk programming.

The layout is a line in which the stations are sequentially filled.

simpleLine.gif

 

Note that instructions between the keywords is and do are not allowed in a method.

 

Regards,

Peter

Re: first in last machine

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Hello San,

 

additional to Peters answer. for each if you need an end...

 

To get the behavior, you need the following programming:

 

is
 
do
 if singleproc4.empty then
  @.move(singleproc4);
 
 elseif  SingleProc3.empty then
  @.move(SingleProc3);
 elseif SingleProc2.empty  then
   @.move(SingleProc2);
 elseif SingleProc1.empty then
      @.move(singleproc1)
 elseif SingleProc.empty then
   @.move(singleproc)
 else
  waituntil singleproc4.empty and singleproc3.empty and singleproc2.empty and singleproc1.empty and  singleproc.empty and
  line.occupied=false and line1.occupied=false and line2.occupied=false and line3.occupied=false and
   line4.occupied=false and line5.occupied=false prio 1;
  @.move(singleproc4);
 end;
     
end;

 

For waiting for the empty line you also should check the lines (occupied=false)

 

 

 

 

 

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: first in last machine

Pioneer
Pioneer

Thank You bangsow that was a great help Smiley Happy

But can you tell me that why was this necessary to mention every singleeproc to be empty and lines to be occupied=false?

Re: first in last machine

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

If you use waituntil for check this, then it can be, that some parts still  on their way to the next SingleProc (on the lines). So all SingleProcs can be empty, but the complete line isn't. So you have to check the complete production-line constists of SingleProcs and lines.

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: first in last machine

Pioneer
Pioneer
i got it, and if i want the mu to be processed just once i.e. such that if it is processed at single proc 3 then it will go directly to drain.. and i have another query can you help me with that too
http://community.plm.automation.siemens.com/t5/Plant-Simulation-Forum/Rework-for-entity/m-p/271777#U...