Skip to content

ACTIVATE

The ACTIVATE node activates the robot arm.Inputs ------ ip_address: TextBlob The IP address of the robot arm. Parameters ------ simulator Whether to activate the simulator or not. Defaults to False.Params:Returns:out : ipThe IP address of the robot arm.
Python Code
from flojoy import flojoy, TextBlob
from PYTHON.utils.mecademic_state.mecademic_state import query_for_handle


@flojoy(deps={"mecademicpy": "1.4.0"})
def ACTIVATE(ip_address: TextBlob, simulator: bool = False) -> TextBlob:
    """
    The ACTIVATE node activates the robot arm.

    Inputs
    ------
    ip_address: TextBlob
        The IP address of the robot arm.

    Parameters
    ------
    simulator
        Whether to activate the simulator or not. Defaults to False.

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

    """
    handle = query_for_handle(ip_address)
    if simulator:
        handle.ActivateSim()
    else:
        handle.ActivateRobot()
    handle.WaitActivated()
    return ip_address

Find this Flojoy Block on GitHub

Example

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

In this example, the ACTIVATE node is responsible for activating the MECADEMIC MECA500 robot arm.

The node takes in the IP address of the robot arm and an optional parameter to specify if the simulator should be activated instead of the actual robot arm.

After activation, the node returns the same IP address as an acknowledgment that the robot arm is now active.

The ACTIVATE node is often the first node in a flow, ensuring that the robot arm is ready for subsequent operations.