Cancel
Showing results for 
Search instead for 
Did you mean: 

Change the object which exits a SingleProc

Pioneer
Pioneer

Good afternoon, I would like to know if it is posible to enter a entity in a SingleProc and to obtain a different entity in the exit in order to simulate the changes in the entity but without using an assembly station.

Maybe with Simtalk?

 

Thank you for your attention 

5 REPLIES

Re: Change the object which exits a SingleProc

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
you can delete the actual MU and create a new one on the station, but you will loose statistic data of the MU (e.g. dwell time...). Normally you change only the icon of the MU. To do this, add a new icon in the icon editor (deactivate the vector graphic and state graphics). In the exit control you change the icon e.g. with:

@.currIcon:="processed1"
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Change the object which exits a SingleProc

Siemens Genius Siemens Genius
Siemens Genius

Hi Santiago,

You can use the exit-control rear to obtain the desired effect.
Your exit control could look something like this:

var name:=@.name
@.delete;
var obj:=.Mus.Container.create(self.~.succ) --self.~.succ is the first - in this case only - successor of the singleProc
obj.name:=name

If you have multiple successors, you would have to determine where to create your new MU. But for a line this works fine, as you can see in the attached model.

 

Regards,
Tim

Re: Change the object which exits a SingleProc

Pioneer
Pioneer

I prefer to delete de entity and create a new one but if I try similar with the code write by tim_k I obtain this error message. I think it is because the code doesnt associate @ with the new entity created. There is any form to associate the new entity to @?

 

Re: Change the object which exits a SingleProc

Siemens Genius Siemens Genius
Siemens Genius

Hi,

there is a slight difference between your and my model:
your exit control "method" is located in the main frame, my exit is control attached to the singleProc as a custom attribute.
The problem here is the "self.~.succ" part which isn't evaluated correctly, since "self.~" is the location of the method and not the singleProc.
Try using "?.succ" as the location for your newly created MU.

Regards,
Tim

Re: Change the object which exits a SingleProc

Pioneer
Pioneer

Thank you very much Tim, it works, and sorry for my small knowledge of the program, I have to practice more

 

Regards