Cancel
Showing results for 
Search instead for 
Did you mean: 

Emptying store evety 30 min

Creator
Creator

Hi

I would like to send 100 items from store do the next station every 30 mins?

How can i do that?

10 REPLIES

Re: Emptying store evety 30 min

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

you can use a generator, that calls a method every 30 minutes, within the method you can use a loop to move the parts e.g. to a parallelProc:

 

for var i:=1 to 100 loop

  store.cont.move(nextStation)

next

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

Re: Emptying store evety 30 min

Creator
Creator

is
    for var i:=1 to 100 loop
        store.cont.move(Line311)
    next;
do
end;

 

Reports syntax error near line 2 at "for"

Re: Emptying store evety 30 min

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

okay, old syntax: you need to program between do and end

if you move to a line, you need to wait, until the line is empty (or at the entrance is space for the next part)

 

is

i:integer

do
    for i:=1 to 100 loop
        store.cont.move(Line311);

        waituntil line311.occupied=false prio 1;
    next;

end;

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

Re: Emptying store evety 30 min

Creator
Creator

Ok. That syntax is ok. Thanks.

But how do I insert that method with generator part in store?

Re: Emptying store evety 30 min

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

insert a generator into your frame, set an interval of 30 minutes in the generator and assign the method as interval control

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

Re: Emptying store evety 30 min

Creator
Creator

I have created a method with the code that you have suggested.

Also I created a generator and under tab control and interval inserted method.

problem.png

Re: Emptying store evety 30 min

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

this happens, if your store is empty

what do you want to do, if your store is empty ??

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

Re: Emptying store evety 30 min

Creator
Creator

Store items. Wait untill it reaches 100 and then send it to next process

Re: Emptying store evety 30 min

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
okay, this you need also to include into the method, e.g. do nothing, if there are not 100 parts in the store

is
i:integer
do
-- do nothing, if there are not 100 parts in the store
if store.numMu < 100 then
return;
end;


for i:=1 to 100 loop
store.cont.move(Line311);
waituntil line311.occupied=false prio 1;
next;

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