Cancel
Showing results for 
Search instead for 
Did you mean: 

Evaluate if Buffer position 1 (load point) is empty

Pioneer
Pioneer

I need to determine if Position 1 in a buffer is empty.  Using the help file for 'empty' I read that for objects with more than 1 station, you can use this method but with the [Postion] included in the path.  Such as 'buffer[1].empty'. However, This is not working.  I continue to get the error "Index is out fo range". 

 

How do determine if a postion in a buffer is 'empty' - in  particular positon 1 (the load point)?

 

 

2 REPLIES

Re: Evaluate if Buffer position 1 (load point) is empty

Genius
Genius

A 'Buffer' object only operates on one of the following two strategies: Queue(FIFO) and Stack(LIFO). This means that parts keep moving towards the exit of the object as a part leaves and you cannot address invidual places.

 

You can, however, do this when you use a 'PlaceBuffer' object instead of a 'Buffer'.

 

 P.S. if you only want to do this to know if the buffer is ready to accept a part or not, use 

if myBuffer.EntranceOpen and myBuffer.EntranceFree
        @.move
end

 

P.P.S. For buffers, you can also check the attibute 'full'. If this is 'false', the first position is the first one to get vacant as soon as a part leaves the buffer.

(if myBuffer.full = false)

 

Re: Evaluate if Buffer position 1 (load point) is empty

Pioneer
Pioneer

EntranceOpen and EntranceFree are the key.  Unfortunately they are not watchable.  However, this is usefull.  However, The Buffer.Full attribute is watchable, so I will use that for buffers.  Thanks!