Cancel
Showing results for 
Search instead for 
Did you mean: 

Move specific MUs from storage to buffer when they are availabe

Creator
Creator

Hi all,

I have a source that produces Par1, Part 2, Part3 and Part4 with a random distribution. The products run into a storage. Accroding to a schedule I get orders with diferent quantities of Part1, Part2, Part3 and Part 4 required.

For example: Order 1: QuantityPart1=5 and QuantityPart2=3,

When these quantities are available in the storage they should be transferred to a buffer (in the storage might also be Part 3 and Part4 that are not needed for the order).

How can I programm the storage what Part to transfer to the buffer.

My Orders are generated in a table.

I would be very pleased, if you helped me.

Thank you very much.

Regards, Ben

6 REPLIES

Re: Move specific MUs from storage to buffer when they are availabe

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Version 12.2 has a function for finding a special MU:

 

<store>.findPart(<partname>), it returns the right part or void

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

Re: Move specific MUs from storage to buffer when they are availabe

Creator
Creator

Thank you. That works.

 

Is it also possible to count the number of a specific part (with a specific name) in the storage?

 

Regards,

Ben

Re: Move specific MUs from storage to buffer when they are availabe

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

you could use the entrance control and the exit control (rear) of the store to update an inventory table.

Insert a TableFile into your model. Activate the row index, format the first column as integer.

Insert all your part names into the row index rows.

 

Than you need only one line in the entrance control to increment the number for the part:

inventory[1,@.name]:=inventory[1,@.name]+1

 

In the exit control rear you decrease the number for the part:

 

inventory[1,@.name]:=inventory[1,@.name]-1

 

At the end you need a method with the name init in your frame to delete the content of the inventory table at the start of each experiment

 

inventory.delete

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

Re: Move specific MUs from storage to buffer when they are availabe

Creator
Creator

Thank you for your reply.

I have implemented all the objects.

 

Unfortunately the network seems to have a problem with the "<store>.findPart(<partname>)" command. I have Tecnomatix Plant Simulation 12, Version 12.0.3 (Educational License)

I have put the network in the attachment.

I'd be very pleased if you could take a look.

Thank you very much.

Regards,

Ben

Re: Move specific MUs from storage to buffer when they are availabe

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

this command is new in 12.1

 

So you need to write your own function e.g.:

 

(partName:string):object
is
do
	--look for the part
	for local i:=1 to store.xDim loop
		for local k:=1 to store.yDim loop
			if store.pe(i,k).cont /= void and store.pe(i,k).cont.name=partName then
				return store.pe(i,k).cont;
			end;
		next;
		
	next;
	
	--nothing found
	return void;
end;
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Move specific MUs from storage to buffer when they are availabe

Creator
Creator

Thank you.

Now it works.