Cancel
Showing results for 
Search instead for 
Did you mean: 

Unload Vehicle

Pioneer
Pioneer

Hey guys,

i have a question to unloading a vehicle.

 

I have a source which produces 2 types of MUs, which have attributs like "Station" and "Hauptteil". From the source they are transhipped MU-specific to a vehicle which has the capaticity 25 (Xdim=25 and Ydim=1).

With the method "FTF_Einlagern" i write the names and the objects of the MUs in a table (FTF_ Bestand) to see which parts are loaded. (Station and Hauptteil are the attributs of the MUs)

-- Eingangssteuerung des Fahrzeugs "FTF_Einlagern"
is
   NächsteZeile : integer;
do
   -- nächste freie Zeile in der Bestandstabelle des Fahrzeugs suchen
   NächsteZeile := FTF_Bestand.ydim + 1;

   -- das Teil, die Station und das Hauptteil in die 'Bestandstabelle' eintragen
   FTF_Bestand[1,NächsteZeile] := @;
   FTF_Bestand[2,NächsteZeile] := @.Station;
   FTF_Bestand[3,NächsteZeile] := @.Hauptteil;

end;

Then there is a second source which produces other MUs with the matching attribut "Hauptteil". The goal is to unload the right MU from the vehicle depending on which MU comes from the second source. (there i got a variable (Eingang1) which is written when a MU leaves the source)

 

So the vehicle drives to a sensor and then there is following method

(SensorID : integer; Bug : boolean;)
is
do
	-- Bei Sensor-ID = 2 anhalten und prüfen, ob Wert in Tabelle ist
	-- Zeiger auf Spalte 3 Zeile 1 festlegen zum suchen
	-- Wenn Ja dann Gegenstand umlagern
	
	if SensorID = 2 then
		
		FTF_Bestand.setzeZeiger(3,1);
		
		while FTF_Bestand.finden({3,*}, (Eingang1)) = true loop
			
			FTF_Bestand.setzeZeiger(3,1); 
			
			if FTF_Bestand.finden({3,*}, (Eingang1)) = true then
				
				-- Zeiger Y -> Zeile in Tabelle
				-- Funktion pe(X,Y)   --> Y=1 vordefiniert
				@.pe(FTF_Bestand.ZeigerY, 1).Inhalt.umlagern(P1);
			
				--Zeiger X= Spalte; Zeiger Y = Zeile
				print FTF_Bestand.ZeigerX, " ", FTF_Bestand.ZeigerY;
		
				--Inhalt aus Zeile löschen
				FTF_Bestand.löschen({1,FTF_Bestand.ZeigerY}..{*,FTF_Bestand.ZeigerY});		
			end;
		end;	
		-- Wenn nicht gefunden weiterfahren
		@.angehalten := false;
	end;
end; 

With this method i check the loaded MUs and look if there is a match with the variable of the exit. If there is a match it should be unloaded as long as there are matches.

 

The unloading MU and the other coming MU should be mounted at an assembly station.

Now i have the problem that the first unloaded MU from the vehicle is right but after that the method writes the next Places of the other MU in the console and then the vehicle drives again without unloading.

 

I guess there is something wrong with my "while-loop" or the time that the station need to mount. But i have no glue what could be wrong.

 

I hope you guys understand what i want to ask. I'm not used to write that much in english so it can be that i forgot something to explain. I upload my model maybe it can help.

It's in the folder "Montageablauf1".

 

Thanks in advance

Greetings Carsten

8 REPLIES

Re: Unload Vehicle

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Carsten,

 

the problem is that your second call to @.pe(FTF_Bestand.ZeigerY, 1).Inhalt.umlagern(P1); will not succeed since P1 is a PlaceBuffer.

 

In a PlaceBuffer all parts have to go through all places in the buffer, so the first MU blocks another MU from entering until the part can move to the next place in the buffer.

 

I'd recommend to replace the PlaceBuffer by a normal buffer with enough capacity.

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: Unload Vehicle

Pioneer
Pioneer

Hello Ralf,

thanks for your reply. It works with your suggestion, but for the part which is written in the variable. I think there is the main problem, that the unloading is faster than my mounting. So i hoped the buffer with capaticity 1 could solve this problem.

Because now the method unloads all parts which matches with the variable input. But that input changes earliest after a min when the mounting is done.

 

Any suggestions how i can solve this problem? Maybe with a timer which continues the loop after a minute?

 

Or is there another solution to unload specific MUs off my vehicle or is my idea with the table good enough for my plans?

 

Thanks in advance

Greetings Carsten

 

edit:// or repeat the loop if the variable has a new value. Just a idea but  don't know how to work with that Smiley Very Happy

Re: Unload Vehicle

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Carsten,

 

you can use the waituntil statement to wait with the unloading until a certain condition is met.

 

Please have a look in the online manual to see how to use the waituntil statement in case you're not familiar with.

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: Unload Vehicle

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Hi Carsten,

 

Another suggestion would be to look at some of the standard objects in Plant Simulation: Assembly and DismantleStation. They handle a lot of conditions that you need without any programming, although SimTalk gives you all flexibility, of course.

 

We use this a lot when the exact space occupation of a vehicle is not that important for the purpose of the model (the Assembly and DismantleStation are point-oriented objects, as opposed to e.g. a Track).

 

Regards,

Gert Nomden

 


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: Unload Vehicle

Pioneer
Pioneer

Hey guys,

thanks for your ideas. I replied to them but somehow i can't see my post Smiley Very Happy

 

so here i go again.

 

I tried with a DismantleStation but it didn't work how i want. Maybe i just didn't get the usermanual right. But nevermind...

 

i solved the problem with an extra attribut for the vehicle --> Entladung (german for unloading).

With that, a while-loop and waituntil everthing works how i want.

(SensorID : integer; Bug : boolean;)
is
do
	-- Bei Sensor-ID = 2 anhalten und prüfen, ob Wert in Tabelle ist
	-- Zeiger auf Spalte 3 Zeile 1 festlegen zum suchen
	-- Wenn Ja dann Gegenstand umlagern
	
	if SensorID = 2 then
		
		print @.Entladung;
		
		@.angehalten := true;
		@.Entladung := true;
		
		print @.Entladung;
		
		while @.Entladung = true loop
			
			FTF_Bestand.setzeZeiger(3,1); 
						
			if FTF_Bestand.finden({3,*}, (Eingang1)) = true then
				
				-- Zeiger Y -> Zeile in Tabelle
				-- Funktion pe(X,Y)   --> Y=1 vordefiniert
				@.pe(FTF_Bestand.ZeigerY, 1).Inhalt.umlagern(P1);
			
				--Zeiger X= Spalte; Zeiger Y = Zeile
				print FTF_Bestand.ZeigerX, " ", FTF_Bestand.ZeigerY;
		
				--Inhalt aus Zeile löschen
				FTF_Bestand.löschen({1,FTF_Bestand.ZeigerY}..{*,FTF_Bestand.ZeigerY});	
				
				waituntil P1.leer = true prio 1;
				
			else
				@.Entladung := false;
				
			end;
			
		end;	
		
		-- Wenn nicht gefunden weiterfahren
		@.angehalten := false;
		
	end;
end; 

with that method it even works with a PlaceBuffer with capaticity of 1.

 

So i don't get why my other code didn't work with my "waituntill" part.

Anybody got a clue why? (but it's not absolutly necessary)

 

Greeting,

Carsten

Re: Unload Vehicle

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Hi Carsten,

 

If you only need the vehicle to be partially unloaded, then you should use SimTalk.

 

I did not succeed to achieve this behaviour with just the standard DismantleStation. Based on the Help-pages I am unsure if it should be possible at all (would make sense to me, though).

 

Regards,

Gert


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: Unload Vehicle

Pioneer
Pioneer

Hello there again,

i have another question to the vehicle capaticity and didn't want to open a new thread.

 

I set the capaticity to Xdim=25 and Ydim to 1 to know that the MUs are set in line in the "storage-cells".

 

Now my 2 questions:

 

1. How is the capaticity filled when i set Xdim = 5 and Ydim =5 ? first [1,1] then [1,2], [1.3] till [1,5] and then again with [2,1] till [2,5] ? I couldn't find something in the usermanual.

 

2. In my method i unload specific places like [15,1] or [4,1]. Now when i load new MUs in the vehicle where are they placed? In the free spaces i unloaded before or is my first listing of the old MUs mixed after new MUs?

 

I hope you guys understand what i want to say Smiley Happy Otherwise i try to post some examples

 

Greetings

Carsten

Re: Unload Vehicle

Siemens Phenom Siemens Phenom
Siemens Phenom

Starting with version 12.0.2 the MUs are placed from left to right and from top to bottom (exactly like you described). If the storage space is partially occupied, the MUs are filled into the free gaps using the left-to-right and top-to-bottom strategy.

 

In earlier versions this is not guaranteed.

 

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