Hi all !
I’m trying to design a conveyor that would speed up a part on a signal input, here’s what it looks like :
I tried to modify the conveyor path speed, wich works fine, but it does not seem that it takes path acceleration/deceleration value.
I saw in this post that it is possible to modify the property pathVelocity & patAcceleration of a component.
I tried that, but nothing really happens visually.
Additionnally, i’d like to be able to stop my conveyor on a signal input taking the acceleration into account.
Do you have any advice ?
Hereunder the code I tried :
from vcScript import *
comp = getComponent()
app = getApplication()
sim = app.Simulation
path = comp.findBehaviour(‘OneWayPath’)
SignalIn = comp.findBehaviour(“SignalIn”)
SignalFullOn = comp.findBehaviour(“SignalFullOn”)
SignalComponent = comp.findBehaviour(“ComponentSignal”)
def OnSignal (signal):
triggerCondition(lambda: getTrigger() == SignalIn and SignalIn.Value == True) skid = path.Component path.Capacity = 1 skid = path.Component print "A= ", skid.PathAcceleration, '\n' print "D= ", skid.PathDeceleration print "V= ", skid.PathVelocity triggerCondition(lambda: getTrigger() == SignalFullOn and SignalIn.Value == True) #skid.PathVelocity = 800 path.Speed = 300