Output only the data that meets certain conditions

This section describes how to output only the data that meets the conditions from among the data acquired from the equipment.

This process outputs results such as the following:

Example: when the condition is "if the input value is 30 or more, a value is output"

  • If the input value is "31", a value is output.

  • If the input value is "30", a value is output.

  • If the input value is "29", a value is not output.

Description of the processing

Only the data acquired from the equipment that meets the conditions is output to the subsequent operation.

In the following example, if the CPU usage rate (percent_overall) acquired by the Get OS resources operation is 30 or more, the CPU usage rate is output to the subsequent operation.

Key features

If Loop

This logic loops and outputs the items that match the conditions.

It can be set from Loop > Conditional loop > If Loop of the tool palette.

Greater than or equal

This logic determines whether the upper input number is greater than or equal to the lower input number.

It can be set from Condition > Number > Greater than or equal of the tool palette.

Numeric constant (integer)

This logic outputs a numeric constant (integer).

It can be set from Number > Basic > Numeric constant (integer) of the tool palette.

Operation procedure

This section describes an example on how to set a condition to output a value if the input value is "30" or more.

1. Create a script.

For information about how to create a script, refer to First Step Guide.

The descriptions in this procedure are based on the following scripts:

2. On the script canvas, double-click mapping_1.

The Mapper editor is displayed.

3. Drag and drop the following logics from the tool palette onto the Mapper editor:

  • Number > Basic > Numeric constant (integer) (to specify the numerical value to determine the condition)

  • Condition > Number > Greater than or equal (to perform a determination)

  • Loop > Conditional loop > If Loop (to perform an extraction according to the conditions)

The logics are placed on the Mapper editor.

4. Enter the property of the placed logic.

  1. Double-click the Numeric constant (integer) logic.

    The Numeric constant (integer) Logic Property dialog box is displayed.

  2. Enter "30" in Number (integer).

  3. If necessary, also enter a comment in Comment and click Finish.

  4. If necessary, double-click the Greater than or equal logic and If Loop logic, enter a comment in Comment, and click Finish.

    • For the Greater than or equal Logic Property dialog box

    • For the If Loop Logic Property dialog box

5. Drag and drop the root element of the input source onto the If Loop logic (first input handler) and the If Loop logic onto the root element of the output destination.

The mapping link (dashed line) from the input source to the output destination via the If Loop logic is displayed.

6. Drag and drop the input numerical value onto the Greater than or equal logic.

The mapping link to the Greater than or equal logic is displayed.

7. Drag and drop the Numeric constant (integer) logic onto the Greater than or equal logic.

The mapping link from the Numeric constant (integer) logic to the Greater than or equal logic is displayed.

8. Drag and drop the Greater than or equal logic onto the If Loop logic (second input handler).

The mapping link from the Greater than or equal logic to the If Loop logic (second input handler) is displayed.

9. Drag and drop the value (the input numerical value) that you want to output to the subsequent operation if it meets the conditions onto the output destination node (or another logic).

The mapping link from percent_overall of the input source to element_1 of the output destination is displayed in this example.

10. Save the script.

For information about how to save a script, refer to First Step Guide.