Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Control workers by methods not by import requests and brokers

Pioneer
Pioneer

Hi everybody,

 

I would like to know whether it is possible to control workers without import requests and brokers from a method.

 

I have tried this:

available_operator.goto(station.workplace)

where available_operator is a variable holding an Operator (a Worker duplicate, I changed its name to Operator). The travel mode of the Operator_pool (WorkerPool duplicate) of the Operator is "Beam to workplace". There is no footpath.

 

When that line runs in the method, the Operator stays in the Operator_pool. I also created two logical user-defined attributes for the Operator, but I doubt that this matters. The Operator_pool has a yellow dot at the top, indicating that it is blocked.

 

The reason I can't really use a Broker and Import requests is as follows.

 

I need to simulate assembly part by part. Adding each part to the half-complete assembly may result in an incorrigible reject or a corrigible reject (stochastic simulation). When it is an incorrigible reject, it is removed from the simulation. When it is a corrigible reject, the last part needs to be added again. The assembly time of each new part is also stochastic. I simulate adding each part by changing the proctime of the station every time, then I use the command outIn to make the station process the very same container again.

 

So when I start a new assembly, it is unclear what will happen. The station ends processing the container many times. If I used Import requests, I would have to know the exact duration of the assembly, and set that as the processing time (otherwise the Worker would leave, I guess). I also would like to workers to stay when an assembly is completed, and not go away, because the next assembly is about to start. So this is really complicated. This is why I wanted to control the workers from my control methods too, but I can't. Do you have any idea how to resolve this problem?

 

The simplest solution I could think of is creating another image for the Workplace object, and set that, and make the Workers disappear somehow, and collect statistics manually. This way, I would not have to move the workers.

 

Thank you in advance for your help! Smiley Happy

9 REPLIES 9

Re: Control workers by methods not by import requests and brokers

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

you can set the worker attribute automaticMediation to false, then the broker will not mediate this worker; you can use the entrance control of the workplaces to trigger controls (e.g. to load the worker and walk to the next station).

 

here you find an example:

 

http://www.bangsow.eu/detail_en.php?id=787

 

 

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

Re: Control workers by methods not by import requests and brokers

Pioneer
Pioneer

Thank you really much, Steffen! Smiley Happy

This way, I could manage to solve my problem.

Re: Control workers by methods not by import requests and brokers

Experimenter
Experimenter

Hi,

 

I'm getting a similar problem. Could I have a v13 copy of that model, please?

 

Thanks in advance.

Re: Control workers by methods not by import requests and brokers

Pioneer
Pioneer

Hi!

As for our model, it can't be shared online. I guess my problem was not having a Broker in the Frame. I do not know about any possibility to convert newer models to older versions.

 

 

Re: Control workers by methods not by import requests and brokers

Creator
Creator

Hi @Steffen_B ,

Your example is very helpful. I have one question: what would be the code, if I need the worker to setup the machine for every part before the worker moves the part to next station?

Thanks

Bhaiya

Re: Control workers by methods not by import requests and brokers

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

do you mean: place the next part?

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

Re: Control workers by methods not by import requests and brokers

Creator
Creator

As seen in the image,what i mean is that I want to control the worker by method to setup the part on station and then carry the part to station1.

With your post above, I am able to move the part between station and station1. I am not able to write a method to ask the worker to first setup the station, wait/do other task till the station  finishes the processing and then cary the part to next station.

setupimporter.JPG

Re: Control workers by methods not by import requests and brokers

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
I guess, then you need the broker for mediate the worker. But if you want to make the setup and transport by the worker, you will not need to program at all, just use the transport and setup-importer to mediate the worker.
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Control workers by methods not by import requests and brokers

Creator
Creator

Hi @Steffen_B 

I am having this issue and so i thought that I can try to program:

https://community.plm.automation.siemens.com/t5/Plant-Simulation-Forum/Worker-carrying-part-to-worke...

Do you have any suggestioins?

Thanks

Bhaiya