- 01/11/2019 at 15:54 #18301
I’m trying to create a Boolean signal sensor that detects a component (an open box in this instance fitted with a Works Process component) when it passes it on a conveyor and stops the component.
I need the sensor to trigger a ‘pick’ task to place items on the component from a separate Works Process component next to the conveyor. When this task is done, I need the component to start moving on the conveyor again to the next spot and so on.
My current code:
comp = getComponent()
sensor = comp.findBehaviour(“ComponentPathSensor”)
if signal == sensor.ComponentSignal:
part = signal.Value
I’m getting the component and the behavior of the sensor on the path I’ve named “MainPath” and using OnSignal to stop the component’s movement. I assume I need to expand this code to include my ‘pick’ task.
Are there more relevant alternatives for connecting boolean signal and component signal to the ComponentPathSensor and does my current code even allow for enabling a task to be performed after stopping the component and the use of ‘startMovement’ to make the component move again?0
You must be logged in to reply to this topic.