Voltage Threshold Parameters - Auto Stow on Voltage Change

Bravo 5 and 7 function manipulators have the ability to automatically stow and disable themselves when a voltage change is detected.

Note

This feature only is available for Bravo 5 or 7 Function Manipulators. Requires TX2 version 0.1.9 and 708 version 0.3.4 or above.

If enabled, upon being within a voltage margin for a set period of time the arm will automatically move to a set stow position.

The stow position is configured as the set position preset for Position Preset 0. For more information on Position Presets see the Reach System Communication Protocol Document in Documentation.

Usage

Use Packet VOLTAGE_THRESHOLD_PARAMETERS (0x99) to configure the settings.

The packet consists of 4 floats.

Enabled: Set to 0 to disable, 1 to enable

Voltage Min (V): Minimum Voltage to trigger the auto-stow.

Voltage Max (V): Maximum Voltage to trigger the auto-stow.

Time (seconds): Time required in the voltage margin to trigger the auto-stow.

Send and Save this packet to the 708 (Device ID: 0x0D).

Example

To set the parameters

import time
from bplprotocol import BPLProtocol, PacketID, PacketReader
import socket

MANIPULATOR_IP_ADDRESS = "192.168.2.4"
MANIPULATOR_PORT = 6789

if __name__ == '__main__':

    manipulator_address = (MANIPULATOR_IP_ADDRESS, MANIPULATOR_PORT)
    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    sock.settimeout(0)

    enabled = 1.0
    v_min = 20.0  # V
    v_max = 27.0  # V
    thresh_time = 3.0  # seconds

    # To Send the voltage threshold parameters to 708 (0x0D)

    voltage_threshold_packet = \
        BPLProtocol.encode_packet(0x0D, PacketID.VOLTAGE_THRESHOLD_PARAMETERS, BPLProtocol.encode_floats([enabled, v_min, v_max, thresh_time]))

    sock.sendto(voltage_threshold_packet, manipulator_address)

To ensure that they are saved after a reboot


    time.sleep(0.5)

    # Save the parameters
    # Set the device to factory Mode
    set_factory_mode = BPLProtocol.encode_packet(0x0D, PacketID.MODE, bytes([8]))
    sock.sendto(set_factory_mode, manipulator_address)

    save_packet = BPLProtocol.encode_packet(0x0D, PacketID.SAVE, bytes([0]))
    sock.sendto(save_packet, manipulator_address)

    time.sleep(1.5)
    set_standby_mode = BPLProtocol.encode_packet(0x0D, PacketID.MODE, bytes([0]))
    sock.sendto(set_standby_mode, manipulator_address)