Skip to content

DELAY

Download Flojoy Studio to try this app
Delay the action between two blocks. Params: ip_address : String The IP address of the robot arm. time : float The time of delay in seconds. Returns: out : String The IP address of the robot arm.
Python Code
from flojoy import flojoy, String
from PYTHON.utils.mecademic_state.mecademic_state import query_for_handle
from PYTHON.utils.mecademic_state.mecademic_helpers import safe_robot_operation


@safe_robot_operation
@flojoy(deps={"mecademicpy": "1.4.0"})
def DELAY(
    ip_address: String,
    time: float,
) -> String:
    """
    Delay the action between two blocks.
    Parameters
    ----------
    Parameters
    ----------
    ip_address: String
        The IP address of the robot arm.

    time: float
        The time of delay in seconds.

    Returns
    -------
    String
        The IP address of the robot arm.

    """
    robot = query_for_handle(ip_address)
    robot.Delay(time)
    robot.WaitIdle()
    return ip_address

Find this Flojoy Block on GitHub

Example App

Having problems with this example app? Join our Discord community and we will help you out!
React Flow mini map

In this example, the DELAY node introduces a pause in the robot arm’s operation for a specified duration.

The node takes in the time for the delay in seconds.

After initiating the delay, the node waits for the robot arm to become idle before proceeding.

The DELAY node is useful in workflows where you need to introduce a pause between operations, such as waiting for an external sensor to trigger or allowing time for a mechanical process to complete.