Cancel
Showing results for 
Search instead for 
Did you mean: 

Method sets station.paused to false, station skips setup and processing

Creator
Creator

Hi, I'd like to ask you for help.

 

I have stations in my model (a changed duplicate of SingleProc). I use a method that sets the station's setup time and proctime, creates a container on the station, pauses the station, then make some parts enter the container on the station (custom assembly solution). Afterwards the method sets the station's paused attribute to false.

 

Here, the station skips both the setup and the processing time. Do you have any idea why?

 

There are some screenshots of the station's dialog window attached.

 

Thank you in advance! Smiley Happy

4 REPLIES

Re: Method sets station.paused to false, station skips setup and processing

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello,

 

could you also provide your model, or if that is not possible the code in the method that you used?

Kind regards,

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


Re: Method sets station.paused to false, station skips setup and processing

Creator
Creator

Hi Igor, thanks for stopping by! Smiley Happy

 

I can't post the model, but I can share a truncated version of the method. The parts I cut are not relevant. They contained mainly information handling and comments, but they were not directly related to the station or the objects on it.

 

As I saw, the Station finished when the method reaches the Station.pause := false part. The container's finished attribute turns true instantly at that moment, without the simulation time changing.

param Station,input_workpiece:object

var state, product:string
var pid_local,id_child,id_assembly:integer
var tab_Assembly_row,station_row,agvo_row,Process_Log_row,inventory_row :integer
var destination,workpiece,store,palette :object
var tab_Assembly:table
var procTime, setup_time:time

if @ /= void
	workpiece := @
else
	workpiece := input_workpiece
end

state := "waiting_for_parts"
product := workpiece.product
tab_Assembly := Assembly_graphs["tab_Assembly",product]
pid_local := workpiece.pid
Process_Log_row := search_tab_for_any(Process_Log,"pid",pid_local)
id_child  := workpiece.id_child 
id_assembly  := getParent(workpiece.id_child)
palette := workpiece.location

if Station.empty
	tab_Assembly_row := search_tab_for_any(tab_Assembly,"ID",id_assembly)
	setup_time  := str_to_time(Station.setup_table[Station.assembly_type,Process_Log["assembly_type",Process_Log_row]])
	tab_Assembly_row := search_tab_for_any(tab_Assembly,"ID",id_assembly)
	station_row := search_object_in_table(tab_Assembly["station",tab_Assembly_row],Station)
	proctime  := tab_Assembly["station",tab_Assembly_row]["proctime",station_row]
	station.SetupTime := setup_time
	station.proctime := proctime
	Station.paused := true
	.agv_lib.Assembly_container.create(Station)
	Station.cont.ydim  := tab_Assembly["no_parts", tab_Assembly_row]
	Station.pid := -1
	tab_Assembly_row := search_tab_for_any(tab_Assembly,"ID",getparent(workpiece.id_child))
	set_assembly_Attributes(Station.cont, -1, -1, id_assembly, 0, product, tab_Assembly["name",tab_Assembly_row], void)
end

if not Station.cont.full
	workpiece.move(Station.cont)
	Station.cont.part_weight += workpiece.part_weight
end

if Station.cont.full
	Station.pause := false
	Station.assembly_type  := Process_Log["assembly_type",Process_Log_row]
	waituntil station.cont.finished prio 1
end

 

Re: Method sets station.paused to false, station skips setup and processing

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

if you create a MU on a station, the MU is created ready for exit, so you cannot take in to account procTime and setup behavior.

You need to create the part on a other destination (eg. dummy station) and move it to the station. Then Plant Simulation will calculate the exit event.

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

Re: Method sets station.paused to false, station skips setup and processing

Creator
Creator

Thank you, this is exactly what I needed! It is working now. Smiley Happy