Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Moving MUs between frames

A simple question i was not able to find a solution; as you can see in the attached file i've problems in moving MUs between frames via a table.

When the MU enters the single proc in the the frame everything stops.

Thanks for the help.

11 REPLIES

Re: Moving MUs between frames

the path in the second row of your table is wrong.

It should be:

.models.frame.FrameTest.S2

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


Re: Moving MUs between frames

Dear Steffen,

 

thanks for the quick reply; it was so obvious that i did not noticed.

However i've discovered another question: how can i move MUs to another frame in which i have two buffer? (see the file attached)

 

Re: Moving MUs between frames

Hello

 

Would recomend looking into the interface object (.MaterialFlow.Interface) which can be placed on a frame as either a in or out connection. Think of it as a way of sending the MU's up or down 1 level in your model.

 

This should be the easiest way as it will enable you to use a connector to connect to your frame without the need of any custom code or logic.

 

JamesM

Re: Moving MUs between frames

to address the buffer, you need the complete path

.Models.Frame.FrameTest2.S4_Buffer_In

If you want to make a decision between two buffers, you need two path fields in the table (e.g. column 1 und 2).

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


Re: Moving MUs between frames

Dear JamesM,

 

thanks for the help but not using connector is what i'm trying to achieve.

 

Re: Moving MUs between frames

Hello

 

Ok, then at which point something like the picture below should do the trick.

 

MoveToObjectsInTable.PNG

What this is doing is looking at row 3 in the table and looking to see if there is another element to the right, if so then it incroments the i value and checks again. When it cant find a value then it will pick a number within that range to address a random column and then continue.

 

Hope this is what you want, but personally interfaces and connectors are a lot better as there is lots of different exit methods you can do while doing it this way you got to program each one yourself but I do guess for a non linear process flow then it can be useful.

 

JamesM

Re: Moving MUs between frames

Dear James,

 

as a newbie i really appreciate your help; unfortunately, as you noticed, i have a non linear process and i'm forced to use method to "push" MUs inside the model.

What i need to do is to achieve the exact "behavior" of moving MUs between the 2 buffer like the image below (normal interface connection) InterfaceInterface

But in a situation like frametest 2modelmodel The method i've written it's working just for one buffer but the other is not receveing any MUs.

Thanks in advance for any help.

Solution
Solution
Accepted by topic author francescopoli
‎02-14-2017 12:20 PM

Re: Moving MUs between frames

[ Edited ]

the exit control will move only one part, so only one buffer is feeded in your method.

If you want to distribute the MUs you need a kind of switch, that remembers the value from the last method call (e.g. global variable cycle, inteher, start value=0).

 

is
	c:object;
	d:object;
do
	--load sequentially to the buffers
	if cycle=0 then
		c:=.Models.Frame.Tab_Reparti[1,3];
		@.move(c);
		cycle:=1;
	else
		d:=.Models.Frame.Tab_Reparti[1,4];
		@.move(d);
		cycle:=0;
	end;
end;

 


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


Re: Moving MUs between frames

Hello

 

If I remember right then the default method is 'cycle' meaning it will do one, then the other, then the next until it reaches the first one again.

 

For this I would say you need to store a number outside of the method to add a bit of history to system, from this you can then do something like the following...

MoveToObjectsInTable.PNG

 

 By using a variable of type integer (initial value of 1) you can track what was the column in the table that a part was last sent to. The if statment will check if the column you are pointing to is empty and if so will then reset you back at column 1.

 

Through doing this, if you needed another process line to be added you can just add it to the next column and if you needed another area to feed to the same location you can use the same integer variable to ensure that the cyclinic nature is still observed.

 

Hope this helps,

JamesM