"Not" Inversion Version 3 (Net)

Action group: Operators


Description

A logical negation operator that returns a value opposite to the value of the operand.

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
Boolean operandValue of boolean operandRobin.BooleantrueYes
Results
ResultOperand negation resultRobin.Booleantrue

Special conditions of use

None.

Example of use 

Task

There is a "Logical variable 1" with value = false. It is required to return the opposite value of Logical variable 1 (true).  In the dialog box output the message - true (the result of the variable true).  

Solution

Use the actions "Inversion", "If", "Show message". 

Implementation

  1. Assemble a robot scheme consisting of actions: 


  2. Create a variable with type logical "Logical variable 3" to record the result of the "Inversion" action into it. 
  3. Move the "Inversion" action to the workspace and set its parameters. 
  4. Move the "If" action to the workspace and set the action parameter to "Logical variable 3". 
  5. In the "True" branch, add the "Show message" action and set its parameters.
  6. In the "False" branch, add the "Show message" action and set its parameters.
  7. Start the robot using the "Start" button and the top panel. 

Result  

The robot completed successfully


A dialog box with the result is displayed. 

  • Нет меток