How to use Boolean table rule of RoutingRule

HI,

I want to let a robot send Boolean signal to control a Lifter.I tried to create Boolean Type of Behaviors of Properties ,assigned value or connect to the robot,but it didn’t work.When i sent a part to the Lifter , it just blocked.

Hello Yelan,
Have you found the answer to the question? how can we do this ?
or
Does anyone know anything about this question?

Hi,

The Variable for routing rule only works for properties, and not with signals. You will need to add a property and a script that updates the property value to match a signal value. Example:

from vcScript import *

comp = getComponent()

def OnSignal( signal ):
  if signal == boolean_signal:
    boolean_property.Value = boolean_signal.Value

def OnRun():
  boolean_property.Value = boolean_signal.Value


boolean_signal = comp.getBehaviour('BooleanSignal')
boolean_property = comp.getProperty('Boolean_1')

You also need to change routing rule property RuleComponent from Processed to Owner. After this, the routing rule looks up the owner component properties instead of the part being processed.

1 Like