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

identification of a next job

Pioneer
Pioneer

Hi everybody!

I have a model in which there is a Buffer and a SingleProc.I have different jobs (Job X, Job Y and Job Z). How can I identify the type of the first job of the buffer, and so the next job that the SingleProc has to work? I'd like to write something like:

if  the next Job is the Job X  then ...

 

 

Thanks a lot

 

Valeria

9 REPLIES 9

Re: identification of a next job

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
how do you define a job (different names, attributes)?
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: identification of a next job

Pioneer
Pioneer

I have created 3 entities with different names and different sequences of processing. In the complete model i have in the frame a table which identifies the sequences of the jobs.

Re: identification of a next job

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
you could store the name of the MU at the exit of the Buffer. So you can compare the name of the actual MU with the stored value, if the values do not match --> the new job starts e.g.
two user defined attributes in the buffer (oldJob:string; isNewJob:boolean)

if buffer.oldJob = @.name then
buffer.isNewJob:=false;
else
--new job
buffer.isNewJob:=true;
--remember the name
buffer.oldJob:=@.name;
end;
@.move: --if exit control front + exit control once
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: identification of a next job

Pioneer
Pioneer

So sorry but I didn't get it. I didn't get what do you mean with old and new job. 

I'd like just to know if the next job the machine has to work is jobX, or JobY or JobZ. Smiley Happy

 

Re: identification of a next job

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
so you need only to read the name of the next part in the buffer:

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

Re: identification of a next job

Pioneer
Pioneer

Great Thanks!! And if i have to control also the second job(and so the job next to the Next Job)?

Re: identification of a next job

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
a little more complex; you could define the last two places of the puffer als single places (additional blocks; buffer with capacity of one). Than you can check both places separately (placeX.cont.name).

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

Re: identification of a next job

Pioneer
Pioneer

Can you please tell me also how can identify a machine that is in pause? For example If i have a machine in the standby state i write: SingleProc.EnergyCurrentState="Standby", but what can i write if i have  a machine in pause?

Re: identification of a next job

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
it is: SingleProc.pause
it is true, if the SingleProc is paused, otherwise false

click on the singleProc and press the F8 key, than you get a window with all attributes and methods of this object,
mark a row and press F1 --> you get the help for the attribute/method
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net