DELAY
Delay the action between two blocks. Params: ip_address : TextBlob The IP address of the robot arm. time : float The time of delay in seconds. Returns: out : TextBlob The IP address of the robot arm.
Python Code
from flojoy import flojoy, TextBlob
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: TextBlob,
time: float,
) -> TextBlob:
"""
Delay the action between two blocks.
Parameters
----------
Parameters
----------
ip_address: TextBlob
The IP address of the robot arm.
time: float
The time of delay in seconds.
Returns
-------
TextBlob
The IP address of the robot arm.
"""
robot = query_for_handle(ip_address)
robot.Delay(time)
robot.WaitIdle()
return ip_address
Example
Having problems with this example app? Join our Discord community and we will help you out!
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.