Hello, I apologize if this has already been covered, or if it is a really simple solution. I am very new to Simtalk and programming in general.
I am trying to model a prestop for a lift and transfer on a conveyor. I am using a combination of two lines, a converter, and a method to do this. The first Line is the input line with the "Prestop" at the end. (Modeled by the exit behaviour) The second line is a small distance of conveyor between the prestop and the lift and transfer, and the converter is the lift and transfer.
My thought was using this code:
if LT74.occupied = true or Line5.occupied = true then
Line.ExitLocked := true
Line.ExitLocked := false
with LT74 being the converter, Line5 being the second intermediate line, and Line being the input line; I could have the MU's be stopped at the end of the input line anytime there is an Mu on the intermediate line or the converter.
However, this is not working. Anytime I run the simulation all the Mu's get stuck at the end of the input line like they should when the intermediate line or converter are occupied, but the neither object is occupied. I even ran a test method to print the occupied status of both just to check.
Please help, it is probably something simple I'm missing.
Solved! Go to Solution.
Ok that worked, but I have another problem now. I actually changed your code to:
waituntil LT74.occupied = false and Line5.occupied = false prio 1
I did this because it was letting multiple MU's through and I only want one at a time.
My new problem is that is it works, but after the first MU goes through the converter all consecutive MU's pause at the intermediate line for somewhere between 5 and 10 seconds before moving on to the converter. I can't find any reason for this.
I just tried that, and I am still having the same problem. I tried switching both to .numMU just to check and it is still pausing at the end of the intermediate line.