Expression Controller: Sensors

Expression Controller: Simple Sensor Expression
  • A simple sensor expression returns True or False
     
  • Sensor expression = True:
    • One Positive pulse is sent to the attached actuator(s)
  • Sensor expression = False:
    • One Negative pulse is sent to the attached actuator(s)
Examples:
  • Expression Controller connected to a sensor named SKey
    • SKey = True
       
    • SKey = False
  • Expression Controller connected to a sensor named SKey and a sensor named WKey
    • (SKey = True) and (WKey = True)
       
    • (SKey = True) or (WKey = True)
       
    • (SKey = True) and not (WKey = False)
Operators:
  • Variables:
    • Boolean:
      • True or False
    • Sensor names
  • Math Operators:
    • Equal to:
      • = or ==
    • Not Equal to:
      • !=
  • Boolean Operators:
    • And/AND/and
       
    • Not/NOT/not
       
    • Or/OR/or
       
    • ()
Note:
  • A sensor name used in an Expression can't contain spaces
     
  • The sensor has to be connected to the Expression Controller
Expression Controller: Conditional Sensor Expression:
  • if (Expression, ExpressionTrue, ExpressionFalse)
     
  • Expression
    • The expression to be evaluated.
  • ExpressionTrue: 
    • If the expression is True, the type of pulse you want sent to actuator
       
    • True = Positive pulse
       
    • False = Negative pulse
  • ExpressionFalse: 
    • If the expression is False, the type of pulse you want sent to actuator
       
    • True = Positive pulse
       
    • False = Negative pulse
Examples:
  • Expression Controller connected to a sensor named SKey
    • if(SKey = True, True, False)
       
    • if(SKey != True, False, True)
  • Expression Controller connected to a sensor named SKey and a sensor named WKey
    • if (SKey = True and WKey = True, True, False)
       
    • if (SKey = True or WKey = True, False, True)
       
    • if (SKey = True and not WKey = False, True, False)
Operators:
  • Variables:
    • Boolean:
      • True or False
    • Sensor names
  • Math Operators:
    • Equal to:
      • = or ==
    • Not Equal to:
      • !=
  • Boolean Operators:
    • And/AND/and
       
    • Not/NOT/not
       
    • Or/OR/or
       
    • ()
Note:
  • A sensor name used in an Expression can't contain spaces
     
  • The sensor has to be connected to the Expression Controller
Expression:
  • The type of Controller
Name:
  • The name you give the Controller
State Mask Group:
  • The State Mask group the controller belongs to
     
  • A controller belongs to one and only one State Mask group
     
  • Sensors and actuators connected to the controller belong to the same State Mask group as the controller
Priority:
  • A controller with Priority enabled is executed before controllers that don't have Priority enabled
Checkbox:
  • Enabled:
    • Controller is turned on
  • Disabled:
    • Controller is turned off
Note:
  • A controller can be connected to more than one sensor.
     
  • A controller can be connected to more than one actuator.
     
  • A controller belongs to one and only one State Mask group.
     
  • Sensors and actuators connected to the controller belong to the same State Mask group as the controller.