I wanted to make a logic where the conveyor only send products to the warehouse shelf when warehouse shelf has only 5 or less products only. Other time conveyor will not work. How can I set this logic to Conveyor or Warehouse shelf?
You could set a static value by going to modeling tab → behaviors → ComponentContainer → change the value of ‘Capacity’ (e.g. to 5)
Or do the products come in batches (and you need to be able to store more than 5)?
Thank you for the response.
My issue is feeder may create products continuously but conveyor just send these products to the warehouse shelf when its stock come down to e.g. 5 or less/ 10 or less.
Or
Firstly, conveyor will fullfil the Shelf with maximum capacity then whenever the stock comes down to e.g. 5 or less/ 10 or less then conveyor will send the products again to warehouse at my desire.
Thanks in advance for your cooperatiob.
If you are using VC 5.0 or newer, you could use the newly added property ComponentCount in the warehouse shelf’s ComponentContainer.
- Add a Get Property statement for that property before the TransportOut statement in the conveyor’s end-of-line process.
- Use a Wait Property Condition statement for that property before the TransportOut statement with condition <5
But unfortunately I am using 4.1 and there is no way to use 5 bcz I am a student and using what my institution gave.
Sorry, I missed that.
I also had a ready-made example for 4.10 users. You have Premium OLP 4.10 in the original post screenshot, so you have access to Modeling tab.
Add this Python script in the warehouse shelf:
from vcScript import *
def on_transition(part, arriveleave):
comp.getProperty('ComponentCount').Value = cont.ComponentCount
comp = getComponent()
cont = comp.findBehaviour('ComponentContainer')
cont.OnTransition = on_transition
compcount = comp.getProperty('ComponentCount')
if not compcount:
compcount = comp.createProperty(VC_INTEGER, 'ComponentCount')
compcount.ChangeOnRebuild = False # performance optimization
def OnReset():
compcount.Value = 0
def OnStart():
compcount.Value = 0
Then you have a property to reflect the container’s built-in component count value in the warehouse shelf component, and it updates whenever the count might change.
Thank you so much. It’s really helpful.

