Cancel
Showing results for 
Search instead for 
Did you mean: 

MU Animation for vehicles

Experimenter
Experimenter

Hi all,

 

I built up a vehicle with a loading area of x-dimension 1 / y-dimension 4 and I created 4 incoming MU Animation for the different loading spaces. Next step, I want to configure an outcoming MU Animation directly on the vehicle. Is it possible? Or is it necessary to create an incoming MU Animation on the next SingleProc?

Background, I want that the cargo to be loaded or unloaded from two sides and the MUs should pass through my loading area. Maybe I overlook something and someone has already made experience with this issue. 

 

Thanks in advance / best regards

Daniel

 

Plant Simulation 12.2

 

2 REPLIES

Re: MU Animation for vehicles

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Daniel,

 

if I guess correctly, you extended the MU animation paths "#0#0" and so on in order to create an incoming animation. These MU animations will start at the moment in which a part has entered its place on the vehicle.

In order to create an outgoing animation, there are two to three things to do:

Firstly, you need to create additional MU animation paths for the outgoing animation. Start each path at the point where the MU sits on the vehicle before it shall leave it and define the animation from there (in the simplest case, just add a second point where the MU shall be after it left the transporter).

Give those animation paths meaningful names, say "Place1Out" etc.

To actually use those paths, forward the animation of each part of the vehicle to its outgoing counterpart and reset its animation time. That step is in SimTalk and will look roughly like this:

-- t is the vehicle that holds the parts
t._3D.MUAnimation.getAnimation("#0#0").redirectTo("Place1Out") -- from now on, use "Place1Out" instead of "#0#0"
@._3D.resetAnimationTime -- reset the part's animation time to restart it now

After the part left the vehicle, call

t._3D.MUAnimation.getAnimation("#0#0").cancelRedirection

to let the next MU reuse the "standard" animation.

 

 

Instead of getAnimation(<pathName>), there is also a version for places on a matrix which you then can also use with little effort in a for loop:

getAnimation(1, 1) (for "1st place in x and 1st place in y direction") corresponds the more cumbersome getAnimation("#0#0") - so your loop could look like this:

-- t is the vehicle that holds the parts
for var i := 1 to 4
    t._3D.MUAnimation.getAnimation(1, i).redirectTo(to_str("PlaceOut", i)) -- use "PlaceOut1"
    @._3D.resetAnimationTime -- reset the part's animation time to restart it now
next

You don't need to use a for loop for this but it makes your code a bit easier and better maintainable.

 

 

Best regards

Peter

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

Re: MU Animation for vehicles

Experimenter
Experimenter

Dear Peter,

 

you made my day! I missed the reset of the animation time.

I also added a delayed ref methcall, otherwise the move to the proc station cut of the animation again.

Many thanks! 

 

Best regards

Daniel