DELAY
The DELAY node delays the action between two nodes.Params:ip_address : TextBlobThe IP address of the robot arm.time : floatThe time of delay in seconds.Returns:ip_address : TextBlobThe IP address of the robot arm.
Python Code
from flojoy import TextBlob, flojoy
from PYTHON.utils.mecademic_state.mecademic_state import query_for_handle
@flojoy(deps={"mecademicpy": "1.4.0"})
def DELAY(
ip_address: TextBlob,
time: float,
) -> TextBlob:
"""
The DELAY node delays the action between two nodes.
Parameters
----------
ip_address : TextBlob
The IP address of the robot arm.
time : float
The time of delay in seconds.
Returns
-------
ip_address : TextBlob
The IP address of the robot arm.
"""
robot = query_for_handle(ip_address)
robot.Delay(time)
robot.WaitIdle()
return ip_address
Example
Having problem 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.