Cancel
Showing results for 
Search instead for 
Did you mean: 

Ispecting a Table

Builder
Builder

I have a situation where, there are multiple stations and I have to send the part to the empty station. I have written the stations in the table and have to write a method where the stations is checked in a loop if it is empty or occupied and the parts is sendto the empty station. How I can set the method for the inspection of the table '?

4 REPLIES

Betreff: Ispecting a Table

Gears Phenom Gears Phenom
Gears Phenom

Maybe something like this

-- walk through table and move MUOBJ to the first empty station (if any)
for local row := 1 to TABLEOBJ.yDim loop
    if TABLEOBJ[1, row].empty then
        if not MUOBJ.move(TABLEOBJ[1, row]) then debug; end;
        exitLoop;
    end;
next;
____________________________________________________________
Alex Dilg, Consultant at SimPlan AG (www.SimPlan.de)
This post was good and/or helpful to you? Please provide some Kudos, thank you!

Betreff: Ispecting a Table

Builder
Builder
Thanks AlexD, it is working but the problem is it is working only for the first time. I have to repeat it in the cycle. if all the stations are occupied then the MU waits till any of the station is empty and then again it continues in the same cycle. what I can do to make it in a cycle ?

Betreff: Ispecting a Table

Builder
Builder
I figured it out. it was because of exit control. could you please also help me with similar thing. In a second table i have written the remainingproctime of the same stations and the parts toes to the station with the minimum remaining proc time when all the station is occupied, what method i can use to find the minimum time written in the ydim of the table ?

Betreff: Ispecting a Table

Gears Phenom Gears Phenom
Gears Phenom

Hello

 

Assuming the values are within the table as you said then the following should work.

 

var lowestTime: Time := -1
var tableRow: Integer := -1

for var row := 1 to tableObj.YDim
	if row = 1 OR tableObj[2, row] < lowestTime
		lowestTime := tableObj[2, row]
		tableRow := row
	end
next

At the end 'tableRow' will point to the row in the table with the lowest time and 'lowestTime' will tell you what that time is.

 

JamesM