Cancel
Showing results for 
Search instead for 
Did you mean: 

Worker - next location

Experimenter
Experimenter

How can I know where is the next workplace the worker is going? When I put the mouse in the worker, it shows where but I want to use this in a method.

For an example, if “the worker is not going to workplace2” then  buffer.entrancelocked := false.

I don´t know how to write this in a method. Do you have any suggestions? 

9 REPLIES 9

Re: Worker - next location

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Débora,


You can determine the assigned importer of the worker.

The question is which of the assigned workplaces to the importer is the destination of the worker.


local t:table;
WorkerObject.getExportedServices(t);
print t[1,1][1,1].assignedWorkplaces[1];

Maybe someone has a better solution.

 

Regards,
Peter

Re: Worker - next location

Experimenter
Experimenter

Sorry Peter, I don´t understand what you describe. Could you please send me a simple example using this?

 

Thanks for your help. Smiley Happy

Re: Worker - next location

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Débora,

 

execute the green method and look at the console

(with option Show Print Output).

 

nextWorkplace.gif

 

The picture shows the next workplace Workplace1.

 

Regards,

Peter

Highlighted

Re: Worker - next location

Experimenter
Experimenter

Thanks a lot!

I´ll use this method!!!!!!!!

 

Best Regards,

Débora.

 

 

Re: Worker - next location

Siemens Phenom Siemens Phenom
Siemens Phenom

Pity, nobody has a better solution.

Re: Worker - next location

Solution Partner Experimenter Solution Partner Experimenter
Solution Partner Experimenter

Hello,

 

I happen to have two Plant Simulation versions installed. The 11.0.6 and the 11.2.1.

The strange thing is that the 11.0.6 version has the attribute Destination for the Worker, but the 11.2.1 does not.

This attribute would probably help in this situation.

 

Not sure what happened through the updates... should this be fixed?

 

Regards,

 

Renato

Re: Worker - next location

Solution Partner Experimenter Solution Partner Experimenter
Solution Partner Experimenter

Well, performed a test here and it does not seem to work. But it would be nice to have this attribute in the Worker just as we have on the transporters. Smiley Happy

 

Regards,

 

Renato

Re: Worker - next location

Experimenter
Experimenter

I tried to use this attribute and didn´t work either. Woman Sad 

Re: Worker - next location

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello,

 

also in Plant Simulation 11.2 the worker has the attribute Destination, but it is not displayed in the dialog of Attributes and Methods (Select an object and press F8), since it is not used by the material flow simulation.

 

Regards,

Peter