RobotStudio event

SmartComponent: Text based logic component

Pavel Riabichev
edited September 2016 in RobotStudio
Hi all!

Try my new SmartComponent "LogicExpressionComparer" which allows you to build some text-based logic and evaluate SC properties.

Description:

Properties:
IF (String) - Evaluates boolean and logic expressions. 
Supports: Parantheses, AND, OR, XOR, <=,   >=   ==,   !=,   >,   <
Numeric properties are automatically added for other identifiers.

Only evaluate math when IF is true (Boolean)
Math Expression (String) - Expression to evaluate.
Supports +, -, *, /, % (reminder), ^ (power), sin, cos, tan, asin, acos, atan, atan2, sqrt, abs, pi.
Numeric properties are automatically added for other identifiers.

Result IF (String) - Contains the result of the evaluation (true/false)
Result Math Expression (Double) - Contains the result of the evaluation.

Outputs:
Execute IF True (Digital) - Pulses high when IF evaluates true.


Example:


It can be found in RobotApps or RobotStudio add-ins tab.
https://robotapps.robotstudio.com/Details.aspx?fileId=3c75eafe-ac60-4922-9db6-48b474ced943

(16-08-01) uploaded a new version LogicExpressionComparer_v2 where custom properties may not start with a number and may not have the same name as the standard properties. Fixed a bug with parantheses and changed some names.
Added an output signal which will stay set as long as IF is TRUE.

If you have any suggestions for improvments or found any bugs, you may report them in this thread.

/Pavel


Post edited by Pavel Riabichev on

Comments

  • Hello Pavel,

    You have created a great smart component but I'm having a slight issue. when using your smart component, robotstudio crashes and becomes non responding. is this a known issue with your smart component? 

    Kind regards
  • Hello, No this is not anything I've experienced or heard of. Is there a special situation when this is happening, do you have a p&g that you could send where it is crashing?
    /Pavel

  • Hi, I experienced the same problem. It happens when I change the conditional expression (IF). I use multiple of your components. If you want, I can send you an example project.